The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
ng::configure_engine Class Reference

configure_engine More...

#include <configure_engine.hpp>

Public Member Functions

 configure_engine (saved_game &state)
 
void set_default_values ()
 
bool force_lock_settings () const
 
std::string game_name () const
 
int num_turns () const
 
int village_gold () const
 
int village_support () const
 
int xp_modifier () const
 
int mp_countdown_init_time () const
 
int mp_countdown_reservoir_time () const
 
int mp_countdown_turn_bonus () const
 
int mp_countdown_action_bonus () const
 
bool mp_countdown () const
 
bool use_map_settings () const
 
bool random_start_time () const
 
bool fog_game () const
 
bool shroud_game () const
 
bool allow_observers () const
 
bool registered_users_only () const
 
bool shuffle_sides () const
 
mp_game_settings::RANDOM_FACTION_MODE random_faction_mode () const
 
const configoptions () const
 
void set_game_name (std::string name)
 
void set_num_turns (int val)
 
void set_village_gold (int val)
 
void set_village_support (int val)
 
void set_xp_modifier (int val)
 
void set_mp_countdown_init_time (int val)
 
void set_mp_countdown_reservoir_time (int val)
 
void set_mp_countdown_turn_bonus (int val)
 
void set_mp_countdown_action_bonus (int val)
 
void set_mp_countdown (bool val)
 
void set_use_map_settings (bool val)
 
void set_random_start_time (bool val)
 
void set_fog_game (bool val)
 
void set_shroud_game (bool val)
 
void set_allow_observers (bool val)
 
void set_registered_users_only (bool val)
 
void set_oos_debug (bool val)
 
void set_shuffle_sides (bool val)
 
void set_random_faction_mode (mp_game_settings::RANDOM_FACTION_MODE val)
 
void set_options (const config &cfg)
 
void set_scenario (size_t scenario_num)
 
bool set_scenario (std::string &scenario_id)
 
std::string game_name_default () const
 
int num_turns_default () const
 
int village_gold_default () const
 
int village_support_default () const
 
int xp_modifier_default () const
 
int mp_countdown_init_time_default () const
 
int mp_countdown_reservoir_time_default () const
 
int mp_countdown_turn_bonus_default () const
 
int mp_countdown_action_bonus_default () const
 
bool mp_countdown_default () const
 
bool use_map_settings_default () const
 
bool random_start_time_default () const
 
bool fog_game_default () const
 
bool shroud_game_default () const
 
bool allow_observers_default () const
 
bool registered_users_only_default () const
 
bool shuffle_sides_default () const
 
mp_game_settings::RANDOM_FACTION_MODE random_faction_mode_default () const
 
const configoptions_default () const
 
const mp_game_settingsget_parameters () const
 
const std::vector< std::string > & entry_point_titles () const
 
void write_parameters ()
 

Private Attributes

saved_gamestate_
 
mp_game_settingsparameters_
 
const configside_cfg_
 
std::vector< const config * > entry_points_
 
std::vector< std::stringentry_point_titles_
 

Detailed Description

configure_engine

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.

Constructor & Destructor Documentation

ng::configure_engine::configure_engine ( saved_game state)

Member Function Documentation

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
bool ng::configure_engine::force_lock_settings ( ) const
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
int ng::configure_engine::mp_countdown_action_bonus_default ( ) const
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
int ng::configure_engine::mp_countdown_init_time_default ( ) const
int ng::configure_engine::mp_countdown_reservoir_time ( ) const
int ng::configure_engine::mp_countdown_reservoir_time_default ( ) const
int ng::configure_engine::mp_countdown_turn_bonus ( ) const
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
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
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 ( )
void ng::configure_engine::set_fog_game ( bool  val)
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)
void ng::configure_engine::set_mp_countdown_action_bonus ( int  val)
void ng::configure_engine::set_mp_countdown_init_time ( int  val)
void ng::configure_engine::set_mp_countdown_reservoir_time ( int  val)
void ng::configure_engine::set_mp_countdown_turn_bonus ( int  val)
void ng::configure_engine::set_num_turns ( int  val)
void ng::configure_engine::set_oos_debug ( bool  val)
void ng::configure_engine::set_options ( const config cfg)

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)
void ng::configure_engine::set_registered_users_only ( bool  val)
void ng::configure_engine::set_scenario ( size_t  scenario_num)
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)
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)
void ng::configure_engine::set_village_gold ( int  val)
void ng::configure_engine::set_village_support ( int  val)
void ng::configure_engine::set_xp_modifier ( int  val)
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
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
bool ng::configure_engine::use_map_settings_default ( ) const
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
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
void ng::configure_engine::write_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

Member Data Documentation

std::vector<std::string> ng::configure_engine::entry_point_titles_
private

Definition at line 128 of file configure_engine.hpp.

Referenced by configure_engine(), and entry_point_titles().

std::vector<const config*> ng::configure_engine::entry_points_
private

Definition at line 126 of file configure_engine.hpp.

Referenced by configure_engine(), and set_scenario().

mp_game_settings& ng::configure_engine::parameters_
private
const config& ng::configure_engine::side_cfg_
private
Todo:
This might not be 100% correct, but at the moment it is not possible to show the fog and shroud per player. This might change in the future. NOTE when 'load game' is selected there are no sides.

Definition at line 124 of file configure_engine.hpp.

Referenced by fog_game_default(), shroud_game_default(), village_gold_default(), and village_support_default().

saved_game& ng::configure_engine::state_
private

The documentation for this class was generated from the following files: