Callers changed.
(drop): Do not disclose anything about target sector before planes
actually got there, unless the target sector is owned by the player or
an ally. This plugs a major loophole. Consequently, the command can
no longer always refuse to attempt to drop stuff where it won't work.
Instead, the planes fly out to try. Other plane commands (para, bomb)
behave exactly the same. Also closes#909859.
(pln_dropoff): Cope with planes trying to drop where they can't.
(drop): Refuse to drop civilians into allied sectors, for consistency
with other means to move around stuff.
(fly, reco): Use it to prevent flying to a carrier that doesn't have
space for the planes. Previously, planes that did this were
teleported home, which could be abused.
(fly): Fail if pln_sel() comes up empty, just like the other commands
to fly planes.
moved. Without that, loyalty computation divided by zero and crashed
when moving civilians to a sector without civilians. Found and
debugged by Jeff Cotter. Closes#1005005.
trailing junk since the previous rev. That's too strict. Silently
ignore trailing junk as long as it starts with whitespace. That's
somewhat lax, but will do for now. Closes#982018.
type literals, unless type inference rejects the selector. This
doesn't work for NSC_TYPE selectors: `?des=n' is interpreted as
`?des=newdes'. Prefer type literal to NSC_TYPE selector. Closes
#982021.
For now, only fairland.c is "fixed". We'll have to patch the random
calls in the server to use the RANDOM and SRANDOM macros to make
things completely reproducible.
and upgrade code.
(build_ship, build_plane, build_land, supgr, pupgr, lupgr): Use them.
Upgrading planes no longer sets plane range to maximum.
(pupgr): Just clear the mission, don't bother to clear op area.
(doship, doplane, dounit): Editing tech now updates stats, like an
upgrade command. Proper range checking.
(warn_deprecated): New.
(pr_ship, doship): Deprecate key 'D'.
(pr_land, dounit): Deprecate key 'A' and 'D'.
sector. Otherwise, clearing MOVE_IN_PROGRESS can abandon the start
sector when it shouldn't, leading to bogus records in the `lost' file.
Closes#931184.
would destroy the edited unit. Deities can still delete a units by
setting the owner to zero. Efficiency values less than 10 used to
delete the unit without informing the owner. Ship efficiency values
between 10 and 20 did inform the owner, but didn't give him any clue
about the reason.
NUK_BLD_WORK): New, to encapsulate the formula in one place.
(SCT_MINEFF): New. Use it instead of literal 20.
(buil): Use CANT_HAPPEN() for internal error.
(build_ship, build_land, build_bridge, build_nuke, build_plane,
build_tower): Simplify avail calculation.
(lupgr, supgr, pupgr): Charge 15% of total build avail instead of an
undocumented amount computed from build lcm and hcm.
(build_ship, build_land, build_bridge, build_nuke, build_plane,
build_tower, lupgr, supgr, pupgr): Fix reporting of required avail
when there's not enough. Closes#942823.
(lupgr, supgr, pupgr): Code printed cost rounded down, but required
and charged unrounded cost. Confusing. Round cost down, like the
build command. Closes#942811.
(UPGR_COST, UPGR_EFF, lupgr, supgr, pupgr): New UPGR_COST, UPGR_COST replace
literal values.
(show_bridge, show_tower): Don't claim bridge building requires
`workers' (whatever that is), since it doesn't.
even when option ROLLOVER_AVAIL was off. Previous revision correctly
limits rollover to rollover_avail_max, but missed the limiting after
rollover. Fix.
production code better, and fixes a small inaccuracy introduced in
rev. 1.10.
(prod): Production is limited to 999 units. Fix for production
efficiency > 1, e.g. agribusiness.
(prod): Raw material consumption was incorrectly limited to 999.
(prod): Production backlog was handled incorrectly; it claimed `will
make' lots, `max' less, which is backwards.