tend: Suppress "not on ship" unless land unit is selected by UID

The quickest way to tend all land units on a ship is to select all
land units with '*'.  However, tend then prints a "not on ship"
message for every land unit not on the tender, as the load-tend test
demonstrates.  Annoying.  Suppress this message unless the land unit
was explictly selected by UID.  Similar to how load and unload
suppress messages, only they get the condition wrong (to be fixed
soon).

A related annoyance remains, also visible in the load-tend test: tend
can still complain "not on ship" many times when tending explicitly
selected land units from multiple ships.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2017-09-12 09:32:40 +02:00
parent 3064731af4
commit 15a43a780a
3 changed files with 3 additions and 123 deletions

View file

@ -217,7 +217,8 @@ tend_land(struct shpstr *tenderp, char *units)
if (!player->owner)
continue;
if (land.lnd_ship != tenderp->shp_uid) {
pr("%s is not on %s!\n", prland(&land), prship(tenderp));
if (lni.sel == NS_LIST)
pr("%s is not on %s!\n", prland(&land), prship(tenderp));
continue;
}
if (!(lchr[(int)land.lnd_type].l_flags & L_ASSAULT)) {