The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Public Attributes | List of all members
game_classification Class Reference

#include <game_classification.hpp>

Public Member Functions

 game_classification ()=default
 
 game_classification (const config &cfg)
 
config to_config () const
 
std::string get_tagname () const
 
std::set< std::string > active_addons (const std::string &scenario_id) const
 
bool is_normal_mp_game () const
 
bool is_scenario () const
 
bool is_multiplayer () const
 
bool is_test () const
 
bool is_tutorial () const
 

Public Attributes

std::string label
 Name of the game (e.g. More...
 
std::string version
 Version game was created with. More...
 
campaign_type::type type
 
std::string campaign_define
 If there is a define the campaign uses to customize data. More...
 
std::vector< std::string > campaign_xtra_defines
 more customization of data More...
 
std::string scenario_define
 If there is a define the scenario uses to customize data. More...
 
std::string era_define
 If there is a define the era uses to customize data. More...
 
std::vector< std::string > mod_defines
 If there are defines the modifications use to customize data. More...
 
std::vector< std::string > active_mods
 
std::string era_id
 
std::string campaign
 The id of the campaign being played. More...
 
std::string campaign_name
 The name of the campaign being played. More...
 
std::string abbrev
 the campaign abbreviation More...
 
bool end_credits = true
 whether to show the standard credits at the end More...
 
std::string end_text
 end-of-campaign text More...
 
std::chrono::milliseconds end_text_duration
 for how long the end-of-campaign text is shown More...
 
std::string difficulty = DEFAULT_DIFFICULTY
 The difficulty level the game is being played on. More...
 
std::string random_mode = ""
 
bool oos_debug = false
 

Detailed Description

Definition at line 30 of file game_classification.hpp.

Constructor & Destructor Documentation

◆ game_classification() [1/2]

game_classification::game_classification ( )
default

◆ game_classification() [2/2]

game_classification::game_classification ( const config cfg)
explicit

Definition at line 39 of file game_classification.cpp.

Member Function Documentation

◆ active_addons()

std::set< std::string > game_classification::active_addons ( const std::string &  scenario_id) const

◆ get_tagname()

std::string game_classification::get_tagname ( ) const

◆ is_multiplayer()

bool game_classification::is_multiplayer ( ) const
inline

◆ is_normal_mp_game()

bool game_classification::is_normal_mp_game ( ) const
inline

◆ is_scenario()

bool game_classification::is_scenario ( ) const
inline

Definition at line 68 of file game_classification.hpp.

References type.

Referenced by campaign_controller::play_game(), and ng::side_engine::side_engine().

◆ is_test()

bool game_classification::is_test ( ) const
inline

Definition at line 78 of file game_classification.hpp.

References type.

Referenced by game_lua_kernel::game_lua_kernel().

◆ is_tutorial()

bool game_classification::is_tutorial ( ) const
inline

Definition at line 83 of file game_classification.hpp.

References type.

Referenced by get_tagname().

◆ to_config()

config game_classification::to_config ( ) const

Member Data Documentation

◆ abbrev

std::string game_classification::abbrev

the campaign abbreviation

Definition at line 51 of file game_classification.hpp.

Referenced by ng::create_engine::prepare_for_campaign(), to_config(), and saved_game::update_label().

◆ active_mods

std::vector<std::string> game_classification::active_mods

◆ campaign

std::string game_classification::campaign

◆ campaign_define

std::string game_classification::campaign_define

If there is a define the campaign uses to customize data.

Definition at line 39 of file game_classification.hpp.

Referenced by game_config_manager::load_game_config_for_game(), ng::create_engine::prepare_for_campaign(), game_launcher::set_test(), and to_config().

◆ campaign_name

std::string game_classification::campaign_name

The name of the campaign being played.

Definition at line 49 of file game_classification.hpp.

Referenced by mp::add_multiplayer_classification(), ng::create_engine::prepare_for_campaign(), and to_config().

◆ campaign_xtra_defines

std::vector<std::string> game_classification::campaign_xtra_defines

◆ difficulty

std::string game_classification::difficulty = DEFAULT_DIFFICULTY

◆ end_credits

bool game_classification::end_credits = true

whether to show the standard credits at the end

Definition at line 52 of file game_classification.hpp.

Referenced by campaign_controller::play_game(), ng::create_engine::prepare_for_campaign(), and to_config().

◆ end_text

std::string game_classification::end_text

end-of-campaign text

Definition at line 53 of file game_classification.hpp.

Referenced by ng::create_engine::prepare_for_campaign(), and to_config().

◆ end_text_duration

std::chrono::milliseconds game_classification::end_text_duration

for how long the end-of-campaign text is shown

Definition at line 54 of file game_classification.hpp.

Referenced by ng::create_engine::prepare_for_campaign(), and to_config().

◆ era_define

std::string game_classification::era_define

If there is a define the era uses to customize data.

Definition at line 42 of file game_classification.hpp.

Referenced by game_config_manager::load_game_config_for_game(), ng::create_engine::prepare_for_era_and_mods(), mp::start_local_game_commandline(), and to_config().

◆ era_id

std::string game_classification::era_id

◆ label

std::string game_classification::label

◆ mod_defines

std::vector<std::string> game_classification::mod_defines

If there are defines the modifications use to customize data.

Definition at line 43 of file game_classification.hpp.

Referenced by game_config_manager::load_game_config_for_game(), ng::create_engine::prepare_for_era_and_mods(), and to_config().

◆ oos_debug

bool game_classification::oos_debug = false

Definition at line 57 of file game_classification.hpp.

Referenced by ng::configure_engine::set_oos_debug(), and to_config().

◆ random_mode

std::string game_classification::random_mode = ""

◆ scenario_define

std::string game_classification::scenario_define

If there is a define the scenario uses to customize data.

Definition at line 41 of file game_classification.hpp.

Referenced by game_config_manager::load_game_config_for_game(), ng::create_engine::prepare_for_scenario(), mp::start_local_game_commandline(), and to_config().

◆ type

campaign_type::type game_classification::type

◆ version

std::string game_classification::version

Version game was created with.

Definition at line 37 of file game_classification.hpp.

Referenced by savegame::loadgame::check_version_compatibility().


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