diff --git a/include/file.h b/include/file.h index 6df41257..efe448fc 100644 --- a/include/file.h +++ b/include/file.h @@ -142,7 +142,8 @@ struct empfile { #define EF_PLAGUE_STAGES 40 #define EF_PACKING 41 #define EF_RESOURCES 42 -#define EF_MAX 43 +#define EF_NATION_STATUS 43 +#define EF_MAX 44 #define EF_IS_GAME_STATE(type) (EF_SECTOR <= (type) && (type) <= EF_LOST) diff --git a/include/nsc.h b/include/nsc.h index 3bd91f3e..70d4f079 100644 --- a/include/nsc.h +++ b/include/nsc.h @@ -227,6 +227,7 @@ extern struct symbol meta_flags[]; extern struct symbol missions[]; extern struct symbol plane_flags[]; extern struct symbol retreat_flags[]; +extern struct symbol nation_status[]; extern struct symbol nation_flags[]; extern struct symbol nation_relations[]; extern struct symbol level[]; diff --git a/src/lib/global/file.c b/src/lib/global/file.c index a56c0fe1..405cb76c 100644 --- a/src/lib/global/file.c +++ b/src/lib/global/file.c @@ -185,6 +185,8 @@ struct empfile empfile[] = { PTR_CACHE(plague_stages, EFF_CFG)}, {EF_PACKING, "packing", NULL, symbol_ca, PTR_CACHE(packing, EFF_CFG)}, {EF_RESOURCES, "resources", NULL, symbol_ca, PTR_CACHE(resources, EFF_CFG)}, + {EF_NATION_STATUS, "nation-status", NULL, symbol_ca, + PTR_CACHE(nation_status, EFF_CFG)}, /* Sentinel */ {EF_BAD, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL}, diff --git a/src/lib/global/nsc.c b/src/lib/global/nsc.c index cb411a30..4f75fc0b 100644 --- a/src/lib/global/nsc.c +++ b/src/lib/global/nsc.c @@ -486,7 +486,7 @@ struct castr trade_ca[] = { struct castr nat_ca[] = { {NSC_NATID, 0, 0, fldoff(natstr, nat_cnum), "cnum", EF_NATION}, {NSC_SITYPE(nat_status), 0, 0, fldoff(natstr, nat_stat), "stat", - EF_BAD /* FIXME */}, + EF_NATION_STATUS}, {NSC_STRINGY, 0, 20, fldoff(natstr, nat_cnam), "cname", EF_BAD}, {NSC_STRINGY, NSC_DEITY, 20, fldoff(natstr, nat_pnam), "passwd", EF_BAD}, {NSC_STRINGY, 0, 32, fldoff(natstr, nat_hostaddr), "ip", EF_BAD}, @@ -693,6 +693,15 @@ struct symbol retreat_flags[] = { {0, NULL} }; +struct symbol nation_status[] = { + {STAT_UNUSED, "unused"}, + {STAT_NEW, "new"}, + {STAT_VIS, "visitor"}, + {STAT_SANCT, "sanctuary"}, + {STAT_ACTIVE, "active"}, + {STAT_GOD, "deity"} +}; + struct symbol nation_flags[] = { {NF_INFORM, "inform"}, {NF_FLASH, "flash"},