#include <configure_engine.hpp>
Private Attributes | |
saved_game & | state_ |
mp_game_settings & | parameters_ |
const config & | side_cfg_ |
std::vector< const config * > | entry_points_ |
std::vector< std::string > | entry_point_titles_ |
this class wraps the parameters relevent to mp_configure, as well as providing defaults for these parameters.
Definition at line 31 of file configure_engine.hpp.
ng::configure_engine::configure_engine | ( | saved_game & | state | ) |
Definition at line 14 of file configure_engine.cpp.
References config::child_range(), saved_game::classification(), game_config::debug, config::debug(), entry_point_titles_, entry_points_, error(), game_config_manager::game_config(), game_config_manager::get(), saved_game::get_starting_pos(), game_classification::get_tagname(), config::has_child(), game_logic::msg(), set_use_map_settings(), state_, saved_game::to_config(), and use_map_settings_default().
bool ng::configure_engine::allow_observers | ( | ) | const |
Definition at line 80 of file configure_engine.cpp.
References mp_game_settings::allow_observers, and parameters_.
Referenced by mp::configure::~configure().
bool ng::configure_engine::allow_observers_default | ( | ) | const |
Definition at line 182 of file configure_engine.cpp.
References preferences::allow_observers().
Referenced by mp::configure::configure().
const std::vector< std::string > & ng::configure_engine::entry_point_titles | ( | ) | const |
Definition at line 204 of file configure_engine.cpp.
References entry_point_titles_.
Referenced by mp::configure::configure().
bool ng::configure_engine::fog_game | ( | ) | const |
Definition at line 78 of file configure_engine.cpp.
References mp_game_settings::fog_game, and parameters_.
Referenced by mp::configure::~configure().
bool ng::configure_engine::fog_game_default | ( | ) | const |
Definition at line 172 of file configure_engine.cpp.
References saved_game::classification(), config::empty(), preferences::fog(), game_classification::is_normal_mp_game(), side_cfg_, state_, and use_map_settings().
Referenced by mp::configure::configure(), mp::configure::process_event_impl(), and set_default_values().
bool ng::configure_engine::force_lock_settings | ( | ) | const |
Definition at line 62 of file configure_engine.cpp.
References saved_game::classification(), saved_game::get_starting_pos(), game_classification::is_normal_mp_game(), and state_.
Referenced by mp::configure::configure(), and use_map_settings_default().
std::string ng::configure_engine::game_name | ( | ) | const |
Definition at line 66 of file configure_engine.cpp.
References mp_game_settings::name, and parameters_.
std::string ng::configure_engine::game_name_default | ( | ) | const |
Definition at line 124 of file configure_engine.cpp.
References preferences::login(), and vgettext().
Referenced by mp::configure::configure(), and set_default_values().
const mp_game_settings & ng::configure_engine::get_parameters | ( | ) | const |
Definition at line 200 of file configure_engine.cpp.
References parameters_.
bool ng::configure_engine::mp_countdown | ( | ) | const |
Definition at line 75 of file configure_engine.cpp.
References mp_game_settings::mp_countdown, and parameters_.
Referenced by mp::configure::~configure().
int ng::configure_engine::mp_countdown_action_bonus | ( | ) | const |
Definition at line 74 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_action_bonus, and parameters_.
Referenced by mp::configure::~configure().
int ng::configure_engine::mp_countdown_action_bonus_default | ( | ) | const |
Definition at line 158 of file configure_engine.cpp.
References preferences::countdown_action_bonus().
Referenced by mp::configure::configure(), and set_default_values().
bool ng::configure_engine::mp_countdown_default | ( | ) | const |
Definition at line 161 of file configure_engine.cpp.
References preferences::countdown().
Referenced by mp::configure::configure(), and set_default_values().
int ng::configure_engine::mp_countdown_init_time | ( | ) | const |
Definition at line 71 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_init_time, and parameters_.
Referenced by mp::configure::~configure().
int ng::configure_engine::mp_countdown_init_time_default | ( | ) | const |
Definition at line 149 of file configure_engine.cpp.
References preferences::countdown_init_time().
Referenced by mp::configure::configure(), and set_default_values().
int ng::configure_engine::mp_countdown_reservoir_time | ( | ) | const |
Definition at line 72 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_reservoir_time, and parameters_.
Referenced by mp::configure::~configure().
int ng::configure_engine::mp_countdown_reservoir_time_default | ( | ) | const |
Definition at line 152 of file configure_engine.cpp.
References preferences::countdown_reservoir_time().
Referenced by mp::configure::configure(), and set_default_values().
int ng::configure_engine::mp_countdown_turn_bonus | ( | ) | const |
Definition at line 73 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_turn_bonus, and parameters_.
Referenced by mp::configure::~configure().
int ng::configure_engine::mp_countdown_turn_bonus_default | ( | ) | const |
Definition at line 155 of file configure_engine.cpp.
References preferences::countdown_turn_bonus().
Referenced by mp::configure::configure().
int ng::configure_engine::num_turns | ( | ) | const |
Definition at line 67 of file configure_engine.cpp.
References mp_game_settings::num_turns, and parameters_.
Referenced by mp::configure::~configure().
int ng::configure_engine::num_turns_default | ( | ) | const |
Definition at line 129 of file configure_engine.cpp.
References saved_game::get_starting_pos(), settings::get_turns(), state_, preferences::turns(), and use_map_settings().
Referenced by mp::configure::configure(), mp::configure::process_event_impl(), and set_default_values().
const config & ng::configure_engine::options | ( | ) | const |
Definition at line 84 of file configure_engine.cpp.
References mp_game_settings::options, and parameters_.
Referenced by mp::configure::~configure().
const config & ng::configure_engine::options_default | ( | ) | const |
Definition at line 196 of file configure_engine.cpp.
References preferences::options().
mp_game_settings::RANDOM_FACTION_MODE ng::configure_engine::random_faction_mode | ( | ) | const |
Definition at line 83 of file configure_engine.cpp.
References parameters_.
Referenced by mp::configure::configure(), and mp::configure::~configure().
mp_game_settings::RANDOM_FACTION_MODE ng::configure_engine::random_faction_mode_default | ( | ) | const |
Definition at line 192 of file configure_engine.cpp.
References preferences::random_faction_mode().
Referenced by set_default_values().
bool ng::configure_engine::random_start_time | ( | ) | const |
Definition at line 77 of file configure_engine.cpp.
References parameters_, and mp_game_settings::random_start_time.
Referenced by mp::configure::~configure().
bool ng::configure_engine::random_start_time_default | ( | ) | const |
Definition at line 167 of file configure_engine.cpp.
References saved_game::get_starting_pos(), preferences::random_start_time(), state_, and use_map_settings().
Referenced by mp::configure::configure(), mp::configure::process_event_impl(), and set_default_values().
bool ng::configure_engine::registered_users_only | ( | ) | const |
Definition at line 81 of file configure_engine.cpp.
References parameters_, and mp_game_settings::registered_users_only.
Referenced by mp::configure::~configure().
bool ng::configure_engine::registered_users_only_default | ( | ) | const |
Definition at line 185 of file configure_engine.cpp.
References preferences::registered_users_only().
Referenced by mp::configure::configure().
void ng::configure_engine::set_allow_observers | ( | bool | val | ) |
Definition at line 100 of file configure_engine.cpp.
References mp_game_settings::allow_observers, and parameters_.
Referenced by mp::configure::get_parameters().
void ng::configure_engine::set_default_values | ( | ) |
Definition at line 45 of file configure_engine.cpp.
References fog_game_default(), game_name_default(), mp_countdown_action_bonus_default(), mp_countdown_default(), mp_countdown_init_time_default(), mp_countdown_reservoir_time_default(), num_turns_default(), random_faction_mode_default(), random_start_time_default(), set_fog_game(), set_game_name(), set_mp_countdown(), set_mp_countdown_action_bonus(), set_mp_countdown_init_time(), set_mp_countdown_reservoir_time(), set_num_turns(), set_random_faction_mode(), set_random_start_time(), set_shroud_game(), set_use_map_settings(), set_village_gold(), set_village_support(), set_xp_modifier(), shroud_game_default(), use_map_settings_default(), village_gold_default(), village_support_default(), and xp_modifier_default().
void ng::configure_engine::set_fog_game | ( | bool | val | ) |
Definition at line 98 of file configure_engine.cpp.
References mp_game_settings::fog_game, and parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
void ng::configure_engine::set_game_name | ( | std::string | name | ) |
Definition at line 86 of file configure_engine.cpp.
References mp_game_settings::name, and parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
void ng::configure_engine::set_mp_countdown | ( | bool | val | ) |
Definition at line 95 of file configure_engine.cpp.
References mp_game_settings::mp_countdown, and parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
Definition at line 94 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_action_bonus, and parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
Definition at line 91 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_init_time, and parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
Definition at line 92 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_reservoir_time, and parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
Definition at line 93 of file configure_engine.cpp.
References mp_game_settings::mp_countdown_turn_bonus, and parameters_.
Referenced by mp::configure::get_parameters().
Definition at line 87 of file configure_engine.cpp.
References mp_game_settings::num_turns, and parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
void ng::configure_engine::set_oos_debug | ( | bool | val | ) |
Definition at line 102 of file configure_engine.cpp.
References saved_game::classification(), game_classification::oos_debug, and state_.
Referenced by mp::configure::get_parameters().
Definition at line 105 of file configure_engine.cpp.
References mp_game_settings::options, and parameters_.
Referenced by mp::configure::get_parameters().
void ng::configure_engine::set_random_faction_mode | ( | mp_game_settings::RANDOM_FACTION_MODE | val | ) |
Definition at line 104 of file configure_engine.cpp.
References parameters_.
Referenced by mp::configure::get_parameters(), and set_default_values().
void ng::configure_engine::set_random_start_time | ( | bool | val | ) |
Definition at line 97 of file configure_engine.cpp.
References parameters_, and mp_game_settings::random_start_time.
Referenced by mp::configure::get_parameters(), and set_default_values().
void ng::configure_engine::set_registered_users_only | ( | bool | val | ) |
Definition at line 101 of file configure_engine.cpp.
References parameters_, and mp_game_settings::registered_users_only.
Referenced by mp::configure::get_parameters().
void ng::configure_engine::set_scenario | ( | size_t | scenario_num | ) |
Definition at line 107 of file configure_engine.cpp.
References entry_points_, mp_game_settings::hash, config::hash(), parameters_, saved_game::set_scenario(), and state_.
Referenced by mp::configure::process_event_impl(), and set_scenario().
bool ng::configure_engine::set_scenario | ( | std::string & | scenario_id | ) |
Definition at line 114 of file configure_engine.cpp.
References entry_points_, i, and set_scenario().
void ng::configure_engine::set_shroud_game | ( | bool | val | ) |
Definition at line 99 of file configure_engine.cpp.
References parameters_, and mp_game_settings::shroud_game.
Referenced by mp::configure::get_parameters(), and set_default_values().
void ng::configure_engine::set_shuffle_sides | ( | bool | val | ) |
Definition at line 103 of file configure_engine.cpp.
References parameters_, and mp_game_settings::shuffle_sides.
Referenced by mp::configure::get_parameters().
void ng::configure_engine::set_use_map_settings | ( | bool | val | ) |
Definition at line 96 of file configure_engine.cpp.
References parameters_, and mp_game_settings::use_map_settings.
Referenced by configure_engine(), mp::configure::get_parameters(), mp::configure::process_event_impl(), and set_default_values().
Definition at line 88 of file configure_engine.cpp.
References parameters_, and mp_game_settings::village_gold.
Referenced by mp::configure::get_parameters(), and set_default_values().
Definition at line 89 of file configure_engine.cpp.
References parameters_, and mp_game_settings::village_support.
Referenced by mp::configure::get_parameters(), and set_default_values().
Definition at line 90 of file configure_engine.cpp.
References parameters_, and mp_game_settings::xp_modifier.
Referenced by mp::configure::get_parameters(), and set_default_values().
bool ng::configure_engine::shroud_game | ( | ) | const |
Definition at line 79 of file configure_engine.cpp.
References parameters_, and mp_game_settings::shroud_game.
Referenced by mp::configure::~configure().
bool ng::configure_engine::shroud_game_default | ( | ) | const |
Definition at line 177 of file configure_engine.cpp.
References config::empty(), preferences::shroud(), side_cfg_, and use_map_settings().
Referenced by mp::configure::configure(), mp::configure::process_event_impl(), and set_default_values().
bool ng::configure_engine::shuffle_sides | ( | ) | const |
Definition at line 82 of file configure_engine.cpp.
References parameters_, and mp_game_settings::shuffle_sides.
Referenced by mp::configure::~configure().
bool ng::configure_engine::shuffle_sides_default | ( | ) | const |
Definition at line 189 of file configure_engine.cpp.
References preferences::shuffle_sides().
Referenced by mp::configure::configure().
bool ng::configure_engine::use_map_settings | ( | ) | const |
Definition at line 76 of file configure_engine.cpp.
References parameters_, and mp_game_settings::use_map_settings.
Referenced by mp::configure::configure(), fog_game_default(), num_turns_default(), mp::configure::process_event_impl(), random_start_time_default(), shroud_game_default(), village_gold_default(), village_support_default(), xp_modifier_default(), and mp::configure::~configure().
bool ng::configure_engine::use_map_settings_default | ( | ) | const |
Definition at line 164 of file configure_engine.cpp.
References force_lock_settings(), and preferences::use_map_settings().
Referenced by configure_engine(), and set_default_values().
int ng::configure_engine::village_gold | ( | ) | const |
Definition at line 68 of file configure_engine.cpp.
References parameters_, and mp_game_settings::village_gold.
Referenced by mp::configure::~configure().
int ng::configure_engine::village_gold_default | ( | ) | const |
Definition at line 134 of file configure_engine.cpp.
References saved_game::classification(), config::empty(), settings::get_village_gold(), side_cfg_, state_, use_map_settings(), and preferences::village_gold().
Referenced by mp::configure::configure(), mp::configure::process_event_impl(), and set_default_values().
int ng::configure_engine::village_support | ( | ) | const |
Definition at line 69 of file configure_engine.cpp.
References parameters_, and mp_game_settings::village_support.
Referenced by mp::configure::~configure().
int ng::configure_engine::village_support_default | ( | ) | const |
Definition at line 139 of file configure_engine.cpp.
References config::empty(), settings::get_village_support(), side_cfg_, use_map_settings(), and preferences::village_support().
Referenced by mp::configure::configure(), mp::configure::process_event_impl(), and set_default_values().
void ng::configure_engine::write_parameters | ( | ) |
Definition at line 208 of file configure_engine.cpp.
References config::child_range(), mp_game_settings::fog_game, saved_game::get_starting_pos(), tod_manager::is_start_ToD(), saved_game::mp_settings(), mp_game_settings::num_turns, mp_game_settings::random_start_time, mp_game_settings::shroud_game, state_, mp_game_settings::use_map_settings, mp_game_settings::village_gold, mp_game_settings::village_support, and mp_game_settings::xp_modifier.
Referenced by mp::configure::get_parameters().
int ng::configure_engine::xp_modifier | ( | ) | const |
Definition at line 70 of file configure_engine.cpp.
References parameters_, and mp_game_settings::xp_modifier.
Referenced by mp::configure::~configure().
int ng::configure_engine::xp_modifier_default | ( | ) | const |
Definition at line 144 of file configure_engine.cpp.
References saved_game::get_starting_pos(), settings::get_xp_modifier(), state_, use_map_settings(), and preferences::xp_modifier().
Referenced by mp::configure::configure(), mp::configure::process_event_impl(), and set_default_values().
|
private |
Definition at line 128 of file configure_engine.hpp.
Referenced by configure_engine(), and entry_point_titles().
|
private |
Definition at line 126 of file configure_engine.hpp.
Referenced by configure_engine(), and set_scenario().
|
private |
Definition at line 116 of file configure_engine.hpp.
Referenced by allow_observers(), fog_game(), game_name(), get_parameters(), mp_countdown(), mp_countdown_action_bonus(), mp_countdown_init_time(), mp_countdown_reservoir_time(), mp_countdown_turn_bonus(), num_turns(), options(), random_faction_mode(), random_start_time(), registered_users_only(), set_allow_observers(), set_fog_game(), set_game_name(), set_mp_countdown(), set_mp_countdown_action_bonus(), set_mp_countdown_init_time(), set_mp_countdown_reservoir_time(), set_mp_countdown_turn_bonus(), set_num_turns(), set_options(), set_random_faction_mode(), set_random_start_time(), set_registered_users_only(), set_scenario(), set_shroud_game(), set_shuffle_sides(), set_use_map_settings(), set_village_gold(), set_village_support(), set_xp_modifier(), shroud_game(), shuffle_sides(), use_map_settings(), village_gold(), village_support(), and xp_modifier().
|
private |
Definition at line 124 of file configure_engine.hpp.
Referenced by fog_game_default(), shroud_game_default(), village_gold_default(), and village_support_default().
|
private |
Definition at line 115 of file configure_engine.hpp.
Referenced by configure_engine(), fog_game_default(), force_lock_settings(), num_turns_default(), random_start_time_default(), set_oos_debug(), set_scenario(), village_gold_default(), write_parameters(), and xp_modifier_default().