(EF_COUNTRY, cou_ca): New.

(empfile): Add it.
(xdvisible): Deal with it.
(ef_open_srv, ef_close_srv): Set it up.
(ef_init_view, ef_fina_view): New.
This commit is contained in:
Markus Armbruster 2006-01-14 16:28:33 +00:00
parent 21e3c9d55e
commit 9eba732cc3
6 changed files with 44 additions and 6 deletions

View file

@ -190,6 +190,9 @@ struct empfile empfile[] = {
{EF_NATION_STATUS, "nation-status", NULL, symbol_ca,
PTR_CACHE(nation_status, EFF_CFG)},
/* Views */
{EF_COUNTRY, "country", NULL, cou_ca, UNMAPPED_CACHE(struct natstr, 0)},
/* Sentinel */
{EF_BAD, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL},
};

View file

@ -400,7 +400,6 @@ struct castr nchr_ca[] = {
};
struct castr treaty_ca[] = {
/* FIXME disclose only to cna, cnb */
{NSC_SHORT, 0, 0, fldoff(trtstr, trt_uid), "uid", EF_TREATY},
{NSC_NATID, 0, 0, fldoff(trtstr, trt_cna), "cna", EF_NATION},
{NSC_NATID, 0, 0, fldoff(trtstr, trt_cnb), "cnb", EF_NATION},
@ -415,7 +414,6 @@ struct castr treaty_ca[] = {
};
struct castr loan_ca[] = {
/* FIXME disclose only to loaner, loanee and partially to all if signed */
{NSC_SHORT, 0, 0, fldoff(lonstr, l_uid), "uid", EF_LOAN},
{NSC_NATID, 0, 0, fldoff(lonstr, l_loner), "loaner", EF_NATION},
{NSC_NATID, 0, 0, fldoff(lonstr, l_lonee), "loanee", EF_NATION},
@ -431,7 +429,6 @@ struct castr loan_ca[] = {
};
struct castr news_ca[] = {
/* FIXME if HIDDEN disclose requires contact with actor and victim, and new */
{NSC_SHORT, 0, 0, fldoff(nwsstr, nws_uid), "uid", EF_NEWS},
{NSC_NATID, 0, 0, fldoff(nwsstr, nws_ano), "actor", EF_NATION},
{NSC_CHAR, 0, 0, fldoff(nwsstr, nws_vrb), "action", EF_NEWS_CHR},
@ -515,7 +512,6 @@ struct castr nat_ca[] = {
EF_BAD},
{NSC_FLOAT, 0, 0, fldoff(natstr, nat_level[NAT_HLEV]), "happiness",
EF_BAD},
/* FIXME nat_b[] */
{NSC_SHORT, 0, MAXNOC, fldoff(natstr, nat_relate), "relations",
EF_NATION_RELATIONS},
{NSC_UCHAR, NSC_DEITY, MAXNOC, fldoff(natstr, nat_contact), "contacts",
@ -526,6 +522,14 @@ struct castr nat_ca[] = {
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
};
struct castr cou_ca[] = {
{NSC_NATID, 0, 0, fldoff(natstr, nat_cnum), "cnum", EF_NATION},
{NSC_CHAR, 0, 0, fldoff(natstr, nat_stat), "stat",
EF_NATION_STATUS},
{NSC_STRINGY, 0, 20, fldoff(natstr, nat_cnam), "cname", EF_BAD},
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
};
struct castr realm_ca[] = {
{NSC_SHORT, 0, 0, fldoff(realmstr, r_uid), "uid", EF_REALM},
{NSC_NATID, 0, 0, fldoff(realmstr, r_cnum), "cnum", EF_NATION},