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.
This commit is contained in:
Markus Armbruster 2009-02-14 09:58:44 +01:00
parent a302d7613e
commit 8fa4f6d507

View 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));
}