]> git.pond.sub.org Git - empserver/log
empserver
19 years agoUpdate copyright notice. v4.2.18
Markus Armbruster [Tue, 7 Sep 2004 15:07:16 +0000 (15:07 +0000)]
Update copyright notice.

19 years agoFix incomplete comment.
Markus Armbruster [Tue, 7 Sep 2004 14:16:36 +0000 (14:16 +0000)]
Fix incomplete comment.

19 years agoUpdate for 4.2.18.
Markus Armbruster [Tue, 7 Sep 2004 14:16:24 +0000 (14:16 +0000)]
Update for 4.2.18.

19 years ago(info): `info' was not checking for all types of common files in
Ron Koenderink [Tue, 7 Sep 2004 14:04:19 +0000 (14:04 +0000)]
(info): `info' was not checking for all types of common files in
Windows, therefore could miss info files depending on the status
(archive, read-only).  Also changed the error message to user to
provide a more accurate description of the problem.  Closes #1018297.

19 years agoExplain roots of LWP.
Markus Armbruster [Tue, 7 Sep 2004 08:49:46 +0000 (08:49 +0000)]
Explain roots of LWP.

19 years agoUnused, remove.
Markus Armbruster [Tue, 7 Sep 2004 08:47:00 +0000 (08:47 +0000)]
Unused, remove.

19 years ago(tran_plane): Fix major, abusable bug: getsect() before move_ground(),
Markus Armbruster [Tue, 7 Sep 2004 06:34:08 +0000 (06:34 +0000)]
(tran_plane): Fix major, abusable bug: getsect() before move_ground(),
putsect() afterwards.  This allowed two cooperating countries to
duplicate items.

(tran_plane): Don't report interdiction damage twice.

(tran_plane): Simplify loop collecting planes.

19 years ago(news): Add a comment to explain why argument is ignored when HIDDEN
Markus Armbruster [Tue, 7 Sep 2004 06:16:23 +0000 (06:16 +0000)]
(news): Add a comment to explain why argument is ignored when HIDDEN
is on.

19 years ago(mchr_ca): Add missing entry for member `frnge'.
Markus Armbruster [Tue, 7 Sep 2004 06:12:15 +0000 (06:12 +0000)]
(mchr_ca): Add missing entry for member `frnge'.

(xdprval): Silence compiler warning.

19 years ago(NEWS_PERIOD, news_keep_days): Replace macro NEWS_PERIOD by new
Markus Armbruster [Sat, 4 Sep 2004 19:32:48 +0000 (19:32 +0000)]
(NEWS_PERIOD, news_keep_days): Replace macro NEWS_PERIOD by new
configuration key news_keep_days.

19 years ago(xdprval): Fix escaping of negative characters.
Markus Armbruster [Sat, 4 Sep 2004 13:11:02 +0000 (13:11 +0000)]
(xdprval): Fix escaping of negative characters.

19 years ago(xdprval): Escape the space character so that a line can be simply
Markus Armbruster [Sat, 4 Sep 2004 08:15:33 +0000 (08:15 +0000)]
(xdprval): Escape the space character so that a line can be simply
split into fields at space.

19 years ago(keymatch): Replace member km_func by km_type. Initializers adapted.
Markus Armbruster [Sat, 4 Sep 2004 08:07:51 +0000 (08:07 +0000)]
(keymatch): Replace member km_func by km_type.  Initializers adapted.
(emp_config, print_config): Cope with km_type.
(worldxset, intset, floatset, optstrset, doubleset, longset): Unused,
remove.

(emp_config): Fail if specified file can't be read or contains errors.
Used to succeed always, returning RET_OK.  RET_OK is not appropriate,
since this is not a command.  Return 0 on success, -1 on failure.
Callers ignore failure at the moment.  A missing or unreadable econfig
file used to be silently ignored.  It is still ignored, but no longer
silently.  It is questionable whether ignoring is wise, but that's
left for another day.

(emp_config): Improve diagnostic messages.

(set_option): Move diagnostics to caller.

(emp_config): Ignore leading whitespace in `#' comment lines.

(print_config): Simplify printing of km_comment.

(set_option): New parameter val, so it can set and clear options.
(delete_option): Remove.

(KM_ALLOC): Turn macro into enumeration constant.

(KM_INTERNAL): New.
(xdump, xdver): New version dump.

(keymatch, infodir, datadir, teldir, upfil, downfil, disablefil,
telfil, annfil, banfil, timestampfil, privname, privlog, update_times,
update_demandtimes, game_days, game_hours): Use plain char * instead
of s_char * for strings, void * for generic pointers.

19 years ago(xdprval): Fix for strings containing backslashes.
Markus Armbruster [Tue, 31 Aug 2004 17:53:34 +0000 (17:53 +0000)]
(xdprval): Fix for strings containing backslashes.

19 years ago(xdprval): Fix for strings with characters printed as escapes. Print
Markus Armbruster [Tue, 31 Aug 2004 17:45:45 +0000 (17:45 +0000)]
(xdprval): Fix for strings with characters printed as escapes.  Print
null pointer as `nil' to distinguish it from empty string.

19 years ago(hard_tech): Unused, remove.
Markus Armbruster [Mon, 30 Aug 2004 21:12:15 +0000 (21:12 +0000)]
(hard_tech): Unused, remove.
(configkeys): Fix km_flags of key anno_keep_days.

19 years agoUndo the previous revision (bad idea).
Markus Armbruster [Mon, 30 Aug 2004 20:28:15 +0000 (20:28 +0000)]
Undo the previous revision (bad idea).

19 years ago(EMPCF_COMMENT): New; for readability.
Markus Armbruster [Mon, 30 Aug 2004 17:41:39 +0000 (17:41 +0000)]
(EMPCF_COMMENT): New; for readability.

19 years ago(keymatch, configkeys): Move to from optlist.h to emp_config.c; static
Markus Armbruster [Mon, 30 Aug 2004 17:36:50 +0000 (17:36 +0000)]
(keymatch, configkeys): Move to from optlist.h to emp_config.c; static
linkage.

19 years ago(xdump): New options dump.
Markus Armbruster [Mon, 30 Aug 2004 16:49:58 +0000 (16:49 +0000)]
(xdump): New options dump.
(xdopt): New.
(xdhdr1): New, factored out of xdhdr().

19 years ago(ship_ca): Fix selector name's ca_len.
Markus Armbruster [Mon, 30 Aug 2004 16:20:05 +0000 (16:20 +0000)]
(ship_ca): Fix selector name's ca_len.
(xflds): Ignore ca_len for NSC_STRINGY.

19 years ago(pln_arm): Callers don't use parameter tech; remove it. Callers
Markus Armbruster [Mon, 30 Aug 2004 16:13:37 +0000 (16:13 +0000)]
(pln_arm): Callers don't use parameter tech; remove it.  Callers
changed.

19 years ago(ANNO_KEEP_DAYS, anno_keep_days): Replace macro ANNO_KEEP_DAYS by
Markus Armbruster [Sat, 28 Aug 2004 15:28:54 +0000 (15:28 +0000)]
(ANNO_KEEP_DAYS, anno_keep_days): Replace macro ANNO_KEEP_DAYS by
new configuration key.  Closes #780425.
(delete_old_announcements): Do nothing when anno_keep_days is
negative.

19 years ago(trad, set): Treat trade file slots with zero owner as unused, so that
Markus Armbruster [Sat, 28 Aug 2004 15:22:50 +0000 (15:22 +0000)]
(trad, set): Treat trade file slots with zero owner as unused, so that
freshly extended trade file makes sense.  When set() removes a lot,
simply zero the slot.

(set): Initialize trd_uid.

(trade_check_ok): Use check_land_ok() & friends instead of doing it by
hand, but wrong.  This fixes bying planes and land units loaded on
ships that moved after loading.

(check_trade_ok): New.
(trade_check_ok): Use it.  Remove unused argument lot.  Callers
changed.

19 years ago(show_land_build, show_plane_build): Adjust the position of the $ column to match
Ron Koenderink [Sat, 28 Aug 2004 13:52:20 +0000 (13:52 +0000)]
(show_land_build, show_plane_build): Adjust the position of the $ column to match
'show ship b'.  Adjust the crew column (show_plane_build) and the adjacent columns
to be right-justified.

19 years ago(gift): Default case can't happen. Make that explicit for safety and
Markus Armbruster [Sat, 28 Aug 2004 12:52:34 +0000 (12:52 +0000)]
(gift): Default case can't happen.  Make that explicit for safety and
to silence compiler.

