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
|
@ -129,8 +129,7 @@ demand_update_want(int *want, int *pop, int which)
|
|||
for (cn = 1; 0 != (natp = getnatp(cn)); cn++) {
|
||||
/* Only countries which are normal. */
|
||||
/* Should probably include sanctuaries ..... */
|
||||
if (((natp->nat_stat & NORM) == NORM) &&
|
||||
((natp->nat_stat & GOD) != GOD)) {
|
||||
if (natp->nat_stat == STAT_ACTIVE) {
|
||||
totpop++;
|
||||
if ((natp->nat_update & WUPD_WANT) == WUPD_WANT) {
|
||||
totwant++;
|
||||
|
@ -175,8 +174,7 @@ demand_check(void)
|
|||
|
||||
veto = 0;
|
||||
for (cn = 1; 0 != (natp = getnatp(cn)); cn++) {
|
||||
if (((natp->nat_stat & NORM) == NORM) &&
|
||||
((natp->nat_stat & GOD) != GOD)) {
|
||||
if (natp->nat_stat == STAT_ACTIVE) {
|
||||
if (natp->nat_missed >= update_missed)
|
||||
veto = cn;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue