(opt_DEMANDUPDATE): Remove. Deities can use update_demandpolicy to

control demand updates.
This commit is contained in:
Markus Armbruster 2007-07-08 15:26:23 +00:00
parent d0e2834ca9
commit 6ca5e47f69
6 changed files with 30 additions and 31 deletions

View file

@ -161,8 +161,6 @@ EMPCF_OPT("BLITZ", opt_BLITZ,
"Enable blitz mode")
EMPCF_OPT("BRIDGETOWERS", opt_BRIDGETOWERS,
"Allow bridge towers")
EMPCF_OPT("DEMANDUPDATE", opt_DEMANDUPDATE,
"Allow demand updates")
EMPCF_OPT("EASY_BRIDGES", opt_EASY_BRIDGES,
"Allow bridge building without bridge heads")
EMPCF_OPT("FALLOUT", opt_FALLOUT,

View file

@ -102,8 +102,7 @@ upda(void)
next += update_window;
pr("The next update window stops at %19.19s.\n", ctime(&next));
}
if (opt_DEMANDUPDATE) {
if (update_demandpolicy != UDDEM_DISABLE) {
switch (update_demandpolicy) {
case UDDEM_TMCHECK:
next_update_check_time(&now, &next, &delta);
@ -114,18 +113,19 @@ upda(void)
case UDDEM_COMSET:
pr("Demand updates occur right after the demand is set.\n");
break;
case UDDEM_DISABLE:
break;
default:
CANT_REACH();
pr("Update demand policy is inconsistent.\n");
}
}
}
if ((update_policy == UDP_TIMES) ||
((update_demandpolicy == UDDEM_TMCHECK) && opt_DEMANDUPDATE)) {
(update_demandpolicy == UDDEM_TMCHECK)) {
if (*update_times != 0)
pr("The update schedule is: %s\n", update_times);
}
if (opt_DEMANDUPDATE) {
if (update_demandpolicy != UDDEM_DISABLE) {
if (*update_demandtimes != 0)
pr("Demand updates are allowed during: %s\n",
@ -133,7 +133,7 @@ upda(void)
pr("Demand updates require %d country(s) to want one.\n",
update_wantmin);
}
}
if (*game_days != 0)
pr("Game days are: %s\n", game_days);
if (*game_hours != 0)

View file

@ -54,6 +54,7 @@
#include "commands.h"
#include "optlist.h"
#include "server.h"
#include "wantupd.h"
int
zdon(void)
@ -70,7 +71,7 @@ zdon(void)
int dowant;
char buf[1024];
if (!opt_DEMANDUPDATE) {
if (update_demandpolicy != UDDEM_DISABLE) {
pr("Demand updates are not enabled.\n");
return RET_FAIL;
}

View file

@ -224,7 +224,7 @@ updatetime(time_t *now)
return 1;
}
}
if (opt_DEMANDUPDATE) {
if (UDDEM_DISABLE != update_demandpolicy) {
if (demand_check()) {
logerror("Demand update, at check time.");
return 1;

View file

@ -40,7 +40,6 @@ int opt_ALL_BLEED = 1;
int opt_AUTO_POWER = 0;
int opt_BLITZ = 1;
int opt_BRIDGETOWERS = 1;
int opt_DEMANDUPDATE = 1;
int opt_EASY_BRIDGES = 1;
int opt_FALLOUT = 1;
int opt_FUEL = 0;

View file

@ -41,6 +41,7 @@
#include "player.h"
#include "server.h"
#include "update.h"
#include "wantupd.h"
long money[MAXNOC];
long pops[MAXNOC];
@ -158,7 +159,7 @@ update_main(void)
mob_plane(etu);
mob_land(etu);
}
if (opt_DEMANDUPDATE)
if (update_demandpolicy != UDDEM_DISABLE)
update_removewants();
/* flush all mem file objects to disk */
ef_flush(EF_NATION);