19 years ago(launch_missile): Simplify to avoid compiler warning.
Markus Armbruster [Sat, 28 Aug 2004 12:51:04 +0000 (12:51 +0000)]
(launch_missile): Simplify to avoid compiler warning.

19 years ago(empth_ctx_t): Unused, remove.
Markus Armbruster [Sat, 28 Aug 2004 12:49:13 +0000 (12:49 +0000)]
(empth_ctx_t): Unused, remove.

19 years ago(min_to_next_daytime): Happily returned zero if DTIME happend to be in
Markus Armbruster [Sat, 28 Aug 2004 11:24:25 +0000 (11:24 +0000)]
(min_to_next_daytime): Happily returned zero if DTIME happend to be in
TIMES.  This can make callers fire another update right away, possibly
several times.  Observed for update policy UDP_TIMES while updates
were disabled, which makes them complete in much less than a second.
Fills up server.log real fast.  Fix to consider DTIME tomorrow.

19 years ago(last_demand_update): Write-only. Removed.
Markus Armbruster [Sat, 28 Aug 2004 09:35:38 +0000 (09:35 +0000)]
(last_demand_update): Write-only.  Removed.

19 years agoReplace incorrect comment on distribution mobility cost by a reference
Markus Armbruster [Sat, 28 Aug 2004 09:05:27 +0000 (09:05 +0000)]
Replace incorrect comment on distribution mobility cost by a reference
to info Mobility.

19 years ago(IPKG): New.
Markus Armbruster [Sat, 28 Aug 2004 08:43:57 +0000 (08:43 +0000)]
(IPKG): New.
(ichr): Set IPKG packing bonus for all sectors to 1.
(move): Use it.  No functional change.
(deliver, dodistribute): Use it.  Inefficient sectors now get IPKG
instead of NPKG packing bonus, cutting civilian packing bonus from 10
to 1.

(dodistribute): Export uses the better of sector or distribution
center packing bonus.  Previously, it assumed that distribution center
WPKG packing is always best.  Which is currently true, but needlessly
breaks the abstraction.

19 years ago(dodeliver): Move from sect.c to deliver.c. No functional changes.
Markus Armbruster [Sat, 28 Aug 2004 07:10:38 +0000 (07:10 +0000)]
(dodeliver): Move from sect.c to deliver.c.  No functional changes.
(deliver): Static linkage.

19 years agoretreat.h is unused, remove it.
Marc Olzheim [Fri, 27 Aug 2004 16:46:49 +0000 (16:46 +0000)]
retreat.h is unused, remove it.

19 years ago(build_land): unused variable natp, remove.
Marc Olzheim [Fri, 27 Aug 2004 16:45:52 +0000 (16:45 +0000)]
(build_land): unused variable natp, remove.

19 years ago(news_ca): Change type of selector action to NSC_TYPEID.
Markus Armbruster [Tue, 24 Aug 2004 18:54:32 +0000 (18:54 +0000)]
(news_ca): Change type of selector action to NSC_TYPEID.

(nat_ca): Split awkward selector level into selectors tech, research,
education and happiness.

19 years ago(nstr_exec_val): Failed to update category when evaluating symbolic
Markus Armbruster [Tue, 24 Aug 2004 18:40:29 +0000 (18:40 +0000)]
(nstr_exec_val): Failed to update category when evaluating symbolic
value.

19 years ago(chr_camap): Make table names differ from file empfile[] names, so
Markus Armbruster [Tue, 24 Aug 2004 18:29:09 +0000 (18:29 +0000)]
(chr_camap): Make table names differ from file empfile[] names, so
that they properly identify the dump.

19 years ago(dchr_ca, intrchr_ca, rpt_ca, tchr_ca): New.
Markus Armbruster [Tue, 24 Aug 2004 15:31:56 +0000 (15:31 +0000)]
(dchr_ca, intrchr_ca, rpt_ca, tchr_ca): New.
(chr_camap): Use them, but disable rpt_ca[], since rpt[] lacks a
sentinel.

(xhdr): Print `XDUMP' rather than `DUMP' to avoid confusion with old
dumps.  Don't print human readable timestamp.

19 years ago(improve): Fix confusing diagnostics when refusing to improve defense
Markus Armbruster [Tue, 24 Aug 2004 08:23:09 +0000 (08:23 +0000)]
(improve): Fix confusing diagnostics when refusing to improve defense
because option DEFENSE_INFRA is off.

