Commit graph

32 commits

Author SHA1 Message Date
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
6b5aa6b556 Doc improvement. 2006-02-22 21:12:20 +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
b43d43392a Document interpretation of relative file names. 2006-02-19 18:33:02 +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
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
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
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
Ron Koenderink
59c8e97797 (configkeys): Make pre_update_hook and start_cash KM_INTERNAL. 2006-02-04 21:04:25 +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
35bbd59288 Documentation. 2006-01-21 20:08:42 +00:00
4515b84c59 COPYING duplicates information from README. Remove. Move GPL from
LICENSE to COPYING, because that's where it usually is.  Update all
the references to these files.
2006-01-21 19:48:41 +00:00
3e400c018c Update copyright notice. 2006-01-05 13:36:57 +00:00
1969a3890a (opt_UPDATESCHED): Remove nooption UPDATESCHED. It had no effect on
the actual update, only on the update command.  Believed to be broken
since Empire2.
2005-12-29 13:38:57 +00:00
ade510f787 Turn options into ordinary econfig keys:
(configkeys): Add options.
(KM_OPTION): New.
(vers): Find options in configkeys[] instead of Options[].
(xdump): Remove xdump opt syntax.
(xdopt): Remove.
(emp_config, print_config): Remove option special case.
(option_list, Options, setoption): Remove.
2005-12-25 10:32:50 +00:00
3bbc91876f (START_CASH, start_cash): Replace START_CASH by new econfig key
start_cash.
2005-12-23 11:16:23 +00:00
38c55314f2 Doc fix. 2005-12-03 20:59:07 +00:00
1580b1f734 (listen_addr): New econfig key.
(player_init): Implement it.

(player_init): Support service name in econfig key loginport.  Service
empire no longer takes precedence over econfig.  Closes #797096.
2005-09-23 18:41:24 +00:00
Ron Koenderink
9f27f5b02a (ship_grow_scale, plane_grow_scale, land_grow_scale): Change from int
to float.  This allows more control of the max. efficiency gain, and
makes it similiar to ship_mob_scale etc.  Closes #1025600.
2005-04-05 03:00:35 +00:00
345ad3dfe0 Update copyright notice. 2005-03-16 22:03:16 +00:00
7d71984932 (pre_update_hook): New configuration key.
(update_wait): Implement it.
(run_hook): New.
2005-03-12 17:24:57 +00:00
Ron Koenderink
3645ee77c8 (ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Move common flak damage code from ac_fireflak() and
pinflak_planedamage() to ac_calc_flak().

Remove carriage return from comment.
2004-12-16 19:28:17 +00:00
Ron Koenderink
66c258b595 Work around for broken MSC C++ 6.0 (VC98) choking on empty macro arguments.
Fixed in MSC C++ 7.0.
2004-10-05 01:08:21 +00:00
fac342ed49 Update copyright notice. 2004-09-07 15:07:16 +00:00
3dc73b39d2 (NEWS_PERIOD, news_keep_days): Replace macro NEWS_PERIOD by new
configuration key news_keep_days.
2004-09-04 19:32:48 +00:00
d89c268b8b (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.
2004-09-04 08:07:51 +00:00
7a4f133d1c (hard_tech): Unused, remove.
(configkeys): Fix km_flags of key anno_keep_days.
2004-08-30 21:12:15 +00:00
cc9efeb13d (EMPCF_COMMENT): New; for readability. 2004-08-30 17:41:39 +00:00
f0b4381c98 (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.
2004-08-28 15:28:54 +00:00
240eb32b76 (last_demand_update): Write-only. Removed. 2004-08-28 09:35:38 +00:00
dcfd251f95 caddr_t is obsolete. Replace by void *, except for struct empfile
member cache, which becomes char * to keep pointer arithmetic simple.
2004-08-23 18:29:44 +00:00
Marc Olzheim
739a695241 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.
2004-08-20 15:44:24 +00:00