Unlike tend, ltend does nothing silently when asked to tend zero
commodities. This may leave the player guessing why the command did
nothing. Report the reason and fail the command, just like tend does.
While there, improve the prompt to match tend's.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
We silently ignore foreign ships and land units. This may leave the
player guessing why the command did nothing. Report explicitly named
ones like this
You don't own ship #160!
except for tend's target ships. Nice reporting is a bit more involved
there, because you can tend to foreign target ships as long as they're
friendly. Left for later.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Land units not on the tender are silently ignored. This may leave the
player guessing why the command did nothing. Reporting them all would
be annoying; I just changed tend to report only explicitly named ones.
Make ltend behave the same.
This does add a related annoyance: ltend can complain "not on ship"
when tending explicitly selected land units from multiple ships.
Tolerable.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Exercise load, unload, lload, lunload, tend, and ltend.
Notable coverage gaps:
* Effect on land unit fortification
* Effect on mission and retreat orders
* Ships, land units and planes on sale (option MARKET 1)
* Transmission of plague (option NO_PLAGUE 0)
* Land units loading and unloading civilians (need a custom land unit
type capable of carrying civilians)
* load refusing to load x-light planes (need a custom ship type that
can carry helo but not x-light)
* load and lload refusing to load land units carrying land units, and
lload refusing to load land units onto land units that are being
carried (need a custom non-heavy land unit type that can carry land
units)
* tend refusing to tend non-light land units to non-supply ships, or
to supply ships without room (need custom a non-light assault land
unit type)
This test exposes bugs. They're marked "BUG:" in the test input.
There are also oddities marked "odd:", and usability issues marked
"usability:".
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>