From: Markus Armbruster Date: Sat, 14 Feb 2009 08:58:44 +0000 (+0100) Subject: Fix lmine's "out of" messages X-Git-Tag: v4.3.20~20 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=8fa4f6d5076cb5b847b1efd6094282bd552004f6 Fix lmine's "out of" messages Don't claim "now out of supply" when actually out of mobility. Don't claim "out of supply" when actually out of shells. A land unit is out of supply when out of shells, but not necessarily the other way round. --- diff --git a/src/lib/commands/mine.c b/src/lib/commands/mine.c index 21937453d..3e8601c17 100644 --- a/src/lib/commands/mine.c +++ b/src/lib/commands/mine.c @@ -159,15 +159,15 @@ landmine(void) pr("%s laid a total of %d mines in %s", prland(&land), total_mines_laid, xyas(sect.sct_x, sect.sct_y, land.lnd_own)); - if (!shells) - pr(" but is now out of supply\n"); + if (!land.lnd_item[I_SHELL]) + pr(" but is now out of shells\n"); else pr("\n"); } else pr("%s ran out of %s before it could finish the job\n" "Only %d mines were laid in %s\n", prland(&land), - land.lnd_mobil > 0 ? "supply" : "mobility", + land.lnd_mobil > 0 ? "shells" : "mobility", total_mines_laid, xyas(sect.sct_x, sect.sct_y, land.lnd_own)); }