Freeciv-3.1
|
#include "base.h"
#include "fc_types.h"
#include "road.h"
#include "terrain.h"
#include "specenum_gen.h"
#include "speclist.h"
Go to the source code of this file.
Data Structures | |
struct | extra_type |
Macros | |
#define | SPECENUM_NAME extra_flag_id |
#define | SPECENUM_VALUE0 EF_NATIVE_TILE |
#define | SPECENUM_VALUE0NAME N_("?extraflag:NativeTile") |
#define | SPECENUM_VALUE1 EF_REFUEL |
#define | SPECENUM_VALUE1NAME N_("?extraflag:Refuel") |
#define | SPECENUM_VALUE2 EF_TERR_CHANGE_REMOVES |
#define | SPECENUM_VALUE2NAME N_("?extraflag:TerrChangeRemoves") |
#define | SPECENUM_VALUE3 EF_AUTO_ON_CITY_CENTER |
#define | SPECENUM_VALUE3NAME N_("?extraflag:AutoOnCityCenter") |
#define | SPECENUM_VALUE4 EF_ALWAYS_ON_CITY_CENTER |
#define | SPECENUM_VALUE4NAME N_("?extraflag:AlwaysOnCityCenter") |
#define | SPECENUM_VALUE5 EF_CONNECT_LAND |
#define | SPECENUM_VALUE5NAME N_("?extraflag:ConnectLand") |
#define | SPECENUM_VALUE6 EF_GLOBAL_WARMING |
#define | SPECENUM_VALUE6NAME N_("?extraflag:GlobalWarming") |
#define | SPECENUM_VALUE7 EF_NUCLEAR_WINTER |
#define | SPECENUM_VALUE7NAME N_("?extraflag:NuclearWinter") |
#define | SPECENUM_VALUE8 EF_SHOW_FLAG |
#define | SPECENUM_VALUE8NAME N_("?extraflag:ShowFlag") |
#define | SPECENUM_VALUE9 EF_NATURAL_DEFENSE |
#define | SPECENUM_VALUE9NAME N_("?extraflag:NaturalDefense") |
#define | SPECENUM_VALUE10 EF_NO_STACK_DEATH |
#define | SPECENUM_VALUE10NAME N_("NoStackDeath") |
#define | SPECENUM_VALUE11 EF_NOT_AGGRESSIVE |
#define | SPECENUM_VALUE11NAME N_("NoAggressive") |
#define | SPECENUM_VALUE12 EF_USER_FLAG_1 |
#define | SPECENUM_VALUE13 EF_USER_FLAG_2 |
#define | SPECENUM_VALUE14 EF_USER_FLAG_3 |
#define | SPECENUM_VALUE15 EF_USER_FLAG_4 |
#define | SPECENUM_VALUE16 EF_USER_FLAG_5 |
#define | SPECENUM_VALUE17 EF_USER_FLAG_6 |
#define | SPECENUM_VALUE18 EF_USER_FLAG_7 |
#define | SPECENUM_VALUE19 EF_USER_FLAG_8 |
#define | SPECENUM_COUNT EF_COUNT |
#define | SPECENUM_NAMEOVERRIDE |
#define | SPECENUM_BITVECTOR bv_extra_flags |
#define | EF_LAST_USER_FLAG EF_USER_FLAG_8 |
#define | MAX_NUM_USER_EXTRA_FLAGS (EF_LAST_USER_FLAG - EF_USER_FLAG_1 + 1) |
#define | EXTRA_NONE (-1) |
#define | SPECLIST_TAG extra_type |
#define | SPECLIST_TYPE struct extra_type |
#define | extra_type_list_iterate(extralist, pextra) TYPED_LIST_ITERATE(struct extra_type, extralist, pextra) |
#define | extra_type_list_iterate_end LIST_ITERATE_END |
#define | extra_type_list_iterate_rev(extralist, pextra) TYPED_LIST_ITERATE_REV(struct extra_type, extralist, pextra) |
#define | extra_type_list_iterate_rev_end LIST_ITERATE_REV_END |
#define | extra_index(_e_) (_e_)->id |
#define | extra_base_get(_e_) (_e_)->data.base |
#define | extra_road_get(_e_) (_e_)->data.road |
#define | extra_resource_get(_e_) (_e_)->data.resource |
#define | is_extra_caused_by(e, c) (e->causes & (1 << c)) |
#define | extra_type_iterate(_p) |
#define | extra_type_iterate_end |
#define | extra_type_re_active_iterate(_p) |
#define | extra_type_re_active_iterate_end |
#define | extra_type_by_cause_iterate(_cause, _extra) |
#define | extra_type_by_cause_iterate_end |
#define | extra_type_by_cause_iterate_rev(_cause, _extra) |
#define | extra_type_by_cause_iterate_rev_end |
#define | extra_type_by_rmcause_iterate(_rmcause, _extra) |
#define | extra_type_by_rmcause_iterate_end |
#define | extra_deps_iterate(_reqs, _dep) |
#define | extra_deps_iterate_end |
Functions | |
void | extras_init (void) |
void | extras_free (void) |
int | extra_count (void) |
int | extra_number (const struct extra_type *pextra) |
struct extra_type * | extra_by_number (int id) |
const char * | extra_name_translation (const struct extra_type *pextra) |
const char * | extra_rule_name (const struct extra_type *pextra) |
struct extra_type * | extra_type_by_rule_name (const char *name) |
struct extra_type * | extra_type_by_translated_name (const char *name) |
void | extra_to_caused_by_list (struct extra_type *pextra, enum extra_cause cause) |
struct extra_type_list * | extra_type_list_by_cause (enum extra_cause cause) |
struct extra_type * | rand_extra_for_tile (struct tile *ptile, enum extra_cause cause, bool generated) |
struct extra_type_list * | extra_type_list_of_unit_hiders (void) |
struct extra_type_list * | extra_type_list_of_terr_claimers (void) |
bool | is_extra_caused_by_worker_action (const struct extra_type *pextra) |
bool | is_extra_caused_by_action (const struct extra_type *pextra, const struct action *paction) |
void | extra_to_removed_by_list (struct extra_type *pextra, enum extra_rmcause rmcause) |
struct extra_type_list * | extra_type_list_by_rmcause (enum extra_rmcause rmcause) |
bool | is_extra_removed_by (const struct extra_type *pextra, enum extra_rmcause rmcause) |
bool | is_extra_removed_by_worker_action (const struct extra_type *pextra) |
bool | is_extra_removed_by_action (const struct extra_type *pextra, const struct action *paction) |
bool | is_extra_card_near (const struct civ_map *nmap, const struct tile *ptile, const struct extra_type *pextra) |
bool | is_extra_near_tile (const struct civ_map *nmap, const struct tile *ptile, const struct extra_type *pextra) |
bool | extra_can_be_built (const struct extra_type *pextra, const struct tile *ptile) |
bool | can_build_extra (const struct extra_type *pextra, const struct unit *punit, const struct tile *ptile) |
bool | can_build_extra_base (const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile) |
bool | player_can_build_extra (const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile) |
bool | player_can_place_extra (const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile) |
bool | can_remove_extra (const struct extra_type *pextra, const struct unit *punit, const struct tile *ptile) |
bool | player_can_remove_extra (const struct extra_type *pextra, const struct player *pplayer, const struct tile *ptile) |
bool | is_native_extra_to_uclass (const struct extra_type *pextra, const struct unit_class *pclass) |
bool | is_native_extra_to_utype (const struct extra_type *pextra, const struct unit_type *punittype) |
bool | is_native_tile_to_extra (const struct extra_type *pextra, const struct tile *ptile) |
bool | extra_conflicting_on_tile (const struct extra_type *pextra, const struct tile *ptile) |
bool | hut_on_tile (const struct tile *ptile) |
bool | unit_can_enter_hut (const struct unit *punit, const struct tile *ptile) |
bool | unit_can_displace_hut (const struct unit *punit, const struct tile *ptile) |
bool | extra_has_flag (const struct extra_type *pextra, enum extra_flag_id flag) |
bool | is_extra_flag_card_near (const struct civ_map *nmap, const struct tile *ptile, enum extra_flag_id flag) |
bool | is_extra_flag_near_tile (const struct civ_map *nmap, const struct tile *ptile, enum extra_flag_id flag) |
void | user_extra_flags_init (void) |
void | extra_flags_free (void) |
void | set_user_extra_flag_name (enum extra_flag_id id, const char *name, const char *helptxt) |
const char * | extra_flag_helptxt (enum extra_flag_id id) |
bool | extra_flag_is_in_use (enum extra_flag_id id) |
bool | extra_causes_env_upset (struct extra_type *pextra, enum environment_upset_type upset) |
bool | can_extras_coexist (const struct extra_type *pextra1, const struct extra_type *pextra2) |
bool | can_extra_appear (const struct extra_type *pextra, const struct tile *ptile) |
bool | can_extra_disappear (const struct extra_type *pextra, const struct tile *ptile) |
struct extra_type * | next_extra_for_tile (const struct tile *ptile, enum extra_cause cause, const struct player *pplayer, const struct unit *punit) |
struct extra_type * | prev_extra_in_tile (const struct tile *ptile, enum extra_rmcause rmcause, const struct player *pplayer, const struct unit *punit) |
enum extra_cause | activity_to_extra_cause (enum unit_activity act) |
enum extra_rmcause | activity_to_extra_rmcause (enum unit_activity act) |
struct player * | extra_owner (const struct tile *ptile) |
bool | player_knows_extra_exist (const struct player *pplayer, const struct extra_type *pextra, const struct tile *ptile) |
#define extra_deps_iterate | ( | _reqs, | |
_dep | |||
) |
#define extra_deps_iterate_end |
#define extra_type_by_cause_iterate | ( | _cause, | |
_extra | |||
) |
#define extra_type_by_cause_iterate_end |
#define extra_type_by_cause_iterate_rev | ( | _cause, | |
_extra | |||
) |
#define extra_type_by_cause_iterate_rev_end |
#define extra_type_by_rmcause_iterate | ( | _rmcause, | |
_extra | |||
) |
#define extra_type_by_rmcause_iterate_end |
#define extra_type_iterate | ( | _p | ) |
#define extra_type_list_iterate | ( | extralist, | |
pextra | |||
) | TYPED_LIST_ITERATE(struct extra_type, extralist, pextra) |
#define extra_type_list_iterate_end LIST_ITERATE_END |
#define extra_type_list_iterate_rev | ( | extralist, | |
pextra | |||
) | TYPED_LIST_ITERATE_REV(struct extra_type, extralist, pextra) |
#define extra_type_list_iterate_rev_end LIST_ITERATE_REV_END |
#define extra_type_re_active_iterate | ( | _p | ) |
#define extra_type_re_active_iterate_end |
#define MAX_NUM_USER_EXTRA_FLAGS (EF_LAST_USER_FLAG - EF_USER_FLAG_1 + 1) |
#define SPECENUM_NAME extra_flag_id |
#define SPECENUM_VALUE2NAME N_("?extraflag:TerrChangeRemoves") |
#define SPECENUM_VALUE3NAME N_("?extraflag:AutoOnCityCenter") |
#define SPECENUM_VALUE4NAME N_("?extraflag:AlwaysOnCityCenter") |
#define SPECLIST_TAG extra_type |
#define SPECLIST_TYPE struct extra_type |
enum extra_cause activity_to_extra_cause | ( | enum unit_activity | act | ) |
What extra cause activity is considered to be?
Definition at line 1028 of file extras.c.
Referenced by help_widget::add_extras_of_act_for_terrain(), city_map::context_menu(), help_extras_of_act_for_terrain(), is_extra_caused_by_action(), set_city_workertask(), settler_evaluate_improvements(), tai_city_worker_task_select(), tai_tile_worker_task_select(), texai_city_worker_task_select(), texai_tile_worker_task_select(), and worker_task_is_sane().
enum extra_rmcause activity_to_extra_rmcause | ( | enum unit_activity | act | ) |
What extra rmcause activity is considered to be?
Definition at line 1049 of file extras.c.
Referenced by city_map::context_menu(), is_extra_removed_by_action(), set_city_workertask(), settler_evaluate_improvements(), tai_city_worker_task_select(), tai_tile_worker_task_select(), texai_city_worker_task_select(), texai_tile_worker_task_select(), and worker_task_is_sane().
bool can_build_extra | ( | const struct extra_type * | pextra, |
const struct unit * | punit, | ||
const struct tile * | ptile | ||
) |
Tells if unit can build extra on tile.
Definition at line 507 of file extras.c.
Referenced by can_unit_do_connect(), is_action_possible(), and next_extra_for_tile().
bool can_build_extra_base | ( | const struct extra_type * | pextra, |
const struct player * | pplayer, | ||
const struct tile * | ptile | ||
) |
Tells if player can build extra to tile with suitable unit.
Definition at line 387 of file extras.c.
Referenced by can_build_base(), can_build_extra(), can_build_road(), player_can_build_base(), player_can_build_extra(), and player_can_build_road().
bool can_extra_appear | ( | const struct extra_type * | pextra, |
const struct tile * | ptile | ||
) |
Are all the requirements for extra to appear on tile fulfilled.
Definition at line 1076 of file extras.c.
Referenced by end_turn().
bool can_extra_disappear | ( | const struct extra_type * | pextra, |
const struct tile * | ptile | ||
) |
Are all the requirements for extra to disappear from tile fulfilled.
Definition at line 1090 of file extras.c.
Referenced by end_turn().
bool can_extras_coexist | ( | const struct extra_type * | pextra1, |
const struct extra_type * | pextra2 | ||
) |
Can two extras coexist in same tile?
Definition at line 952 of file extras.c.
Referenced by adv_calc_extra(), can_unit_do_activity_targeted_at(), create_extra(), extra_conflicting_on_tile(), help_update_extra(), save_terrain_ruleset(), and tile_extra_apply().
bool can_remove_extra | ( | const struct extra_type * | pextra, |
const struct unit * | punit, | ||
const struct tile * | ptile | ||
) |
Tells if unit can remove extra from tile. Does not examine action requirements if an action is required for it.
Definition at line 586 of file extras.c.
Referenced by is_action_possible(), and prev_extra_in_tile().
struct extra_type * extra_by_number | ( | int | id | ) |
Return extras type of given id.
Definition at line 175 of file extras.c.
Referenced by act_sel_new_extra_tgt_callback(), tab_extras::add_now(), base(), editor_tool_get_value_name(), execute_orders(), get_tool_value_pixbuf(), handle_edit_tile_extra(), handle_player_place_infra(), handle_ruleset_extra(), handle_ruleset_resource(), handle_ruleset_terrain(), handle_tile_info(), handle_unit_actions(), handle_unit_change_activity(), handle_unit_get_actions(), handle_worker_task(), handle_worker_task(), irrigate(), load_terrain_names(), mine(), pillage_callback(), pillage_callback(), pillage_something(), road(), sg_extras_get(), sg_load_map_owner(), simple_action_callback(), simple_action_callback(), tgt_extra_change_callback(), unit_order_list_is_sane(), unit_perform_action(), universal_by_number(), universal_value_initial(), unpackage_short_unit(), unpackage_unit(), and choice_dialog::update_dialog().
bool extra_can_be_built | ( | const struct extra_type * | pextra, |
const struct tile * | ptile | ||
) |
Tells if extra can build to tile if all other requirements are met.
Definition at line 368 of file extras.c.
Referenced by can_build_extra_base().
bool extra_causes_env_upset | ( | struct extra_type * | pextra, |
enum environment_upset_type | upset | ||
) |
Does the extra count toward environment upset?
Definition at line 965 of file extras.c.
Referenced by update_environmental_upset().
bool extra_conflicting_on_tile | ( | const struct extra_type * | pextra, |
const struct tile * | ptile | ||
) |
Returns TRUE iff an extra that conflicts with pextra exists at ptile.
Definition at line 655 of file extras.c.
Referenced by can_extra_appear().
int extra_count | ( | void | ) |
Return the number of extra_types.
Definition at line 145 of file extras.c.
Referenced by fill_tile_edit_packet(), helptext_unit(), and tileset_setup_base().
const char * extra_flag_helptxt | ( | enum extra_flag_id | id | ) |
Return the (untranslated) help text of the user extra flag.
Definition at line 923 of file extras.c.
Referenced by helptext_extra(), save_terrain_ruleset(), and send_ruleset_extras().
bool extra_flag_is_in_use | ( | enum extra_flag_id | id | ) |
Returns TRUE iff the specified extra type flag is in use by any extra type.
id | the extra type flag to check if is in use. |
Definition at line 936 of file extras.c.
Referenced by universal_never_there().
void extra_flags_free | ( | void | ) |
Frees the memory associated with all extra flags
Definition at line 870 of file extras.c.
Referenced by game_ruleset_free().
bool extra_has_flag | ( | const struct extra_type * | pextra, |
enum extra_flag_id | flag | ||
) |
Check if extra has given flag
Definition at line 810 of file extras.c.
Referenced by can_extra_be_removed(), extra_causes_env_upset(), extra_flag_is_in_use(), extra_type_found(), fill_road_sprite_array(), handle_ruleset_extra(), helptext_extra(), is_extra_flag_card_near(), is_extra_flag_near_tile(), load_ruleset_terrain(), move_type_from_extra(), sanity_check_ruleset_data(), save_terrain_ruleset(), set_unit_class_caches(), settler_evaluate_improvements(), tile_change_terrain(), tile_has_extra_flag(), tileset_setup_extra(), and upgrade_city_extras().
const char * extra_name_translation | ( | const struct extra_type * | pextra | ) |
Return the (translated) name of the extra type. You don't have to free the return pointer.
Definition at line 186 of file extras.c.
Referenced by help_widget::add_extras_of_act_for_terrain(), boot_help_texts(), concat_tile_activity_text(), go_act_menu::create(), create_units_order_widgets(), editbar_reload_tileset(), editor_tool_get_value_name(), end_turn(), extra_type_by_translated_name(), extviewer_refresh_widgets(), get_infrastructure_text(), handle_player_place_infra(), help_extras_of_act_for_terrain(), help_update_extra(), help_update_terrain(), helptext_extra(), helptext_unit(), infra_placement_set_tile(), insert_allows(), insert_generated_text(), manual_command(), mr_menu::menus_sensitive(), objbind_get_value_from_object(), popup_info_text(), popup_pillage_dialog(), real_menus_init(), real_menus_update(), req_text_insert(), help_widget::set_topic_terrain(), tgt_extra_descr(), tile_get_info_text(), tile_info_pollution(), transfer_city(), unit_activity_astr(), universal_name_translation(), mr_menu::update_bases_menu(), mr_menu::update_roads_menu(), upgrade_all_city_extras(), and worklist_item_postpone_req_vec().
int extra_number | ( | const struct extra_type * | pextra | ) |
Return the extra id.
Definition at line 153 of file extras.c.
Referenced by act_sel_new_extra_tgt_callback(), action_auto_perf_unit_do(), action_sub_target_id_for_action(), go_act_menu::create(), fill_tile_edit_packet(), handle_edit_tile(), package_and_send_worker_tasks(), popup_action_selection(), select_tgt_extra(), send_ruleset_extras(), send_ruleset_terrain(), send_tile_info(), sg_load_player_unit(), sg_load_player_vision(), sg_save_map_owner(), tile_virtual_new(), unit_goto_and_callback(), unit_goto_and_callback(), universal_number(), and update_player_tile_knowledge().
Who owns extras on tile
Definition at line 1068 of file extras.c.
Referenced by api_edit_unit_move_old(), api_edit_unit_teleport_old(), api_methods_tile_extra_owner(), create_extra(), destroy_extra(), do_conquer_extras(), enter_war(), fill_sprite_array(), handle_tile_info(), is_border_source(), kill_player(), map_change_seen(), remove_player_from_maps(), send_tile_info(), sg_load_player_units(), sg_save_map_owner(), tgt_extra_descr(), tile_claim_bases(), and update_player_tile_knowledge().
const char * extra_rule_name | ( | const struct extra_type * | pextra | ) |
Return the (untranslated) rule name of the extra type. You don't have to free the return pointer.
Definition at line 195 of file extras.c.
Referenced by auto_settler_setup_work(), autoadjust_ruleset_data(), tab_extras::delete_now(), tab_extras::edit_effects(), edit_extra::edit_extra(), tab_extras::edit_reqs(), extra_type_by_rule_name(), is_tech_needed(), is_universal_needed(), load_ruleset_terrain(), tab_extras::name_given(), tab_extras::refresh(), sanity_check_ruleset_data(), save_terrain_ruleset(), select_tgt_extra(), sg_load_players(), sg_load_players(), sg_save_player_cities(), sg_save_savefile(), tileset_setup_base(), tileset_setup_extra(), tileset_setup_road(), unit_enter_hut(), unit_order_list_is_sane(), universal_kind_values(), universal_rule_name(), and tab_extras::update_extra_info().
void extra_to_caused_by_list | ( | struct extra_type * | pextra, |
enum extra_cause | cause | ||
) |
Add extra type to list of extra caused by given cause.
Definition at line 296 of file extras.c.
Referenced by handle_ruleset_extra(), and load_ruleset_terrain().
void extra_to_removed_by_list | ( | struct extra_type * | pextra, |
enum extra_rmcause | rmcause | ||
) |
Add extra type to list of extra removed by given cause.
Definition at line 316 of file extras.c.
Referenced by handle_ruleset_extra(), load_ruleset_terrain(), and rscompat_extra_adjust_3_1().
struct extra_type * extra_type_by_rule_name | ( | const char * | name | ) |
Returns extra type matching rule name or NULL if there is no extra type with such name.
Definition at line 204 of file extras.c.
Referenced by api_edit_create_owned_extra(), api_edit_perform_action_unit_vs_tile_extra(), api_edit_remove_extra(), api_methods_tile_extra_owner(), api_methods_tile_has_base(), api_methods_tile_has_extra(), api_methods_tile_has_road(), tab_extras::initialize_new_extra(), load_ruleset_terrain(), load_terrain_names(), lookup_resource(), tab_extras::select_extra(), sg_load_player_cities(), sg_load_player_cities(), sg_load_savefile(), sg_load_savefile(), sg_special_set(), and universal_value_from_str().
struct extra_type * extra_type_by_translated_name | ( | const char * | name | ) |
Returns extra type matching the translated name, or NULL if there is no extra type with that name.
Definition at line 227 of file extras.c.
Referenced by help_update_extra(), help_dialog::make_tree(), and help_widget::set_topic_extra().
struct extra_type_list * extra_type_list_by_cause | ( | enum extra_cause | cause | ) |
Returns extra type for given cause.
Definition at line 241 of file extras.c.
Referenced by base_by_number(), connect_irrigation_callback(), connect_irrigation_callback(), extviewer_view_cell_toggled(), handle_ruleset_extra(), load_ruleset_terrain(), mr_menu::menus_sensitive(), rand_extra_for_tile(), real_menus_update(), road_by_number(), mr_menu::slot_conn_irrigation(), special_extra_get(), and unit_order_callback().
struct extra_type_list * extra_type_list_by_rmcause | ( | enum extra_rmcause | rmcause | ) |
struct extra_type_list * extra_type_list_of_terr_claimers | ( | void | ) |
Returns extra types that claim terrain
Definition at line 259 of file extras.c.
Referenced by action_actor_utype_hard_reqs_ok_full(), handle_ruleset_base(), is_border_source(), load_ruleset_terrain(), tile_border_source_radius_sq(), and tile_border_source_strength().
struct extra_type_list * extra_type_list_of_unit_hiders | ( | void | ) |
Returns extra types that hide units.
Definition at line 251 of file extras.c.
Referenced by handle_ruleset_extra(), load_ruleset_terrain(), and player_can_trust_tile_has_no_units().
void extras_free | ( | void | ) |
Free the memory associated with extras
Definition at line 80 of file extras.c.
Referenced by game_ruleset_free().
void extras_init | ( | void | ) |
Initialize extras structures.
Definition at line 43 of file extras.c.
Referenced by game_ruleset_init().
Returns TRUE iff an extra on the tile is a hut (removed by entering). The effect of entering is handled by unit_enter_hut() in unittools.c
Definition at line 672 of file extras.c.
Referenced by adv_data_phase_init(), dai_unit_move(), explorer_desirable(), and is_valid_start_pos().
bool is_extra_card_near | ( | const struct civ_map * | nmap, |
const struct tile * | ptile, | ||
const struct extra_type * | pextra | ||
) |
Is there extra of the given type cardinally near tile? (Does not check ptile itself.)
Definition at line 337 of file extras.c.
Referenced by is_extra_req_active().
bool is_extra_caused_by_action | ( | const struct extra_type * | pextra, |
const struct action * | paction | ||
) |
Is the extra caused by specific worker action?
Definition at line 1006 of file extras.c.
Referenced by settler_evaluate_improvements(), tai_tile_worker_task_select(), and texai_tile_worker_task_select().
bool is_extra_caused_by_worker_action | ( | const struct extra_type * | pextra | ) |
Is the extra caused by some kind of worker action?
Definition at line 981 of file extras.c.
Referenced by helptext_extra(), initialize_infrastructure_cache(), load_ruleset_terrain(), and save_terrain_ruleset().
bool is_extra_flag_card_near | ( | const struct civ_map * | nmap, |
const struct tile * | ptile, | ||
enum extra_flag_id | flag | ||
) |
Returns TRUE iff any cardinally adjacent tile contains an extra with the given flag (does not check ptile itself).
Definition at line 819 of file extras.c.
Referenced by is_extraflag_req_active().
bool is_extra_flag_near_tile | ( | const struct civ_map * | nmap, |
const struct tile * | ptile, | ||
enum extra_flag_id | flag | ||
) |
Returns TRUE iff any adjacent tile contains an extra with the given flag (does not check ptile itself).
Definition at line 839 of file extras.c.
Referenced by is_extraflag_req_active().
bool is_extra_near_tile | ( | const struct civ_map * | nmap, |
const struct tile * | ptile, | ||
const struct extra_type * | pextra | ||
) |
Is there extra of the given type near tile? (Does not check ptile itself.)
Definition at line 353 of file extras.c.
Referenced by is_extra_req_active().
bool is_extra_removed_by | ( | const struct extra_type * | pextra, |
enum extra_rmcause | rmcause | ||
) |
Is given cause one of the removal causes for the given extra?
Definition at line 327 of file extras.c.
Referenced by action_removes_extra(), can_extra_disappear(), get_preferred_pillage(), handle_ruleset_extra(), helptext_extra(), is_action_possible(), is_extra_drawing_enabled(), is_extra_removed_by_action(), save_terrain_ruleset(), send_ruleset_extras(), and worker_task_is_sane().
bool is_extra_removed_by_action | ( | const struct extra_type * | pextra, |
const struct action * | paction | ||
) |
Is the extra removed by specific worker action?
Definition at line 1017 of file extras.c.
Referenced by settler_evaluate_improvements(), tai_tile_worker_task_select(), and texai_tile_worker_task_select().
bool is_extra_removed_by_worker_action | ( | const struct extra_type * | pextra | ) |
Is the extra removed by some kind of worker action?
Definition at line 994 of file extras.c.
Referenced by initialize_infrastructure_cache().
bool is_native_extra_to_uclass | ( | const struct extra_type * | pextra, |
const struct unit_class * | pclass | ||
) |
Is extra native to unit class?
Definition at line 792 of file extras.c.
Referenced by action_actor_utype_hard_reqs_ok_full(), helptext_extra(), helptext_unit(), is_native_extra_to_utype(), move_type_from_extra(), set_unit_class_caches(), tile_extras_class_defense_bonus(), and tile_move_cost_ptrs().
bool is_native_extra_to_utype | ( | const struct extra_type * | pextra, |
const struct unit_type * | punittype | ||
) |
Is extra native to unit type?
Definition at line 801 of file extras.c.
Referenced by create_extra(), destroy_extra(), and tile_has_not_aggressive_extra_for_unit().
bool is_native_tile_to_extra | ( | const struct extra_type * | pextra, |
const struct tile * | ptile | ||
) |
Is tile native to extra?
Definition at line 608 of file extras.c.
Referenced by add_recursive_extras(), can_extra_appear(), create_city(), rand_extra_for_tile(), remove_city(), and tile_change_terrain().
struct extra_type * next_extra_for_tile | ( | const struct tile * | ptile, |
enum extra_cause | cause, | ||
const struct player * | pplayer, | ||
const struct unit * | punit | ||
) |
Returns next extra by cause that unit or player can build to tile.
Definition at line 740 of file extras.c.
Referenced by build_road_callback(), build_road_callback(), can_unit_do_activity(), city_map::context_menu(), get_tile_value(), handle_unit_change_activity(), key_unit_extra(), key_unit_road(), mr_menu::menus_sensitive(), popup_workertask_dlg(), real_menus_update(), set_city_workertask(), settler_evaluate_improvements(), sg_load_player_unit(), sg_load_player_unit(), mr_menu::slot_build_road(), tai_city_worker_task_select(), tai_tile_worker_task_select(), texai_city_worker_task_select(), and texai_tile_worker_task_select().
bool player_can_build_extra | ( | const struct extra_type * | pextra, |
const struct player * | pplayer, | ||
const struct tile * | ptile | ||
) |
Tells if player can build extra to tile with suitable unit.
Definition at line 442 of file extras.c.
Referenced by adv_calc_extra(), can_extra_be_removed(), impr_provides_buildable_extras(), next_extra_for_tile(), player_can_place_extra(), and upgrade_city_extras().
bool player_can_place_extra | ( | const struct extra_type * | pextra, |
const struct player * | pplayer, | ||
const struct tile * | ptile | ||
) |
Tells if player can place extra on tile.
Definition at line 462 of file extras.c.
Referenced by handle_player_place_infra(), and infra_placement_set_tile().
bool player_can_remove_extra | ( | const struct extra_type * | pextra, |
const struct player * | pplayer, | ||
const struct tile * | ptile | ||
) |
Tells if player can remove extra from tile with suitable unit.
Definition at line 564 of file extras.c.
Referenced by adv_calc_rmextra(), and prev_extra_in_tile().
bool player_knows_extra_exist | ( | const struct player * | pplayer, |
const struct extra_type * | pextra, | ||
const struct tile * | ptile | ||
) |
Extra is not hidden from the user.
Definition at line 1103 of file extras.c.
Referenced by send_tile_info(), and update_player_tile_knowledge().
struct extra_type * prev_extra_in_tile | ( | const struct tile * | ptile, |
enum extra_rmcause | rmcause, | ||
const struct player * | pplayer, | ||
const struct unit * | punit | ||
) |
Returns prev extra by cause that unit or player can remove from tile.
Definition at line 765 of file extras.c.
Referenced by clean_pollution_callback(), city_map::context_menu(), handle_unit_change_activity(), is_action_possible(), key_unit_clean(), key_unit_gen_clean(), popup_workertask_dlg(), real_menus_update(), set_city_workertask(), settler_evaluate_improvements(), sg_load_player_unit(), mr_menu::slot_clean_pollution(), tai_city_worker_task_select(), tai_tile_worker_task_select(), texai_city_worker_task_select(), texai_tile_worker_task_select(), and update_unit_activity().
struct extra_type * rand_extra_for_tile | ( | struct tile * | ptile, |
enum extra_cause | cause, | ||
bool | generated | ||
) |
Return random extra type for given cause that is native to the tile.
Definition at line 267 of file extras.c.
Referenced by do_nuke_tile(), fair_map_make_huts(), make_huts(), and place_pollution().
void set_user_extra_flag_name | ( | enum extra_flag_id | id, |
const char * | name, | ||
const char * | helptxt | ||
) |
Sets user defined name for extra flag.
Definition at line 882 of file extras.c.
Referenced by handle_ruleset_extra_flag(), and load_terrain_names().
Returns TRUE iff the unit can enter or frighten any hut on the tile. For the unit, tests only its class and its owner.
Definition at line 713 of file extras.c.
Referenced by is_action_possible().
Returns TRUE iff the unit can enter any hut on the tile. For the unit, tests only its class and its owner.
Definition at line 687 of file extras.c.
Referenced by dai_rampage_want(), and explorer_desirable().
void user_extra_flags_init | ( | void | ) |
Initialize user extra flags.
Definition at line 858 of file extras.c.
Referenced by game_ruleset_init().