Freeciv-3.3
Loading...
Searching...
No Matches
common
extras.h
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
#ifndef FC__EXTRAS_H
14
#define FC__EXTRAS_H
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
/* __cplusplus */
19
20
/* common */
21
#include "
fc_types.h
"
22
#include "
unittype.h
"
23
24
struct
base_type
;
25
struct
road_type
;
26
27
/* Used in the network protocol. */
28
#define SPECENUM_NAME extra_flag_id
29
/* Tile with this extra is considered native for units in tile. */
30
#define SPECENUM_VALUE0 EF_NATIVE_TILE
31
#define SPECENUM_VALUE0NAME N_("?extraflag:NativeTile")
32
/* Refuel native units */
33
#define SPECENUM_VALUE1 EF_REFUEL
34
#define SPECENUM_VALUE1NAME N_("?extraflag:Refuel")
35
#define SPECENUM_VALUE2 EF_TERR_CHANGE_REMOVES
36
#define SPECENUM_VALUE2NAME N_("?extraflag:TerrChangeRemoves")
37
/* Extra will be built in cities automatically */
38
#define SPECENUM_VALUE3 EF_AUTO_ON_CITY_CENTER
39
#define SPECENUM_VALUE3NAME N_("?extraflag:AutoOnCityCenter")
40
/* Extra is always present in cities */
41
#define SPECENUM_VALUE4 EF_ALWAYS_ON_CITY_CENTER
42
#define SPECENUM_VALUE4NAME N_("?extraflag:AlwaysOnCityCenter")
43
/* Road style gfx from ocean extra connects to nearby land */
44
#define SPECENUM_VALUE5 EF_CONNECT_LAND
45
#define SPECENUM_VALUE5NAME N_("?extraflag:ConnectLand")
46
/* Counts towards Global Warming */
47
#define SPECENUM_VALUE6 EF_GLOBAL_WARMING
48
#define SPECENUM_VALUE6NAME N_("?extraflag:GlobalWarming")
49
/* Counts towards Nuclear Winter */
50
#define SPECENUM_VALUE7 EF_NUCLEAR_WINTER
51
#define SPECENUM_VALUE7NAME N_("?extraflag:NuclearWinter")
52
/* Owner's flag will be shown on the tile */
53
#define SPECENUM_VALUE8 EF_SHOW_FLAG
54
#define SPECENUM_VALUE8NAME N_("?extraflag:ShowFlag")
55
/* Extra's defense bonus will be counted to
56
* separate "Natural" defense layer. */
57
#define SPECENUM_VALUE9 EF_NATURAL_DEFENSE
58
#define SPECENUM_VALUE9NAME N_("?extraflag:NaturalDefense")
59
/* Units inside will not die all at once */
60
#define SPECENUM_VALUE10 EF_NO_STACK_DEATH
61
#define SPECENUM_VALUE10NAME N_("NoStackDeath")
62
/* Extra itself makes tile to be considered extra owners ZoC */
63
#define SPECENUM_VALUE11 EF_CAUSE_ZOC
64
#define SPECENUM_VALUE11NAME N_("CauseZoC")
65
66
#define SPECENUM_VALUE12 EF_USER_FLAG_1
67
#define SPECENUM_VALUE13 EF_USER_FLAG_2
68
#define SPECENUM_VALUE14 EF_USER_FLAG_3
69
#define SPECENUM_VALUE15 EF_USER_FLAG_4
70
#define SPECENUM_VALUE16 EF_USER_FLAG_5
71
#define SPECENUM_VALUE17 EF_USER_FLAG_6
72
#define SPECENUM_VALUE18 EF_USER_FLAG_7
73
#define SPECENUM_VALUE19 EF_USER_FLAG_8
74
#define SPECENUM_VALUE20 EF_USER_FLAG_9
75
#define SPECENUM_VALUE21 EF_USER_FLAG_10
76
77
#define SPECENUM_COUNT EF_COUNT
78
#define SPECENUM_NAMEOVERRIDE
79
#define SPECENUM_BITVECTOR bv_extra_flags
80
#include "
specenum_gen.h
"
81
82
#define EF_LAST_USER_FLAG EF_USER_FLAG_10
83
#define MAX_NUM_USER_EXTRA_FLAGS (EF_LAST_USER_FLAG - EF_USER_FLAG_1 + 1)
84
85
#define EXTRA_NONE (-1)
86
87
struct
extra_type
88
{
89
int
id
;
90
struct
name_translation
name
;
91
bool
ruledit_disabled
;
92
void
*
ruledit_dlg
;
93
enum
extra_category
category
;
94
uint16_t
causes
;
95
uint8_t
rmcauses
;
96
97
char
graphic_str
[
MAX_LEN_NAME
];
98
char
graphic_alt
[
MAX_LEN_NAME
];
99
char
activity_gfx
[
MAX_LEN_NAME
];
100
char
act_gfx_alt
[
MAX_LEN_NAME
];
101
char
act_gfx_alt2
[
MAX_LEN_NAME
];
102
char
rmact_gfx
[
MAX_LEN_NAME
];
103
char
rmact_gfx_alt
[
MAX_LEN_NAME
];
104
char
rmact_gfx_alt2
[
MAX_LEN_NAME
];
105
106
struct
requirement_vector
reqs
;
107
struct
requirement_vector
rmreqs
;
108
struct
requirement_vector
appearance_reqs
;
109
struct
requirement_vector
disappearance_reqs
;
110
111
/* 'buildable' is unclean. Clean solution would be to rely solely on extra_cause:
112
* if the extra cannot be built, it's not in the cause's list.
113
* But we currently rely on actually-not-buildable extras to be on the lists,
114
* for example for the editor to list non-buildable but editor-placeable
115
* extras. */
116
bool
buildable
;
117
bool
generated
;
118
int
build_time
;
119
int
build_time_factor
;
120
int
removal_time
;
121
int
removal_time_factor
;
122
int
infracost
;
123
124
int
defense_bonus
;
125
int
appearance_chance
;
126
int
disappearance_chance
;
127
128
enum
extra_unit_seen_type
eus
;
129
130
bv_unit_classes
native_to
;
131
132
bv_extra_flags
flags
;
133
bv_extras
conflicts
;
134
bv_extras
hidden_by
;
135
bv_extras
bridged_over
;
/* Needs "bridge" to get built over these extras */
136
137
int
no_aggr_near_city
;
138
139
Tech_type_id
visibility_req
;
140
141
/* Same information as in hidden_by, but iterating through this list is much
142
* faster than through all extra types to check which ones are hiding this one.
143
* Only used client side. */
144
struct
extra_type_list
*
hiders
;
145
146
/* Same information as bridged_over */
147
struct
extra_type_list
*
bridged
;
148
149
struct
strvec
*
helptext
;
150
151
struct
152
{
153
int
special_idx
;
154
struct
base_type
*
base
;
155
struct
road_type
*
road
;
156
struct
resource_type
*
resource
;
157
}
data
;
158
};
159
160
/* get 'struct extra_type_list' and related functions: */
161
#define SPECLIST_TAG extra_type
162
#define SPECLIST_TYPE struct extra_type
163
#include "
speclist.h
"
164
165
#define extra_type_list_iterate(extralist, pextra) \
166
TYPED_LIST_ITERATE(struct extra_type, extralist, pextra)
167
#define extra_type_list_iterate_end LIST_ITERATE_END
168
169
#define extra_type_list_iterate_rev(extralist, pextra) \
170
TYPED_LIST_ITERATE_REV(struct extra_type, extralist, pextra)
171
#define extra_type_list_iterate_rev_end LIST_ITERATE_REV_END
172
173
void
extras_init
(
void
);
174
void
extras_free
(
void
);
175
176
int
extra_count
(
void
);
177
int
extra_number
(
const
struct
extra_type
*pextra);
178
struct
extra_type
*
extra_by_number
(
int
id
);
179
180
/* For optimization purposes (being able to have it as macro instead of function
181
* call) this is now same as extra_number(). extras.c does have semantically correct
182
* implementation too. */
183
#define extra_index(_e_) (_e_)->id
184
185
const
char
*
extra_name_translation
(
const
struct
extra_type
*pextra);
186
const
char
*
extra_rule_name
(
const
struct
extra_type
*pextra);
187
struct
extra_type
*
extra_type_by_rule_name
(
const
char
*
name
);
188
struct
extra_type
*
extra_type_by_translated_name
(
const
char
*
name
);
189
190
#define extra_base_get(_e_) (_e_)->data.base
191
#define extra_road_get(_e_) (_e_)->data.road
192
#define extra_resource_get(_e_) (_e_)->data.resource
193
194
void
extra_to_caused_by_list
(
struct
extra_type
*pextra,
enum
extra_cause
cause);
195
struct
extra_type_list
*
extra_type_list_by_cause
(
enum
extra_cause
cause);
196
struct
extra_type
*
rand_extra_for_tile
(
struct
tile
*ptile,
enum
extra_cause
cause,
197
bool
generated
);
198
199
struct
extra_type_list
*
extra_type_list_of_unit_hiders
(
void
);
200
struct
extra_type_list
*
extra_type_list_of_zoccers
(
void
);
201
struct
extra_type_list
*
extra_type_list_of_terr_claimers
(
void
);
202
203
#define is_extra_caused_by(e, c) (e->causes & (1 << c))
204
bool
is_extra_caused_by_worker_action
(
const
struct
extra_type
*pextra);
205
bool
is_extra_caused_by_action
(
const
struct
extra_type
*pextra,
206
const
struct
action
*
paction
);
207
208
void
_extra_to_removed_by_list
(
struct
extra_type
*pextra,
enum
extra_rmcause
rmcause
);
209
210
/************************************************************************/
214
static
inline
void
extra_to_removed_by_list
(
struct
extra_type
*pextra,
215
enum
extra_rmcause
rmcause
)
216
{
217
fc__unreachable
(
rmcause
>=
ERM_COUNT
);
218
219
_extra_to_removed_by_list
(pextra,
rmcause
);
220
}
221
222
struct
extra_type_list
*
extra_type_list_by_rmcause
(
enum
extra_rmcause
rmcause
);
223
struct
extra_type_list
*
extra_type_list_cleanable
(
void
);
224
225
bool
is_extra_removed_by
(
const
struct
extra_type
*pextra,
enum
extra_rmcause
rmcause
);
226
bool
is_extra_removed_by_worker_action
(
const
struct
extra_type
*pextra);
227
bool
is_extra_removed_by_action
(
const
struct
extra_type
*pextra,
228
const
struct
action
*
paction
);
229
230
bool
is_extra_card_near
(
const
struct
civ_map
*
nmap
,
const
struct
tile
*ptile,
231
const
struct
extra_type
*pextra);
232
bool
is_extra_near_tile
(
const
struct
civ_map
*
nmap
,
const
struct
tile
*ptile,
233
const
struct
extra_type
*pextra);
234
235
bool
extra_can_be_built
(
const
struct
extra_type
*pextra,
const
struct
tile
*ptile);
236
bool
can_build_extra
(
const
struct
extra_type
*pextra,
237
const
struct
unit
*
punit
,
238
const
struct
tile
*ptile);
239
bool
can_build_extra_base
(
const
struct
extra_type
*pextra,
240
const
struct
player
*pplayer,
241
const
struct
tile
*ptile);
242
bool
player_can_build_extra
(
const
struct
extra_type
*pextra,
243
const
struct
player
*pplayer,
244
const
struct
tile
*ptile);
245
bool
player_can_place_extra
(
const
struct
extra_type
*pextra,
246
const
struct
player
*pplayer,
247
const
struct
tile
*ptile);
248
249
bool
can_remove_extra
(
const
struct
extra_type
*pextra,
250
const
struct
unit
*
punit
,
251
const
struct
tile
*ptile);
252
bool
player_can_remove_extra
(
const
struct
extra_type
*pextra,
253
const
struct
player
*pplayer,
254
const
struct
tile
*ptile);
255
256
bool
is_native_extra_to_uclass
(
const
struct
extra_type
*pextra,
257
const
struct
unit_class
*
pclass
);
258
bool
is_native_extra_to_utype
(
const
struct
extra_type
*pextra,
259
const
struct
unit_type
*
punittype
);
260
bool
is_native_tile_to_extra
(
const
struct
extra_type
*pextra,
261
const
struct
tile
*ptile);
262
bool
extra_conflicting_on_tile
(
const
struct
extra_type
*pextra,
263
const
struct
tile
*ptile);
264
265
bool
hut_on_tile
(
const
struct
tile
*ptile);
266
bool
unit_can_enter_hut
(
const
struct
unit
*
punit
,
267
const
struct
tile
*ptile);
268
bool
unit_can_displace_hut
(
const
struct
unit
*
punit
,
269
const
struct
tile
*ptile);
270
271
bool
extra_has_flag
(
const
struct
extra_type
*pextra,
enum
extra_flag_id
flag);
272
bool
is_extra_flag_card_near
(
const
struct
civ_map
*
nmap
,
273
const
struct
tile
*ptile,
274
enum
extra_flag_id
flag);
275
bool
is_extra_flag_near_tile
(
const
struct
civ_map
*
nmap
,
276
const
struct
tile
*ptile,
277
enum
extra_flag_id
flag);
278
279
void
user_extra_flags_init
(
void
);
280
void
extra_flags_free
(
void
);
281
void
set_user_extra_flag_name
(
enum
extra_flag_id
id
,
282
const
char
*
name
,
283
const
char
*helptxt);
284
const
char
*
extra_flag_helptxt
(
enum
extra_flag_id
id
);
285
bool
extra_flag_is_in_use
(
enum
extra_flag_id
id
);
286
287
bool
extra_causes_env_upset
(
struct
extra_type
*pextra,
288
enum
environment_upset_type
upset
);
289
290
bool
can_extras_coexist
(
const
struct
extra_type
*
pextra1
,
291
const
struct
extra_type
*
pextra2
);
292
293
bool
can_extra_appear
(
const
struct
extra_type
*pextra,
const
struct
tile
*ptile);
294
bool
can_extra_disappear
(
const
struct
extra_type
*pextra,
const
struct
tile
*ptile);
295
296
struct
extra_type
*
next_extra_for_tile
(
const
struct
tile
*ptile,
enum
extra_cause
cause,
297
const
struct
player
*pplayer,
298
const
struct
unit
*
punit
);
299
struct
extra_type
*
prev_extra_in_tile
(
const
struct
tile
*ptile,
enum
extra_rmcause
rmcause
,
300
const
struct
player
*pplayer,
301
const
struct
unit
*
punit
);
302
struct
extra_type
*
prev_cleanable_in_tile
(
const
struct
tile
*ptile,
303
const
struct
player
*pplayer,
304
const
struct
unit
*
punit
);
305
306
enum
extra_cause
activity_to_extra_cause
(
enum
unit_activity
act);
307
enum
extra_rmcause
activity_to_extra_rmcause
(
enum
unit_activity
act);
308
309
struct
player
*
extra_owner
(
const
struct
tile
*ptile);
310
311
bool
player_knows_extra_exist
(
const
struct
player
*pplayer,
312
const
struct
extra_type
*pextra,
313
const
struct
tile
*ptile);
314
315
#define extra_type_iterate(_p) \
316
{ \
317
int _i_##_p; \
318
for (_i_##_p = 0; _i_##_p < game.control.num_extra_types; _i_##_p++) { \
319
struct extra_type *_p = extra_by_number(_i_##_p);
320
321
#define extra_type_iterate_end \
322
} \
323
}
324
325
#define extra_type_re_active_iterate(_p) \
326
extra_type_iterate(_p) { \
327
if (!_p->ruledit_disabled) {
328
329
#define extra_type_re_active_iterate_end \
330
} \
331
} extra_type_iterate_end;
332
333
#define extra_type_by_cause_iterate(_cause, _extra) \
334
{ \
335
struct extra_type_list *_etl_##_extra = extra_type_list_by_cause(_cause); \
336
if (_etl_##_extra != NULL) { \
337
extra_type_list_iterate(_etl_##_extra, _extra) {
338
339
#define extra_type_by_cause_iterate_end \
340
} extra_type_list_iterate_end \
341
} \
342
}
343
344
#define extra_type_by_cause_iterate_rev(_cause, _extra) \
345
{ \
346
struct extra_type_list *_etl_ = extra_type_list_by_cause(_cause); \
347
extra_type_list_iterate_rev(_etl_, _extra) {
348
349
#define extra_type_by_cause_iterate_rev_end \
350
} extra_type_list_iterate_rev_end \
351
}
352
353
#define extra_type_by_rmcause_iterate(_rmcause, _extra) \
354
{ \
355
struct extra_type_list *_etl_ = extra_type_list_by_rmcause(_rmcause); \
356
extra_type_list_iterate_rev(_etl_, _extra) {
357
358
#define extra_type_by_rmcause_iterate_end \
359
} extra_type_list_iterate_rev_end \
360
}
361
362
#define extra_type_cleanable_iterate(_extra) \
363
{ \
364
struct extra_type_list *_etl_ = extra_type_list_cleanable(); \
365
extra_type_list_iterate_rev(_etl_, _extra) {
366
367
#define extra_type_cleanable_iterate_end \
368
} extra_type_list_iterate_rev_end \
369
}
370
371
#define extra_deps_iterate(_reqs, _dep) \
372
{ \
373
requirement_vector_iterate(_reqs, preq) { \
374
if (preq->source.kind == VUT_EXTRA \
375
&& preq->present) { \
376
struct extra_type *_dep; \
377
_dep = preq->source.value.extra;
378
379
#define extra_deps_iterate_end \
380
} \
381
} requirement_vector_iterate_end; \
382
}
383
384
#ifdef __cplusplus
385
}
386
#endif
/* __cplusplus */
387
388
#endif
/* FC__EXTRAS_H */
incite_cost
char * incite_cost
Definition
comments.c:76
punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition
dialogs_g.h:74
is_extra_removed_by_worker_action
bool is_extra_removed_by_worker_action(const struct extra_type *pextra)
Definition
extras.c:1059
next_extra_for_tile
struct extra_type * next_extra_for_tile(const struct tile *ptile, enum extra_cause cause, const struct player *pplayer, const struct unit *punit)
Definition
extras.c:779
extra_type_by_rule_name
struct extra_type * extra_type_by_rule_name(const char *name)
Definition
extras.c:212
prev_cleanable_in_tile
struct extra_type * prev_cleanable_in_tile(const struct tile *ptile, const struct player *pplayer, const struct unit *punit)
Definition
extras.c:831
extra_causes_env_upset
bool extra_causes_env_upset(struct extra_type *pextra, enum environment_upset_type upset)
Definition
extras.c:1030
can_build_extra_base
bool can_build_extra_base(const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile)
Definition
extras.c:413
unit_can_displace_hut
bool unit_can_displace_hut(const struct unit *punit, const struct tile *ptile)
Definition
extras.c:749
rand_extra_for_tile
struct extra_type * rand_extra_for_tile(struct tile *ptile, enum extra_cause cause, bool generated)
Definition
extras.c:283
player_can_place_extra
bool player_can_place_extra(const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile)
Definition
extras.c:490
user_extra_flags_init
void user_extra_flags_init(void)
Definition
extras.c:923
extra_owner
struct player * extra_owner(const struct tile *ptile)
Definition
extras.c:1128
extra_flag_is_in_use
bool extra_flag_is_in_use(enum extra_flag_id id)
Definition
extras.c:1001
extra_flag_helptxt
const char * extra_flag_helptxt(enum extra_flag_id id)
Definition
extras.c:988
extra_type_by_translated_name
struct extra_type * extra_type_by_translated_name(const char *name)
Definition
extras.c:235
set_user_extra_flag_name
void set_user_extra_flag_name(enum extra_flag_id id, const char *name, const char *helptxt)
Definition
extras.c:947
is_extra_flag_near_tile
bool is_extra_flag_near_tile(const struct civ_map *nmap, const struct tile *ptile, enum extra_flag_id flag)
Definition
extras.c:904
extra_to_removed_by_list
static void extra_to_removed_by_list(struct extra_type *pextra, enum extra_rmcause rmcause)
Definition
extras.h:214
unit_can_enter_hut
bool unit_can_enter_hut(const struct unit *punit, const struct tile *ptile)
Definition
extras.c:720
is_extra_caused_by_worker_action
bool is_extra_caused_by_worker_action(const struct extra_type *pextra)
Definition
extras.c:1046
is_extra_flag_card_near
bool is_extra_flag_card_near(const struct civ_map *nmap, const struct tile *ptile, enum extra_flag_id flag)
Definition
extras.c:884
extras_free
void extras_free(void)
Definition
extras.c:84
can_extra_appear
bool can_extra_appear(const struct extra_type *pextra, const struct tile *ptile)
Definition
extras.c:1136
extra_type_list_of_zoccers
struct extra_type_list * extra_type_list_of_zoccers(void)
Definition
extras.c:267
is_extra_near_tile
bool is_extra_near_tile(const struct civ_map *nmap, const struct tile *ptile, const struct extra_type *pextra)
Definition
extras.c:379
extra_number
int extra_number(const struct extra_type *pextra)
Definition
extras.c:161
extra_has_flag
bool extra_has_flag(const struct extra_type *pextra, enum extra_flag_id flag)
Definition
extras.c:875
is_native_tile_to_extra
bool is_native_tile_to_extra(const struct extra_type *pextra, const struct tile *ptile)
Definition
extras.c:641
extra_type_list_by_cause
struct extra_type_list * extra_type_list_by_cause(enum extra_cause cause)
Definition
extras.c:249
extra_type_list_by_rmcause
struct extra_type_list * extra_type_list_by_rmcause(enum extra_rmcause rmcause)
Definition
extras.c:322
prev_extra_in_tile
struct extra_type * prev_extra_in_tile(const struct tile *ptile, enum extra_rmcause rmcause, const struct player *pplayer, const struct unit *punit)
Definition
extras.c:804
hut_on_tile
bool hut_on_tile(const struct tile *ptile)
Definition
extras.c:705
is_extra_card_near
bool is_extra_card_near(const struct civ_map *nmap, const struct tile *ptile, const struct extra_type *pextra)
Definition
extras.c:363
extra_to_caused_by_list
void extra_to_caused_by_list(struct extra_type *pextra, enum extra_cause cause)
Definition
extras.c:312
player_can_build_extra
bool player_can_build_extra(const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile)
Definition
extras.c:468
extra_by_number
struct extra_type * extra_by_number(int id)
Definition
extras.c:183
activity_to_extra_cause
enum extra_cause activity_to_extra_cause(enum unit_activity act)
Definition
extras.c:1090
extra_can_be_built
bool extra_can_be_built(const struct extra_type *pextra, const struct tile *ptile)
Definition
extras.c:394
is_native_extra_to_utype
bool is_native_extra_to_utype(const struct extra_type *pextra, const struct unit_type *punittype)
Definition
extras.c:866
extra_conflicting_on_tile
bool extra_conflicting_on_tile(const struct extra_type *pextra, const struct tile *ptile)
Definition
extras.c:688
can_extras_coexist
bool can_extras_coexist(const struct extra_type *pextra1, const struct extra_type *pextra2)
Definition
extras.c:1017
extra_flags_free
void extra_flags_free(void)
Definition
extras.c:935
can_remove_extra
bool can_remove_extra(const struct extra_type *pextra, const struct unit *punit, const struct tile *ptile)
Definition
extras.c:618
extra_type_list_of_terr_claimers
struct extra_type_list * extra_type_list_of_terr_claimers(void)
Definition
extras.c:275
is_extra_caused_by_action
bool is_extra_caused_by_action(const struct extra_type *pextra, const struct action *paction)
Definition
extras.c:1070
extra_rule_name
const char * extra_rule_name(const struct extra_type *pextra)
Definition
extras.c:203
extra_type_list_cleanable
struct extra_type_list * extra_type_list_cleanable(void)
Definition
extras.c:332
is_extra_removed_by
bool is_extra_removed_by(const struct extra_type *pextra, enum extra_rmcause rmcause)
Definition
extras.c:353
_extra_to_removed_by_list
void _extra_to_removed_by_list(struct extra_type *pextra, enum extra_rmcause rmcause)
Definition
extras.c:340
is_extra_removed_by_action
bool is_extra_removed_by_action(const struct extra_type *pextra, const struct action *paction)
Definition
extras.c:1080
activity_to_extra_rmcause
enum extra_rmcause activity_to_extra_rmcause(enum unit_activity act)
Definition
extras.c:1111
player_can_remove_extra
bool player_can_remove_extra(const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile)
Definition
extras.c:595
extra_type_list_of_unit_hiders
struct extra_type_list * extra_type_list_of_unit_hiders(void)
Definition
extras.c:259
extras_init
void extras_init(void)
Definition
extras.c:45
extra_count
int extra_count(void)
Definition
extras.c:153
player_knows_extra_exist
bool player_knows_extra_exist(const struct player *pplayer, const struct extra_type *pextra, const struct tile *ptile)
Definition
extras.c:1167
can_build_extra
bool can_build_extra(const struct extra_type *pextra, const struct unit *punit, const struct tile *ptile)
Definition
extras.c:535
is_native_extra_to_uclass
bool is_native_extra_to_uclass(const struct extra_type *pextra, const struct unit_class *pclass)
Definition
extras.c:857
extra_name_translation
const char * extra_name_translation(const struct extra_type *pextra)
Definition
extras.c:194
can_extra_disappear
bool can_extra_disappear(const struct extra_type *pextra, const struct tile *ptile)
Definition
extras.c:1152
fc_types.h
environment_upset_type
environment_upset_type
Definition
fc_types.h:986
Tech_type_id
int Tech_type_id
Definition
fc_types.h:236
MAX_LEN_NAME
#define MAX_LEN_NAME
Definition
fc_types.h:66
name
const char * name
Definition
inputfile.c:127
specenum_gen.h
speclist.h
action
Definition
actions.h:106
base_type
Definition
base.h:41
civ_map
Definition
map_types.h:71
extra_type
Definition
extras.h:88
extra_type::native_to
bv_unit_classes native_to
Definition
extras.h:130
extra_type::rmact_gfx
char rmact_gfx[MAX_LEN_NAME]
Definition
extras.h:102
extra_type::conflicts
bv_extras conflicts
Definition
extras.h:133
extra_type::rmcauses
uint8_t rmcauses
Definition
extras.h:95
extra_type::act_gfx_alt
char act_gfx_alt[MAX_LEN_NAME]
Definition
extras.h:100
extra_type::appearance_reqs
struct requirement_vector appearance_reqs
Definition
extras.h:108
extra_type::helptext
struct strvec * helptext
Definition
extras.h:149
extra_type::flags
bv_extra_flags flags
Definition
extras.h:132
extra_type::hiders
struct extra_type_list * hiders
Definition
extras.h:144
extra_type::rmact_gfx_alt
char rmact_gfx_alt[MAX_LEN_NAME]
Definition
extras.h:103
extra_type::causes
uint16_t causes
Definition
extras.h:94
extra_type::road
struct road_type * road
Definition
extras.h:155
extra_type::bridged_over
bv_extras bridged_over
Definition
extras.h:135
extra_type::resource
struct resource_type * resource
Definition
extras.h:156
extra_type::removal_time
int removal_time
Definition
extras.h:120
extra_type::rmact_gfx_alt2
char rmact_gfx_alt2[MAX_LEN_NAME]
Definition
extras.h:104
extra_type::bridged
struct extra_type_list * bridged
Definition
extras.h:147
extra_type::build_time_factor
int build_time_factor
Definition
extras.h:119
extra_type::ruledit_disabled
bool ruledit_disabled
Definition
extras.h:91
extra_type::disappearance_reqs
struct requirement_vector disappearance_reqs
Definition
extras.h:109
extra_type::generated
bool generated
Definition
extras.h:117
extra_type::special_idx
int special_idx
Definition
extras.h:153
extra_type::data
struct extra_type::@26 data
extra_type::rmreqs
struct requirement_vector rmreqs
Definition
extras.h:107
extra_type::visibility_req
Tech_type_id visibility_req
Definition
extras.h:139
extra_type::category
enum extra_category category
Definition
extras.h:93
extra_type::id
int id
Definition
extras.h:89
extra_type::graphic_alt
char graphic_alt[MAX_LEN_NAME]
Definition
extras.h:98
extra_type::activity_gfx
char activity_gfx[MAX_LEN_NAME]
Definition
extras.h:99
extra_type::ruledit_dlg
void * ruledit_dlg
Definition
extras.h:92
extra_type::disappearance_chance
int disappearance_chance
Definition
extras.h:126
extra_type::removal_time_factor
int removal_time_factor
Definition
extras.h:121
extra_type::act_gfx_alt2
char act_gfx_alt2[MAX_LEN_NAME]
Definition
extras.h:101
extra_type::reqs
struct requirement_vector reqs
Definition
extras.h:106
extra_type::buildable
bool buildable
Definition
extras.h:116
extra_type::eus
enum extra_unit_seen_type eus
Definition
extras.h:128
extra_type::defense_bonus
int defense_bonus
Definition
extras.h:124
extra_type::appearance_chance
int appearance_chance
Definition
extras.h:125
extra_type::graphic_str
char graphic_str[MAX_LEN_NAME]
Definition
extras.h:97
extra_type::build_time
int build_time
Definition
extras.h:118
extra_type::infracost
int infracost
Definition
extras.h:122
extra_type::no_aggr_near_city
int no_aggr_near_city
Definition
extras.h:137
extra_type::hidden_by
bv_extras hidden_by
Definition
extras.h:134
extra_type::name
struct name_translation name
Definition
extras.h:90
extra_type::base
struct base_type * base
Definition
extras.h:154
name_translation
Definition
name_translation.h:35
player
Definition
player.h:249
resource_type
Definition
terrain.h:48
road_type
Definition
road.h:71
strvec
Definition
string_vector.c:29
tile
Definition
tile.h:50
unit_class
Definition
unittype.h:149
unit_type
Definition
unittype.h:507
unit
Definition
unit.h:140
fc__unreachable
#define fc__unreachable(_cond_)
Definition
support.h:134
unittype.h
Generated on Sun Dec 22 2024 22:30:36 for Freeciv-3.3 by
1.9.8