(EF_NATION_STATUS, nation_status): New.

(empfile): Add it.
(nat_ca): Use it.
This commit is contained in:
Markus Armbruster 2006-01-04 23:15:47 +00:00
parent 6e6cd67bd8
commit a5c87a2b54
4 changed files with 15 additions and 2 deletions

View 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)

View 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[];

View 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},

View 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"},