]> git.pond.sub.org Git - empserver/commitdiff
Fix lmine's "out of" messages
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 14 Feb 2009 08:58:44 +0000 (09:58 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 17 Feb 2009 18:24:10 +0000 (19:24 +0100)
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.

src/lib/commands/mine.c

index 21937453dbf1dd9fb4431a1e59796cb6531a4d14..3e8601c17a708470e3e45e70410add294f382453 100644 (file)
@@ -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));
     }