2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure, Markus Armbruster
6 * Empire is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * See files README, COPYING and CREDITS in the root of the source
22 * tree for related information and legal notices. It is expected
23 * that future projects/authors will amend these files as needed.
27 * zdon.c: Update right now
29 * Known contributors to this file:
31 * Markus Armbruster, 2007-2010
36 * Normal player: zdone [Y|N|C]
37 * Deity : zdone [country_num [Y|N|C]]
40 * Y = Yes, wants an update.
41 * N = No, change status to not wanting an update.
42 * C = Check (the default), check how many want an update.
44 * Sets/Unsets a nation flag.
46 * Only considers NORMAL, active countries. No Deities or sanctuaries.
48 * After the change, send a message to the "tm" for it to check
49 * if an update should occur.
72 if (update_demand != UPD_DEMAND_SCHED
73 && update_demand != UPD_DEMAND_ASYNC) {
74 pr("Demand updates are not enabled.\n");
77 p = getstarg(player->argp[1], "Want update? [Yes|No|Check] ", buf);
80 if (*p == 'y' || *p == 'Y') {
83 } else if (*p == 'n' || *p == 'N') {
92 whichcnum = natarg(player->argp[2], "for which country? ");
96 whichcnum = player->cnum;
98 if (!(natp = getnatp(whichcnum))) {
99 pr("Unable to find country. %d\n", whichcnum);
100 pr("Notify the Deity.\n");
106 pr("Unable to request an update as the country is in flux\n");
109 pr("You (%d) now want an update.\n", whichcnum);
111 pr("You (%d) now DON'T want an update.\n", whichcnum);
113 natp->nat_update = wantupd;
117 dowant = demand_update_want(&totwant, &totpop, whichcnum);
120 pr("You want an update.\n");
122 pr("You DON'T want an update, yet.\n");
125 pr("%d of a total of %d lunatics want an update.\n", totwant, totpop);
127 if (!checking && wantupd && demandupdatecheck()) {
128 pr("Here goes...\n");