offset and index. This is for the new dumps; conditions can't use it,
yet.
(nstr_comp_val): Zero index.
(nstr_exec_val): Implement index.
(nstr_exec_val): Simplify coercion to WANT.
extended (beyond due date) loan time. At the due date, or after a
last payment made at the due date, durations were zero in fina() and
unpredictable elsewhere. With luck, debtors could abuse this to repay
loans cheap (they couldn't gain cash, though), sharks to purchase
loans cheap, and creditors to collect excessively.
caller had to zero some. Caller changed.
(goodsect): Remove; use sct_typematch() instead.
(change_prio): New.
(budg): Use it to replace ugly and confusing priority change code.
(budg): Use prexpense() for industries as well. Fixes cost output
alignment bug.
(budg): Use splur() & friends.
PRI_LBUILD): Turn macros into enumeration constants. Value
SCT_MAXDEF+1 was previously unused; use it.
(PRI_MAX): New; replacing the horrible SCT_MAXDEF+8.
(show_sect_build): Simply examine all sector types, don't skip the
first five. The code ignores them just fine.
(show_sect_build, show_sect_stats, show_sect_capab): Don't try to show
sector types beyond SCT_MAXDEF. The table has some empty extra slots,
for whatever reasons; no use examining them.
item types was removed some time ago. Simplify.
(VT_ITEM, VT_TYPE, V_MAX): Unused, remove.
(show_sect_capab): Properly use ichr[] member i_mnem to print item
characters.
Store only up to MAXPRCON constituents, not MAXCHRNV; code doesn't
fully support more than three anyway. Remove member p_nv, use item
type I_NONE for unused slots. Rename members p_vtype, p_vamt to
p_ctype, p_camt to avoid confusion with variable-style storage.
(pchr): Initializers adapted.
(nullify_objects, materials_cost, materials_charge, prod,
show_sect_capab, grind): Adapt, simplify where possible, protect
against bad item types in pchr[].
(MAXCHRNV): Unused, remove.
capacities to straight arrays. Users now subscript the array instead
of calling vl_find() or walking the variable data structure.
(mchr, lchr): Initializers adapted.
(vl_find): No longer used. Remove file.
(upd_ship): Oil and food production used special rules that didn't
match ordinary production and didn't make much sense. Made them
follow ordinary production rules. This puts uw and mil to work, and
makes ship tech and efficiency relevant to production. Closes#917461
and #955072.
ETUS is just the default for etu_per_update. Deities don't change
ETUS, they change etu_per_update by editing econfig. This nonsense
dates back at least to chainsaw 3.31, where it was just as broken as
now. Replace ETUS by 60 and simplify.
(upd_ship): Oil and food production used special rules that didn't
match ordinary production and didn't make much sense. Made them
follow ordinary production rules. This puts uw and mil to work, and
makes ship tech and efficiency relevant to production. Closes#917461
and #955072.
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.