2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure
6 * This program 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 2 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, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * See files README, COPYING and CREDITS in the root of the source
23 * tree for related information and legal notices. It is expected
24 * that future projects/authors will amend these files as needed.
28 * zdon.c: Update right now
30 * Known contributors to this file:
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 whichcnum = player->cnum;
80 /* Deity syntax "country what" */
81 whichcnum = onearg(player->argp[1], "Which country no.? ");
82 if ((whichcnum > 0) && (getnatp(whichcnum)))
83 p = getstarg(player->argp[2], "Want update? [Yes|No|Check] ",
86 p = getstarg(player->argp[1], "Want update? [Yes|No|Check] ", buf);
94 if (*p == 'y' || *p == 'Y') {
97 } else if (*p == 'n' || *p == 'N') {
103 if (!(natp = getnatp(whichcnum))) {
104 pr("Unable to find country. %d\n", whichcnum);
105 pr("Notify the Deity.\n");
111 pr("Unable to request an update as the country is in flux\n");
114 natp->nat_missed = 0;
115 pr("You (%d) now want an update.\n", whichcnum);
117 pr("You (%d) now DON'T want an update.\n", whichcnum);
119 natp->nat_update = wantupd;
123 dowant = demand_update_want(&totwant, &totpop, whichcnum);
126 pr("You want an update.\n");
128 pr("You DON'T want an update, yet.\n");
129 pr("You have missed the vote on a demand update %d times.\n",
131 pr("It takes %d misses to veto a demand update.\n",
135 pr("%d of a total of %d lunatics want an update.\n", totwant, totpop);
137 if (!checking && wantupd && demandupdatecheck()) {
138 pr("Here goes...\n");