(improve): Simplify use of `value' to avoid compiler warning.

19 years ago(move, explore): Simplify computation of destination sector's work and
Markus Armbruster [Tue, 24 Aug 2004 07:08:59 +0000 (07:08 +0000)]
(move, explore): Simplify computation of destination sector's work and
loyalty to get rid of compiler warnings.

19 years ago(sect_ca): Fix selector che.
Markus Armbruster [Tue, 24 Aug 2004 05:54:11 +0000 (05:54 +0000)]
(sect_ca): Fix selector che.

19 years ago(getsect, putsect, getsectp): Remove superflous casts, parenthesize
Markus Armbruster [Mon, 23 Aug 2004 18:35:50 +0000 (18:35 +0000)]
(getsect, putsect, getsectp): Remove superflous casts, parenthesize
macro parameters properly.

19 years agocaddr_t is obsolete. Replace by void *, except for struct empfile
Markus Armbruster [Mon, 23 Aug 2004 18:29:44 +0000 (18:29 +0000)]
caddr_t is obsolete.  Replace by void *, except for struct empfile
member cache, which becomes char * to keep pointer arithmetic simple.

19 years ago(sctstr, sect_ca): Make sct_mines signed for same reasons as
Markus Armbruster [Mon, 23 Aug 2004 15:50:32 +0000 (15:50 +0000)]
(sctstr, sect_ca): Make sct_mines signed for same reasons as
sct_item[] (see sect.h rev. 1.10).

19 years agoRemoved unnecessary #ifdef's for Windows.
Ron Koenderink [Sat, 21 Aug 2004 22:10:10 +0000 (22:10 +0000)]
Removed unnecessary #ifdef's for Windows.

19 years ago(nstr_exec): Fix the previous rev.
Markus Armbruster [Sat, 21 Aug 2004 15:06:37 +0000 (15:06 +0000)]
(nstr_exec): Fix the previous rev.

19 years ago(NSC_STRINGY): New.
Markus Armbruster [Sat, 21 Aug 2004 14:09:31 +0000 (14:09 +0000)]
(NSC_STRINGY): New.
(nstr_promote, nstr_exec_val): Implement.

(nstr_exec_val): Ignored IDX for NSC_STRING values.

(nstr_exec): Implement NSC_STRING.

(ship_ca): New selector name.

19 years ago(sect_ca): New selectors loyal, access.
Markus Armbruster [Sat, 21 Aug 2004 13:35:35 +0000 (13:35 +0000)]
(sect_ca): New selectors loyal, access.

(NSC_GENITEM): New selector radius.

(ship_ca): New selectors nland, access, xbuilt, ybuilt, builder.

(plane_ca): New selectors access, theta.

(land_ca): New selectors react, nland, access.

(lost_ca): New selector id.

19 years agoDoc clarifications.
Markus Armbruster [Sat, 21 Aug 2004 13:25:57 +0000 (13:25 +0000)]
Doc clarifications.

19 years agoReorder selectors to match struct member order, for easier consistency
Markus Armbruster [Sat, 21 Aug 2004 12:50:58 +0000 (12:50 +0000)]
Reorder selectors to match struct member order, for easier consistency
checking.

19 years ago(NSC_EXTRA): New.
Markus Armbruster [Sat, 21 Aug 2004 12:36:13 +0000 (12:36 +0000)]
(NSC_EXTRA): New.
(sect_ca, NSC_GENITEM, plane_ca, land_ca): Use it for aliases and
cached functions of tech.
(xdflds, xdfldnam): Skip NSC_EXTRA fields.

19 years ago(ldump): Remove superflous casts.
Markus Armbruster [Sat, 21 Aug 2004 12:07:42 +0000 (12:07 +0000)]
(ldump): Remove superflous casts.

19 years ago(NSC_NATID): New.
Markus Armbruster [Sat, 21 Aug 2004 11:59:23 +0000 (11:59 +0000)]
(NSC_NATID): New.
(sect_ca, NSC_GENITEM, nuke_ca, treaty_ca, loan_ca, news_ca, lost_ca,
commodity_ca, trade_ca, nat_ca): Use it.  Fixes sector selector
che_target.

(NSC_IELT, NSC_GENITEM, ship_ca, plane_ca, nuke_ca, treaty_ca,
news_ca, lost_ca, commodity_ca, trade_ca, nat_ca): Fix initializers
for ca_type.  Harmless signed/unsigned mismatches, except for plane
selectors att, def, nuke selector types, treaty selector exp, news
selector time, commodity selectors type, xbuy, ybuy.

(commodity_ca): Remove NSC_DEITY from selector price.

19 years ago(xdeval): Use NSC_NOTYPE instead of 0.
Markus Armbruster [Sat, 21 Aug 2004 11:48:59 +0000 (11:48 +0000)]
(xdeval): Use NSC_NOTYPE instead of 0.

(xdprval): Cope with NSC_TYPEID.  Check for bad types.

19 years agoDoc fixes & clarifications.
Markus Armbruster [Sat, 21 Aug 2004 11:47:17 +0000 (11:47 +0000)]
Doc fixes & clarifications.

19 years ago(plchr): Fix the previous rev.
Markus Armbruster [Sat, 21 Aug 2004 06:51:49 +0000 (06:51 +0000)]
(plchr): Fix the previous rev.

19 years ago(PLANENAMES, opt_PLANENAMES, Options, plchrstr, plchr_ca, plchr,
Markus Armbruster [Sat, 21 Aug 2004 06:48:34 +0000 (06:48 +0000)]
(PLANENAMES, opt_PLANENAMES, Options, plchrstr, plchr_ca, plchr,
main): Remove nooption PLANENAMES.

19 years ago(xdprval): Passed ptrdiff_t as field width.
Markus Armbruster [Sat, 21 Aug 2004 06:20:25 +0000 (06:20 +0000)]
(xdprval): Passed ptrdiff_t as field width.

19 years ago(delete_old_announcements, copy_and_expire): Split off
Ron Koenderink [Sat, 21 Aug 2004 00:44:20 +0000 (00:44 +0000)]
(delete_old_announcements, copy_and_expire): Split off
copy_and_expire() to simplify cleanup.  Previously, cleanup was
missing or incomplete on many less common code paths, which leaked
file descriptors and memory, and could corrupt the anno file.  Use
stdio instead of POSIX I/O for writing.  Check for I/O errors
properly.  Treat bad telegram type just like bad telegram length (give
up).  Closes #1013234.

19 years agoCombine the definitions of include/optlist.h and the use thereof in
Marc Olzheim [Fri, 20 Aug 2004 15:44:24 +0000 (15:44 +0000)]
Combine the definitions of include/optlist.h and the use thereof in
src/lib/gen/emp_config.c into a single file: include/econfig-spec.h.

19 years agoComments, cosmetics.
Markus Armbruster [Fri, 20 Aug 2004 13:18:28 +0000 (13:18 +0000)]
Comments, cosmetics.

19 years ago(xdump): New command xdump (experimental).
Markus Armbruster [Fri, 20 Aug 2004 12:39:16 +0000 (12:39 +0000)]
(xdump): New command xdump (experimental).
(player_coms): Add xdump under #if 0.

19 years ago(valstr): Replace member val_as.off by val_as.sym, which contains
Markus Armbruster [Fri, 20 Aug 2004 12:21:04 +0000 (12:21 +0000)]
(valstr): Replace member val_as.off by val_as.sym, which contains
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.

19 years ago(loan_owed): New, factored out common code.
Markus Armbruster [Fri, 20 Aug 2004 11:46:01 +0000 (11:46 +0000)]
(loan_owed): New, factored out common code.
(coll, fina, repa, shark, disloan): Use it.

19 years agoUse plain char * instead of s_char *.
Markus Armbruster [Fri, 20 Aug 2004 08:55:23 +0000 (08:55 +0000)]
Use plain char * instead of s_char *.

19 years ago(fina, repa, shark): Bankers never round down debts!
Markus Armbruster [Fri, 20 Aug 2004 08:47:00 +0000 (08:47 +0000)]
(fina, repa, shark): Bankers never round down debts!

(repa, coll): Collect interest for the time the debtor is idling at
sub-prompts.

19 years ago(loan_owed): New, factored out common code.
Markus Armbruster [Fri, 20 Aug 2004 08:16:34 +0000 (08:16 +0000)]
(loan_owed): New, factored out common code.
(coll, fina, repa, shark, disloan): Use it.

19 years ago(fina, repa, disloan): Fix the previous rev.
Markus Armbruster [Fri, 20 Aug 2004 07:11:18 +0000 (07:11 +0000)]
(fina, repa, disloan): Fix the previous rev.

19 years ago(coll, fina, repa, shark, disloan): Fix calculation of regular and
Markus Armbruster [Fri, 20 Aug 2004 07:01:26 +0000 (07:01 +0000)]
(coll, fina, repa, shark, disloan): Fix calculation of regular and
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.

19 years ago(tran_nuke, tran_plane, set, sell, move): Use military_control().
Markus Armbruster [Thu, 19 Aug 2004 18:12:28 +0000 (18:12 +0000)]
(tran_nuke, tran_plane, set, sell, move): Use military_control().

(tran_plane): Fix message for attempting to transport a plane in a
sector not owned by the player.

19 years ago(ship_bomb): Clarify.
Markus Armbruster [Thu, 19 Aug 2004 18:02:30 +0000 (18:02 +0000)]
(ship_bomb): Clarify.

19 years ago(SHOULD_PRODUCE): Silly. Simplify and inline at only call site.
Markus Armbruster [Thu, 19 Aug 2004 18:01:55 +0000 (18:01 +0000)]
(SHOULD_PRODUCE): Silly.  Simplify and inline at only call site.

19 years ago(nullify_objects): Use SCT_MAXDEF instead of sct_maxno. Loop no
Markus Armbruster [Thu, 19 Aug 2004 17:45:36 +0000 (17:45 +0000)]
(nullify_objects): Use SCT_MAXDEF instead of sct_maxno.  Loop no
longer covers the extra empty slots at the end of the dchr[]; doesn't
matter.

(sct_maxno): Unused, remove.

19 years ago(calc_all): Change all parameters into out-parameters. Previously,
Markus Armbruster [Thu, 19 Aug 2004 17:33:29 +0000 (17:33 +0000)]
(calc_all): Change all parameters into out-parameters.  Previously,
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.

19 years ago(PRI_SMAINT, PRI_PMAINT, PRI_LMAINT, PRI_SBUILD, PRI_PBUILD,
Markus Armbruster [Thu, 19 Aug 2004 16:59:36 +0000 (16:59 +0000)]
(PRI_SMAINT, PRI_PMAINT, PRI_LMAINT, PRI_SBUILD, PRI_PBUILD,
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.

19 years ago(main): Don't initialize budget priorities of unused nations; leave
Markus Armbruster [Thu, 19 Aug 2004 15:49:43 +0000 (15:49 +0000)]
(main): Don't initialize budget priorities of unused nations; leave
that to add() like all the other initializations.

19 years ago(deliver): Grant packing bonus only to efficient sectors, as
Markus Armbruster [Thu, 19 Aug 2004 12:40:35 +0000 (12:40 +0000)]
(deliver): Grant packing bonus only to efficient sectors, as
everywhere else.

19 years agoUse plain char * instead of s_char *. Doc clarifications.
Markus Armbruster [Tue, 17 Aug 2004 19:22:43 +0000 (19:22 +0000)]
Use plain char * instead of s_char *.  Doc clarifications.

19 years agoSilence harmless compiler warning.
Markus Armbruster [Tue, 17 Aug 2004 19:00:18 +0000 (19:00 +0000)]
Silence harmless compiler warning.

19 years agoRemove dead code.
Markus Armbruster [Tue, 17 Aug 2004 18:59:52 +0000 (18:59 +0000)]
Remove dead code.

19 years ago(M_TORP_SHELLS, SHP_TORP_SHELLS): Rename.
Markus Armbruster [Tue, 17 Aug 2004 18:45:04 +0000 (18:45 +0000)]
(M_TORP_SHELLS, SHP_TORP_SHELLS): Rename.

19 years ago(pln_onewaymission, carriersatxy): Change to match ordinary sorties:
Markus Armbruster [Tue, 17 Aug 2004 18:34:53 +0000 (18:34 +0000)]
(pln_onewaymission, carriersatxy): Change to match ordinary sorties:
offer carriers regardless of the sector they're in, require carriers
to be efficient.  Closes #875376.

19 years ago(SHP_AIROPS_EFF, LND_AIROPS_EFF): New. Use it instead of literal 50.
Markus Armbruster [Tue, 17 Aug 2004 18:31:32 +0000 (18:31 +0000)]
(SHP_AIROPS_EFF, LND_AIROPS_EFF): New.  Use it instead of literal 50.

19 years ago(real): Support argument `#' in addition to `<NUMBER>' and
Markus Armbruster [Tue, 17 Aug 2004 17:12:44 +0000 (17:12 +0000)]
(real): Support argument `#' in addition to `<NUMBER>' and
`#<NUMBER>'.

19 years ago(msl_intercept): msl_hit() expects plain WHAT argument, without owner.
Markus Armbruster [Tue, 17 Aug 2004 16:57:43 +0000 (16:57 +0000)]
(msl_intercept): msl_hit() expects plain WHAT argument, without owner.
Passing it with owner gets the owner printed twice.  Fix.

19 years ago(V_CIVIL, V_MILIT, V_SHELL, V_GUN, V_PETROL, V_IRON, V_DUST, V_BAR,
Markus Armbruster [Tue, 17 Aug 2004 16:12:31 +0000 (16:12 +0000)]
(V_CIVIL, V_MILIT, V_SHELL, V_GUN, V_PETROL, V_IRON, V_DUST, V_BAR,
V_FOOD, V_OIL, V_LCM, V_HCM, V_UW, V_RAD, V_ITEM): Remove, use item
types instead.

19 years ago(show_sect_capab, V_ITEM): The difference between variable and
Markus Armbruster [Tue, 17 Aug 2004 16:07:01 +0000 (16:07 +0000)]
(show_sect_capab, V_ITEM): The difference between variable and
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.

19 years ago(pchrstr, MAXPRCON): Simplify variable-style storage of constituents.
Markus Armbruster [Tue, 17 Aug 2004 15:19:46 +0000 (15:19 +0000)]
(pchrstr, MAXPRCON): Simplify variable-style storage of constituents.
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.

19 years ago(max_pop): Clarify code. No functional changes.
Markus Armbruster [Tue, 17 Aug 2004 14:46:40 +0000 (14:46 +0000)]
(max_pop): Clarify code.  No functional changes.

19 years ago(ldump, ndump, pdump, sdump): Remove leading spaces in deity dumps;
Markus Armbruster [Tue, 17 Aug 2004 14:44:06 +0000 (14:44 +0000)]
(ldump, ndump, pdump, sdump): Remove leading spaces in deity dumps;
they waste bandwidth and don't match dump().

19 years ago(mchrstr, lchrstr): Change from variable-style storage of load
Markus Armbruster [Tue, 17 Aug 2004 14:09:04 +0000 (14:09 +0000)]
(mchrstr, lchrstr): Change from variable-style storage of load
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.

19 years ago(prod_eff): New, factored out of produce() and prod().
Ron Koenderink [Tue, 17 Aug 2004 13:17:50 +0000 (13:17 +0000)]
(prod_eff): New, factored out of produce() and prod().

(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.

19 years ago(lchr, pchr): Initializers depended on ETUS instead of etu_per_update.
Markus Armbruster [Tue, 17 Aug 2004 12:38:00 +0000 (12:38 +0000)]
(lchr, pchr): Initializers depended on ETUS instead of etu_per_update.
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.

19 years ago(prod_eff): New, factored out of produce() and prod().
Ron Koenderink [Tue, 17 Aug 2004 02:31:10 +0000 (02:31 +0000)]
(prod_eff): New, factored out of produce() and prod().

(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.

19 years ago4.2.17 last minute changes. v4.2.17
Markus Armbruster [Mon, 16 Aug 2004 16:24:56 +0000 (16:24 +0000)]
4.2.17 last minute changes.

19 years ago(drop, fly): Fix previous rev. not to prohibit flying civilians to an
Markus Armbruster [Mon, 16 Aug 2004 14:35:06 +0000 (14:35 +0000)]
(drop, fly): Fix previous rev. not to prohibit flying civilians to an
ally.  Since you can load them onto their ships, you should be able to
fly them over.

19 years agoUpdate for 4.2.17.
Markus Armbruster [Sat, 14 Aug 2004 20:03:08 +0000 (20:03 +0000)]
Update for 4.2.17.

19 years agoAdded srand call to thread startup as each thread needs to be seeded in Windows.
Ron Koenderink [Sat, 14 Aug 2004 19:35:38 +0000 (19:35 +0000)]
Added srand call to thread startup as each thread needs to be seeded in Windows.

19 years ago(pln_mine, pln_dropoff): Split off aerial mining into new pln_mine().
Markus Armbruster [Sat, 14 Aug 2004 17:12:20 +0000 (17:12 +0000)]
(pln_mine, pln_dropoff): Split off aerial mining into new pln_mine().
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.