]> git.pond.sub.org Git - empserver/blob - src/lib/global/nsc.c
Do not include var.h where no longer needed. Clean up register keywords in these...
[empserver] / src / lib / global / nsc.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
4  *                           Ken Stevens, Steve McClure
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  *  ---
21  *
22  *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
23  *  related information and legal notices. It is expected that any future
24  *  projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  nsc.c: Empire selection global structures
29  * 
30  *  Known contributors to this file:
31  *     Markus Armbruster, 2004
32  *  
33  */
34
35 #include <stddef.h>
36 #include "misc.h"
37 #include "xy.h"
38 #include "loan.h"
39 #include "nsc.h"
40 #include "news.h"
41 #include "nuke.h"
42 #include "plane.h"
43 #include "ship.h"
44 #include "land.h"
45 #include "sect.h"
46 #include "trade.h"
47 #include "treaty.h"
48 #include "genitem.h"
49 #include "nat.h"
50 #include "map.h"
51 #include "commodity.h"
52 #include "lost.h"
53
54 #define fldoff(str, fld) offsetof(struct str, fld)
55
56 #define NSC_IELT(name, pfx, sfx, base, itype)           \
57 {NSC_SHORT, 0, 0, ((base) + (itype)*sizeof(u_short)),   \
58 sizeof(sfx) == 1 ? name : pfx sfx}
59
60 #define NSC_IVEC(base, sfx)             \
61 NSC_IELT("civil", "c", sfx, base, I_CIVIL),     \
62 NSC_IELT("milit", "m", sfx, base, I_MILIT),     \
63 NSC_IELT("shell", "s", sfx, base, I_SHELL),     \
64 NSC_IELT("gun", "g", sfx, base, I_GUN),         \
65 NSC_IELT("petrol", "p", sfx, base, I_PETROL),   \
66 NSC_IELT("iron", "i", sfx, base, I_IRON),       \
67 NSC_IELT("dust", "d", sfx, base, I_DUST),       \
68 NSC_IELT("bar", "b", sfx, base, I_BAR),         \
69 NSC_IELT("food", "f", sfx, base, I_FOOD),       \
70 NSC_IELT("oil", "o", sfx, base, I_OIL),         \
71 NSC_IELT("lcm", "l", sfx, base, I_LCM),         \
72 NSC_IELT("hcm", "h", sfx, base, I_HCM),         \
73 NSC_IELT("uw", "u", sfx, base, I_UW),           \
74 NSC_IELT("rad", "r", sfx, base, I_RAD)
75
76 struct castr sect_ca[] = {
77     {NSC_NATID, 0, 0, fldoff(sctstr, sct_own), "owner"},
78     {NSC_XCOORD, 0, 0, fldoff(sctstr, sct_x), "xloc"},
79     {NSC_YCOORD, 0, 0, fldoff(sctstr, sct_y), "yloc"},
80     {NSC_TYPEID, 0, 0, fldoff(sctstr, sct_type), "des"},
81     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_effic), "effic"},
82     {NSC_SHORT, 0, 0, fldoff(sctstr, sct_mobil), "mobil"},
83     {NSC_UCHAR, NSC_DEITY, 0, fldoff(sctstr, sct_loyal), "loyal"},
84     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_terr), "terr"},
85     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(sctstr, sct_terr), "terr0"},
86     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_terr1), "terr1"},
87     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_terr2), "terr2"},
88     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_terr3), "terr3"},
89     {NSC_XCOORD, 0, 0, fldoff(sctstr, sct_dist_x), "xdist"},
90     {NSC_YCOORD, 0, 0, fldoff(sctstr, sct_dist_y), "ydist"},
91     {NSC_SHORT, 0, 0, fldoff(sctstr, sct_avail), "avail"},
92     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_work), "work"},
93     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(sctstr, sct_coastal), "coastal"},
94     {NSC_TYPEID, 0, 0, fldoff(sctstr, sct_newtype), "newdes"},
95     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_min), "min"},
96     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_gmin), "gold"},
97     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_fertil), "fert"},
98     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_oil), "ocontent"},
99     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_uran), "uran"},
100     {NSC_NATID, 0, 0, fldoff(sctstr, sct_oldown), "oldown"},
101     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_off), "off"},
102     NSC_IVEC(fldoff(sctstr, sct_item), ""),
103     NSC_IVEC(fldoff(sctstr, sct_dist), "_dist"),
104     NSC_IVEC(fldoff(sctstr, sct_del), "_del"),
105     {NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_mines), "mines"},
106     {NSC_USHORT, NSC_DEITY, 0, fldoff(sctstr, sct_pstage), "pstage"},
107     {NSC_USHORT, NSC_DEITY, 0, fldoff(sctstr, sct_ptime), "ptime"},
108     {NSC_UCHAR, NSC_DEITY, 0, fldoff(sctstr, sct_che), "che"},
109     {NSC_NATID, NSC_DEITY, 0, fldoff(sctstr, sct_che_target), "che_target"},
110     {NSC_USHORT, 0, 0, fldoff(sctstr, sct_fallout), "fallout"},
111     {NSC_TIME, 0, 0, fldoff(sctstr, sct_access), "access"},
112     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_road), "road"},
113     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_rail), "rail"},
114     {NSC_UCHAR, 0, 0, fldoff(sctstr, sct_defense), "dfense"},
115     {NSC_TIME, NSC_EXTRA, 0, fldoff(sctstr, sct_timestamp), "timestamp"},
116     {NSC_NOTYPE, 0, 0, 0, NULL}
117 };
118
119 #define NSC_GENITEM                                             \
120 { NSC_NATID, 0, 0, fldoff(genitem, own), "owner"},              \
121 { NSC_SHORT, 0, 0, fldoff(genitem, uid), "uid"},                \
122 { NSC_XCOORD, 0, 0, fldoff(genitem, x), "xloc"},                \
123 { NSC_YCOORD, 0, 0, fldoff(genitem, y), "yloc"},                \
124 { NSC_TYPEID, 0, 0, fldoff(genitem, type), "type"},             \
125 { NSC_CHAR, 0, 0, fldoff(genitem, effic), "effic"},             \
126 { NSC_CHAR , 0, 0, fldoff(genitem, mobil), "mobil"},            \
127 { NSC_SHORT, 0, 0, fldoff(genitem, tech), "tech"},              \
128 { NSC_CHAR, NSC_EXTRA, 0, fldoff(genitem, group), "group"},     \
129 { NSC_XCOORD, 0, 0, fldoff(genitem, opx), "opx"},               \
130 { NSC_YCOORD, 0, 0, fldoff(genitem, opy), "opy"},               \
131 { NSC_SHORT, 0, 0, fldoff(genitem, mission), "mission"},        \
132 { NSC_SHORT, 0, 0, fldoff(genitem, radius), "radius"}
133
134 struct castr ship_ca[] = {
135     NSC_GENITEM,
136     {NSC_CHAR, 0, 0, fldoff(shpstr, shp_fleet), "fleet"},
137     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(shpstr, shp_nplane), "nplane"},
138     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(shpstr, shp_nland), "nland"},
139     {NSC_XCOORD, 0, 0, fldoff(shpstr, shp_destx[0]), "xstart"},
140     {NSC_XCOORD, 0, 0, fldoff(shpstr, shp_destx[1]), "xend"},
141     {NSC_YCOORD, 0, 0, fldoff(shpstr, shp_desty[0]), "ystart"},
142     {NSC_YCOORD, 0, 0, fldoff(shpstr, shp_desty[1]), "yend"},
143     {NSC_SITYPE(i_type), 0, TMAX, fldoff(shpstr, shp_tstart), "cargostart"},
144     {NSC_SITYPE(i_type), 0, TMAX, fldoff(shpstr, shp_tend), "cargoend"},
145     {NSC_SHORT, 0, TMAX, fldoff(shpstr, shp_lstart), "amtstart"},
146     {NSC_SHORT, 0, TMAX, fldoff(shpstr, shp_lend), "amtend"},
147     {NSC_UCHAR, 0, 0, fldoff(shpstr, shp_autonav), "autonav"},
148     NSC_IVEC(fldoff(shpstr, shp_item), ""),
149     {NSC_USHORT, NSC_DEITY, 0, fldoff(shpstr, shp_pstage), "pstage"},
150     {NSC_USHORT, NSC_DEITY, 0, fldoff(shpstr, shp_ptime), "ptime"},
151     {NSC_TIME, 0, 0, fldoff(shpstr, shp_access), "access"},
152     {NSC_TIME, NSC_EXTRA, 0, fldoff(shpstr, shp_timestamp), "timestamp"},
153     {NSC_UCHAR, 0, 0, fldoff(shpstr, shp_mobquota), "mobquota"},
154     {NSC_STRINGY, 0, MAXSHPPATH, fldoff(shpstr, shp_path), "path"},
155     {NSC_SHORT, 0, 0, fldoff(shpstr, shp_follow), "follow"},
156     {NSC_STRINGY, 0, MAXSHPNAMLEN, fldoff(shpstr, shp_name), "name"},
157     {NSC_UCHAR, 0, 0, fldoff(shpstr, shp_fuel), "fuel"},
158     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(shpstr, shp_nchoppers), "nchoppers"},
159     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(shpstr, shp_nxlight), "nxlight"},
160     /* could let builder access these, but we can't express that yet: */
161     {NSC_XCOORD, NSC_DEITY, 0, fldoff(shpstr, shp_orig_x), "xbuilt"},
162     {NSC_YCOORD, NSC_DEITY, 0, fldoff(shpstr, shp_orig_y), "ybuilt"},
163     {NSC_NATID, NSC_DEITY, 0, fldoff(shpstr, shp_orig_own), "builder"},
164     {NSC_INT, 0, 0, fldoff(shpstr, shp_rflags), "rflags"},
165     {NSC_STRINGY, 0, RET_LEN, fldoff(shpstr, shp_rpath), "rpath"},
166     {NSC_NOTYPE, 0, 0, 0, NULL}
167 };
168
169 struct castr plane_ca[] = {
170     NSC_GENITEM,
171     {NSC_CHAR, 0, 0, fldoff(plnstr, pln_wing), "wing"},
172     {NSC_UCHAR, 0, 0, fldoff(plnstr, pln_range), "range"},
173     {NSC_SHORT, 0, 0, fldoff(plnstr, pln_ship), "ship"},
174     {NSC_SHORT, 0, 0, fldoff(plnstr, pln_land), "land"},
175     {NSC_INT, NSC_EXTRA, 0, fldoff(plnstr, pln_att), "att"},
176     {NSC_INT, NSC_EXTRA, 0, fldoff(plnstr, pln_def), "def"},
177     {NSC_CHAR, 0, 0, fldoff(plnstr, pln_harden), "harden"},
178     {NSC_CHAR, 0, 0, fldoff(plnstr, pln_nuketype), "nuketype"},
179     {NSC_CHAR, 0, 0, fldoff(plnstr, pln_flags), "flags"},
180     {NSC_TIME, 0, 0, fldoff(plnstr, pln_access), "access"},
181     {NSC_TIME, NSC_EXTRA, 0, fldoff(plnstr, pln_timestamp), "timestamp"},
182     {NSC_FLOAT, 0, 0, fldoff(plnstr, pln_theta), "theta"},
183     {NSC_NOTYPE, 0, 0, 0, NULL}
184 };
185
186 struct castr land_ca[] = {
187     NSC_GENITEM,
188     {NSC_CHAR, 0, 0, fldoff(lndstr, lnd_army), "army"},
189     {NSC_SHORT, 0, 0, fldoff(lndstr, lnd_ship), "ship"},
190     {NSC_CHAR, 0, 0, fldoff(lndstr, lnd_harden), "harden"},
191     {NSC_SHORT, 0, 0, fldoff(lndstr, lnd_retreat), "retreat"},
192     {NSC_UCHAR, 0, 0, fldoff(lndstr, lnd_fuel), "fuel"},
193     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(lndstr, lnd_nxlight), "nxlight"},
194     {NSC_INT, 0, 0, fldoff(lndstr, lnd_rflags), "rflags"},
195     {NSC_STRINGY, 0, RET_LEN, fldoff(lndstr, lnd_rpath), "rpath"},
196     {NSC_UCHAR, 0, 0, fldoff(lndstr, lnd_rad_max), "react"},
197     NSC_IVEC(fldoff(lndstr, lnd_item), ""),
198     {NSC_USHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_pstage), "pstage"},
199     {NSC_USHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_ptime), "ptime"},
200     {NSC_SHORT, 0, 0, fldoff(lndstr, lnd_land), "land"},
201     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(lndstr, lnd_nland), "nland"},
202     {NSC_TIME, 0, 0, fldoff(lndstr, lnd_access), "access"},
203     {NSC_FLOAT, NSC_EXTRA, 0, fldoff(lndstr, lnd_att), "att"},
204     {NSC_FLOAT, NSC_EXTRA, 0, fldoff(lndstr, lnd_def), "def"},
205     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_vul), "vul"},
206     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_spd), "spd"},
207     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_vis), "vis"},
208     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_spy), "spy"},
209     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_rad), "rad"},
210     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_frg), "frg"},
211     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_acc), "acc"},
212     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_dam), "dam"},
213     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_ammo), "ammo"},
214     {NSC_INT, NSC_EXTRA, 0, fldoff(lndstr, lnd_aaf), "aaf"},
215     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(lndstr, lnd_fuelc), "fuelc"},
216     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(lndstr, lnd_fuelu), "fuelu"},
217     {NSC_UCHAR, NSC_EXTRA, 0, fldoff(lndstr, lnd_maxlight), "maxlight"},
218     {NSC_TIME, NSC_EXTRA, 0, fldoff(lndstr, lnd_timestamp), "timestamp"},
219     {NSC_NOTYPE, 0, 0, 0, NULL}
220 };
221
222 struct castr nuke_ca[] = {
223     {NSC_NATID, 0, 0, fldoff(nukstr, nuk_own), "owner"},
224     {NSC_SHORT, 0, 0, fldoff(nukstr, nuk_uid), "uid"},
225     {NSC_XCOORD, 0, 0, fldoff(nukstr, nuk_x), "xloc"},
226     {NSC_YCOORD, 0, 0, fldoff(nukstr, nuk_y), "yloc"},
227     {NSC_CHAR, 0, 0, fldoff(nukstr, nuk_n), "number"},
228     {NSC_SHORT, 0, N_MAXNUKE, fldoff(nukstr, nuk_types[0]), "types"},
229     {NSC_TIME, NSC_EXTRA, 0, fldoff(nukstr, nuk_timestamp), "timestamp"},
230     {NSC_NOTYPE, 0, 0, 0, NULL}
231 };
232
233 struct castr treaty_ca[] = {
234     {NSC_NATID, 0, 0, fldoff(trtstr, trt_cna), "cna"},
235     {NSC_NATID, 0, 0, fldoff(trtstr, trt_cnb), "cnb"},
236     {NSC_CHAR, 0, 0, fldoff(trtstr, trt_status), "status"},
237     {NSC_SHORT, 0, 0, fldoff(trtstr, trt_acond), "acond"},
238     {NSC_SHORT, 0, 0, fldoff(trtstr, trt_bcond), "bcond"},
239     {NSC_TIME, 0, 0, fldoff(trtstr, trt_exp), "exp"},
240     {NSC_NOTYPE, 0, 0, 0, NULL}
241 };
242
243 struct castr loan_ca[] = {
244     {NSC_NATID, 0, 0, fldoff(lonstr, l_loner), "loaner"},
245     {NSC_SHORT, 0, 0, fldoff(lonstr, l_uid), "uid"},
246     {NSC_NATID, 0, 0, fldoff(lonstr, l_lonee), "loanee"},
247     {NSC_CHAR, 0, 0, fldoff(lonstr, l_status), "status"},
248     {NSC_INT, 0, 0, fldoff(lonstr, l_irate), "irate"},
249     {NSC_INT, 0, 0, fldoff(lonstr, l_ldur), "ldur"},
250     {NSC_LONG, 0, 0, fldoff(lonstr, l_amtpaid), "amtpaid"},
251     {NSC_LONG, 0, 0, fldoff(lonstr, l_amtdue), "amtdue"},
252     {NSC_TIME, 0, 0, fldoff(lonstr, l_lastpay), "lastpay"},
253     {NSC_TIME, 0, 0, fldoff(lonstr, l_duedate), "duedate"},
254     {NSC_NOTYPE, 0, 0, 0, NULL}
255 };
256
257 struct castr news_ca[] = {
258     {NSC_NATID, 0, 0, fldoff(nwsstr, nws_ano), "actor"},
259     {NSC_SHORT, 0, 0, fldoff(nwsstr, nws_uid), "uid"},
260     {NSC_TYPEID, 0, 0, fldoff(nwsstr, nws_vrb), "action"},
261     {NSC_NATID, 0, 0, fldoff(nwsstr, nws_vno), "victim"},
262     {NSC_CHAR, 0, 0, fldoff(nwsstr, nws_ntm), "times"},
263     {NSC_TIME, 0, 0, fldoff(nwsstr, nws_when), "time"},
264     {NSC_NOTYPE, 0, 0, 0, NULL}
265 };
266
267 struct castr lost_ca[] = {
268     {NSC_NATID, 0, 0, fldoff(loststr, lost_owner), "owner"},
269     {NSC_INT, 0, 0, fldoff(loststr, lost_uid), "uid"},
270     {NSC_CHAR, 0, 0, fldoff(loststr, lost_type), "type"},
271     {NSC_SHORT, 0, 0, fldoff(loststr, lost_id), "id"},
272     {NSC_XCOORD, 0, 0, fldoff(loststr, lost_x), "x"},
273     {NSC_YCOORD, 0, 0, fldoff(loststr, lost_y), "y"},
274     {NSC_TIME, 0, 0, fldoff(loststr, lost_timestamp), "timestamp"},
275     {NSC_NOTYPE, 0, 0, 0, NULL}
276 };
277
278 struct castr commodity_ca[] = {
279     {NSC_NATID, 0, 0, fldoff(comstr, com_owner), "owner"},
280     {NSC_SHORT, 0, 0, fldoff(comstr, com_uid), "uid"},
281     {NSC_SITYPE(i_type), 0, 0, fldoff(comstr, com_type), "type"},
282     {NSC_INT, 0, 0, fldoff(comstr, com_amount), "amount"},
283     {NSC_INT, 0, 0, fldoff(comstr, com_maxbidder), "maxbidder"},
284     {NSC_TIME, 0, 0, fldoff(comstr, com_markettime), "markettime"},
285     /* could let maxbidder access these, but we can't express that yet: */
286     {NSC_XCOORD, NSC_DEITY, 0, fldoff(comstr, com_x), "xbuy"},
287     {NSC_XCOORD, NSC_DEITY, 0, fldoff(comstr, com_y), "ybuy"},
288     /* could let the owner access these, but we can't express that yet: */
289     {NSC_XCOORD, NSC_DEITY, 0, fldoff(comstr, sell_x), "xsell"},
290     {NSC_YCOORD, NSC_DEITY, 0, fldoff(comstr, sell_y), "ysell"},
291     {NSC_FLOAT, 0, 0, fldoff(comstr, com_price), "price"},
292     {NSC_NOTYPE, 0, 0, 0, NULL}
293 };
294
295 struct castr trade_ca[] = {
296     {NSC_NATID, 0, 0, fldoff(trdstr, trd_owner), "owner"},
297     {NSC_SHORT, 0, 0, fldoff(trdstr, trd_uid), "uid"},
298     {NSC_CHAR, 0, 0, fldoff(trdstr, trd_type), "type"},
299     {NSC_SHORT, 0, 0, fldoff(trdstr, trd_unitid), "unitid"},
300     {NSC_LONG, 0, 0, fldoff(trdstr, trd_price), "price"},
301     {NSC_INT, 0, 0, fldoff(trdstr, trd_maxbidder), "maxbidder"},
302     {NSC_TIME, 0, 0, fldoff(trdstr, trd_markettime), "markettime"},
303     /* could let the owner access these, but we can't express that yet: */
304     {NSC_XCOORD, NSC_DEITY, 0, fldoff(trdstr, trd_x), "xloc"},
305     {NSC_YCOORD, NSC_DEITY, 0, fldoff(trdstr, trd_y), "yloc"},
306     {NSC_NOTYPE, 0, 0, 0, NULL}
307 };
308
309 struct castr nat_ca[] = {
310     {NSC_CHAR, 0, 20, fldoff(natstr, nat_cnam[0]), "cnam"},
311     {NSC_CHAR, NSC_DEITY, 20, fldoff(natstr, nat_pnam[0]), "pnam"},
312     {NSC_XCOORD, 0, 0, fldoff(natstr, nat_xstart), "xstart"},
313     {NSC_YCOORD, 0, 0, fldoff(natstr, nat_ystart), "ystart"},
314     {NSC_XCOORD, 0, 0, fldoff(natstr, nat_xcap), "xcap"},
315     {NSC_YCOORD, 0, 0, fldoff(natstr, nat_ycap), "ycap"},
316     {NSC_XCOORD, NSC_DEITY, 0, fldoff(natstr, nat_xorg), "xorg"},
317     {NSC_YCOORD, NSC_DEITY, 0, fldoff(natstr, nat_yorg), "yorg"},
318     {NSC_NATID, 0, 0, fldoff(natstr, nat_cnum), "cnum"},
319 #ifdef MAYBE_LATER
320     {NSC_CHAR, 0, 0, fldoff(natstr, nat_stat), "stat"},
321     {NSC_CHAR, 0, 0, fldoff(natstr, nat_dayno), "dayno"},
322     {NSC_CHAR, 0, 0, fldoff(natstr, nat_update), "update"},
323     {NSC_UCHAR, 0, 0, fldoff(natstr, nat_missed), "missed"},
324 #endif /* MAYBE_LATER */
325     {NSC_USHORT, 0, 0, fldoff(natstr, nat_tgms), "tgms"},
326     {NSC_USHORT, 0, 0, fldoff(natstr, nat_ann), "ann"},
327     {NSC_USHORT, 0, 0, fldoff(natstr, nat_minused), "minused"},
328     {NSC_SHORT, 0, 0, fldoff(natstr, nat_btu), "btu"},
329     {NSC_LONG, 0, 0, fldoff(natstr, nat_reserve), "reserve"},
330     {NSC_LONG, 0, 0, fldoff(natstr, nat_money), "money"},
331 #ifdef MAYBE_LATER
332     {NSC_TIME, 0, 0, fldoff(natstr, nat_last_login), "last_login"},
333     {NSC_TIME, 0, 0, fldoff(natstr, nat_last_logout), "last_logout"},
334     {NSC_TIME, 0, 0, fldoff(natstr, nat_newstim), "newstim"},
335 #endif /* MAYBE_LATER */
336     {NSC_FLOAT, 0, 0, fldoff(natstr, nat_level[NAT_TLEV]), "tech"},
337     {NSC_FLOAT, 0, 0, fldoff(natstr, nat_level[NAT_RLEV]), "research"},
338     {NSC_FLOAT, 0, 0, fldoff(natstr, nat_level[NAT_ELEV]), "education"},
339     {NSC_FLOAT, 0, 0, fldoff(natstr, nat_level[NAT_HLEV]), "happiness"},
340 #if 0
341     {NSC_SHORT, 0, MAXNOC, fldoff(natstr, nat_relate[0]),"relate"},
342     {NSC_CHAR, 0, PRI_MAX+1, fldoff(natstr, nat_priorities[0]),"priorities"},
343     {NSC_LONG, 0, 0, fldoff(natstr, nat_flags),"flags",0},
344 #endif
345     {NSC_NOTYPE, 0, 0, 0, NULL}
346 };