/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
#include <config.h>
#include <stddef.h>
-#include "misc.h"
-#include "xy.h"
-#include "loan.h"
+#include "empobj.h"
+#include "file.h"
#include "nsc.h"
-#include "news.h"
-#include "nuke.h"
-#include "plane.h"
-#include "ship.h"
-#include "land.h"
-#include "sect.h"
-#include "trade.h"
-#include "treaty.h"
-#include "genitem.h"
-#include "nat.h"
-#include "map.h"
-#include "commodity.h"
-#include "lost.h"
#include "product.h"
-#include "file.h"
#define fldoff(str, fld) offsetof(struct str, fld)
{NSC_INT, 0, 0, offsetof(struct pchrstr, p_nlndx), "nlndx", EF_LEVEL},
{NSC_INT, 0, 0, offsetof(struct pchrstr, p_nlmin), "nlmin", EF_BAD},
{NSC_INT, 0, 0, offsetof(struct pchrstr, p_nllag), "nllag", EF_BAD},
- {NSC_INT, 0, 0, offsetof(struct pchrstr, p_effic), "effic", EF_BAD},
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
};
{NSC_NATID, 0, 0, fldoff(sctstr, sct_own), "owner", EF_NATION},
{NSC_XCOORD, NSC_CONST, 0, fldoff(sctstr, sct_x), "xloc", EF_BAD},
{NSC_YCOORD, NSC_CONST, 0, fldoff(sctstr, sct_y), "yloc", EF_BAD},
- {NSC_TYPEID, 0, 0, fldoff(sctstr, sct_type), "des", EF_SECTOR_CHR},
+ {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_type), "des", EF_SECTOR_CHR},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_effic), "effic", EF_BAD},
{NSC_SHORT, 0, 0, fldoff(sctstr, sct_mobil), "mobil", EF_BAD},
{NSC_UCHAR, NSC_DEITY, 0, fldoff(sctstr, sct_loyal), "loyal", EF_BAD},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_terr1), "terr1", EF_BAD},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_terr2), "terr2", EF_BAD},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_terr3), "terr3", EF_BAD},
+ {NSC_UCHAR, NSC_DEITY, 0, fldoff(sctstr, sct_dterr), "dterr", EF_BAD},
{NSC_XCOORD, 0, 0, fldoff(sctstr, sct_dist_x), "xdist", EF_BAD},
{NSC_YCOORD, 0, 0, fldoff(sctstr, sct_dist_y), "ydist", EF_BAD},
{NSC_SHORT, 0, 0, fldoff(sctstr, sct_avail), "avail", EF_BAD},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_work), "work", EF_BAD},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_coastal), "coastal", EF_BAD},
- {NSC_TYPEID, 0, 0, fldoff(sctstr, sct_newtype), "newdes", EF_SECTOR_CHR},
+ {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_newtype), "newdes", EF_SECTOR_CHR},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_min), "min", EF_BAD},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_gmin), "gold", EF_BAD},
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_fertil), "fert", EF_BAD},
{NSC_STRINGY, NSC_CONST, 1, offsetof(struct dchrstr, d_mnem), "mnem",
EF_BAD},
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_prd), "prd", EF_PRODUCT},
- {NSC_INT, 0, 0, offsetof(struct dchrstr, d_mcst), "mcst", EF_BAD},
+ {NSC_INT, 0, 0, offsetof(struct dchrstr, d_peffic), "peffic", EF_BAD},
+ {NSC_FLOAT, 0, 0, offsetof(struct dchrstr, d_mob0), "mob0", EF_BAD},
+ {NSC_FLOAT, 0, 0, offsetof(struct dchrstr, d_mob1), "mob1", EF_BAD},
{NSC_SITYPE(d_navigation), 0, 0, offsetof(struct dchrstr, d_nav), "nav",
EF_SECTOR_NAVIGATION},
{NSC_SITYPE(i_packing), 0, 0, offsetof(struct dchrstr, d_pkg), "pkg",
};
#define NSC_GENITEM(ef_type, ef_chr) \
-{ NSC_SHORT, 0, 0, fldoff(genitem, uid), "uid", ef_type}, \
-{ NSC_NATID, 0, 0, fldoff(genitem, own), "owner", EF_NATION}, \
-{ NSC_XCOORD, 0, 0, fldoff(genitem, x), "xloc", EF_BAD}, \
-{ NSC_YCOORD, 0, 0, fldoff(genitem, y), "yloc", EF_BAD}, \
-{ NSC_TYPEID, 0, 0, fldoff(genitem, type), "type", ef_chr}, \
-{ NSC_CHAR, 0, 0, fldoff(genitem, effic), "effic", EF_BAD}, \
-{ NSC_CHAR , 0, 0, fldoff(genitem, mobil), "mobil", EF_BAD}, \
-{ NSC_UCHAR , 0, 0, fldoff(genitem, off), "off", EF_BAD}, \
-{ NSC_SHORT, 0, 0, fldoff(genitem, tech), "tech", EF_BAD}, \
-{ NSC_STRINGY, NSC_EXTRA, 1, fldoff(genitem, group), "group", EF_BAD}, \
-{ NSC_XCOORD, 0, 0, fldoff(genitem, opx), "opx", EF_BAD}, \
-{ NSC_YCOORD, 0, 0, fldoff(genitem, opy), "opy", EF_BAD}, \
-{ NSC_SHORT, 0, 0, fldoff(genitem, mission), "mission", EF_MISSIONS}, \
-{ NSC_SHORT, 0, 0, fldoff(genitem, radius), "radius", EF_BAD}
+{ NSC_SHORT, 0, 0, fldoff(empobj, uid), "uid", ef_type}, \
+{ NSC_NATID, 0, 0, fldoff(empobj, own), "owner", EF_NATION}, \
+{ NSC_XCOORD, 0, 0, fldoff(empobj, x), "xloc", EF_BAD}, \
+{ NSC_YCOORD, 0, 0, fldoff(empobj, y), "yloc", EF_BAD}, \
+{ NSC_CHAR, 0, 0, fldoff(empobj, type), "type", ef_chr}, \
+{ NSC_CHAR, 0, 0, fldoff(empobj, effic), "effic", EF_BAD}, \
+{ NSC_CHAR , 0, 0, fldoff(empobj, mobil), "mobil", EF_BAD}, \
+{ NSC_UCHAR , 0, 0, fldoff(empobj, off), "off", EF_BAD}, \
+{ NSC_SHORT, 0, 0, fldoff(empobj, tech), "tech", EF_BAD}, \
+{ NSC_STRINGY, NSC_EXTRA, 1, fldoff(empobj, group), "group", EF_BAD}, \
+{ NSC_XCOORD, 0, 0, fldoff(empobj, opx), "opx", EF_BAD}, \
+{ NSC_YCOORD, 0, 0, fldoff(empobj, opy), "opy", EF_BAD}, \
+{ NSC_SHORT, 0, 0, fldoff(empobj, mission), "mission", EF_MISSIONS}, \
+{ NSC_SHORT, 0, 0, fldoff(empobj, radius), "radius", EF_BAD}
struct castr ship_ca[] = {
NSC_GENITEM(EF_SHIP, EF_SHIP_CHR),
{NSC_UCHAR, 0, 0, offsetof(struct sctintrins, in_hcms), "hcms", EF_BAD},
{NSC_UCHAR, 0, 0, offsetof(struct sctintrins, in_dcost), "dcost", EF_BAD},
{NSC_UCHAR, 0, 0, offsetof(struct sctintrins, in_mcost), "mcost", EF_BAD},
+ {NSC_UCHAR, 0, 0, offsetof(struct sctintrins, in_enable), "enable",
+ EF_BAD},
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
};