Freeciv-3.3
|
#include "bitvector.h"
#include "string_vector.h"
#include "fc_types.h"
#include "name_translation.h"
#include "requirements.h"
Go to the source code of this file.
Data Structures | |
struct | multiplier |
Macros | |
#define | multipliers_iterate(_mul_) |
#define | multipliers_iterate_end |
#define | multipliers_re_active_iterate(_mul_) |
#define | multipliers_re_active_iterate_end |
Functions | |
void | multipliers_init (void) |
void | multipliers_free (void) |
Multiplier_type_id | multiplier_count (void) |
Multiplier_type_id | multiplier_index (const struct multiplier *pmul) |
Multiplier_type_id | multiplier_number (const struct multiplier *pmul) |
struct multiplier * | multiplier_by_number (Multiplier_type_id id) |
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) |
Definition at line 61 of file multipliers.h.
#define multipliers_iterate_end |
Definition at line 67 of file multipliers.h.
Definition at line 71 of file multipliers.h.
#define multipliers_re_active_iterate_end |
Definition at line 75 of file multipliers.h.
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().