(EF_SECTOR_NAVIGATION, sector_navigation): New.
(empfile): Add it. (dchr_ca): Use it. (NAV_NONE): New.
This commit is contained in:
parent
18902e45d0
commit
4f20f3dd9c
5 changed files with 15 additions and 1 deletions
|
@ -145,6 +145,7 @@ enum {
|
||||||
EF_PACKING,
|
EF_PACKING,
|
||||||
EF_RESOURCES,
|
EF_RESOURCES,
|
||||||
EF_NATION_STATUS,
|
EF_NATION_STATUS,
|
||||||
|
EF_SECTOR_NAVIGATION,
|
||||||
/* Views */
|
/* Views */
|
||||||
EF_COUNTRY,
|
EF_COUNTRY,
|
||||||
/* Number of types: */
|
/* Number of types: */
|
||||||
|
|
|
@ -237,6 +237,7 @@ extern struct symbol agreement_statuses[];
|
||||||
extern struct symbol plague_stages[];
|
extern struct symbol plague_stages[];
|
||||||
extern struct symbol packing[];
|
extern struct symbol packing[];
|
||||||
extern struct symbol resources[];
|
extern struct symbol resources[];
|
||||||
|
extern struct symbol sector_navigation[];
|
||||||
|
|
||||||
/* src/lib/subs/nstr.c */
|
/* src/lib/subs/nstr.c */
|
||||||
extern int nstr_comp(struct nscstr *np, int len, int type, char *str);
|
extern int nstr_comp(struct nscstr *np, int len, int type, char *str);
|
||||||
|
|
|
@ -108,6 +108,7 @@ struct dchrstr {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* for d_nav */
|
/* for d_nav */
|
||||||
|
#define NAV_NONE 0 /* ships can't navigate */
|
||||||
#define NAVOK 1 /* ships can always navigate */
|
#define NAVOK 1 /* ships can always navigate */
|
||||||
#define NAV_02 2 /* requires 2% effic to navigate */
|
#define NAV_02 2 /* requires 2% effic to navigate */
|
||||||
#define NAV_60 3 /* requires 60% effic to navigate */
|
#define NAV_60 3 /* requires 60% effic to navigate */
|
||||||
|
|
|
@ -189,6 +189,8 @@ struct empfile empfile[] = {
|
||||||
{EF_RESOURCES, "resources", NULL, symbol_ca, PTR_CACHE(resources, EFF_CFG)},
|
{EF_RESOURCES, "resources", NULL, symbol_ca, PTR_CACHE(resources, EFF_CFG)},
|
||||||
{EF_NATION_STATUS, "nation-status", NULL, symbol_ca,
|
{EF_NATION_STATUS, "nation-status", NULL, symbol_ca,
|
||||||
PTR_CACHE(nation_status, EFF_CFG)},
|
PTR_CACHE(nation_status, EFF_CFG)},
|
||||||
|
{EF_SECTOR_NAVIGATION, "sector-navigation", NULL, symbol_ca,
|
||||||
|
PTR_CACHE(sector_navigation, EFF_CFG)},
|
||||||
|
|
||||||
/* Views */
|
/* Views */
|
||||||
{EF_COUNTRY, "country", NULL, cou_ca, UNMAPPED_CACHE(struct natstr, 0)},
|
{EF_COUNTRY, "country", NULL, cou_ca, UNMAPPED_CACHE(struct natstr, 0)},
|
||||||
|
|
|
@ -167,7 +167,8 @@ struct castr dchr_ca[] = {
|
||||||
{NSC_INT, NSC_CONST, 0, offsetof(struct dchrstr, d_mnem), "mnem", EF_BAD},
|
{NSC_INT, NSC_CONST, 0, offsetof(struct dchrstr, d_mnem), "mnem", EF_BAD},
|
||||||
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_prd), "prd", EF_PRODUCT},
|
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_prd), "prd", EF_PRODUCT},
|
||||||
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_mcst), "mcst", EF_BAD},
|
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_mcst), "mcst", EF_BAD},
|
||||||
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_nav), "nav", EF_BAD /* FIXME */},
|
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_nav), "nav",
|
||||||
|
EF_SECTOR_NAVIGATION},
|
||||||
{NSC_SITYPE(i_packing), 0, 0, offsetof(struct dchrstr, d_pkg), "pkg",
|
{NSC_SITYPE(i_packing), 0, 0, offsetof(struct dchrstr, d_pkg), "pkg",
|
||||||
EF_PACKING},
|
EF_PACKING},
|
||||||
{NSC_FLOAT, 0, 0, offsetof(struct dchrstr, d_ostr), "ostr", EF_BAD},
|
{NSC_FLOAT, 0, 0, offsetof(struct dchrstr, d_ostr), "ostr", EF_BAD},
|
||||||
|
@ -781,3 +782,11 @@ struct symbol resources[] = {
|
||||||
{offsetof(struct sctstr, sct_uran), "uran"},
|
{offsetof(struct sctstr, sct_uran), "uran"},
|
||||||
{0, NULL}
|
{0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct symbol sector_navigation[] = { /* for d_nav */
|
||||||
|
{NAV_NONE, "land"},
|
||||||
|
{NAVOK, "sea"},
|
||||||
|
{NAV_02, "harbor"},
|
||||||
|
{NAV_60, "bridge"},
|
||||||
|
{0, NULL}
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue