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