Freeciv-3.4
|
Go to the source code of this file.
Data Structures | |
struct | specialist |
Variables | |
struct specialist | specialists [SP_MAX] |
int | default_specialist |
#define DEFAULT_SPECIALIST default_specialist |
Definition at line 43 of file specialist.h.
Definition at line 89 of file specialist.h.
#define normal_specialist_type_iterate_end |
Definition at line 95 of file specialist.h.
Definition at line 79 of file specialist.h.
#define specialist_type_iterate_end |
Definition at line 85 of file specialist.h.
Definition at line 109 of file specialist.h.
#define specialist_type_re_active_iterate_end |
Definition at line 114 of file specialist.h.
Definition at line 99 of file specialist.h.
#define super_specialist_type_iterate_end |
Definition at line 105 of file specialist.h.
int get_specialist_output | ( | const struct city * | pcity, |
Specialist_type_id | sp, | ||
Output_type_id | otype | ||
) |
Return the output for the specialist type with this output type.
Definition at line 270 of file specialist.c.
Referenced by add_specialist_output(), best_specialist(), dai_set_defenders(), get_entertainers(), init_specialist_lattice_nodes(), and military_advisor_choose_build().
bool is_normal_specialist | ( | const struct specialist * | sp | ) |
If this is a normal specialist: included into city population, can be reassigned by player. Assumes a valid specialist pointer.
Definition at line 217 of file specialist.c.
bool is_normal_specialist_id | ( | Specialist_type_id | sp | ) |
If this is a normal specialist: included into city population, can be reassigned by player.
Definition at line 196 of file specialist.c.
Referenced by city_increase_size(), city_rotate_specialist(), handle_city_change_specialist(), handle_city_info(), is_normal_specialist(), package_city(), and sg_load_player_city().
bool is_super_specialist | ( | const struct specialist * | sp | ) |
If this is a superspecialist: is not included into city population, is not controlled by player. Assumes a valid specialist pointer.
Definition at line 208 of file specialist.c.
Referenced by action_actor_utype_hard_reqs_ok_full(), api_edit_city_add_specialist(), api_methods_specialist_is_super(), city_add_unit(), dai_can_requirement_be_met_in_city(), expl_act_not_enabl(), helptext_specialist(), and helptext_unit().
bool is_super_specialist_id | ( | Specialist_type_id | sp | ) |
If this is a superspecialist: is not included into city population, is not controlled by player.
Definition at line 184 of file specialist.c.
Referenced by actres_possible(), api_edit_city_reduce_specialists(), city_build(), is_super_specialist(), and save_cities_ruleset().
Specialist_type_id normal_specialist_count | ( | void | ) |
Return the number of normal specialist_types.
Definition at line 79 of file specialist.c.
Referenced by api_edit_city_reduce_specialists(), apply_solution(), and city_rotate_specialist().
const char * specialist_abbreviation_translation | ( | const struct specialist * | sp | ) |
Return the (translated) abbreviation of the specialist type. You don't have to free the return pointer.
Definition at line 175 of file specialist.c.
Referenced by init_city_report_game_data(), and specialists_abbreviation_string().
struct specialist * specialist_by_number | ( | const Specialist_type_id | id | ) |
Return the specialist pointer for the given number.
Definition at line 110 of file specialist.c.
Referenced by api_find_specialist(), boot_help_texts(), city_can_use_specialist(), compat_load_020600(), go_act_menu::create(), handle_ruleset_specialist(), handle_ruleset_unit(), init_city_report_game_data(), load_ruleset_cities(), load_ruleset_units(), real_menus_init(), real_menus_update(), save_cities_ruleset(), send_ruleset_specialists(), sg_save_savefile(), simple_action_callback(), simple_action_callback(), specialist_by_rule_name(), specialist_by_translated_name(), specialists_abbreviation_string(), tileset_setup_specialist_type(), unit_order_list_is_sane(), unit_perform_action(), universal_by_number(), and universal_value_initial().
struct specialist * specialist_by_rule_name | ( | const char * | name | ) |
Return the specialist type with the given (untranslated!) rule name. Returns nullptr if none match.
Definition at line 123 of file specialist.c.
Referenced by api_find_specialist_by_name(), load_ruleset_units(), sg_load_savefile(), sg_load_savefile(), and universal_value_from_str().
struct specialist * specialist_by_translated_name | ( | const char * | name | ) |
Return the specialist type with the given (translated, plural) name. Returns nullptr if none match.
Definition at line 141 of file specialist.c.
Referenced by help_update_specialist(), and help_widget::set_topic_specialist().
Specialist_type_id specialist_count | ( | void | ) |
Return the number of specialist_types.
Definition at line 71 of file specialist.c.
Referenced by compat_load_020600(), init_city_report_game_data(), package_city(), redraw_city_dialog(), redraw_happiness_city_dialog(), reload_small_citizens_icons(), sg_save_savefile(), and tilespec_free_city_icons().
Specialist_type_id specialist_index | ( | const struct specialist * | sp | ) |
Return the specialist index.
Currently same as specialist_number(), paired with specialist_count() indicates use as an array index.
Definition at line 90 of file specialist.c.
Referenced by actres_possible(), api_edit_city_add_specialist(), api_edit_city_reduce_specialists(), api_methods_city_can_employ(), api_methods_city_num_specialists(), city_add_unit(), city_build(), cr_entry_specialist(), dai_can_requirement_be_met_in_city(), expl_act_not_enabl(), helptext_unit(), is_normal_specialist(), is_super_specialist(), save_units_ruleset(), send_ruleset_units(), sg_load_player_city(), sg_load_player_city(), sg_load_player_main(), sg_load_player_main(), and sg_load_player_unit().
Specialist_type_id specialist_number | ( | const struct specialist * | sp | ) |
Return the specialist item_number.
Definition at line 100 of file specialist.c.
Referenced by unit_goto_and_callback(), unit_goto_and_callback(), and universal_number().
const char * specialist_plural_translation | ( | const struct specialist * | sp | ) |
Return the (translated, plural) name of the specialist type. You don't have to free the return pointer.
Definition at line 166 of file specialist.c.
Referenced by api_methods_specialist_name_translation(), boot_help_texts(), go_act_menu::create(), helptext_unit(), init_city_report_game_data(), real_menus_init(), real_menus_update(), req_text_insert(), specialist_by_translated_name(), and universal_name_translation().
const char * specialist_rule_name | ( | const struct specialist * | sp | ) |
Return the (untranslated) rule name of the specialist type. You don't have to free the return pointer.
Definition at line 157 of file specialist.c.
Referenced by api_methods_specialist_rule_name(), compat_load_020600(), init_city_report_game_data(), is_universal_needed(), load_specialist(), sanity_check_ruleset_data(), save_units_ruleset(), sg_save_savefile(), specialist_by_rule_name(), universal_kind_values(), and universal_rule_name().
Return a string containing all the specialist abbreviations, for instance "E/S/T". You don't have to free the return pointer.
Definition at line 227 of file specialist.c.
Referenced by cmafec_get_result_descr(), and init_city_report_game_data().
Free data for specialists.
Definition at line 53 of file specialist.c.
Referenced by game_ruleset_free().
Initialize data for specialists.
Definition at line 36 of file specialist.c.
Referenced by game_ruleset_init().
Return a string showing the number of specialists in the array.
For instance with a city with (0,3,1) specialists call
specialists_string(pcity->specialists);
and you'll get "0/3/1".
Definition at line 252 of file specialist.c.
Referenced by cm_print_city(), cm_print_result(), cmafec_get_result_descr(), and cr_entry_specialists().
|
extern |
Definition at line 31 of file specialist.c.
Referenced by receive_packet_ruleset_game_100().
|
extern |
Definition at line 30 of file specialist.c.
Referenced by fc_results_are_equal(), get_specialist_output(), receive_packet_city_info_100(), receive_packet_edit_city_100(), specialist_by_number(), specialist_index(), specialists_free(), and specialists_init().