Change nation status from bits to a simple enum:
(nat_status, STAT_UNUSED, STAT_VIS, STAT_ACTIVE): New. (STAT_NEW, STAT_SANCT, STAT_GOD): Change into nat_status members. (STAT_INUSE, STAT_NORM): Remove. (natstr): Use new nat_status for nat_stat. New value Old value STAT_UNUSED 0 STAT_NEW STAT_INUSE | STAT_NEW STAT_VIS STAT_INUSE STAT_SANCT STAT_INUSE | STAT_SANCT STAT_ACTIVE STAT_INUSE | STAT_NORM STAT_GOD STAT_INUSE | STAT_NORM | STAT_GOD Users changed.
This commit is contained in:
parent
41c2c27376
commit
8b16c31223
35 changed files with 113 additions and 151 deletions
|
@ -59,7 +59,7 @@ coun(void)
|
|||
pr(" # last access %sstatus country name\n",
|
||||
player->god ? "BTU " : "");
|
||||
while (nxtitem(&ni, &nat)) {
|
||||
if ((nat.nat_stat & STAT_INUSE) == 0)
|
||||
if (nat.nat_stat == STAT_UNUSED)
|
||||
continue;
|
||||
coun_list(&nat);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ coun_list(struct natstr *natp)
|
|||
|
||||
if (getplayer(cn)
|
||||
&& (player->god
|
||||
|| (natp->nat_stat & STAT_GOD)
|
||||
|| natp->nat_stat == STAT_GOD
|
||||
|| cn == player->cnum || getrel(natp, player->cnum) == ALLIED))
|
||||
pr(" Now logged on ");
|
||||
else if (player->god) {
|
||||
|
@ -94,13 +94,13 @@ coun_list(struct natstr *natp)
|
|||
if (player->god)
|
||||
pr(" %4d", natp->nat_btu);
|
||||
|
||||
if (natp->nat_stat & STAT_GOD)
|
||||
if (natp->nat_stat == STAT_GOD)
|
||||
status = "DEITY";
|
||||
else if (natp->nat_stat & STAT_NEW)
|
||||
else if (natp->nat_stat == STAT_NEW)
|
||||
status = "New";
|
||||
else if (natp->nat_stat & STAT_SANCT)
|
||||
else if (natp->nat_stat == STAT_SANCT)
|
||||
status = "Sanctuary";
|
||||
else if (natp->nat_stat & STAT_NORM) {
|
||||
else if (natp->nat_stat == STAT_ACTIVE) {
|
||||
status = "Active";
|
||||
if (!opt_HIDDEN || player->god) {
|
||||
if (influx(natp))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue