Commit graph

2407 commits

Author SHA1 Message Date
25dece0a3d (produce_sect): Game state changes may be changed only if
player->simulation.  Fix a missing guard.  Existing callers should not
need it.
2006-09-23 10:47:58 +00:00
8da88626d5 (produce_sect, finish_sects): Move stop order expiry to end of update,
so that stopped sectors don't repair units.  The update sequence
masked this bug until its change in src/lib/update/main.c rev. 1.25,
but use of budget priorities (gone since rev. 1.24) could unmask it.
2006-09-23 10:37:55 +00:00
e121d1bdc0 (sect_has_dock): NAV_CANAL in sect.h rev. 1.36 broke loading in
canals, fix.  Can't enforce M_CANAL condition here, so leave it to
callers.  Callers don't enforce it either, which means landlocked
ships can load in canals.  Oh well.
2006-09-23 09:09:43 +00:00
c9f21c0e73 (player_main): Delay journal_login() until after error exits, to
ensure it is properly paired with journal_logout().
2006-09-23 08:58:54 +00:00
251f552088 (tend_land): Fix to not let land units be tended that could not be
loaded.
2006-09-23 08:40:40 +00:00
59f7aee1f4 Remove bogus paragraphs on RES_POP and NO_PLAGUE. Clarify sentence on
max safe population.
2006-09-23 08:37:57 +00:00
19b4e76fef Update for maximum population change in sect.config rev. 1.3. Remove
incorrect claims about mil.
2006-09-23 08:35:36 +00:00
Ron Koenderink
eb54f7b574 (genlist): Switch thing to use struct empobj * instead of void *.
Remove type from struct genlist as it can be determined from thing.
Users changed.
2006-09-01 23:22:45 +00:00
Ron Koenderink
14ea670fc5 (struct trdstr): Change trd_type to be short to be consistent with the
rest of the definitions of ef_type.
2006-08-22 03:52:44 +00:00
Ron Koenderink
ebf588b713 (empobj_chr): New, create a new (imcomplete) structure for
empobj characteristics.
(get_empobj_chr):  Update get_empobj_chr() to use new
struct empobj_chr.
2006-08-18 23:32:45 +00:00
Ron Koenderink
a9a9957a27 (radar): New, moved functionality from rada() except ef_type determination.
(rada): Call radar() with EF_SHIP.
(lrad): New, call radar() with EF_LAND.
(empmod[]): Call lrad() for lradar command.
(march, navi): Call radar() with appropriate type.
2006-08-16 01:16:30 +00:00
ed88f3140d (EF_IS_VIEW): New.
(xdump): Use it to deny access to views when denying access to game
state.  Fixes the previous revision.
2006-08-13 07:29:30 +00:00
7e474afa32 (obj_nameof): Return safer error value.
(get_empobjp, get_empobj_chr, emp_obj_chr_name, get_empobj_mob_max):
Style.
2006-08-13 07:18:11 +00:00
f7233ff841 Allow xdump before break; partial solution for #1417871:
(player_coms): Set xdump's c_permit to VIS.
(xdump): Deny countries that couldn't run xdump before access to game
state.
2006-08-13 07:13:37 +00:00
Ron Koenderink
2742a2db62 (ef_open) [_WIN32]: Add shared.h for MinGW environment,
needed for WIN32 file locking. Broken (missed) in rev 1.70.
2006-08-08 22:43:18 +00:00
Ron Koenderink
a89e21037e (ef_open) [_WIN32]: Provide file locking for WIN32. 2006-08-07 17:15:04 +00:00
Ron Koenderink
db541d9b9b (rada): Replace the "unit" text with "land" to be more clear. 2006-08-04 19:59:24 +00:00
Ron Koenderink
90ff9ae2b0 (rada): Using struct empobj to generalize the code. 2006-08-02 22:07:12 +00:00
Ron Koenderink
09248d018d (makelost, makenotlost, findlost, struct loststr): Change type to be a
short instead of a char.  This will make lost_type consistent with
ef_type in the rest of the structures.
2006-08-02 21:46:34 +00:00
Ron Koenderink
74b263f3d8 (unit_map): Replace player->owner with direct owner check and
player->god check.  player->owner is not set if ef_ptr() is used
as no post_read() is done. Broken in rev 1.38.  Not completely fixed
in rev 1.40.
2006-08-02 18:39:22 +00:00
de124108de (ef_open): Lock the file. This prevents two programs (servers in
particular) running on the same game state.  fairland does not use
ef_open() at this time, and thus ignores the lock.
2006-08-02 18:05:04 +00:00
18417fdef6 (produce): The reported amount produced (returned through last
parameter) did not reflect production cut for ITEM_MAX.  Broken in
3.0.14 or so.  Reported by Stefan Hauser.
2006-08-02 17:58:20 +00:00
Ron Koenderink
f246f86542 (gift): Remove the type argument, can be determined from the ptr
argument. Replace prship/prland/prplane/prnuke code with
obj_nameof().
2006-08-02 13:07:09 +00:00
Ron Koenderink
55107731cc (unit_map): Replace player->owner with direct owner check.
player->owner if not set if ef_ptr() is used as no post_read() is done.
Broken in rev 1.38.
2006-07-30 01:05:17 +00:00
Ron Koenderink
fa0b12e332 (getpath): Remove check for DIR_MAP.
DIR_MAP is not a value that can be entered by the user.
2006-07-29 17:55:22 +00:00
Ron Koenderink
28eb5d28fa (draw_map): Use struct empobj to generalize the code. 2006-07-27 23:32:55 +00:00
Ron Koenderink
80e5a77e83 (map): Prompt only for sects for map and bmap commands.
Broken in 1.27.
2006-07-26 23:13:52 +00:00
Ron Koenderink
22e529a93d (get_empobj_chr, obj_nameof): Switch CANT_HAPPEN() to
CANT_REACH().

(get_empobj_mob_max): Remove carriage return.
2006-07-26 01:09:11 +00:00
Ron Koenderink
5f6e5ef4b1 (get_empobj_mob_max): Move the return -1 to the end of function. 2006-07-26 01:01:14 +00:00
Ron Koenderink
0a9c46ad1e (emp_obj_chr_name): Move the return NULL to the end of function. 2006-07-26 00:58:14 +00:00
Ron Koenderink
cf6de2541b (get_empobj_chr): Removed local cp. Return the result directly. 2006-07-26 00:54:33 +00:00
Ron Koenderink
34f29824eb (get_empobj_mob_max): Switch ef_type to type to be more consistent
with other functions.
2006-07-26 00:40:33 +00:00
Ron Koenderink
fec9878ca4 (get_empobjp): New. Returns a pointer an empobj.
(emp_obj_chr_name): New. Returns a pointer to the characteristics name
for an empobj.
(unit_map):  Simplify unit_map() by using get_empobjp() and
emp_obj_chr_name().
(map,  cmd_move_map):  Switch to EF_SHIP as unit_map does not default
to EF_SHIP for EF_BAD anymore.
2006-07-26 00:21:58 +00:00
Ron Koenderink
b70653815c (get_empobj_mob_max): New. Return maximum mobility based on ef_type.
(miss): Use new get_empobj_mob_max().
2006-07-24 13:40:12 +00:00
6db2e6ec63 (swaps): Failed to update coastal flags. Was missed in the changeset
containing coastal.c rev. 1.1.
(set_coastal): New parameter olddes, to simplify fixing swaps().
Callers changed.
2006-07-21 18:10:09 +00:00
ad0a37eca4 (update_coastal_flag, coast_sea_to_land, coastal_land_to_sea): Return
new coastal flag instead of updating the sector.  This is a bit
simpler.  Change arguments from sectors to coordinates to make it
obvious that the sector is not touched.
(set_coastal): Update the coastal flag, but leave putsect() to
callers.  All existing callers do that anyway.
2006-07-21 18:01:28 +00:00
f760628d77 Clarify doc. 2006-07-21 06:05:50 +00:00
cc0748894b Bump version to 4.3.8. 2006-07-21 05:28:47 +00:00
Ron Koenderink
a62989d4a3 (put_empobj): New. Put generic empobj into the appropriate data file.
(get_empobj_chr): New.  Get characteristics for empobj.
(mission, build_mission_list_type): Switch to use new
functions put_empobj() and get_empobj_chr().
2006-07-20 14:12:35 +00:00
Ron Koenderink
8e7199c338 (march, navi): Provide equivalent functionality to map in move(), expl()
and tran(). Allow map and bmap to access the regular map command
parameters.
2006-07-20 13:33:11 +00:00
Ron Koenderink
379cb0a840 (prod_nat): Change the wording from "total pop is" to
"total pop was" to be less confusing.  The total population
display is the total at the start of the update, not after the
update is complete.
2006-07-20 01:29:25 +00:00
Ron Koenderink
60fc522758 [_WIN32]: Add io.h to pickup open/close externs for MSVC environments. 2006-07-19 01:22:57 +00:00
7072dd0930 Update for 4.3.7. 2006-07-14 23:08:49 +00:00
76cf8811fc (draw_map): Simplify. 2006-07-14 23:07:59 +00:00
a511b8b82b Change level to Expert to match stop's. 2006-07-14 23:07:22 +00:00
Ron Koenderink
911a553a65 (powe): Remove unused local variable.
Remove CR's.
2006-07-13 21:17:00 +00:00
Ron Koenderink
d413884a37 [_WIN32, __GNUC__]: Reorganize the include files for WIN32 to
separate the MinGW environment from the MSVC environment and
WIN32 environment.  Reorganize the order of the includes so
the system files are always loaded first to prevent with misc.h defines.
Remove system file includes from misc.h.
2006-07-13 21:14:16 +00:00
b1399ebbad Fix power's c_form. 2006-07-13 20:58:13 +00:00
51baf40e90 (powe): Fix `pow n' not to ignore second argument when BTUs don't
suffice for `n'.
2006-07-13 20:07:41 +00:00
b27c7ea77d (powe): Simplify evaluation of arg 1. No functional change. 2006-07-13 19:57:56 +00:00