(tend_land): Fix to not let land units be tended that could not be
loaded.
This commit is contained in:
parent
59f7aee1f4
commit
251f552088
1 changed files with 9 additions and 0 deletions
|
@ -242,6 +242,15 @@ tend_land(struct shpstr *tenderp, char *units)
|
||||||
count_units(&target);
|
count_units(&target);
|
||||||
getship(target.shp_uid, &target);
|
getship(target.shp_uid, &target);
|
||||||
|
|
||||||
|
if ((!(lchr[(int)land.lnd_type].l_flags & L_LIGHT)) &&
|
||||||
|
(!((mchr[(int)target.shp_type].m_flags & M_SUPPLY) &&
|
||||||
|
(!(mchr[(int)target.shp_type].m_flags & M_SUB))))) {
|
||||||
|
pr("You can only load light units onto ships,\n"
|
||||||
|
"unless the ship is a non-sub supply ship\n"
|
||||||
|
"%s not tended\n", prland(&land));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ((mchr[(int)target.shp_type].m_flags & M_SUB) &&
|
if ((mchr[(int)target.shp_type].m_flags & M_SUB) &&
|
||||||
(lchr[(int)land.lnd_type].l_flags & L_SPY) &&
|
(lchr[(int)land.lnd_type].l_flags & L_SPY) &&
|
||||||
!mchr[(int)target.shp_type].m_nland) {
|
!mchr[(int)target.shp_type].m_nland) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue