Commit graph

3332 commits

Author SHA1 Message Date
4c5d3c235b Replace other occurences of git-FOO by git FOO 2008-12-03 07:57:14 -05:00
b4ecf7c7a6 Use 'git ls-files' instead of deprecated 'git-ls-files' 2008-12-02 21:26:32 -05:00
4a0dd2d1f7 Fix shp_prewrite() to print the sunk message
Broken in commit 861a66625, v4.3.17.
2008-11-24 19:08:16 -05:00
Ron Koenderink
344e91bbb9 Log out player when time per day is exceeded
Commit 3da4030 already changed player_main() to log out the player
when m_m_p_d was exceeded in command().  This crept in accidentally.
Complete the job by changing status() to log out the player instead of
downgrading him to visitor status.

Also, change player_main(), command() and status() to apply the time
limit to countries in sanctuary in addition to active countries.
Leave visitors alone, because those are shared logins.  Make the
disconnect message to a player consistent for all situations.

Note that commit 875a80d1 already changed player_main() to apply the
time limit only to active countries instead of all, just like status()
does, but neglected to document that.
2008-11-16 13:16:36 -05:00
Ron Koenderink
9fe6f7a406 Fix nat_timeused calculation on login
Broken in commit 875a80d.
2008-11-15 20:46:52 -06:00
Ron Koenderink
3da4030ac0 Prevent command from execute after game restrictions
If a player is at a prompt when either game hours
restrictions starts or logged in time limit is exceeded
the player is allow to enter one command.
2008-11-15 16:51:02 -06:00
fe69514067 Capital obliteration failed to charge money and report news
Commit 221e88f1 (v4.3.15) made caploss() expect the new owner in
sct_own, so it can distinguish between sack and obliteration.  Commit
0d139ee1 (v4.3.17) broke that in sct_prewrite(): it moved zapping the
sector owner after caploss(), and passed 0 instead of the old owner to
caploss().  Because of that, obliterating a capital didn't make the
news and didn't cost the victim money.  Fix that.
2008-11-15 17:40:48 -05:00
Ron Koenderink
2ce0a58a0d Update emptime.c.patch for commit cb0a373 2008-11-15 16:21:02 -06:00
cb0a373dff Don't call time() for nat_last_login, use player->curup 2008-11-15 15:59:29 -05:00
273875a68c Fix coding style and simplify seconds_since_midnight() a bit 2008-11-15 15:59:29 -05:00
f331432459 Clean up unused variable in status()
Unused since commit 875a80d1.
2008-11-15 15:59:29 -05:00
Ron Koenderink
875a80d14f Rewrite accounting of play time
Replace daychange() and gettimeleft() by update_timeused_login(),
update_timeused() and enforce_minimum_session_time().  The new
code doesn't assume the day is always 24 hours long which can
occur when transitioning into or out of DST and such.  Logging
in after more a multiple of 128 days now resets nat_timeused
properly.

Fix nat_timeused calculation on midnight rollover to include
the time since midnight.

struct natstr member nat_dayno and struct player member timeleft
are now unused, remove them.
2008-11-15 13:08:19 -06:00
Ron Koenderink
f46dc55254 Fix initialization of nat_last_logout
Broken in f94f81ee, v4.2.22.
2008-11-09 18:17:46 -06:00
Ron Koenderink
5054b26899 Fix parsing of 24:00 in game_hours and update_demandtimes
daytime() rejects 24:00 as invalid.  This makes daytime_range()
fail, is_daytime_allowed() ignore this and later ranges silently.
Broken in commit acdee1e3, v4.2.15.
2008-11-09 18:06:51 -06:00
b27298d4c5 New option RAILWAYS
With RAILWAYS, highway-like sectors double as rail.  They need to be
at least 5% efficient to be operational, and then they additionally
extend rail into adjacent sectors that are at least 60% efficient.

New opt_RAILWAYS, SCT_HAS_RAIL(), sct_rail_track().  Update
sector_mcost(), bp_neighbors(), lnd_mar_one_sector() for RAILWAYS
mobility rules.  Update sinfra(), spyline(), satdisp_sect() to show
rail track instead of rail infrastructure for RAILWAYS.

