(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

@ -57,7 +57,11 @@ struct boundstr {
};
struct natstr {
/* initial part must match struct genitem */
short ef_type;
natid nat_cnum; /* our country number */
/* end of part matching struct genitem */
s_char nat_stat; /* inuse, norm, god, abs */
s_char nat_cnam[20]; /* country name */
s_char nat_pnam[20]; /* representative */
s_char nat_hostaddr[32]; /* host addr of last user */
@ -66,8 +70,6 @@ struct natstr {
coord nat_xstart, nat_ystart; /* cap location at start */
coord nat_xcap, nat_ycap; /* cap location in abs coords */
coord nat_xorg, nat_yorg; /* origin location in abs coords */
natid nat_cnum; /* our country number */
s_char nat_stat; /* inuse, norm, god, abs */
s_char nat_dayno; /* day of the year mod 128 */
s_char nat_connected; /* connected or not? */
s_char nat_update; /* Want an update or not. */