nav, ship and land plague status (deity only), plane theta (governs
satellite movement), trade selectors xloc, yloc, commodity selectors
xbuy, ybuy.
+Incremental dump doesn't work after importing news with the empdump
+utility.
.s1
.L "FUTURE DIRECTIONS:"
xdump is still fairly new, and experience with it may lead to changes.
{EF_NUKE, "nuke", "nuke", nuke_ca,
UNMAPPED_CACHE(struct nukstr, EFF_TYPED | EFF_XY | EFF_OWNER)},
{EF_NEWS, "news", "news", news_ca,
- UNMAPPED_CACHE(struct nwsstr, EFF_TYPED)},
+ UNMAPPED_CACHE(struct nwsstr, 0)},
{EF_TREATY, "treaty", "treaty", treaty_ca,
UNMAPPED_CACHE(struct trtstr, EFF_TYPED)},
{EF_TRADE, "trade", "trade", trade_ca,
static void *nsc_lnd_dam(struct valstr *, struct natstr *, void *);
static void *nsc_lnd_aaf(struct valstr *, struct natstr *, void *);
static void *nsc_lchr(struct valstr *, struct natstr *, void *);
+static void *nsc_nws_timestamp(struct valstr *, struct natstr *, void *);
/* Ugly hack to improve legibility by avoid long lines */
#define fldoff(fld) offsetof(CURSTR, fld)
struct castr news_ca[] = {
#define CURSTR struct nwsstr
- /* no need for uid as long as it's not referenced from other tables */
- {"timestamp", fldoff(nws_timestamp), NSC_TIME, 0, NULL,
- EF_BAD, NSC_EXTRA},
+ {"timestamp", 0, NSC_LONG, 0, nsc_nws_timestamp, EF_BAD, NSC_EXTRA},
{"actor", fldoff(nws_ano), NSC_NATID, 0, NULL, EF_NATION, 0},
{"action", fldoff(nws_vrb), NSC_UCHAR, 0, NULL, EF_NEWS_CHR, 0},
{"victim", fldoff(nws_vno), NSC_NATID, 0, NULL, EF_NATION, 0},
val->val_as.sym.get = NULL;
return lchr + ((struct lndstr *)ptr)->lnd_type;
}
+
+static void *
+nsc_nws_timestamp(struct valstr *val, struct natstr *natp, void *ptr)
+{
+ struct nwsstr *np = ptr;
+
+ val->val_as.lng = np->nws_when + np->nws_duration;
+ return NULL;
+}