(tend_land): Allow spy units to be tended to and from sub
with no land unit carrying capability. Closes #1313537.
This commit is contained in:
parent
fdec6a8aae
commit
e8746e9af0
1 changed files with 9 additions and 1 deletions
|
@ -242,7 +242,15 @@ tend_land(struct shpstr *tenderp, s_char *units)
|
|||
count_units(&target);
|
||||
getship(target.shp_uid, &target);
|
||||
|
||||
if (target.shp_nland >= mchr[(int)target.shp_type].m_nland) {
|
||||
if ((mchr[(int)target.shp_type].m_flags & M_SUB) &&
|
||||
(lchr[(int)land.lnd_type].l_flags & L_SPY) &&
|
||||
!mchr[(int)target.shp_type].m_nland) {
|
||||
if (target.shp_nland > 1) {
|
||||
pr("%s doesn't have room for more than two spy units!\n",
|
||||
prship(&target));
|
||||
continue;
|
||||
}
|
||||
} else if (target.shp_nland >= mchr[(int)target.shp_type].m_nland) {
|
||||
if (mchr[(int)target.shp_type].m_nland)
|
||||
pr("%s doesn't have room for any more land units!\n",
|
||||
prship(&target));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue