14 #ifndef MULTIPLAYER_CONNECT_ENGINE_HPP_INCLUDED
15 #define MULTIPLAYER_CONNECT_ENGINE_HPP_INCLUDED
23 #include <boost/scoped_ptr.hpp>
94 throw "No scenariodata found";
184 {
return (!
cfg_[
"save_id"].empty()) ?
cfg_[
"save_id"] :
cfg_[
"id"]; }
187 {
return (!
cfg_[
"previous_save_id"].empty()) ?
cfg_[
"previous_save_id"] :
save_id(); }
bool can_start_game() const
const std::string & ai_algorithm() const
void save_reserved_sides_information()
void set_waiting_to_choose_status(bool status)
void set_reserved_for(const std::string &reserved_for)
bool allow_changes() const
std::vector< std::string > player_teams_
std::string save_id() const
void import_user(const std::string &name, const bool observer, int side_taken=-1)
std::vector< side_engine_ptr > side_engines_
void load_previous_sides_users()
bool swap_sides_on_drop_target(const unsigned drop_target)
bool allow_shuffle() const
void add_controller_option(ng::controller controller, const std::string &name, const std::string &controller_value)
config new_config() const
void set_income(int income)
void place_user(const std::string &name)
std::string previous_save_id() const
void set_faction_commandline(const std::string &faction_name)
void set_controller_commandline(const std::string &controller_name)
std::string ai_algorithm_
std::vector< std::string > user_team_names_
const config & level() const
const bool allow_changes_
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
FLG stands for faction, leader and gender.
std::vector< controller_option > controller_options_
Definitions for the interface to Wesnoth Markup Language (WML).
bool ready_for_start() const
const std::string & reserved_for() const
void update_and_send_diff(bool update_time_of_day=false)
const std::set< std::string > & connected_users() const
const config & cfg() const
bool sides_available() const
void set_color(int color)
bool waiting_to_choose_faction_
std::string custom_color_
This class stores all the data for a single 'side' (in game nomenclature).
void operator=(const side_engine &)
const mp_game_settings & params() const
std::vector< side_engine_ptr > & side_engines()
bool waiting_to_choose_faction() const
bool first_scenario() const
void send_to_server(const config &cfg) const
const std::string & player_id() const
void set_controller(ng::controller controller)
boost::shared_ptr< side_engine > side_engine_ptr
std::string user_description() const
void start_game_commandline(const commandline_options &cmdline_opts)
std::vector< std::string > get_colors() const
const bool first_scenario_
const std::vector< std::string > & user_team_names()
ng::controller controller() const
bool available_for_user(const std::string &name="") const
ng::controller controller_
std::vector< const config * > era_factions_
mp_campaign_info * campaign_info_
const ng::controller default_controller_
void operator=(const connect_engine &)
bool force_lock_settings() const
std::vector< std::string > get_children_to_swap()
void send_level_data() const
config * current_config()
void update_controller_options()
unsigned current_controller_index() const
void set_ai_algorithm(const std::string &ai_algorithm)
bool allow_player() const
std::string reserved_for_
const std::vector< controller_option > & controller_options()
connect_engine(saved_game &state, const bool first_scenario, mp_campaign_info *campaign_info)
bool receive_from_server(config &dst) const
void update_current_controller_index()
unsigned current_controller_index_
GLuint const GLchar * name
std::pair< ng::controller, std::string > controller_option
int find_user_side_index_by_id(const std::string &id) const
std::set< std::string > & connected_users_rw()
void set_index(int index)
config & child(const std::string &key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
const bool controller_lock_
bool controller_changed(const int selection)
void set_side_children(std::multimap< std::string, config > children)
const mp_game_settings & params_
std::string get_color(int index=-1) const
A config object defines a single node in a WML file, with access to child nodes.
boost::scoped_ptr< connect_engine > connect_engine_ptr
void resolve_random(rand_rng::mt_rng &rng, const std::vector< std::string > &avoid_faction_ids=std::vector< std::string >())
std::vector< std::string > team_names_
side_engine(const config &cfg, connect_engine &parent_engine, const int index)
GLsizei const GLcharARB ** string
std::multimap< std::string, config > get_side_children()
std::pair< bool, bool > process_network_data(const config &data)
bool force_lock_settings_
const std::vector< std::string > & player_teams() const
void update_side_controller_options()