![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "extras.h"#include "game.h"#include "map.h"#include "tile.h"#include "unit.h"#include "base.h"
Include dependency graph for base.cpp:Go to the source code of this file.
Functions | |
| bool | base_has_flag (const struct base_type *pbase, enum base_flag_id flag) |
| Check if base provides effect. More... | |
| 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 ptile itself) More... | |
| 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) More... | |
| bool | base_flag_is_retired (enum base_flag_id flag) |
| Returns TRUE iff the given flag is retired. More... | |
| 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. More... | |
| bool | can_build_base (const struct unit *punit, const struct base_type *pbase, const struct tile *ptile) |
| Can unit build base to given tile? More... | |
| struct base_type * | base_by_number (const Base_type_id id) |
| Returns base_type entry for an ID value. More... | |
| Base_type_id | base_number (const struct base_type *pbase) |
| Return the base index. More... | |
| struct extra_type * | base_extra_get (const struct base_type *pbase) |
| Return extra that base is. More... | |
| Base_type_id | base_count () |
| Return the number of base_types. More... | |
| void | base_type_init (struct extra_type *pextra, int idx) |
| Initialize base_type structures. More... | |
| void | base_types_free () |
| Free the memory associated with base types. More... | |
| 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. More... | |
| bool | territory_claiming_base (const struct base_type *pbase) |
| Does this base type claim territory? More... | |
| struct base_type* base_by_number | ( | const Base_type_id | id | ) |
Returns base_type entry for an ID value.
Definition at line 119 of file base.cpp.
Referenced by handle_ruleset_base(), set_unit_activity_base(), and sg_load_player_unit().
| Base_type_id base_count | ( | ) |
Return the number of base_types.
Definition at line 152 of file base.cpp.
Referenced by editor_tool_is_usable(), and tab_misc::refresh_stats().
| struct extra_type* base_extra_get | ( | const struct base_type * | pbase | ) |
Return extra that base is.
Definition at line 144 of file base.cpp.
Referenced by base_has_flag_for_utype(), can_build_base(), key_unit_airbase(), key_unit_fortress(), set_unit_activity_base(), settler_evaluate_improvements(), sg_bases_set(), and sg_load_player_unit().
| bool base_flag_is_retired | ( | enum base_flag_id | flag | ) |
Returns TRUE iff the given flag is retired.
Definition at line 78 of file base.cpp.
Referenced by load_ruleset_terrain(), and sanity_check_ruleset_data().
| bool base_has_flag | ( | const struct base_type * | pbase, |
| enum base_flag_id | flag | ||
| ) |
Check if base provides effect.
Definition at line 24 of file base.cpp.
Referenced by base_has_flag_for_utype(), helptext_extra(), is_base_flag_card_near(), is_base_flag_near_tile(), save_terrain_ruleset(), and tile_has_base_flag().
| 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.
Definition at line 90 of file base.cpp.
Referenced by tile_has_base_flag_for_unit().
| Base_type_id base_number | ( | const struct base_type * | pbase | ) |
Return the base index.
Definition at line 135 of file base.cpp.
Referenced by load_ruleset_terrain(), send_ruleset_bases(), and sg_load_player_unit().
| void base_type_init | ( | struct extra_type * | pextra, |
| int | idx | ||
| ) |
Initialize base_type structures.
Definition at line 157 of file base.cpp.
Referenced by handle_ruleset_extra(), and load_terrain_names().
| void base_types_free | ( | ) |
Free the memory associated with base types.
Definition at line 170 of file base.cpp.
Referenced by extras_free().
| bool can_build_base | ( | const struct unit * | punit, |
| const struct base_type * | pbase, | ||
| const struct tile * | ptile | ||
| ) |
Can unit build base to given tile?
Definition at line 101 of file base.cpp.
Referenced by get_base_by_gui_type().
| 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.
Definition at line 175 of file base.cpp.
Referenced by can_units_do_base_gui(), key_unit_airbase(), key_unit_fortress(), and sg_load_player_unit().
| bool is_base_flag_card_near | ( | const struct tile * | ptile, |
| enum base_flag_id | flag | ||
| ) |
| bool is_base_flag_near_tile | ( | const struct tile * | ptile, |
| enum base_flag_id | flag | ||
| ) |
| bool territory_claiming_base | ( | const struct base_type * | pbase | ) |
Does this base type claim territory?
Definition at line 196 of file base.cpp.
Referenced by destroy_extra(), helptext_extra(), is_border_source(), load_ruleset_terrain(), map_claim_base(), tile_border_source_radius_sq(), tile_border_source_strength(), and tile_has_claimable_base().