]> git.pond.sub.org Git - empserver/commitdiff
(EF_NATION_STATUS, nation_status): New.
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 4 Jan 2006 23:15:47 +0000 (23:15 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 4 Jan 2006 23:15:47 +0000 (23:15 +0000)
(empfile): Add it.
(nat_ca): Use it.

include/file.h
include/nsc.h
src/lib/global/file.c
src/lib/global/nsc.c

index 6df412575b86447d01e6b5e08abcf2f20720e95a..efe448fc1b16baf35560720b160c696e14ed78fa 100644 (file)
@@ -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)
 
index 3bd91f3ecde8f82f37bb06629caf08093f9b7235..70d4f07930bf5ca1f0c82aa16f6857514258c7f7 100644 (file)
@@ -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[];
index a56c0fe1745d99fedaa2fcc9b8e785d9febd9085..405cb76c0b625fc3106a78742ab0530374239662 100644 (file)
@@ -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},
index cb411a30aa71c511bc0927e5123ba5baa7e85ff7..4f75fc0bff08918a164fc98f5bc0f0a15146de76 100644 (file)
@@ -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"},