2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2021, 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.
65 if (update_demand != UPD_DEMAND_SCHED
66 && update_demand != UPD_DEMAND_ASYNC) {
67 pr("Demand updates are not enabled.\n");
70 p = getstarg(player->argp[1], "Want update? [Yes|No|Check] ", buf);
73 if (*p == 'y' || *p == 'Y') {
76 } else if (*p == 'n' || *p == 'N') {
85 whichcnum = natarg(player->argp[2], "for which country? ");
89 whichcnum = player->cnum;
91 if (!(natp = getnatp(whichcnum))) {
92 pr("Unable to find country. %d\n", whichcnum);
93 pr("Notify the Deity.\n");
99 pr("Unable to request an update as the country is in flux\n");
102 pr("You (%d) now want an update.\n", whichcnum);
104 pr("You (%d) now DON'T want an update.\n", whichcnum);
106 natp->nat_update = wantupd;
110 dowant = demand_update_want(&totwant, &totpop, whichcnum);
113 pr("You want an update.\n");
115 pr("You DON'T want an update, yet.\n");
118 pr("%d of a total of %d lunatics want an update.\n", totwant, totpop);
120 if (!checking && wantupd && demandupdatecheck()) {
121 pr("Here goes...\n");