New virtual sector selector track, implemented by nsc_sct_track().
2008-11-01 11:40:15 -04:00
cacc393c53 Age che just like reserves (1% per 24 ETUs)
Factor aging out of age_levels() into new age_people().  Use it in
do_feed() to age che.
2008-11-01 11:37:35 -04:00
a090b7878a Permit ships to assault the sector they're in
Ships still have to be in a sea sector to assault an adjacent sector.
2008-10-28 19:35:51 -04:00
0bdb80c4c9 Don't produce food without work
We don't want to starve tiny populations, because that would require
players to move trivial amounts of food after explore and such.
growfood() used to simply grow at least 1f when a sector was about to
starve.  That food is almost never eaten by a tiny population, so we
effectively got some production without work.  Fix by taking away that
free food after people ate, in do_feed().
2008-10-28 19:35:51 -04:00
3376589007 New concept sector terrain
A sector type's terrain (struct dchrstr member d_terrain) is the
sector type of its underlying terrain.  Sector types occuring in
d_terrain are terrain types, and must have their own type in
d_terrain.  Players can change sector types only to those with the
same terrain.

The builtin configuration defines terrain types sea, mountain,
wasteland, wilderness and plains.  It gives bridge span and tower
terrain sea, and everything else terrain wilderness.  Hence, the stock
game remains unchanged.

Deities can use terrain to create sector types that can be developed
only in limited ways.
2008-10-28 19:35:51 -04:00
0d48dae06b Explicitly specify dependency output file with gcc -MF
Used to work without that, but somehow no longer does.
2008-10-28 19:27:23 -04:00
Ron Koenderink
14319b89ec Represent logged in time in seconds rather than minutes
This simplifies things.  In particular, it gets rid of random rounding
in getcommand(), which created a variation in the nightly build
depending on whether the update starts before or after the deity logs
out.

Replace struct natstr member nat_minused by nat_timeused, and update
cou_ca[] accordingly (this affects xdump nat).  Replace player member
minleft by timeleft, and getminleft() by gettimeleft().  Update
getcommand(), daychange(), player_main(), status() accordingly, taking
care not to change player output.  Change edit country key 'u' to work
in seconds.
2008-10-28 08:48:25 -06:00
Ron Koenderink
436328f641 Correct the emptime.c.patch for player.c
Broken in commit 122171b.
2008-10-26 21:12:10 -06:00
Ron Koenderink
122171b8d1 Add a time base for nightly builds
Increment the time base at the each update.
Remove the unnecessary patches that overrode
the timestamp printouts.
2008-10-26 15:59:43 -06:00
Ron Koenderink
4c8bb492a3 Add more tests to nightly builds
Add Player 02 as an ally for Player 01.
Add tests for telegrams, wall, announce, relationships,
land units, wire, fire, attack, planes, autofish and autooil.
2008-10-26 15:56:04 -06:00
69c20a2f7b Bump version to 4.3.19 2008-10-19 14:41:55 -04:00
5572686e32 Update change log for 4.3.18 2008-10-18 14:40:27 -04:00
c0c416b011 Oops when unit_carrier_change() arguments OLD or NEW are invalid 2008-10-18 14:21:45 -04:00
Ron Koenderink
488b80841b Add scrap and scuttle tests to nightly builds
Also general improvements to economy for player 08.
2008-10-18 12:06:11 -04:00
Ron Koenderink
a758e38510 Add land units tests to nightly builds and improve economy
Up the bar production.  Start education and tech for player 08
Improve the general economy for player 08.  Add land units building
tests to player 01, including ensuring the tech is high to build.
2008-10-18 12:06:11 -04:00
Ron Koenderink
f180712625 Fix initialization of new elements in plane, land and nuke tables
ef_init_srv() neglected to set struct empfile callback oninit.  This
made unit_carrier_change() crash or oops on freshly initialized
planes, land units and nukes, i.e. when build used an uid that hadn't
been used before.  Oops recovery worked.

