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
|
@ -61,7 +61,7 @@ chan(void)
|
|||
buf)) == 0)
|
||||
return RET_SYN;
|
||||
us = getnatp(player->cnum);
|
||||
if (us->nat_stat == VIS) {
|
||||
if (us->nat_stat == STAT_VIS) {
|
||||
pr("Visitor countries can't change their country name or representative.\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ chan(void)
|
|||
case 'c':
|
||||
charge = 0;
|
||||
btucost = 0;
|
||||
if (!player->god && (us->nat_stat & STAT_NORM)) {
|
||||
if (us->nat_stat == STAT_ACTIVE) {
|
||||
if (opt_BLITZ == 0) {
|
||||
if (us->nat_btu < 254) {
|
||||
pr("You need 254 btus to change your country name!\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue