(nsc_type): New member NSC_HIDDEN.
(meta_type): Add its entry. (setnum, nstr_promote, nstr_exec_val): Deal with it. nstr_exec_val() implements opt_HIDDEN by mapping unknown values to -1. (natstr, nat_ca): Use it for member nat_relate. This also halves its size. Fixes very minor leak: before, player could see relations to all countries, regardless of contact. (nation_relations): Add entry for -1.
This commit is contained in:
parent
6844c94b4a
commit
75604d817c
6 changed files with 23 additions and 4 deletions
|
@ -527,7 +527,7 @@ struct castr nat_ca[] = {
|
|||
EF_BAD},
|
||||
{NSC_FLOAT, 0, 0, fldoff(natstr, nat_level[NAT_HLEV]), "happiness",
|
||||
EF_BAD},
|
||||
{NSC_SHORT, 0, MAXNOC, fldoff(natstr, nat_relate), "relations",
|
||||
{NSC_HIDDEN, 0, MAXNOC, fldoff(natstr, nat_relate), "relations",
|
||||
EF_NATION_RELATIONS},
|
||||
/* should show mortals whether there's contact (obvious from relations?) */
|
||||
{NSC_UCHAR, NSC_DEITY, MAXNOC, fldoff(natstr, nat_contact), "contacts",
|
||||
|
|
|
@ -94,6 +94,7 @@ struct symbol meta_type[] = {
|
|||
{NSC_INT, "d"},
|
||||
{NSC_XCOORD, "d"},
|
||||
{NSC_YCOORD, "d"},
|
||||
{NSC_HIDDEN, "d"},
|
||||
{NSC_TIME, "d"},
|
||||
{NSC_FLOAT, "g"},
|
||||
{NSC_STRINGY,"c"},
|
||||
|
@ -124,6 +125,7 @@ struct symbol nation_flags[] = {
|
|||
};
|
||||
|
||||
struct symbol nation_relations[] = {
|
||||
{-1, "unknown"},
|
||||
{AT_WAR, "at-war"},
|
||||
{SITZKRIEG, "sitzkrieg"},
|
||||
{MOBILIZATION, "mobilization"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue