"# in addition to (non-demand) scheduled updates\n")
EMPCFBOTH("update_wantmin", update_wantmin, int, NSC_INT, 0,
"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,
"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"
coord nat_xorg, nat_yorg; /* origin location in abs coords */
signed char nat_dayno; /* day of the year mod 128 */
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_ann; /* # of annos pending */
unsigned short nat_minused; /* number of minutes used today */
pr("Happiness <H>: %.2f\n", np->nat_level[NAT_HLEV]);
pr("Money <M>: $%6ld\n", np->nat_money);
pr("Telegrams <t>: %6d\n", np->nat_tgms);
- pr("Updates missed <U>: %d\n", np->nat_missed);
if (opt_HIDDEN) {
pr("Countries contacted: ");
for (i = 0; i < MAXNOC; i++) {
np->nat_level[NAT_HLEV] = farg;
break;
case 'U':
- np->nat_missed = arg;
+ warn_deprecated(op);
break;
default:
pr("huh? (%c)\n", op);
pr("Unable to request an update as the country is in flux\n");
return RET_FAIL;
}
- natp->nat_missed = 0;
pr("You (%d) now want an update.\n", whichcnum);
} else {
pr("You (%d) now DON'T want an update.\n", whichcnum);
pr("You want an update.\n");
} else
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);
int
demand_check(void)
{
- struct natstr *natp;
- int want, pop, cn, veto;
+ int want, pop;
demand_update_want(&want, &pop, 0);
if (want < update_wantmin) {
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;
}
int etu_per_update = 60; /* # of etu's per update */
int update_window = 0; /* update window adjustment, in seconds */
int update_demand = UPD_DEMAND_NONE;
-int update_missed = 999; /* demand updates missed before veto */
int update_wantmin = 1; /* votes required for demand update */
char *update_demandtimes = ""; /* demand update time ranges */
char *game_days = ""; /* days game is running */
"yorg", 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_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_ann), "ann", EF_BAD},
{NSC_USHORT, 0, 0, fldoff(natstr, nat_minused), "minused", EF_BAD},
natid cn;
struct natstr *natp;
- for (cn = 0; NULL != (natp = getnatp(cn)); cn++) {
- if (natp->nat_stat != STAT_UNUSED && !natp->nat_update)
- natp->nat_missed++;
+ for (cn = 0; NULL != (natp = getnatp(cn)); cn++)
natp->nat_update = 0;
- }
return 0;
}