(d_navigation): New.
(dchrstr): Use it.
This commit is contained in:
parent
7179908cf5
commit
100b39d71f
2 changed files with 9 additions and 8 deletions
|
@ -89,12 +89,19 @@ struct sctstr {
|
|||
time_t sct_timestamp; /* Last time this sector was written to */
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
NAV_NONE, /* ships can't navigate */
|
||||
NAVOK, /* ships can always navigate */
|
||||
NAV_02, /* requires 2% effic to navigate */
|
||||
NAV_60 /* requires 60% effic to navigate */
|
||||
} d_navigation;
|
||||
|
||||
struct dchrstr {
|
||||
unsigned char d_uid;
|
||||
int d_mnem; /* map symbol */
|
||||
int d_prd; /* product type */
|
||||
int d_mcst; /* movement cost */
|
||||
int d_nav; /* navigation capability */
|
||||
d_navigation d_nav; /* navigation capability */
|
||||
i_packing d_pkg; /* type of packaging in these sects */
|
||||
float d_ostr; /* offensive strength */
|
||||
float d_dstr; /* defensive strength */
|
||||
|
@ -107,12 +114,6 @@ struct dchrstr {
|
|||
char *d_name; /* full name of sector type */
|
||||
};
|
||||
|
||||
/* for d_nav */
|
||||
#define NAV_NONE 0 /* ships can't navigate */
|
||||
#define NAVOK 1 /* ships can always navigate */
|
||||
#define NAV_02 2 /* requires 2% effic to navigate */
|
||||
#define NAV_60 3 /* requires 60% effic to navigate */
|
||||
|
||||
/* sector types (must agree with order in dchr, empglb.c) */
|
||||
|
||||
#define SCT_WATER 0 /* basics */
|
||||
|
|
|
@ -167,7 +167,7 @@ struct castr dchr_ca[] = {
|
|||
{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_mcst), "mcst", EF_BAD},
|
||||
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_nav), "nav",
|
||||
{NSC_SITYPE(d_navigation), 0, 0, offsetof(struct dchrstr, d_nav), "nav",
|
||||
EF_SECTOR_NAVIGATION},
|
||||
{NSC_SITYPE(i_packing), 0, 0, offsetof(struct dchrstr, d_pkg), "pkg",
|
||||
EF_PACKING},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue