Commit graph

2433 commits

Author SHA1 Message Date
a57645340c New command show updates:
(show): New sub-command.
(player_coms): Update its c_form.
(show_updates, fmttime2822): New.

(vers): Show game_days and game_hours.

(upda): Mark obsolete and point to show updates.
(vers): Point to show rather than update.

Rewrite much of info zdone.
2007-07-15 13:34:22 +00:00
87eeea32c9 (show): Print tech level later, when we're done prompting for
arguments.  This also prints it only for units, when it's relevant.
2007-07-15 13:22:37 +00:00
30217b1b87 Fix .SA. 2007-07-15 12:36:35 +00:00
38992e43b5 Update example to current output. 2007-07-15 12:32:48 +00:00
159cd471b8 Describe the effect on the Empire clock.
Warn against manual disable/enable and point to the schedule file.
2007-07-15 12:05:43 +00:00
c4812b0ea2 Describe the Empire clock. 2007-07-15 11:53:32 +00:00
f427e3d123 Update for the new Empire clock, i.e. don't refer to s_p_etu, which no
longer exists.

Abbreviate time unit as ETU rather than TU.

max_btus is 640, not 512.
2007-07-15 11:38:41 +00:00
315770cae5 Remove references to s_p_etu. 2007-07-15 11:02:17 +00:00
335d9d34ab Include reshuffle. 2007-07-15 10:07:48 +00:00
ab55ea7381 (s_p_etu): econfig key no longer used, remove. 2007-07-15 09:59:52 +00:00
4bd19812af Use the new Empire clock for implementing MOB_ACCESS:
(lndstr, plnstr, sctstr, shpstr): Change timestamp members lnd_access,
pln_access, sct_access, shp_access from real time (time_t) to ETUs
within a turn (short).
(land_ca, plane_ca, sect_ca, ship_ca): Update accordingly.
(build_ship, build_land, build_bridge, build_plane, build_tower)
(explore, check_trade, bsanct, takeover, takeover_ship)
(takeover_land): Use game_tick_to_now() instead of time() to update
the timestamp.  Change check_trade(), takeover_ship(), takeover_land()
to do that only when MOB_ACCESS is enabled, for consistency.
(lupgr, supgr, pupgr, takeover_ship): Don't touch the timestamp where
mobility isn't touched either.
(sct_do_upd_mob, shp_do_upd_mob, lnd_do_upd_mob, pln_do_upd_mob): Use
game_tick_to_now() instead of increase_mob() to compute ETUs since
the timestamp and update the timestamp.  Closes #1012699.
(increase_mob): Remove.
(mob_sect, mob_ship, mob_land, mob_plane): sct_do_upd_mob() & friends
no longer do the right thing at the update.  Use game_reset_tick() and
pass its result directly to do_mob_sect() & friends.  This is only
correct when argument is etu_per_update, which it always is.  Remove
parameter.  Callers changed.
(do_mob_sect, do_mob_ship, do_mob_land, do_mob_plane): Oops on
negative argument.

(mob_acc_globals, timestampfil, mobupdate, updating_mob)
(update_all_mob, timestamp_fixing, update_timestamps, mobility_check):
The mobupdate command was important to let deities manually
synchronize mobility updating with updates.  That's no longer needed.
The code behind it is somewhat hairy and ugly, and updating it to work
with the Empire clock is just not worth it.  Remove.  Users changed.
(player_coms): Update accordingly.
(upda): Remove display of mobility updating state.

(mobility_init): No need to fix up mobility on startup, as the Empire
clock runs normally even when the server is down.  Remove.  Caller
changed.
2007-07-15 09:43:57 +00:00
aa34ef2b7b (game_reset_tick): New.
(prod_nat): Use it.
2007-07-15 09:01:58 +00:00
d3e0597f0e Use the new Empire clock for generating BTUs:
(natstr): New member nat_access.
(cou_ca): New selector access.
(grant_btus, accrued_btus): New.
(prod_nat, init_nat): Use grant_btus().  BTUs are now made at the
update in addition to login, because that lets us get away with a
simple ETU stamp (nat_access).
(nat_cap): Replaced by grant_btus(), remove.
2007-07-14 16:30:12 +00:00
dd2daaaab3 Provide an Empire clock with ETU resolution that is properly
synchronized to updates (the one based on s_p_etu isn't synchronized):
(gamestr): New members game_turn, game_tick, game_rt.
(game_ca): New selectors for them.  Restrict tick and rt to deity for
now.  We'd need xdump update the Empire clock to make them safe for
players.
(game_record_update): New.
(update_main): Call it.
(game_tick_tick, game_tick_to_now, game_step_a_tick): New, not yet
used.
2007-07-14 15:58:37 +00:00
654335c621 New Empire table game, to be used for global stuff:
(gamestr, EF_GAME, game_ca): New.
(empfile): Declare the table.
(ef_open_srv, ef_close_srv): Open and close it.
(main): Create it.
(empobj_storage): New member game.

(EF_DYNMAX): New.
(EF_IS_GAME_STATE): Use it.
2007-07-14 14:49:58 +00:00
4ba4cd98c6 Remove the demand update feature veto. It's virtually unused, flawed
by design (by voting last players can tactically vote no and thus
build up veto rights), and its implementation is buggy:
(update_missed): Remove.
(zdone): Don't show it.
(demand_check): Remove veto check.
(natstr, cou_ca): Remove member nat_missed and its selector.
(zdone): Don't clear and don't show it.
(update_removewants): Don't increment it.  This was buggy anyway; it
incremented even on non-demand updates.
(prnat): Don't show it, remove key 'U'.
(docountry): Don't change it, deprecate the now useless key 'U'.
2007-07-14 13:09:33 +00:00
ec98ff03f3 (do_mob_sect, do_mob_plane): Remove the special case for maxed out
mobility.  The general case is fine.
(do_mob_ship): Move the special case for maxed out mobility into the
fuel conditional.  The general non-fuel case is fine.
(do_mob_land): Likewise, but continue to call lnd_fortify() only when
needed.
2007-07-14 09:07:54 +00:00
0e6508c556 (do_mob_land): Simplify fortification. No functional change. 2007-07-14 08:45:01 +00:00
78008c69fa Fix missing include. 2007-07-13 17:15:33 +00:00
e04193eabd Comment. 2007-07-13 16:51:31 +00:00
eeb9d3cb04 New utility program empsched. 2007-07-13 16:49:13 +00:00
47be4f724c Update for new reload command. Back out a reference to a new utility
program that hasn't been committed, yet.
2007-07-13 16:42:10 +00:00
ae9a759527 (relo): New command. 2007-07-13 06:04:03 +00:00
7f16f7151f Fix the previous revision. 2007-07-12 06:10:59 +00:00
27db04027e (schedule): New.
(install): Install a default schedule.
2007-07-11 22:37:31 +00:00
94e0fe46bf Document the new update scheduler. 2007-07-11 22:34:21 +00:00
71320ed67f New update scheduler:
(schedulefil): New.
(set_dirs, set_paths): Rename.  Initialize schedulfil.
(read_schedule): New.  Can read several updates, which will be used in
later changesets.
(update_time): Change to array.  Will be used in later changesets.
(update_schedule_anchor): New.
(update_init): Initialize it.
(update_get_schedule): New.
(update_init): Call it to initialize update_time[].
(update_sched): Rewrite.
(update_forced, update_wanted): Replace.
(update_reschedule): New.
(main): Call it on SIGHUP to reload the schedule.
(update_trigger, update_force, force, player_coms): Drop force's
capability to schedule updates in the future, because it's not worth
the trouble to implement again.  Deities can simply edit the schedule
file to schedule updates.  Remove update_force() and
update_trigger()'s parameter.
(upda): Update for new scheduler.  Take care to keep output the same
as far as possible, even though it's ugly, to avoid breaking clients.
(update_policy, adj_update, update_times, hourslop, blitz_time):
econfig keys removed.
(update_demand, UPD_DEMAND_NONE, UPD_DEMAND_SCHED, UPD_DEMAND_ASYNC)
(update_demandpolicy, UDP_NORMAL, UDP_TIMES, UDP_NORMAL, UDP_BLITZ)
(UDP_MAX, UDP_DEFAULT, UDDEM_TMCHECK, UDDEM_COMSET, UDDEM_DISABLE)
(UDDEM_MAX, UDDEM_DEFAULT): econfig key and values replaced.  Users
changed.  wantupd.h is now empty, remove.
(demand_check): External linkage.
(update_policy_check): Now pointless, remove.
(is_daytime_near, min_to_next_daytime, regular_update_time)
(scheduled_update_time, next_scheduled_time, updatetime)
(next_update_time, next_update_check_time): Unused, Remove.

(demand_check, demandupdatecheck): Move call of demand_update_time()
from demand_check(), which controls all demand updates, to
demandupdatecheck(), which controls only unscheduled ones.  Fixes
update command not to lie about the next scheduled demand update.

(demandupdatecheck): Check updates_disabled() so that zdone no longer
claims to trigger an update when it can't.
2007-07-11 22:27:29 +00:00
15f8f48353 (demand_check): Remove dead code. 2007-07-11 21:35:47 +00:00
b8a1833438 Fix markup. Reorder so that options appear in alphabetical order.
Document -h and -v for fairland and files.  Supply proper .SA.  Minor
polishing.
2007-07-11 19:59:47 +00:00
8da8e3fb3a Some variables were recursively expanded unintentionally. Fix. 2007-07-11 19:52:24 +00:00
530deef2fe Install all manual pages in section 6, where they belong. Source
files renamed.
2007-07-11 19:45:28 +00:00
de19a17aaf (show_news): Don't show unused elements of rpt[]. 2007-07-10 21:23:29 +00:00
097692a373 Update example to current output. 2007-07-10 21:15:53 +00:00
20f3d0ef0e Fix indentation. 2007-07-10 21:03:22 +00:00
8ad279e84c Fix .SA. 2007-07-10 21:00:49 +00:00
2de92d99d8 Clarify. Improve .SA. 2007-07-10 20:54:15 +00:00
fea01b7dd8 Fix for N_WELCH_DEAL, N_LND_LOSE, N_BOARD_LAND. 2007-07-10 20:49:07 +00:00
ba1c7e3267 (EMPCFONLYC, EMPCFBOTH): Rename parameter num to flags. 2007-07-10 18:27:24 +00:00
1fa61af843 (natstr): Simplify encoding of member nat_update. Users changed.
(WUPD_WANT): Unused, remove.
2007-07-10 17:48:57 +00:00
bd16520e7c (zdon): Simplify. Also gets rid of a compiler warning. 2007-07-10 17:28:23 +00:00
32f20dc511 Fix the previous revision. 2007-07-10 16:44:57 +00:00
6ca5e47f69 (opt_DEMANDUPDATE): Remove. Deities can use update_demandpolicy to
control demand updates.
2007-07-08 15:26:23 +00:00
d0e2834ca9 (prnat): Show nat_missed even when opt_DEMANDUPDATE is off, because
docountry() lets you edit it even then.
2007-07-08 11:46:49 +00:00
1fb03c5662 (journal_entry): Silence compiler warning in previous revision. 2007-05-27 14:00:59 +00:00
b9324da31d (player): Remove unused member blitz_time. 2007-05-27 13:36:14 +00:00
1cfeeb6e0c (show_nuke_build, show_nuke_capab): Fix rounding of research.
Reported by Doug Wescott.
2007-05-13 14:39:42 +00:00
06f61d1a4e Spelling fixes. 2007-04-09 09:36:28 +00:00
2e3ca36369 (powe): Don't tell user to run power new when it is disabled by
AUTO_POWER.
2007-03-24 17:31:36 +00:00
Ron Koenderink
2cdfec6a3a (journal_entry): Print unprintable characters in octal instead of a question mark. 2007-03-13 13:48:11 +00:00
Ron Koenderink
568ef6048d (S_IRUSR, S_IWUSR, S_IEUSR, S_IRWXU,
S_IRGRP, S_IWGRP, S_IEGRP, S_IRWXG,
S_IROTH, S_IWOTH, S_IEOTH, S_IRWXO) [_WIN32]:
Add #ifndef for standard defines as the the MinGW environment has the
user defines already created.  Correct EXEC permision to use S_IEXEC.
Set the group and other permssions to 0 as they do not exist in WIN32.
2007-03-11 21:29:37 +00:00