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>
This commit is contained in:
Markus Armbruster 2014-01-11 18:02:53 +01:00
parent b2090ed34f
commit a109de948b
60 changed files with 415 additions and 1300 deletions

View file

@ -24,7 +24,7 @@
*
* ---
*
* acce.c: Report rejection status of telegrams/treaties/annos/loans
* acce.c: Report rejection status of telegrams/annos/loans
*
* Known contributors to this file:
*
@ -35,7 +35,7 @@
#include "commands.h"
/*
* report rejection status of telegrams and treaties.
* report rejection status
* Optional argument reports staus from the
* viewpoint of another country
*/
@ -44,22 +44,14 @@ acce(void)
{
static char *rejects[] = {
/* must follow reject flags defined in nat.h */
" YES YES YES YES",
" NO YES YES YES",
" YES NO YES YES",
" NO NO YES YES",
" YES YES NO YES",
" NO YES NO YES",
" YES NO NO YES",
" NO NO NO YES",
" YES YES YES NO ",
" NO YES YES NO ",
" YES NO YES NO ",
" NO NO YES NO ",
" YES YES NO NO ",
" NO YES NO NO ",
" YES NO NO NO ",
" NO NO NO NO "
" YES YES YES",
" NO YES YES",
" YES NO YES",
" NO NO YES",
" YES YES NO ",
" NO YES NO ",
" YES NO NO ",
" NO NO NO ",
};
struct natstr *natp;
struct natstr *np;
@ -75,9 +67,9 @@ acce(void)
as = natp->nat_cnum;
pr("\t%s Acceptance Status Report\t", cname(as));
prdate();
pr("\n Acceptance status %5s theirs\n",
player->cnum == as ? "yours" : " his");
pr(" tel trty anno loan tel trty anno loan\n");
pr("\n Acceptance status %s theirs\n",
player->cnum == as ? "yours" : " his ");
pr(" tel anno loan tel anno loan\n");
for (cn = 0; cn < MAXNOC; cn++) {
if (cn == as)
continue;