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:
Markus Armbruster 2013-01-20 17:38:06 +01:00
parent 9aaf609359
commit 4c1866285b
2 changed files with 6 additions and 0 deletions

View file

@ -89,6 +89,10 @@ give(void)
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,
xyas(sect.sct_x, sect.sct_y, player->cnum));
}