Freeciv-3.2
|
Go to the source code of this file.
Functions | |
void | multipliers_init (void) |
void | multipliers_free (void) |
struct multiplier * | multiplier_by_number (Multiplier_type_id id) |
Multiplier_type_id | multiplier_number (const struct multiplier *pmul) |
Multiplier_type_id | multiplier_index (const struct multiplier *pmul) |
Multiplier_type_id | multiplier_count (void) |
const char * | multiplier_name_translation (const struct multiplier *pmul) |
const char * | multiplier_rule_name (const struct multiplier *pmul) |
struct multiplier * | multiplier_by_rule_name (const char *name) |
bool | multiplier_can_be_changed (struct multiplier *pmul, struct player *pplayer) |
Variables | |
static struct multiplier | multipliers [MAX_NUM_MULTIPLIERS] |
struct multiplier * multiplier_by_number | ( | Multiplier_type_id | id | ) |
Returns multiplier associated to given number
Definition at line 57 of file multipliers.c.
Referenced by tab_multiplier::add_now(), handle_player_multiplier(), handle_ruleset_multiplier(), and recv_ruleset_effect().
struct multiplier * multiplier_by_rule_name | ( | const char * | name | ) |
Returns multiplier matching rule name, or NULL if there is no multiplier with such a name.
Definition at line 115 of file multipliers.c.
Referenced by tab_multiplier::initialize_new_multiplier(), load_ruleset_effects(), effect_edit::multiplier_menu(), tab_multiplier::select_multiplier(), sg_load_savefile(), and sg_load_savefile().
bool multiplier_can_be_changed | ( | struct multiplier * | pmul, |
struct player * | pplayer | ||
) |
Can player change multiplier value
Definition at line 137 of file multipliers.c.
Referenced by create_multiplier_dialog(), dai_adjust_policies(), end_phase(), handle_player_multiplier(), and multipler_rates_dialog::multipler_rates_dialog().
Multiplier_type_id multiplier_count | ( | void | ) |
Return number of loaded multipliers in the ruleset.
Definition at line 88 of file multipliers.c.
Referenced by handle_player_info(), handle_player_multiplier(), mr_menu::menus_sensitive(), multipliers_command_callback(), package_player_info(), real_menus_init(), real_menus_update(), sg_save_player_main(), sg_save_savefile(), and multipler_rates_dialog::slot_ok_button_pressed().
Multiplier_type_id multiplier_index | ( | const struct multiplier * | pmul | ) |
Returns multiplier index.
Currently same as multiplier_number(), paired with multiplier_count() indicates use as an array index.
Definition at line 80 of file multipliers.c.
Referenced by create_multiplier_dialog(), dai_adjust_policies(), dai_gained_control(), end_phase(), final_ruleset_adjustments(), handle_player_info(), load_government_names(), load_ruleset_governments(), multiplier_can_be_changed(), multiplier_dialog_update_values(), multipliers_command_callback(), package_player_info(), player_multiplier_target_value(), player_multiplier_value(), tab_multiplier::refresh(), sg_load_players_basic(), sg_load_players_basic(), sg_save_savefile(), and multipler_rates_dialog::slot_ok_button_pressed().
const char * multiplier_name_translation | ( | const struct multiplier * | pmul | ) |
Return the (translated) name of the multiplier. You don't have to free the return pointer.
Definition at line 97 of file multipliers.c.
Referenced by create_multiplier_dialog(), end_phase(), get_effect_req_text(), and multipler_rates_dialog::multipler_rates_dialog().
Multiplier_type_id multiplier_number | ( | const struct multiplier * | pmul | ) |
Returns multiplier number.
Definition at line 67 of file multipliers.c.
Referenced by multiplier_index(), send_ruleset_cache(), and send_ruleset_multipliers().
const char * multiplier_rule_name | ( | const struct multiplier * | pmul | ) |
Return the (untranslated) rule name of the multiplier. You don't have to free the return pointer.
Definition at line 106 of file multipliers.c.
Referenced by tab_multiplier::delete_now(), tab_multiplier::edit_reqs(), effect_edit::effect_edit(), effect_edit::fill_active(), handle_player_multiplier(), load_ruleset_governments(), multiplier_by_rule_name(), tab_multiplier::name_given(), tab_multiplier::refresh(), sg_load_players_basic(), sg_load_players_basic(), sg_save_savefile(), and tab_multiplier::update_multiplier_info().
Free all multipliers
Definition at line 43 of file multipliers.c.
Referenced by game_ruleset_free().
Initialize all multipliers
Definition at line 28 of file multipliers.c.
Referenced by game_ruleset_init().
|
static |
Definition at line 23 of file multipliers.c.
Referenced by handle_player_multiplier(), multiplier_by_number(), multiplier_number(), multipliers_init(), receive_packet_player_multiplier_100(), and server_handle_packet().