Freeciv-3.1: /fast/freeciv/nightly/S3_1/tools/ruledit/univ_value.c Source File

Freeciv-3.1

Loading...
Searching...
No Matches
univ_value.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* common */
19#include "achievements.h"
20#include "game.h"
21#include "government.h"
22#include "requirements.h"
23#include "server_settings.h"
24#include "specialist.h"
25#include "tech.h"
26#include "traderoutes.h"
27
28/* server */
29#include "rssanity.h"
30#include "settings.h"
31
32#include "univ_value.h"
33
34/********************************************************************/
40 bool universal_value_initial(struct universal *src)
41{
42 switch (src->kind) {
43 case VUT_NONE:
44 /* Value of None should never be used */
45 return TRUE;
46 case VUT_ADVANCE:
47 if (game.control.num_tech_types <= 0) {
48 return FALSE;
49 }
50 src->value.advance = advance_by_number(A_NONE);
51 return TRUE;
52 case VUT_GOVERNMENT:
53 src->value.govern = game.government_during_revolution;
54 return TRUE;
55 case VUT_IMPROVEMENT:
56 if (game.control.num_impr_types <= 0) {
57 return FALSE;
58 }
59 src->value.building = improvement_by_number(0);
60 return TRUE;
61 case VUT_TERRAIN:
62 src->value.terrain = terrain_by_number(0);
63 return TRUE;
64 case VUT_NATION:
65 if (game.control.nation_count <= 0) {
66 return FALSE;
67 }
68 src->value.nation = nation_by_number(0);
69 return TRUE;
70 case VUT_UTYPE:
71 if (game.control.num_unit_types <= 0) {
72 return FALSE;
73 }
74 src->value.utype = utype_by_number(0);
75 return TRUE;
76 case VUT_UTFLAG:
77 src->value.unitflag = (enum unit_type_flag_id)0;
78 return TRUE;
79 case VUT_UCLASS:
80 if (game.control.num_unit_classes <= 0) {
81 return FALSE;
82 }
83 src->value.uclass = uclass_by_number(0);
84 return TRUE;
85 case VUT_UCFLAG:
86 src->value.unitclassflag = (enum unit_class_flag_id)0;
87 return TRUE;
88 case VUT_OTYPE:
89 src->value.outputtype = (enum output_type_id)0;
90 return TRUE;
91 case VUT_SPECIALIST:
92 if (game.control.num_specialist_types <= 0) {
93 return FALSE;
94 }
95 src->value.specialist = specialist_by_number(0);
96 return TRUE;
97 case VUT_MINSIZE:
98 src->value.minsize = 0;
99 return TRUE;
100 case VUT_AI_LEVEL:
101 src->value.ai_level = AI_LEVEL_CHEATING;
102 return TRUE;
103 case VUT_TERRAINCLASS:
104 src->value.terrainclass = TC_LAND;
105 return TRUE;
106 case VUT_MINYEAR:
107 src->value.minyear = 0;
108 return TRUE;
109 case VUT_MINCALFRAG:
110 src->value.mincalfrag = 0;
111 return TRUE;
112 case VUT_TERRAINALTER:
113 src->value.terrainalter = TA_CAN_IRRIGATE;
114 return TRUE;
115 case VUT_CITYTILE:
116 src->value.citytile = CITYT_CENTER;
117 return TRUE;
118 case VUT_CITYSTATUS:
119 src->value.citystatus = CITYS_OWNED_BY_ORIGINAL;
120 return TRUE;
121 case VUT_GOOD:
122 if (game.control.num_goods_types <= 0) {
123 return FALSE;
124 }
125 src->value.good = goods_by_number(0);
126 return TRUE;
127 case VUT_TERRFLAG:
128 src->value.terrainflag = TER_NO_BARBS;
129 return TRUE;
130 case VUT_NATIONALITY:
131 if (game.control.nation_count <= 0) {
132 return FALSE;
133 }
134 src->value.nationality = nation_by_number(0);
135 return TRUE;
136 case VUT_ROADFLAG:
137 src->value.roadflag = RF_RIVER;
138 return TRUE;
139 case VUT_EXTRA:
140 if (game.control.num_extra_types <= 0) {
141 return FALSE;
142 }
143 src->value.extra = extra_by_number(0);
144 return TRUE;
145 case VUT_TECHFLAG:
146 src->value.techflag = TF_BONUS_TECH;
147 return TRUE;
148 case VUT_ACHIEVEMENT:
149 if (game.control.num_achievement_types <= 0) {
150 return FALSE;
151 }
152 src->value.achievement = achievement_by_number(0);
153 return TRUE;
154 case VUT_DIPLREL:
155 case VUT_DIPLREL_TILE:
156 case VUT_DIPLREL_TILE_O:
157 case VUT_DIPLREL_UNITANY:
158 case VUT_DIPLREL_UNITANY_O:
159 src->value.diplrel = DS_WAR;
160 return TRUE;
161 case VUT_MAXTILEUNITS:
162 src->value.max_tile_units = 0;
163 return TRUE;
164 case VUT_STYLE:
165 if (game.control.num_styles <= 0) {
166 return FALSE;
167 }
168 src->value.style = style_by_number(0);
169 return TRUE;
170 case VUT_MINCULTURE:
171 src->value.minculture = 0;
172 return TRUE;
173 case VUT_MINFOREIGNPCT:
174 src->value.minforeignpct = 0;
175 return TRUE;
176 case VUT_UNITSTATE:
177 src->value.unit_state = USP_TRANSPORTED;
178 return TRUE;
179 case VUT_ACTIVITY:
180 src->value.activity = ACTIVITY_IDLE;
181 return TRUE;
182 case VUT_MINMOVES:
183 src->value.minmoves = 0;
184 return TRUE;
185 case VUT_MINVETERAN:
186 src->value.minveteran = 0;
187 return TRUE;
188 case VUT_MINHP:
189 src->value.min_hit_points = 0;
190 return TRUE;
191 case VUT_AGE:
192 src->value.age = 0;
193 return TRUE;
194 case VUT_NATIONGROUP:
195 if (nation_group_count() <= 0) {
196 return FALSE;
197 }
198 src->value.nationgroup = nation_group_by_number(0);
199 return TRUE;
200 case VUT_TOPO:
201 src->value.topo_property = TF_ISO;
202 return TRUE;
203 case VUT_SERVERSETTING:
204 src->value.ssetval
205 = ssetv_from_values(server_setting_by_name("killstack"), TRUE);
206 return TRUE;
207 case VUT_IMPR_GENUS:
208 src->value.impr_genus = IG_IMPROVEMENT;
209 return TRUE;
210 case VUT_ACTION:
211 src->value.action = action_by_number(0);
212 return TRUE;
213 case VUT_MINTECHS:
214 src->value.min_techs = 0;
215 return TRUE;
216 case VUT_EXTRAFLAG:
217 src->value.extraflag = EF_NATIVE_TILE;
218 return TRUE;
219 case VUT_COUNT:
220 fc_assert(src->kind != VUT_COUNT);
221 return FALSE;
222 }
223
224 return FALSE;
225}
226
227/********************************************************************/
230 void universal_kind_values(struct universal *univ,
231 univ_kind_values_cb cb, void *data)
232{
233 int i;
234
235 switch (univ->kind) {
236 case VUT_NONE:
237 break;
238 case VUT_ADVANCE:
239 advance_re_active_iterate(padv) {
240 cb(advance_rule_name(padv), univ->value.advance == padv, data);
241 } advance_re_active_iterate_end;
242 break;
243 case VUT_GOVERNMENT:
244 governments_re_active_iterate(pgov) {
245 cb(government_rule_name(pgov), univ->value.govern == pgov, data);
246 } governments_re_active_iterate_end;
247 break;
248 case VUT_IMPROVEMENT:
249 improvement_re_active_iterate(pimpr) {
250 cb(improvement_rule_name(pimpr), univ->value.building == pimpr, data);
251 } improvement_re_active_iterate_end;
252 break;
253 case VUT_TERRAIN:
254 terrain_re_active_iterate(pterr) {
255 cb(terrain_rule_name(pterr), univ->value.terrain == pterr, data);
256 } terrain_re_active_iterate_end;
257 break;
258 case VUT_NATION:
259 nations_iterate(pnat) {
260 cb(nation_rule_name(pnat), univ->value.nation == pnat, data);
261 } nations_iterate_end;
262 break;
263 case VUT_UTYPE:
264 unit_type_re_active_iterate(putype) {
265 cb(utype_rule_name(putype), univ->value.utype == putype, data);
266 } unit_type_re_active_iterate_end;
267 break;
268 case VUT_UCLASS:
269 unit_class_re_active_iterate(pclass) {
270 cb(uclass_rule_name(pclass), univ->value.uclass == pclass, data);
271 } unit_class_re_active_iterate_end;
272 break;
273 case VUT_OTYPE:
274 output_type_iterate(otype) {
275 cb(get_output_name(otype), univ->value.outputtype == otype, data);
276 } output_type_iterate_end;
277 break;
278 case VUT_GOOD:
279 goods_type_re_active_iterate(pgood) {
280 cb(goods_rule_name(pgood), univ->value.good == pgood, data);
281 } goods_type_re_active_iterate_end;
282 break;
283 case VUT_NATIONALITY:
284 nations_iterate(pnat) {
285 cb(nation_rule_name(pnat), univ->value.nationality == pnat, data);
286 } nations_iterate_end;
287 break;
288 case VUT_EXTRA:
289 extra_type_re_active_iterate(pextra) {
290 cb(extra_rule_name(pextra), univ->value.extra == pextra, data);
291 } extra_type_re_active_iterate_end;
292 break;
293 case VUT_STYLE:
294 styles_re_active_iterate(pstyle) {
295 cb(style_rule_name(pstyle), univ->value.style == pstyle, data);
296 } styles_re_active_iterate_end;
297 break;
298 case VUT_AI_LEVEL:
299 for (i = 0; i < AI_LEVEL_COUNT; i++) {
300 cb(ai_level_name(i), univ->value.ai_level == i, data);
301 }
302 break;
303 case VUT_SPECIALIST:
304 specialist_type_re_active_iterate(pspe) {
305 cb(specialist_rule_name(pspe), univ->value.specialist == pspe, data);
306 } specialist_type_re_active_iterate_end;
307 break;
308 case VUT_TERRAINCLASS:
309 for (i = 0; i < TC_COUNT; i++) {
310 cb(terrain_class_name(i), univ->value.terrainclass == i, data);
311 }
312 break;
313 case VUT_UTFLAG:
314 for (i = 0; i < UTYF_LAST_USER_FLAG; i++) {
315 cb(unit_type_flag_id_name(i), univ->value.unitflag == i, data);
316 }
317 break;
318 case VUT_UCFLAG:
319 for (i = 0; i < UCF_COUNT; i++) {
320 cb(unit_class_flag_id_name(i), univ->value.unitclassflag == i, data);
321 }
322 break;
323 case VUT_TERRFLAG:
324 for (i = 0; i < TER_USER_LAST; i++) {
325 cb(terrain_flag_id_name(i), univ->value.terrainflag == i, data);
326 }
327 break;
328 case VUT_ROADFLAG:
329 for (i = 0; i < RF_COUNT; i++) {
330 cb(road_flag_id_name(i), univ->value.roadflag == i, data);
331 }
332 break;
333 case VUT_TECHFLAG:
334 for (i = 0; i < TF_COUNT; i++) {
335 cb(tech_flag_id_name(i), univ->value.techflag == i, data);
336 }
337 break;
338 case VUT_EXTRAFLAG:
339 for (i = 0; i < EF_COUNT; i++) {
340 cb(extra_flag_id_name(i), univ->value.extraflag == i, data);
341 }
342 break;
343 case VUT_TERRAINALTER:
344 for (i = 0; i < TA_COUNT; i++) {
345 cb(terrain_alteration_name(i), univ->value.terrainalter == i, data);
346 }
347 break;
348 case VUT_CITYTILE:
349 for (i = 0; i < CITYT_LAST; i++) {
350 cb(citytile_type_name(i), univ->value.citytile == i, data);
351 }
352 break;
353 case VUT_CITYSTATUS:
354 for (i = 0; i < CITYS_LAST; i++) {
355 cb(citystatus_type_name(i), univ->value.citystatus == i, data);
356 }
357 break;
358 case VUT_ACHIEVEMENT:
359 achievements_re_active_iterate(pach) {
360 cb(achievement_rule_name(pach), univ->value.achievement == pach, data);
361 } achievements_re_active_iterate_end;
362 break;
363 case VUT_DIPLREL:
364 case VUT_DIPLREL_TILE:
365 case VUT_DIPLREL_TILE_O:
366 case VUT_DIPLREL_UNITANY:
367 case VUT_DIPLREL_UNITANY_O:
368 for (i = 0; i < DS_LAST; i++) {
369 cb(diplstate_type_name(i), univ->value.diplrel == i, data);
370 }
371 for (; i < DRO_LAST; i++) {
372 cb(diplrel_other_name(i), univ->value.diplrel == i, data);
373 }
374 break;
375 case VUT_UNITSTATE:
376 for (i = 0; i < USP_COUNT; i++) {
377 cb(ustate_prop_name(i), univ->value.unit_state == i, data);
378 }
379 break;
380 case VUT_ACTIVITY:
381 activity_type_iterate(act) {
382 if (!universal_is_legal_in_requirement(
383 &(struct universal){.kind = VUT_ACTIVITY,
384 .value = {.activity = act}})) {
385 /* This activity is excluded from appearing in requirement
386 * vectors. */
387 continue;
388 }
389 cb(unit_activity_name(act), univ->value.activity == act, data);
390 } activity_type_iterate_end;
391 break;
392 case VUT_NATIONGROUP:
393 nation_groups_iterate(pgroup) {
394 cb(nation_group_rule_name(pgroup), univ->value.nationgroup == pgroup, data);
395 } nation_groups_iterate_end;
396 break;
397 case VUT_TOPO:
398 for (i = 0; i < TOPO_FLAG_BITS; i++) {
399 cb(topo_flag_name(1 << i), univ->value.topo_property == 1 << i, data);
400 }
401 break;
402 case VUT_SERVERSETTING:
403 for (i = 0;
404 /* Only binary settings with the value TRUE are currently
405 * supported. */
406 i < settings_number();
407 i++) {
408 if (sanity_check_server_setting_value_in_req(i)) {
409 cb(ssetv_rule_name(i),
410 univ->value.ssetval == ssetv_from_values(i, TRUE), data);
411 }
412 }
413 break;
414 case VUT_IMPR_GENUS:
415 genus_iterate(genus) {
416 cb(impr_genus_id_name(genus), univ->value.impr_genus == genus, data);
417 } genus_iterate_end;
418 break;
419 case VUT_ACTION:
420 action_iterate(act) {
421 struct action *pact = action_by_number(act);
422
423 cb(action_rule_name(pact), univ->value.action == pact, data);
424 } action_iterate_end;
425 break;
426 case VUT_MINSIZE:
427 case VUT_MINYEAR:
428 case VUT_MINCALFRAG:
429 case VUT_MAXTILEUNITS:
430 case VUT_MINCULTURE:
431 case VUT_MINFOREIGNPCT:
432 case VUT_MINMOVES:
433 case VUT_MINVETERAN:
434 case VUT_MINHP:
435 case VUT_AGE:
436 case VUT_MINTECHS:
437 /* Requirement types having numerical value */
438 cb(NULL, FALSE, data);
439 break;
440 case VUT_COUNT:
441 fc_assert(univ->kind != VUT_COUNT);
442 break;
443 }
444}
achievement_by_number
struct achievement * achievement_by_number(int id)
Definition achievements.c:96
achievement_rule_name
const char * achievement_rule_name(struct achievement *pach)
Definition achievements.c:114
achievements.h
achievements_re_active_iterate
#define achievements_re_active_iterate(_p)
Definition achievements.h:74
achievements_re_active_iterate_end
#define achievements_re_active_iterate_end
Definition achievements.h:78
action_rule_name
const char * action_rule_name(const struct action *action)
Definition actions.c:1876
action_by_number
static struct action * action_by_number(action_id act_id)
Definition actions.h:638
action_iterate_end
#define action_iterate_end
Definition actions.h:472
action_iterate
#define action_iterate(_act_)
Definition actions.h:467
get_output_name
const char * get_output_name(Output_type_id output)
Definition city.c:624
output_type_iterate
#define output_type_iterate(output)
Definition city.h:812
output_type_iterate_end
#define output_type_iterate_end
Definition city.h:818
extra_by_number
struct extra_type * extra_by_number(int id)
Definition extras.c:175
extra_rule_name
const char * extra_rule_name(const struct extra_type *pextra)
Definition extras.c:195
extra_type_re_active_iterate_end
#define extra_type_re_active_iterate_end
Definition extras.h:305
extra_type_re_active_iterate
#define extra_type_re_active_iterate(_p)
Definition extras.h:301
TOPO_FLAG_BITS
#define TOPO_FLAG_BITS
Definition fc_types.h:561
output_type_id
output_type_id
Definition fc_types.h:90
game
struct civ_game game
Definition game.c:57
game.h
government_rule_name
const char * government_rule_name(const struct government *pgovern)
Definition government.c:132
government.h
governments_re_active_iterate
#define governments_re_active_iterate(_p)
Definition government.h:125
governments_re_active_iterate_end
#define governments_re_active_iterate_end
Definition government.h:129
improvement_by_number
struct impr_type * improvement_by_number(const Impr_type_id id)
Definition improvement.c:192
improvement_rule_name
const char * improvement_rule_name(const struct impr_type *pimprove)
Definition improvement.c:250
genus_iterate_end
#define genus_iterate_end
Definition improvement.h:230
improvement_re_active_iterate_end
#define improvement_re_active_iterate_end
Definition improvement.h:220
genus_iterate
#define genus_iterate(_p)
Definition improvement.h:224
improvement_re_active_iterate
#define improvement_re_active_iterate(_p)
Definition improvement.h:216
fc_assert
#define fc_assert(condition)
Definition log.h:176
nation_rule_name
const char * nation_rule_name(const struct nation_type *pnation)
Definition nation.c:137
nation_by_number
struct nation_type * nation_by_number(const Nation_type_id nation)
Definition nation.c:474
nation_group_rule_name
const char * nation_group_rule_name(const struct nation_group *pgroup)
Definition nation.c:1078
nation_group_by_number
struct nation_group * nation_group_by_number(int id)
Definition nation.c:1003
nation_group_count
int nation_group_count(void)
Definition nation.c:934
nations_iterate_end
#define nations_iterate_end
Definition nation.h:335
nations_iterate
#define nations_iterate(NAME_pnation)
Definition nation.h:332
nation_groups_iterate
#define nation_groups_iterate(NAME_pgroup)
Definition nation.h:310
nation_groups_iterate_end
#define nation_groups_iterate_end
Definition nation.h:314
universal_is_legal_in_requirement
bool universal_is_legal_in_requirement(const struct universal *univ)
Definition requirements.c:263
requirements.h
sanity_check_server_setting_value_in_req
bool sanity_check_server_setting_value_in_req(ssetv ssetval)
Definition rssanity.c:125
rssanity.h
server_setting_by_name
server_setting_id server_setting_by_name(const char *name)
Definition server_settings.c:29
ssetv_rule_name
const char * ssetv_rule_name(ssetv val)
Definition server_settings.c:169
ssetv_from_values
ssetv ssetv_from_values(server_setting_id setting, int value)
Definition server_settings.c:106
server_settings.h
settings_number
int settings_number(void)
Definition settings.c:5005
settings.h
specialist_by_number
struct specialist * specialist_by_number(const Specialist_type_id id)
Definition specialist.c:100
specialist_rule_name
const char * specialist_rule_name(const struct specialist *sp)
Definition specialist.c:146
specialist.h
specialist_type_re_active_iterate_end
#define specialist_type_re_active_iterate_end
Definition specialist.h:88
specialist_type_re_active_iterate
#define specialist_type_re_active_iterate(_p)
Definition specialist.h:83
action
Definition actions.h:379
civ_game::control
struct packet_ruleset_control control
Definition game.h:83
civ_game::government_during_revolution
struct government * government_during_revolution
Definition game.h:94
packet_ruleset_control::num_goods_types
int num_goods_types
Definition packets_gen.h:1464
packet_ruleset_control::num_styles
int num_styles
Definition packets_gen.h:1468
packet_ruleset_control::num_extra_types
int num_extra_types
Definition packets_gen.h:1460
packet_ruleset_control::num_unit_types
int num_unit_types
Definition packets_gen.h:1456
packet_ruleset_control::num_impr_types
int num_impr_types
Definition packets_gen.h:1457
packet_ruleset_control::nation_count
int nation_count
Definition packets_gen.h:1471
packet_ruleset_control::num_tech_types
int num_tech_types
Definition packets_gen.h:1459
packet_ruleset_control::num_achievement_types
int num_achievement_types
Definition packets_gen.h:1466
packet_ruleset_control::num_specialist_types
int num_specialist_types
Definition packets_gen.h:1474
packet_ruleset_control::num_unit_classes
int num_unit_classes
Definition packets_gen.h:1455
universal
Definition fc_types.h:756
universal::kind
enum universals_n kind
Definition fc_types.h:758
universal::value
universals_u value
Definition fc_types.h:757
style_by_number
struct nation_style * style_by_number(int id)
Definition style.c:88
style_rule_name
const char * style_rule_name(const struct nation_style *pstyle)
Definition style.c:108
styles_re_active_iterate_end
#define styles_re_active_iterate_end
Definition style.h:60
styles_re_active_iterate
#define styles_re_active_iterate(_p)
Definition style.h:56
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47
advance_by_number
struct advance * advance_by_number(const Tech_type_id atype)
Definition tech.c:107
advance_rule_name
const char * advance_rule_name(const struct advance *padvance)
Definition tech.c:299
tech.h
advance_re_active_iterate
#define advance_re_active_iterate(_p)
Definition tech.h:275
advance_re_active_iterate_end
#define advance_re_active_iterate_end
Definition tech.h:279
A_NONE
#define A_NONE
Definition tech.h:43
terrain_by_number
struct terrain * terrain_by_number(const Terrain_type_id type)
Definition terrain.c:144
terrain_rule_name
const char * terrain_rule_name(const struct terrain *pterrain)
Definition terrain.c:235
terrain_re_active_iterate_end
#define terrain_re_active_iterate_end
Definition terrain.h:373
terrain_re_active_iterate
#define terrain_re_active_iterate(_p)
Definition terrain.h:369
goods_rule_name
const char * goods_rule_name(struct goods_type *pgood)
Definition traderoutes.c:620
goods_by_number
struct goods_type * goods_by_number(Goods_type_id id)
Definition traderoutes.c:602
traderoutes.h
goods_type_re_active_iterate_end
#define goods_type_re_active_iterate_end
Definition traderoutes.h:231
goods_type_re_active_iterate
#define goods_type_re_active_iterate(_p)
Definition traderoutes.h:227
universals_u::utype
const struct unit_type * utype
Definition fc_types.h:604
universals_u::unitflag
int unitflag
Definition fc_types.h:624
universals_u::min_techs
int min_techs
Definition fc_types.h:639
universals_u::mincalfrag
int mincalfrag
Definition fc_types.h:619
universals_u::diplrel
int diplrel
Definition fc_types.h:629
universals_u::style
struct nation_style * style
Definition fc_types.h:608
universals_u::ai_level
enum ai_level ai_level
Definition fc_types.h:612
universals_u::specialist
struct specialist * specialist
Definition fc_types.h:601
universals_u::impr_genus
enum impr_genus_id impr_genus
Definition fc_types.h:633
universals_u::citytile
enum citytile_type citytile
Definition fc_types.h:613
universals_u::nationgroup
struct nation_group * nationgroup
Definition fc_types.h:607
universals_u::extra
struct extra_type * extra
Definition fc_types.h:605
universals_u::nation
struct nation_type * nation
Definition fc_types.h:599
universals_u::minmoves
int minmoves
Definition fc_types.h:634
universals_u::terrainclass
int terrainclass
Definition fc_types.h:621
universals_u::unitclassflag
int unitclassflag
Definition fc_types.h:623
universals_u::govern
struct government * govern
Definition fc_types.h:597
universals_u::age
int age
Definition fc_types.h:638
universals_u::minsize
int minsize
Definition fc_types.h:615
universals_u::max_tile_units
int max_tile_units
Definition fc_types.h:635
universals_u::terrainalter
int terrainalter
Definition fc_types.h:622
universals_u::minculture
int minculture
Definition fc_types.h:616
universals_u::citystatus
enum citystatus_type citystatus
Definition fc_types.h:614
universals_u::minforeignpct
int minforeignpct
Definition fc_types.h:617
universals_u::building
const struct impr_type * building
Definition fc_types.h:598
universals_u::achievement
struct achievement * achievement
Definition fc_types.h:606
universals_u::ssetval
ssetv ssetval
Definition fc_types.h:642
universals_u::techflag
int techflag
Definition fc_types.h:626
universals_u::advance
struct advance * advance
Definition fc_types.h:596
universals_u::activity
enum unit_activity activity
Definition fc_types.h:632
universals_u::good
struct goods_type * good
Definition fc_types.h:610
universals_u::terrain
struct terrain * terrain
Definition fc_types.h:602
universals_u::terrainflag
int terrainflag
Definition fc_types.h:625
universals_u::unit_state
enum ustate_prop unit_state
Definition fc_types.h:631
universals_u::minveteran
int minveteran
Definition fc_types.h:636
universals_u::extraflag
int extraflag
Definition fc_types.h:628
universals_u::outputtype
Output_type_id outputtype
Definition fc_types.h:620
universals_u::roadflag
int roadflag
Definition fc_types.h:627
universals_u::topo_property
enum topo_flag topo_property
Definition fc_types.h:641
universals_u::min_hit_points
int min_hit_points
Definition fc_types.h:637
universals_u::uclass
struct unit_class * uclass
Definition fc_types.h:603
universals_u::nationality
struct nation_type * nationality
Definition fc_types.h:600
universals_u::minyear
int minyear
Definition fc_types.h:618
universals_u::action
struct action * action
Definition fc_types.h:609
activity_type_iterate
#define activity_type_iterate(_act_)
Definition unit.h:288
activity_type_iterate_end
#define activity_type_iterate_end
Definition unit.h:292
uclass_by_number
struct unit_class * uclass_by_number(const Unit_Class_id id)
Definition unittype.c:2524
utype_rule_name
const char * utype_rule_name(const struct unit_type *punittype)
Definition unittype.c:1630
utype_by_number
struct unit_type * utype_by_number(const Unit_type_id id)
Definition unittype.c:112
uclass_rule_name
const char * uclass_rule_name(const struct unit_class *pclass)
Definition unittype.c:1693
unit_type_re_active_iterate
#define unit_type_re_active_iterate(_p)
Definition unittype.h:850
unit_class_re_active_iterate_end
#define unit_class_re_active_iterate_end
Definition unittype.h:892
UTYF_LAST_USER_FLAG
#define UTYF_LAST_USER_FLAG
Definition unittype.h:315
unit_class_re_active_iterate
#define unit_class_re_active_iterate(_p)
Definition unittype.h:888
unit_type_re_active_iterate_end
#define unit_type_re_active_iterate_end
Definition unittype.h:854
universal_value_initial
bool universal_value_initial(struct universal *src)
Definition univ_value.c:40
universal_kind_values
void universal_kind_values(struct universal *univ, univ_kind_values_cb cb, void *data)
Definition univ_value.c:230
univ_value.h
univ_kind_values_cb
void(* univ_kind_values_cb)(const char *value, bool current, void *data)
Definition univ_value.h:20