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