give: Report number given when less than requested amount
Necessary to give the deity a chance to catch unexpected changes, e.g. a player moving away stuff right before a give command, leaving fewer items than the deity intends to take. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
9aaf609359
commit
4c1866285b
2 changed files with 6 additions and 0 deletions
|
@ -89,6 +89,10 @@ give(void)
|
||||||
xyas(sect.sct_x, sect.sct_y, sect.sct_own));
|
xyas(sect.sct_x, sect.sct_y, sect.sct_own));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (m - n != amt)
|
||||||
|
pr("Only %d %s in %s\n", abs(m - n),
|
||||||
|
m - n >= 0 ? "given" : "taken",
|
||||||
|
xyas(sect.sct_x, sect.sct_y, player->cnum));
|
||||||
pr("%d %s in %s\n", m, ip->i_name,
|
pr("%d %s in %s\n", m, ip->i_name,
|
||||||
xyas(sect.sct_x, sect.sct_y, player->cnum));
|
xyas(sect.sct_x, sect.sct_y, player->cnum));
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,6 +752,7 @@
|
||||||
Play#0 output Play#0 6 0 640
|
Play#0 output Play#0 6 0 640
|
||||||
Play#0 input give l 2,6 -2147483648
|
Play#0 input give l 2,6 -2147483648
|
||||||
Play#0 command give
|
Play#0 command give
|
||||||
|
Play#0 output Play#0 1 Only 0 given in 2,6
|
||||||
Play#0 output Play#0 1 0 light products in 2,6
|
Play#0 output Play#0 1 0 light products in 2,6
|
||||||
Play#0 output Play#0 6 0 640
|
Play#0 output Play#0 6 0 640
|
||||||
Play#0 input give c 4:8,6 1
|
Play#0 input give c 4:8,6 1
|
||||||
|
@ -762,6 +763,7 @@
|
||||||
Play#0 output Play#0 6 0 640
|
Play#0 output Play#0 6 0 640
|
||||||
Play#0 input give c 6,6 2147483647
|
Play#0 input give c 6,6 2147483647
|
||||||
Play#0 command give
|
Play#0 command give
|
||||||
|
Play#0 output Play#0 1 Only 9997 given in 6,6
|
||||||
Play#0 output Play#0 1 9999 civilians in 6,6
|
Play#0 output Play#0 1 9999 civilians in 6,6
|
||||||
Play#0 output Play#0 6 0 640
|
Play#0 output Play#0 6 0 640
|
||||||
Play#0 input give c 8,6 -1
|
Play#0 input give c 8,6 -1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue