(lnd_fortify): New, factored out of fort().

(fort): Use it; no functional changes.
(is_engineer): Move to logical place, external linkage.
This commit is contained in:
Markus Armbruster 2004-01-28 09:31:22 +00:00
parent ab01edbe46
commit f7faeb6470
5 changed files with 67 additions and 52 deletions

View file

@ -96,3 +96,18 @@ has_units_with_mob(coord x, coord y, natid cn)
return 0;
}
int
is_engineer(int x, int y)
{
struct nstr_item ni;
struct lndstr land;
snxtitem_xy(&ni, EF_LAND, x, y);
while (nxtitem(&ni, (s_char *)&land)) {
if (lchr[(int)land.lnd_type].l_flags & L_ENGINEER)
return 1;
}
return 0;
}