Commit graph

22 commits

Author SHA1 Message Date
a109de948b Remove option TREATIES
TREATIES has issues:

* Treaties can cover attack, assault, paradrop, board, lboard, fire,
  build (s|p|l|n) and enlist, but not bomb, launch, torpedo and
  enlistment centers.

* Usability is very poor.  While a treaty is in effect, every player
  action that violates a treaty condition triggers a prompt like this:

    This action is in contravention of  treaty #0 (with Curmudgeon)
    Do you wish to go ahead anyway? [yn]

  If you decline, the action is not executed.  If you accept, it is.
  In both cases, your decision is reported in the news.

  You cannot get rid of these prompts until the treaty expires.

* Virtually nobody uses them.

* Virtually unused code is buggy code.  There is at least one race
  condition: multifire() reads the firing sector, ship or land unit
  before the treaty prompt, and writes it back after, triggering a
  generation oops.  Any updates made by other threads while trechk()
  waits for input are wiped out, triggering a seqno mismatch oops.

* The treaty prompts could confuse smart clients that aren't prepared
  for them.  WinACE isn't, but is reported to work anyway at least
  common usage.  Ron Koenderink (the WinACE maintainer) suspects there
  could be a few situations where it will fail.

This feature is not earning its keep.  Remove it.  Drop command
treaty, consider treaty, offer treaty, xdump treaty, reject treaties.
Output of accept changed, obviously.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2014-02-16 11:44:14 +01:00
bb467c335d Update copyright notice
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2014-01-02 14:33:48 +01:00
df4925d696 Update copyright notice 2013-01-12 17:45:01 +01:00
1118f1c0ca Update copyright notice 2012-06-10 10:52:22 +02:00
b30c83cd64 Verify table uid sanity more tightly
verify_row() refrains from rejecting zero uids, because some tables
may contain blank entries, with zero uid.

Change it to check only header sanity for entries that are not in use.
This filters out all legitimately blank entries.  Tighten up the uid
check.

For computing "in use", factor empobj_in_use() out of xdvisible().
Note that xdvisible()'s case EF_COUNTRY doesn't bother to check
nat_stat, because that's implied by what it does check.  It's not
implied in empobj_in_use(), so add it there.
2011-06-25 16:54:29 +02:00
465c0c8587 Move src/lib/subs/empobj.c back to src/lib/common/
Commit 77e95bd7 (v4.3.12) moved it from its natural home because
obj_nameof() required stuff from subs/.  Now that obj_nameof() is
gone, move it back.
2011-06-25 16:50:20 +02:00
77e95bd788 Clean up library dependencies
Move stuff to untangle the ugly cyclic dependencies between the
archives built for selected subdirectories of src/lib/:

* Move common/io.c to empthread/ because it requires empthread stuff

* Move parts of subs/nstr.c to common/nstreval.c to satisfy
  common/ef_verify.o

* Move getstarg.c getstring.c onearg.c from gen/ to subs/ because they
  require stuff from there

* Move bridgefall.c check.c damage.c empobj.c journal.c maps.c
  sectdamage.c from common/ to subs/ because they require stuff from
  there

* Move cnumb.c from subs/ to common/ to satisfy common/type.o

* Move log.c fsize.c from common/ to gen/ because they really belong
  there

* Move emp_config.c mapdist.c from gen/ to common/ because they really
  belong there, and require stuff from libglobal.a

Also package as/ as libas.a to satisfy common/path.o.

Remaining dependencies:

    lib             needs
    --------------------------------------------
    libas.a         libglobal.a
    libcommon.a     libas.a libglobal.a libgen.a
    libgen.a
    libglobal.a
    liblwp.a        libgen.a
    libw32.a[*]     libgen.a

    [*] Except for service.o, which can only be linked into the server

Link order now: liblwp.a libcommon.a libas.a libgen.a libglobal.a
libw32.a.  The position of libw32.a is not quite right, but works
anyway.
2008-02-03 08:11:13 +01:00
db02dda32f Update copyright notice 2008-01-19 10:15:37 +01:00
63bdc89835 Update copyright notice. 2007-01-09 19:09:31 +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
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
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
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
db3996e37e Fix the previous revision. 2006-07-11 19:59:28 +00:00
Ron Koenderink
7748e65fe6 Add missing includes config.h, prototypes.h and file.h. 2006-07-11 03:14:56 +00:00
Ron Koenderink
6d90861aae (obj_nameof): New.
(nameofitem): Remove, switch callers to to obj_nameof().
(mission, show_mission): Convert functions to use obj_nameof()
instead of nameofitem().
2006-07-10 23:14:26 +00:00