Change xdump nat to show only own country, and xdump cou to show to
deities what xdump nat used to show: (cou_ca): Remove initializer. (ef_init_srv): Initialize cou_ca[] from nat_ca[]. (xdvisible): Change case EF_NATION to return true only for owner even for deities.
This commit is contained in:
parent
3f96090ac5
commit
58f67c8e19
3 changed files with 15 additions and 10 deletions
|
@ -494,6 +494,11 @@ struct castr trade_ca[] = {
|
|||
};
|
||||
|
||||
struct castr nat_ca[] = {
|
||||
/*
|
||||
* Keep selectors cnum, stat and cname at the beginning.
|
||||
* ef_init_srv() makes their copies in cou_ca[] accessible for
|
||||
* mortals.
|
||||
*/
|
||||
{NSC_NATID, 0, 0, fldoff(natstr, nat_cnum), "cnum", EF_NATION},
|
||||
{NSC_SITYPE(nat_status), 0, 0, fldoff(natstr, nat_stat), "stat",
|
||||
EF_NATION_STATUS},
|
||||
|
@ -535,13 +540,8 @@ struct castr nat_ca[] = {
|
|||
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
|
||||
};
|
||||
|
||||
struct castr cou_ca[] = {
|
||||
{NSC_NATID, NSC_CONST, 0, fldoff(natstr, nat_cnum), "cnum", EF_NATION},
|
||||
{NSC_SITYPE(nat_status), NSC_CONST, 0, fldoff(natstr, nat_stat), "stat",
|
||||
EF_NATION_STATUS},
|
||||
{NSC_STRINGY, NSC_CONST, 20, fldoff(natstr, nat_cnam), "cname", EF_BAD},
|
||||
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
|
||||
};
|
||||
struct castr cou_ca[sizeof(nat_ca) / sizeof(*nat_ca)];
|
||||
/* initialized in ef_init_srv() */
|
||||
|
||||
struct castr realm_ca[] = {
|
||||
/* uid is encoded in cnum, realm */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue