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:
parent
2a8a6a5933
commit
a0dc5cbf16
2 changed files with 9 additions and 1 deletions
|
@ -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 can_take = to_max - to->shp_item[ip->i_uid];
|
||||||
int transfer;
|
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;
|
return 0;
|
||||||
|
}
|
||||||
if (!can_give) {
|
if (!can_give) {
|
||||||
pr("No %s on %s\n", ip->i_name, prship(from));
|
pr("No %s on %s\n", ip->i_name, prship(from));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -2173,6 +2173,8 @@
|
||||||
Play#1 input tend c 166 1 160/162/163/164
|
Play#1 input tend c 166 1 160/162/163/164
|
||||||
Play#1 command tend
|
Play#1 command tend
|
||||||
Play#1 output Play#1 1 You don't own ship #160!
|
Play#1 output Play#1 1 You don't own ship #160!
|
||||||
|
Play#1 output Play#1 1 Your civilians refuse to board cs cargo ship (#162)!
|
||||||
|
Play#1 output Play#1 1 Your civilians refuse to board cs cargo ship (#163)!
|
||||||
Play#1 output Play#1 1 You are not on friendly terms with the owner of ship #164!
|
Play#1 output Play#1 1 You are not on friendly terms with the owner of ship #164!
|
||||||
Play#1 output Play#1 1 0 total civilians transferred off of cs cargo ship (#166)
|
Play#1 output Play#1 1 0 total civilians transferred off of cs cargo ship (#166)
|
||||||
Play#1 output Play#1 6 0 409
|
Play#1 output Play#1 6 0 409
|
||||||
|
@ -2474,11 +2476,13 @@
|
||||||
Play#0 input tend c 160/164 1 166
|
Play#0 input tend c 160/164 1 166
|
||||||
Play#0 command tend
|
Play#0 command tend
|
||||||
Play#0 output Play#0 1 You don't own ship #160!
|
Play#0 output Play#0 1 You don't own ship #160!
|
||||||
|
Play#0 output Play#0 1 Foreign civilians refuse to board cs cargo ship (#166)!
|
||||||
Play#0 output Play#0 1 0 total civilians transferred off of cs cargo ship (#164)
|
Play#0 output Play#0 1 0 total civilians transferred off of cs cargo ship (#164)
|
||||||
Play#0 output Play#0 6 0 637
|
Play#0 output Play#0 6 0 637
|
||||||
Play#0 input tend c 166 1 160/164
|
Play#0 input tend c 166 1 160/164
|
||||||
Play#0 command tend
|
Play#0 command tend
|
||||||
Play#0 output Play#0 1 You don't own ship #160!
|
Play#0 output Play#0 1 You don't own ship #160!
|
||||||
|
Play#0 output Play#0 1 Foreign civilians refuse to board cs cargo ship (#164)!
|
||||||
Play#0 output Play#0 1 0 total civilians transferred off of cs cargo ship (#166)
|
Play#0 output Play#0 1 0 total civilians transferred off of cs cargo ship (#166)
|
||||||
Play#0 output Play#0 6 0 636
|
Play#0 output Play#0 6 0 636
|
||||||
Play#0 input tend land 163/164 313/314 166
|
Play#0 input tend land 163/164 313/314 166
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue