2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2017, 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 * togg.c: Set player flags
29 * Known contributors to this file:
46 np = getnatp(player->cnum);
47 if (player->argp[1]) {
48 switch (*player->argp[1]) {
77 if (!strcmp(player->argp[2], "on"))
79 else if (!strcmp(player->argp[2], "off"))
84 pos = !(np->nat_flags & flag);
86 np->nat_flags |= flag;
88 np->nat_flags &= ~flag;
90 pr("%s flag %s\n", name, pos ? "on" : "off");
92 if (np->nat_flags & NF_INFORM)
93 pr("inform flag on\n");
95 pr("inform flag off\n");
96 if (np->nat_flags & NF_FLASH)
97 pr("flash flag on\n");
99 pr("flash flag off\n");
100 if (np->nat_flags & NF_BEEP)
101 pr("beep flag on\n");
103 pr("beep flag off\n");
104 if (np->nat_flags & NF_COASTWATCH)
105 pr("coastwatch flag on\n");
107 pr("coastwatch flag off\n");
108 if (np->nat_flags & NF_SONAR)
109 pr("sonar flag on\n");
111 pr("sonar flag off\n");
112 if (np->nat_flags & NF_TECHLISTS)
113 pr("techlists flag on\n");
115 pr("techlists flag off\n");