tend: Refuse to give away civilians more nicely

Foreign target ships are silently ignored when tending civilians.
This may leave the player guessing why the command did nothing.
Report the reason similar to load does:

    Your civilians refuse to board cs   cargo ship (#162)!

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2017-09-15 16:47:51 +02:00
parent 2a8a6a5933
commit a0dc5cbf16
2 changed files with 9 additions and 1 deletions

View file

@ -227,8 +227,12 @@ tend_comm_to(struct shpstr *from, struct ichrstr *ip, int amt,
int can_take = to_max - to->shp_item[ip->i_uid];
int transfer;
if (ip->i_uid == I_CIVIL && from->shp_own != to->shp_own)
if (ip->i_uid == I_CIVIL && from->shp_own != to->shp_own) {
pr("%s civilians refuse to board %s!\n",
from->shp_own == player->cnum ? "Your" : "Foreign",
prship(to));
return 0;
}
if (!can_give) {
pr("No %s on %s\n", ip->i_name, prship(from));
return 0;