26 #define LOG_NG LOG_STREAM(info, log_engine) 27 #define ERR_NG LOG_STREAM(err, log_engine) 30 #define LOG_CF LOG_STREAM(info, log_config) 31 #define WRN_CF LOG_STREAM(warn, log_config) 32 #define ERR_CF LOG_STREAM(err, log_config) 35 #define LOG_NW LOG_STREAM(info, log_network) 36 #define ERR_NW LOG_STREAM(err, log_network) 72 if(scenario[
"objectives"].empty()) {
74 std::ostringstream ss;
76 ss <<
t_string(
N_(
"Victory:"),
"wesnoth") <<
"</big>\n";
78 ss <<
t_string(
N_(
"Defeat enemy leader(s)"),
"wesnoth") <<
"</span>";
80 scenario[
"objectives"] = ss.str();
102 if(params.
saved_game == saved_game_mode::type::no) {
107 WRN_CF <<
"Missing era in MP load game '" << era <<
"'";
114 const config& custom_side = game_config.
find_child(
"multiplayer_side",
"id",
"Custom");
121 for(
unsigned i = 0;
i < mods.size(); ++
i) {
122 if(
const config& mod_cfg = game_config.
find_child(
"modification",
"id", mods[
i])) {
123 level.
add_child(
"modification", mod_cfg);
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
std::string join(const T &v, const std::string &s=",")
Generates a new string joining container items in a list.
static lg::log_domain log_config("config")
void set_defaults()
does some post loading stuff must be used before passing the data to connect_engine ...
config initial_level_config(saved_game &state)
void expand_random_scenario()
takes care of generate_map=, generate_scenario=, map= attributes This should be called before expandi...
std::string campaign_name
The name of the campaign being played.
config & child_or_add(config_key_type key)
Returns a reference to the first child with the given key.
void level_to_gamestate(const config &level, saved_game &state)
Definitions for the interface to Wesnoth Markup Language (WML).
std::string get_scenario_id() const
Main entry points of multiplayer mode.
static game_config_manager * get()
void set_random_seed()
sets the random seed if that didn't already happen.
std::vector< std::string > active_mods
void expand_mp_options()
adds values of [option]s into [carryover_sides_start][variables] so that they are applied in the next...
config & add_child_at(config_key_type key, const config &val, unsigned index)
const game_config_view & game_config() const
config & get_starting_point()
saved_game_mode::type saved_game
std::string campaign
The id of the campaign being played.
Game configuration data as global variables.
void expand_mp_events()
adds [event]s from [era] and [modification] into this scenario does NOT expand [option]s because vari...
const std::string unicode_bullet
const version_info wesnoth_version(VERSION)
config & add_child(config_key_type key)
const config & find_child(config_key_type key, const std::string &name, const std::string &value) const
std::string difficulty
The difficulty level the game is being played on.
game_classification & classification()
Standard logging facilities (interface).
std::string str() const
Serializes the version number into string form.
A config object defines a single node in a WML file, with access to child nodes.
mp_game_settings & mp_settings()
Multiplayer parameters for this game.
static lg::log_domain log_network("network")
static lg::log_domain log_engine("engine")
static void add_multiplayer_classification(config &multiplayer, saved_game &state)