20 #define SPECENUM_NAME base_gui_type
21 #define SPECENUM_VALUE0 BASE_GUI_FORTRESS
22 #define SPECENUM_VALUE0NAME "Fortress"
23 #define SPECENUM_VALUE1 BASE_GUI_AIRBASE
24 #define SPECENUM_VALUE1NAME "Airbase"
25 #define SPECENUM_VALUE2 BASE_GUI_OTHER
26 #define SPECENUM_VALUE2NAME "Other"
27 #include "specenum_gen.h"
30 #define SPECENUM_NAME base_flag_id
32 #define SPECENUM_VALUE0 BF_NOT_AGGRESSIVE
35 #define SPECENUM_VALUE0NAME N_("NoAggressive")
37 #define SPECENUM_COUNT BF_COUNT
38 #define SPECENUM_BITVECTOR bv_base_flags
39 #include "specenum_gen.h"
69 enum base_flag_id flag);
71 enum base_flag_id flag);
74 enum base_flag_id flag,
79 const struct tile *ptile);
82 const struct unit *punit,
83 const struct tile *ptile);
91 #define base_deps_iterate(_reqs, _dep) \
93 requirement_vector_iterate(_reqs, preq) \
95 if (preq->source.kind == VUT_EXTRA && preq->present \
96 && is_extra_caused_by(preq->source.value.extra, EC_BASE)) { \
97 struct base_type *_dep = extra_base_get(preq->source.value.extra);
99 #define base_deps_iterate_end \
102 requirement_vector_iterate_end; \
bool base_flag_is_retired(enum base_flag_id flag)
Returns TRUE iff the given flag is retired.
Base_type_id base_number(const struct base_type *pbase)
Return the base index.
void base_type_init(struct extra_type *pextra, int idx)
Initialize base_type structures.
bool base_has_flag(const struct base_type *pbase, enum base_flag_id flag)
Check if base provides effect.
bool is_base_flag_card_near(const struct tile *ptile, enum base_flag_id flag)
Returns TRUE iff any cardinally adjacent tile contains a base with the given flag (does not check pti...
void base_types_free()
Free the memory associated with base types.
struct extra_type * base_extra_get(const struct base_type *pbase)
Return extra that base is.
bool base_has_flag_for_utype(const struct base_type *pbase, enum base_flag_id flag, const struct unit_type *punittype)
Base provides base flag for unit? Checks if base provides flag and if base is native to unit.
struct base_type * base_by_number(const Base_type_id id)
Returns base_type entry for an ID value.
bool can_build_base(const struct unit *punit, const struct base_type *pbase, const struct tile *ptile)
Can unit build base to given tile?
Base_type_id base_count()
Return the number of base_types.
struct base_type * get_base_by_gui_type(enum base_gui_type type, const struct unit *punit, const struct tile *ptile)
Get best gui_type base for given parameters.
bool is_base_flag_near_tile(const struct tile *ptile, enum base_flag_id flag)
Returns TRUE iff any adjacent tile contains a base with the given flag (does not check ptile itself)
bool territory_claiming_base(const struct base_type *pbase)
Does this base type claim territory?
enum base_gui_type gui_type