fire: Clean up damage sanity check and printing of range
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 8 Feb 2015 11:45:52 +0000 (12:45 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:52 +0000 (08:20 +0100)
commit165fbed512d339cdd452c5dbed69c2950bc8d7f3
tree89caab2939411439fa8f7febeaa2285433c880da
parentee3b02c514b1410fa60f317d26a73ae813d2005c
fire: Clean up damage sanity check and printing of range

Repeated for ship, sector and land unit firing.  The latter prints
range only when the sanity check succeeds.

Factor out, changing ship and sector to behave like land unit firing.

When the sanity check fails, print "Jammed!" instead of "Klick!",
because "Klick!" suggests no shells.  Used to be printed exactly then,
but the condition first became impossible (Chainsaw), then generalized
to "can't fire for whatever reason" (commit 22c6fd8, v4.3.12).

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/mfir.c