(EFF_OWNER): The assertion that EFF_OWNER implies ef_read() sets

player->owner is no longer used.  Use it to indicate that owner can be
accessed through struct genitem, similar to EFF_XY and EFF_GROUP.
(xdump): Fix ownership checking.  Old version worked only when
nxtitem() set player->owner.

(empfile): Set EFF_OWNER for EF_LOST.  This fixes `xdump lost'
disclosing other countries' losses.
(loststr): Document implications of EFF_OWNER.

(empfile): Set EFF_OWNER for EF_NATION.
(natstr): Rearrange members for EFF_OWNER, document.
(nat_ca): Unused so far.  Clean it up, add most missing selectors.
(fileinit): Use it.  This implements `xdump nation'.

(fileinit): Simplify setting map file size.
This commit is contained in:
Markus Armbruster 2005-05-29 14:14:33 +00:00
parent b111abc2c5
commit 326ac671ba
7 changed files with 33 additions and 36 deletions

View file

@ -80,7 +80,7 @@ struct empfile empfile[] = {
{"pow", "power", 0,
0, sizeof(struct powstr), 0, 0, 0, 0,
-1, -1, 0, 0, 0, 0, 0},
{"nat", "nation", 0,
{"nat", "nation", EFF_OWNER,
0, sizeof(struct natstr), 0, 0, 0, 0,
-1, -1, 0, 0, 0, 0, 0},
{"loan", "loan", 0,
@ -95,7 +95,7 @@ struct empfile empfile[] = {
{"commodity", "commodity", 0,
0, sizeof(struct comstr), 0, 0, 0, 0,
-1, -1, 0, 0, 0, 0, 0},
{"lost", "lostitems", 0,
{"lost", "lostitems", EFF_OWNER,
0, sizeof(struct loststr), 0, 0, 0, 0,
-1, -1, 0, 0, 0, 0, 0}
};