From: Markus Armbruster Date: Sat, 23 Sep 2006 08:40:40 +0000 (+0000) Subject: (tend_land): Fix to not let land units be tended that could not be X-Git-Tag: v4.3.8~16 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=251f552088925091dc590adeee0c8055bb016086 (tend_land): Fix to not let land units be tended that could not be loaded. --- diff --git a/src/lib/commands/tend.c b/src/lib/commands/tend.c index 44fad8531..1136dab36 100644 --- a/src/lib/commands/tend.c +++ b/src/lib/commands/tend.c @@ -242,6 +242,15 @@ tend_land(struct shpstr *tenderp, char *units) count_units(&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) && (lchr[(int)land.lnd_type].l_flags & L_SPY) && !mchr[(int)target.shp_type].m_nland) {