]> git.pond.sub.org Git - empserver/blob - src/lib/global/symbol.c
Update known contributors comments
[empserver] / src / lib / global / symbol.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2009, 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 files README, COPYING and CREDITS in the root of the source
23  *  tree for related information and legal notices.  It is expected
24  *  that future projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  symbol.c: Empire symbol tables
29  *
30  *  Known contributors to this file:
31  *     Markus Armbruster, 2006-2009
32  */
33
34 #include <config.h>
35
36 #include "land.h"
37 #include "misc.h"
38 #include "mission.h"
39 #include "nat.h"
40 #include "news.h"
41 #include "nsc.h"
42 #include "nuke.h"
43 #include "plague.h"
44 #include "plane.h"
45 #include "retreat.h"
46 #include "sect.h"
47 #include "ship.h"
48 #include "treaty.h"
49
50 struct symbol agreement_statuses[] = {
51     {AGREE_FREE, "free"},
52     {AGREE_PROPOSED, "proposed"},
53     {AGREE_SIGNED, "signed"},
54     {0, NULL}
55 };
56
57 struct symbol land_chr_flags[] = {
58     {L_ENGINEER, "engineer"},
59     {L_SUPPLY, "supply"},
60     {L_SECURITY, "security"},
61     {L_LIGHT, "light"},
62     {L_MARINE, "marine"},
63     {L_RECON, "recon"},
64     {L_RADAR, "radar"},
65     {L_ASSAULT, "assault"},
66     {L_FLAK, "flak"},
67     {L_SPY, "spy"},
68     {L_TRAIN, "train"},
69     {L_HEAVY, "heavy"},
70     {0, NULL}
71 };
72
73 struct symbol level[] = {
74     {-1, "none"},
75     {NAT_TLEV, "technology"},
76     {NAT_RLEV, "research"},
77     {NAT_ELEV, "education"},
78     {NAT_HLEV, "happiness"},
79     {0, NULL}
80 };
81
82 struct symbol meta_flags[] = {
83     {NSC_DEITY, "deity"},
84     {NSC_EXTRA, "extra"},
85     {NSC_CONST, "const"},
86     {NSC_BITS, "bits"},
87     {0, NULL}
88 };
89
90 struct symbol meta_type[]  = {
91     {NSC_LONG, "d"},
92     {NSC_DOUBLE, "g"},
93     {NSC_STRING, "s"},
94     {NSC_CHAR, "d"},
95     {NSC_UCHAR, "d"},
96     {NSC_SHORT, "d"},
97     {NSC_USHORT, "d"},
98     {NSC_INT, "d"},
99     {NSC_XCOORD, "d"},
100     {NSC_YCOORD, "d"},
101     {NSC_HIDDEN, "d"},
102     {NSC_TIME, "d"},
103     {NSC_FLOAT, "g"},
104     {NSC_STRINGY,"c"},
105     {NSC_NOTYPE, NULL}
106 };
107
108 struct symbol missions[] = {
109     {MI_NONE, "none"},
110     {MI_INTERDICT, "interdiction"},
111     {MI_SUPPORT, "support"},
112     {MI_RESERVE, "reserve"},
113     {MI_ESCORT, "escort"},
114     {MI_AIR_DEFENSE, "air defense"},
115     {MI_DSUPPORT, "defensive support"},
116     {MI_OSUPPORT, "offensive support"},
117     {0, NULL}
118 };
119
120 struct symbol nation_flags[] = {
121     {NF_INFORM, "inform"},
122     {NF_FLASH, "flash"},
123     {NF_BEEP, "beep"},
124     {NF_COASTWATCH, "coastwatch"},
125     {NF_SONAR, "sonar"},
126     {NF_TECHLISTS, "techlists"},
127     {NF_SACKED, "sacked"},
128     {0, NULL}
129 };
130
131 struct symbol nation_rejects[] = {
132     {REJ_TELE, "telegrams"},
133     {REJ_TREA, "treaties"},
134     {REJ_ANNO, "announcements"},
135     {REJ_LOAN, "loans"},
136     {0, NULL}
137 };
138
139 struct symbol nation_relations[] = {
140     {-1, "unknown"},
141     {AT_WAR, "at-war"},
142     {SITZKRIEG, "sitzkrieg"},
143     {MOBILIZATION, "mobilization"},
144     {HOSTILE, "hostile"},
145     {NEUTRAL, "neutral"},
146     {FRIENDLY, "friendly"},
147     {ALLIED, "allied"},
148     {0, NULL}
149 };
150
151 struct symbol nation_status[] = {
152     {STAT_UNUSED, "unused"},
153     {STAT_NEW,  "new"},
154     {STAT_VIS, "visitor"},
155     {STAT_SANCT, "sanctuary"},
156     {STAT_ACTIVE, "active"},
157     {STAT_GOD, "deity"},
158     {0, NULL}
159 };
160
161 struct symbol nuke_chr_flags[] = {
162     {N_NEUT, "neutron"},
163     {0, NULL}
164 };
165
166 struct symbol packing[] = {
167     {IPKG, "inefficient"},
168     {NPKG, "normal"},
169     {WPKG, "warehouse"},
170     {UPKG, "urban"},
171     {BPKG, "bank"},
172     {0, NULL}
173 };
174
175 struct symbol page_headings[] = {
176     {N_NOTUSED, "Comics"},
177     {N_FOR, "Foreign Affairs"},
178     {N_FRONT, "The Front Line"},
179     {N_SEA, "The High Seas"},
180     {N_SKY, "Sky Watch"},
181     {N_MISS, "Guidance Systems"},
182     {N_ARTY, "Firestorms"},
183     {N_ECON, "Business & Economics"},
184     {N_COLONY, "The Frontier"},
185     {N_HOME, "The Home Front"},
186     {N_SPY, "Espionage"},
187     {N_TELE, "Telecommunications"},
188     {0, NULL}
189 };
190
191 struct symbol plague_stages[] = {
192     {PLG_HEALTHY, "healthy"},
193     {PLG_DYING, "dying"},
194     {PLG_INFECT, "infect"},
195     {PLG_INCUBATE, "incubate"},
196     {PLG_EXPOSED, "exposed"},
197     {0, NULL}
198 };
199
200 struct symbol plane_chr_flags[] = {
201     {P_T, "tactical"},
202     {P_B, "bomber"},
203     {P_F, "intercept"},
204     {P_C, "cargo"},
205     {P_V, "VTOL"},
206     {P_M, "missile"},
207     {P_L, "light"},
208     {P_S, "spy"},
209     {P_I, "image"},
210     {P_O, "satellite"},
211     {P_N, "SDI"},
212     {P_E, "x-light"},
213     {P_K, "helo"},
214     {P_A, "ASW"},
215     {P_P, "para"},
216     {P_ESC, "escort"},
217     {P_MINE, "mine"},
218     {P_SWEEP, "sweep"},
219     {P_MAR, "marine"},
220     {0, NULL}
221 };
222
223 struct symbol plane_flags[] = {
224     {PLN_LAUNCHED, "launched"},
225     {PLN_SYNCHRONOUS, "synchronous"},
226     {PLN_AIRBURST, "airburst"},
227     {0, NULL}
228 };
229
230 struct symbol resources[] = {
231     /* names should match resource selector names in sect_ca[] */
232     {0, "none"},
233     {offsetof(struct sctstr, sct_min), "min"},
234     {offsetof(struct sctstr, sct_gmin), "gold"},
235     {offsetof(struct sctstr, sct_fertil), "fert"},
236     {offsetof(struct sctstr, sct_oil), "ocontent"},
237     {offsetof(struct sctstr, sct_uran), "uran"},
238     {0, NULL}
239 };
240
241 struct symbol retreat_flags[] = {
242     {RET_GROUP, "group"},
243     {RET_INJURED, "injured"},
244     {RET_TORPED, "torped"},
245     {RET_SONARED, "sonared"},
246     {RET_HELPLESS, "helpless"},
247     {RET_BOMBED, "bombed"},
248     {RET_DCHRGED, "depth-charged"},
249     {RET_BOARDED, "boarded"},
250     {0, NULL}
251 };
252
253 struct symbol sector_navigation[] = {
254     {NAV_NONE, "land"},
255     {NAVOK, "sea"},
256     {NAV_02, "harbor"},
257     {NAV_CANAL, "canal"},
258     {NAV_60, "bridge"},
259     {0, NULL}
260 };
261
262 struct symbol ship_chr_flags[] = {
263     {M_FOOD, "fish"},
264     {M_TORP, "torp"},
265     {M_DCH, "dchrg"},
266     {M_FLY, "plane"},
267     {M_MSL, "miss"},
268     {M_OIL, "oil"},
269     {M_SONAR, "sonar"},
270     {M_MINE, "mine"},
271     {M_SWEEP, "sweep"},
272     {M_SUB, "sub"},
273     {M_LAND, "land"},
274     {M_SUBT, "sub-torp"},
275     {M_TRADE, "trade"},
276     {M_SEMILAND, "semi-land"},
277     {M_SUPPLY, "supply"},
278     {M_CANAL, "canal"},
279     {M_ANTIMISSILE, "anti-missile"},
280     {0, NULL}
281 };
282
283 struct symbol treaty_flags[] = {
284     {LNDATT, "no attacks on any land units"},
285     {SEAATT, "no attacks on any ships"},
286     {SEAFIR, "no shelling any ships"},
287     {SUBFIR, "no depth-charging any subs"},
288     {LANATT, "no sector attacks"},
289     {LANFIR, "no shelling any land"},
290     {NEWSHP, "no building ships"},
291     {NEWNUK, "no new nuclear weapons"},
292     {NEWPLN, "no building planes"},
293     {NEWLND, "no building land units"},
294     {TRTENL, "no enlistment"},
295     {0, NULL}
296 };