Commit graph

331 commits

Author SHA1 Message Date
802f69b039 (nukstr): Make it a struct genitem: add members nuk_effic, nuk_mobil,
nuk_tech, nuk_stockpile, nuk_opx, nuk_opy, nuk_mission, nuk_radius.
These have no effect, yet.
(build_nuke): Initialize them.
(nuke_ca): Add genitem selectors: effic, mobil, tech, group, opx, opy,
mission, radius.
(tran_nuke): Zap mission, just in case somebody invents missions for
nukes.
(trade_desc): Show tech and efficiency, for consistency with other
units.
2006-05-06 07:37:00 +00:00
2e40a4bb90 Change nuke storage and commands to match other units:
(nukstr): Hold one nuke instead of a stockpile: replace members nuk_n,
nuk_types by nuk_type, nuk_plane.  Add nuk_land for completeness, like
nuk_ship it's not yet used.
(nuke_ca): Update accordingly: replace selectors number and types by
type and plane.
(build_nuke): Update accordingly.
(ndump, nuke): Update accordingly.  Output is no longer sorted by
location, and nukes in same location no longer share id.  nuke's extra
columns for nuclear plants are repeated for every nuke.
(trade_desc): Update accordingly.
(cede, grab_sect, check_nuke_ok, detonate, trade_nameof): Talk about
nukes instead of nuclear stockpiles.
(arm, disarm): Rewrite, split off new disarm().  Don't remove nuke
from the nuke file on arm.  Allow usual plane syntax, not just plane
number.  Change second argument from nuke type to nuke number.  When
plane is already armed, ignore nuke argument and rearm (broken in
4.2.6).
(tran_nuke): Update for changed struct nukstr, make as similar as
possible to tran_plane.  Change syntax to match transport plane.
(player_coms): Update arm, disarm and transport accordingly.
(prnuke, nuk_on_plane): New.
(nuk_add, nuk_delete): Stockpile management, remove.
2006-05-06 07:20:21 +00:00
ce79ad5a19 Fix another insufficiently parenthesized macro expansion. 2006-04-30 16:25:58 +00:00
8054aafb9a (u_char, u_short, u_int): BSDisms. Figuring out whether sys/types.h
defines them would be possible, but isn't worth the trouble.  Replace
by unabbreviated types.
2006-03-25 07:05:34 +00:00
435183f74d (privip): Lacked the IPv4 mapped IPv6 address for localhost. 2006-03-09 21:51:27 +00:00
b0c9691e64 Doc fix. 2006-03-08 20:16:18 +00:00
6fc677e720 Doc fix. 2006-03-06 18:24:39 +00:00
3731466557 Doc update. 2006-02-28 21:19:21 +00:00
f5a9284867 Update known contributors comment. 2006-02-24 21:35:27 +00:00
7457fef9e7 (update_wantmin, update_policy_check, demand_check, upda): Remove the
ability to switch off demand updates by setting update_wantmin to
zero.  Setting update_demandpolicy to UDDEM_DISABLE does the job.

(update_policy_check): Fix lower bound for blitz_time.
2006-02-24 19:02:01 +00:00
198fad473e Rework obsolete comment on hours file, an move it where it belongs:
next to variable definitions and into econfig doc strings.
2006-02-24 18:33:58 +00:00
38fdf1ba43 (config_tables, custom_tables, read_config_tables, read_custom_tables)
(read_config_table_file, read_custom_table_file): Rename.
2006-02-23 18:31:23 +00:00
0bb11049f4 Document not to edit this file to customize a game. 2006-02-23 07:36:31 +00:00
0e8b31500e (banfil, authfil): Remove. Matching user is useless, because the
player can send whatever he wants.  Banning IPs is better done with a
packet filter.  That leaves restricting deity IPs.
(privip): New econfig key to restrict deity IPs.
(may_play): Implement it.
(match_user): Unused, remove.
2006-02-22 22:12:18 +00:00
02ddee69fb (banfil, authfil): Remove. Matching user is useless, because the
player can send whatever he wants.  Banning IPs is better done with a
packet filter.  That leaves restricting deity IPs.
(privip): New econfig key to restrict deity IPs.
(may_play): Implement it.
(match_user): Unused, remove.
2006-02-22 20:57:51 +00:00
783b00bbad (ichrstr): Rename member i_vtype to i_uid.
(ichr_ca): Rename selector vtype to uid.
2006-02-20 05:35:58 +00:00
96a1e8277a Make Emacs use c-mode. 2006-02-20 05:24:44 +00:00
Ron Koenderink
0f23f96fe0 (lchr[], nchr[], mchr[], plchr[]) [_WIN32]:
Add size to array declarations to compile in WIN32.
2006-02-19 21:05:55 +00:00
b43d43392a Document interpretation of relative file names. 2006-02-19 18:33:02 +00:00
53a564d474 (lndchr): Document that members l_gun and l_shell are unused.
(lchr_ca): Remove selectors g_build and s_build.  Update land.config.
2006-02-19 18:30:13 +00:00
d4edc2761d Split excessively wide tables. No functional change. 2006-02-19 15:41:37 +00:00
c596577d32 (mchrstr, plchrstr, lchrstr, nchrstr): New member m_type, pl_type,
l_type, n_type.
(mchr_ca, plchr_ca, lchr_ca, nchr_ca): New selector type.  Update
builtin config files.
2006-02-19 09:47:26 +00:00
b4161cd7e2 (mchr, plchr, lchr, nchr): Move initializer to new builtin config
files ship.config, plane.config, land.config, nuke.config.
(empfile): Declare the new config files.
(install, installdirs): Install them.
(builtins): New make variable.
2006-02-19 09:15:46 +00:00
dae17432ae (lndchr): Rename member l_mxland to l_nland for consistency with
similar unit characteristics.
2006-02-19 07:32:03 +00:00
9a30f30107 (builtindir): New econfig key, variable and make variable.
(subst.in): Substitute it.  Fix prerequisites.
(read_builtin_tables): New.
(main): Call it.  This doesn't do anything, because no builtin tables
have been defined.
2006-02-19 07:04:30 +00:00
fd461e7bf5 (empfile, SYMTAB): Reorder so that symbol tables are together. Sort
them alphabetically.  Factor out commonalities into new SYMTAB().  No
functional changes.
2006-02-18 15:02:18 +00:00
a0bd72feed Collect all symbol tables in new symbol.c. No functional changes. 2006-02-18 14:55:29 +00:00
bd65a84eb5 New way to read configuration tables:
(config_tables): New econfig key.
(read_config_tables): New, implements config_tables.
(main): Call it.  Need to call ef_init() and chdir(configdir) first.
(ef_init_srv): Don't call ef_init(), since main() did it already.

Remove old way to do the same:
(ef_load): Remove, along with calls.
(empfile): Set configuration tables' member file back to NULL.
2006-02-18 13:57:52 +00:00
e4865d473e (configdir): New, to be used for loading configuration tables.
(emp_config): Set it to econfig's directory.
2006-02-18 12:43:17 +00:00
5282f500b5 (datadir, edatadir, gamedir): Rename to avoid confusion with Autoconf
output variable datadir and with configuration data.
2006-02-18 09:16:50 +00:00
58f67c8e19 Change xdump nat to show only own country, and xdump cou to show to
deities what xdump nat used to show:
(cou_ca): Remove initializer.
(ef_init_srv): Initialize cou_ca[] from nat_ca[].
(xdvisible): Change case EF_NATION to return true only for owner
even for deities.
2006-02-17 18:38:50 +00:00
3f96090ac5 (lost_ca, trade_ca): Provide proper ca_table for selector type. 2006-02-17 18:04:07 +00:00
Ron Koenderink
b7d0b66161 (buil, drnuke_const, opt_DRNUKE, show, show_nuke_build)
(show_nuke_capab, vers, xdvisible, build.t, Options.t):
Remove opt_DRNUKE and replace with the following check
drnuke_const > MIN_DRNUKE_CONST.
Set MIN_DRNUKE_CONST to 0.001 to prevent issues with tiny values.
Change the default drnuke_const to 0.0 because in the stock game
opt_DRNUKE was disabled.
2006-02-16 02:14:08 +00:00
69c23f554e (sect_ca): Make selectors xloc, yloc NSC_CONST.
(realm_ca): Make selectors cnum, realm NSC_CONST.
2006-02-13 20:48:00 +00:00
Ron Koenderink
22c7319aab (sect_ca[]): Remove NSC_EXTRA for sct_coastal
so the field is dumped.
2006-02-12 20:40:18 +00:00
94fb350e40 Change dchrstr member d_mnem to char. 2006-02-12 13:56:12 +00:00
94ef2f4275 Change ichrstr member i_mnen to char. 2006-02-11 07:41:34 +00:00
fa63f87bc0 (cou_ca, symbol_ca, mdchr_ca): Make all selectors NSC_CONST.
(empfile_ca): Make selector name NSC_CONST.
2006-02-10 19:12:10 +00:00
8c8bf88730 (cou_ca): Fix ca_type for selector stat. 2006-02-10 19:00:38 +00:00
Ron Koenderink
524fe1aa50 (lchr_ca[]): Change the name for l_rnd from "rad" to "rmax".
This removes a conflict between rad items and reaction radius.
Now the name matches the equivalent name in land_ca[].
2006-02-09 13:31:05 +00:00
25c9f2c66f (nation_status): Lacked sentinel. 2006-02-06 20:12:42 +00:00
7261d6a3e0 (level): Add value -1. 2006-02-06 07:41:55 +00:00
3879ab9643 (meta_type): Fix NSC_TYPE entry to match specification. 2006-02-05 20:20:46 +00:00
2258ec7703 Document uid selector convention. 2006-02-05 19:30:20 +00:00
8add5fbb86 (realm_ca): Remove selector uid. It's not useful for players, and not
needed for xdump, because it doesn't occur as ca_table.

(lost_ca): Remove selector uid.  Reasons as for realm_ca.  The value
is incorrect in unused records, which is semantically tolerable, but
needlessly complicated to check in ef_verify.c.

(news_ca): Remove selector uid.  Reasons as for realm_ca, plus the
value is incorrect, because nws_uid is not used.
2006-02-05 19:01:41 +00:00
Ron Koenderink
3db7e6201f (powe_cost): Remove powe_cost and replace with a fixed cost of 10. 2006-02-04 19:36:51 +00:00
Ron Koenderink
7b9fdf8b95 (show_news, news, empfile[], page_headings[], page_headings_symbols[]):
Change page_headings[] to struct symbol and removed
page_headings_symbols[].
2006-01-30 22:26:48 +00:00
Ron Koenderink
f438b74e85 (EF_PAGE_HEADINGS, page_headings_symbols, M_NOTUSED): New.
(empfile): Add it.
(rpt_ca): Use it.
2006-01-29 18:40:11 +00:00
5109a30910 (vers): Don't report KSU distribution (1.04 in all known versions),
Chainsaw version (4.00 since Empire 2, ca. 1995) and Wolfpack version
(used to be the version number after the first dot).
(KSU_DIST, CHAINSAW_DIST, WOLFPACK_DIST): Unused, remove.

(version): New.
(EMP_VERS_MAJOR, EMP_VERS_MINOR, EMP_VERS_PATCH): Remove.  Users
changed to use version[] instead.  version[] is slightly easier to
initialize from configure.ac.
(check-version): No longer needed, remove.

(legal): New.
(vers, main): Show it.
2006-01-27 17:59:06 +00:00
Ron Koenderink
69851a554e Add generated file path.c. 2006-01-21 21:26:38 +00:00