Broken in commit 64a53c90, v4.3.17.
2008-10-18 10:53:42 -04:00
Ron Koenderink
62843e166c Add xdump tests to nightly builds
Add xdump meta test to Turn 00 Player 02 to verify player visibility.
Add xdump test to Turn 99 Player 00 to verify xdump output.
Add xdump test to Turn 99 Player 01 to player's version of xdump
output.
2008-10-18 10:53:36 -04:00
Ron Koenderink
8b77d0ca07 Add xdump meta and table accessible tests to nightly builds 2008-10-18 10:53:36 -04:00
Ron Koenderink
17f44e8104 Move test scripts from nightlybuild.sh to separate files
The test scripts are now in nightly/tests/TURN/PLAYER.  For each turn,
the update script is executed first (except for turn 00), and then all
the player scripts in the appropriate turn directory.  This runs
runfeed() in different directories; change it to accomodate for that.

The update script runs "report *" on all updates.  Before, it ran only
on some of them.
2008-10-16 20:50:11 -04:00
Ron Koenderink
945b473250 Add missing cd to patch step for nightlybuild.sh
If the patch step is ran without the preceeding step, the cwd
is incorrect.
2008-10-16 20:46:56 -04:00
Ron Koenderink
1047c5703f Correction for Ubuntu Conversion
Change nightlybuild.sh to allow the setting of the pthread
option for ./configure.  Remove the incorrectly added xml
header line from the ubuntu-pthread.i386.config file.
2008-09-25 21:12:24 -06:00
Ron Koenderink
787e501420 Switch Linux nightly builds to Ubuntu and add pthread build.
Remove the cron file for SuSE.  Add cron file for Ubuntu.
Remove LWP config file for SuSE.  Add LWP and pthread config
files for Ubuntu.
2008-09-24 20:18:27 -06:00
c497da4dcf Bump version to 4.3.18 2008-09-22 21:18:24 -04:00
a32a5cd050 Update change log again for 4.3.17 2008-09-20 12:08:41 -04:00
774b590f55 Fix standalone client build for Windows
Need to compile with -mthreads since commit f082ef9f, v4.3.11.
2008-09-20 11:57:59 -04:00
65410d16fd Disable incorrect autmatic supply in load and lload
load_land_ship() and load_land_land() automatically resupply the land
units they load.  This can draw supplies from the sector where the
land units are.  When load() and lload() later update the sector, they
wipe out the update made for drawing supplies, and we get a seqno
mismatch oops.  Highly abusable.  Disable for now.
2008-09-20 09:16:46 -04:00
e0f7751f6b Update change log for 4.3.17 2008-09-17 21:38:42 -04:00
b2f75427bd Update example to current output 2008-09-17 21:31:46 -04:00
d702068457 Fix trailing whitespace 2008-09-17 21:31:40 -04:00
a9653c475b Fix whitespace: space before tab 2008-09-17 19:29:42 -04:00
db4770426e Update known contributors comments 2008-09-17 18:54:15 -04:00
6589601e56 Make unit_give_away() immune to infinite recursion
Put the unit before recursing into its cargo.  This breaks cycles in
the "is loaded on" relations.  Such cycles exist only in a corrupt
game state.  Mildly inefficient, because callers typically put the
unit again.
2008-09-16 21:47:55 -04:00
5820e12504 Belatedly remove DEMANDUPDATE from info Options
Option gone since commit 6ca5e47f, v4.3.10.
2008-09-16 19:14:41 -04:00
3e15a8e226 Make trade show exactly what's on sale, remove option SHOW_PLANE
Planes and land units on ships are sold along with the ship, but trade
showed them only when SHOWPLANE was enabled.  Show them always.

Planes on land units are not sold along with the land unit, but trade
showed them when SHOWPLANE was enabled.  Don't.
2008-09-16 19:11:18 -04:00
4a44b51f8c Guard unit.h against multiple inclusion 2008-09-16 18:47:06 -04:00
60000b1a42 Use unit_wipe_orders() to simplify build.c
Simplify build_ship(), build_plane(), build_land() and build_nuke().
2008-09-15 19:40:44 -04:00