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'.
This commit is contained in:
parent
ec98ff03f3
commit
4ba4cd98c6
8 changed files with 3 additions and 32 deletions
|
@ -124,8 +124,6 @@ EMPCF_COMMENT("# 0 - No demand updates\n"
|
||||||
"# in addition to (non-demand) scheduled updates\n")
|
"# in addition to (non-demand) scheduled updates\n")
|
||||||
EMPCFBOTH("update_wantmin", update_wantmin, int, NSC_INT, 0,
|
EMPCFBOTH("update_wantmin", update_wantmin, int, NSC_INT, 0,
|
||||||
"Number of votes required for a demand update")
|
"Number of votes required for a demand update")
|
||||||
EMPCFBOTH("update_missed", update_missed, int, NSC_INT, 0,
|
|
||||||
"A country vetoes further demand updates after missing that many votes")
|
|
||||||
EMPCFBOTH("update_demandtimes", update_demandtimes, char *, NSC_STRING, 0,
|
EMPCFBOTH("update_demandtimes", update_demandtimes, char *, NSC_STRING, 0,
|
||||||
"Times when unscheduled demand updates can occur, separated by space.")
|
"Times when unscheduled demand updates can occur, separated by space.")
|
||||||
EMPCF_COMMENT("# Give time ranges as HOUR:MINUTE-HOUR:MINUTE, e.g. 20:00-24:00\n"
|
EMPCF_COMMENT("# Give time ranges as HOUR:MINUTE-HOUR:MINUTE, e.g. 20:00-24:00\n"
|
||||||
|
|
|
@ -91,7 +91,6 @@ struct natstr {
|
||||||
coord nat_xorg, nat_yorg; /* origin location in abs coords */
|
coord nat_xorg, nat_yorg; /* origin location in abs coords */
|
||||||
signed char nat_dayno; /* day of the year mod 128 */
|
signed char nat_dayno; /* day of the year mod 128 */
|
||||||
signed char nat_update; /* Want an update or not. */
|
signed char nat_update; /* Want an update or not. */
|
||||||
unsigned char nat_missed; /* How many updates missed */
|
|
||||||
unsigned short nat_tgms; /* # of telegrams to be announced */
|
unsigned short nat_tgms; /* # of telegrams to be announced */
|
||||||
unsigned short nat_ann; /* # of annos pending */
|
unsigned short nat_ann; /* # of annos pending */
|
||||||
unsigned short nat_minused; /* number of minutes used today */
|
unsigned short nat_minused; /* number of minutes used today */
|
||||||
|
|
|
@ -299,7 +299,6 @@ prnat(struct natstr *np)
|
||||||
pr("Happiness <H>: %.2f\n", np->nat_level[NAT_HLEV]);
|
pr("Happiness <H>: %.2f\n", np->nat_level[NAT_HLEV]);
|
||||||
pr("Money <M>: $%6ld\n", np->nat_money);
|
pr("Money <M>: $%6ld\n", np->nat_money);
|
||||||
pr("Telegrams <t>: %6d\n", np->nat_tgms);
|
pr("Telegrams <t>: %6d\n", np->nat_tgms);
|
||||||
pr("Updates missed <U>: %d\n", np->nat_missed);
|
|
||||||
if (opt_HIDDEN) {
|
if (opt_HIDDEN) {
|
||||||
pr("Countries contacted: ");
|
pr("Countries contacted: ");
|
||||||
for (i = 0; i < MAXNOC; i++) {
|
for (i = 0; i < MAXNOC; i++) {
|
||||||
|
@ -745,7 +744,7 @@ docountry(char op, int arg, char *p, struct natstr *np)
|
||||||
np->nat_level[NAT_HLEV] = farg;
|
np->nat_level[NAT_HLEV] = farg;
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
np->nat_missed = arg;
|
warn_deprecated(op);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pr("huh? (%c)\n", op);
|
pr("huh? (%c)\n", op);
|
||||||
|
|
|
@ -111,7 +111,6 @@ zdon(void)
|
||||||
pr("Unable to request an update as the country is in flux\n");
|
pr("Unable to request an update as the country is in flux\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
natp->nat_missed = 0;
|
|
||||||
pr("You (%d) now want an update.\n", whichcnum);
|
pr("You (%d) now want an update.\n", whichcnum);
|
||||||
} else {
|
} else {
|
||||||
pr("You (%d) now DON'T want an update.\n", whichcnum);
|
pr("You (%d) now DON'T want an update.\n", whichcnum);
|
||||||
|
@ -126,10 +125,6 @@ zdon(void)
|
||||||
pr("You want an update.\n");
|
pr("You want an update.\n");
|
||||||
} else
|
} else
|
||||||
pr("You DON'T want an update, yet.\n");
|
pr("You DON'T want an update, yet.\n");
|
||||||
pr("You have missed the vote on a demand update %d times.\n",
|
|
||||||
natp->nat_missed);
|
|
||||||
pr("It takes %d misses to veto a demand update.\n",
|
|
||||||
update_missed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pr("%d of a total of %d lunatics want an update.\n", totwant, totpop);
|
pr("%d of a total of %d lunatics want an update.\n", totwant, totpop);
|
||||||
|
|
|
@ -91,8 +91,7 @@ demand_update_want(int *want, int *pop, int which)
|
||||||
int
|
int
|
||||||
demand_check(void)
|
demand_check(void)
|
||||||
{
|
{
|
||||||
struct natstr *natp;
|
int want, pop;
|
||||||
int want, pop, cn, veto;
|
|
||||||
|
|
||||||
demand_update_want(&want, &pop, 0);
|
demand_update_want(&want, &pop, 0);
|
||||||
if (want < update_wantmin) {
|
if (want < update_wantmin) {
|
||||||
|
@ -101,20 +100,6 @@ demand_check(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
veto = 0;
|
|
||||||
for (cn = 1; 0 != (natp = getnatp(cn)); cn++) {
|
|
||||||
if (natp->nat_stat == STAT_ACTIVE) {
|
|
||||||
if (natp->nat_missed >= update_missed)
|
|
||||||
veto = cn;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (veto) {
|
|
||||||
logerror("no demand update, %d has missed more than %d updates",
|
|
||||||
veto, update_missed);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ int s_p_etu = 10; /* seconds per Empire Time Unit */
|
||||||
int etu_per_update = 60; /* # of etu's per update */
|
int etu_per_update = 60; /* # of etu's per update */
|
||||||
int update_window = 0; /* update window adjustment, in seconds */
|
int update_window = 0; /* update window adjustment, in seconds */
|
||||||
int update_demand = UPD_DEMAND_NONE;
|
int update_demand = UPD_DEMAND_NONE;
|
||||||
int update_missed = 999; /* demand updates missed before veto */
|
|
||||||
int update_wantmin = 1; /* votes required for demand update */
|
int update_wantmin = 1; /* votes required for demand update */
|
||||||
char *update_demandtimes = ""; /* demand update time ranges */
|
char *update_demandtimes = ""; /* demand update time ranges */
|
||||||
char *game_days = ""; /* days game is running */
|
char *game_days = ""; /* days game is running */
|
||||||
|
|
|
@ -501,7 +501,6 @@ struct castr cou_ca[] = {
|
||||||
"yorg", EF_BAD},
|
"yorg", EF_BAD},
|
||||||
{NSC_CHAR, 0, 0, fldoff(natstr, nat_dayno), "dayno", EF_BAD},
|
{NSC_CHAR, 0, 0, fldoff(natstr, nat_dayno), "dayno", EF_BAD},
|
||||||
{NSC_CHAR, 0, 0, fldoff(natstr, nat_update), "update", EF_BAD},
|
{NSC_CHAR, 0, 0, fldoff(natstr, nat_update), "update", EF_BAD},
|
||||||
{NSC_UCHAR, 0, 0, fldoff(natstr, nat_missed), "missed", EF_BAD},
|
|
||||||
{NSC_USHORT, 0, 0, fldoff(natstr, nat_tgms), "tgms", EF_BAD},
|
{NSC_USHORT, 0, 0, fldoff(natstr, nat_tgms), "tgms", EF_BAD},
|
||||||
{NSC_USHORT, 0, 0, fldoff(natstr, nat_ann), "ann", EF_BAD},
|
{NSC_USHORT, 0, 0, fldoff(natstr, nat_ann), "ann", EF_BAD},
|
||||||
{NSC_USHORT, 0, 0, fldoff(natstr, nat_minused), "minused", EF_BAD},
|
{NSC_USHORT, 0, 0, fldoff(natstr, nat_minused), "minused", EF_BAD},
|
||||||
|
|
|
@ -41,10 +41,7 @@ update_removewants(void)
|
||||||
natid cn;
|
natid cn;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
|
|
||||||
for (cn = 0; NULL != (natp = getnatp(cn)); cn++) {
|
for (cn = 0; NULL != (natp = getnatp(cn)); cn++)
|
||||||
if (natp->nat_stat != STAT_UNUSED && !natp->nat_update)
|
|
||||||
natp->nat_missed++;
|
|
||||||
natp->nat_update = 0;
|
natp->nat_update = 0;
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue