29 #define ERR_NG LOG_STREAM(err, log_engine) 
   39         const std::vector<ng::create_engine::level_ptr> campaigns =
 
   42         if(campaigns.empty()) {
 
   47         std::string random_mode = 
"", difficulty = 
"";
 
   66                         random_mode = 
"deterministic";
 
   69                         random_mode = 
"biased";
 
   89             if(campaign == campaigns.end()) {
 
   90                 ERR_NG << 
"No such campaign id to jump to: [" << jump_to_campaign.
campaign_id << 
"]";
 
   99         const auto selected_difficulty = difficulty;
 
  101         if(selected_difficulty == 
"FAIL") 
return false;
 
  102         if(selected_difficulty == 
"CANCEL") {
 
A config object defines a single node in a WML file, with access to child nodes.
 
static const int OPEN_ADDON_MANAGER
 
const std::string & get_difficulty() const
 
RNG_MODE get_rng_mode() const
 
bool show(const unsigned auto_close_time=0)
Shows the window.
 
void prepare_for_new_level()
 
std::shared_ptr< level > level_ptr
 
void set_current_level_type(const level_type::type type)
 
void prepare_for_campaign(const std::string &difficulty="")
 
std::vector< level_ptr > get_levels_by_type_unfiltered(level_type::type type) const
 
const mp_game_settings & get_parameters()
 
void set_current_level(const std::size_t index)
 
void prepare_for_era_and_mods()
 
game_classification & classification()
 
void set_carryover_sides_start(config carryover_sides_start)
 
std::string get_scenario_id() const
 
mp_game_settings & mp_settings()
Multiplayer parameters for this game.
 
Definitions for the interface to Wesnoth Markup Language (WML).
 
static std::string _(const char *str)
 
bool manage_addons()
Shows the add-ons server connection dialog, for access to the various management front-ends.
 
void show_error_message(const std::string &msg, bool message_use_markup)
Shows an error message to the user.
 
@ OK
Dialog was closed with the OK button.
 
bool select_campaign(saved_game &state, jump_to_campaign_info jump_to_campaign)
 
bool configure_campaign(saved_game &state, ng::create_engine &create_eng)
 
auto find(Container &container, const Value &value, const Projection &projection={})
 
static lg::log_domain log_engine("engine")
 
std::string campaign_id
The ID of the campaign to launch.
 
std::string scenario_id
The ID of the scenario within the campaign to jump to.
 
Helper class, don't construct this directly.
 
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...