#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 |
Definition at line 30 of file game_classification.hpp.
|
default |
|
explicit |
Definition at line 39 of file game_classification.cpp.
std::set< std::string > game_classification::active_addons | ( | const std::string & | scenario_id | ) | const |
Definition at line 118 of file game_classification.cpp.
References active_mods, campaign, config::child_range(), DBG_NG, era_id, ERR_NG, game_config_manager::get(), and get_tagname().
Referenced by game_config_manager::load_game_config().
std::string game_classification::get_tagname | ( | ) | const |
Definition at line 89 of file game_classification.cpp.
References campaign, string_enums::enum_base< Definition >::get_string(), is_multiplayer(), is_tutorial(), and type.
Referenced by active_addons(), play_controller::check_next_scenario_is_known(), saved_game::expand_scenario(), gui2::dialogs::mp_create_game::post_show(), play_controller::reveal_map_default(), and saved_game::set_defaults().
|
inline |
Definition at line 73 of file game_classification.hpp.
References type.
Referenced by ng::create_engine::create_engine(), get_tagname(), ng::create_engine::init_all_levels(), ng::create_engine::init_extras(), is_normal_mp_game(), game_launcher::load_game(), game_config_manager::load_game_config_for_game(), campaign_controller::play_game(), and ng::create_engine::set_current_level().
|
inline |
Definition at line 63 of file game_classification.hpp.
References campaign, and is_multiplayer().
Referenced by ng::connect_engine::connect_engine(), ng::configure_engine::fog_game_default(), ng::configure_engine::force_lock_settings(), settings::get_village_gold(), campaign_controller::play_game(), and gui2::dialogs::mp_join_game::show_flg_select().
|
inline |
Definition at line 68 of file game_classification.hpp.
References type.
Referenced by campaign_controller::play_game(), and ng::side_engine::side_engine().
|
inline |
Definition at line 78 of file game_classification.hpp.
References type.
Referenced by game_lua_kernel::game_lua_kernel().
|
inline |
Definition at line 83 of file game_classification.hpp.
References type.
Referenced by get_tagname().
config game_classification::to_config | ( | ) | const |
Definition at line 62 of file game_classification.cpp.
References abbrev, active_mods, campaign, campaign_define, campaign_name, campaign_xtra_defines, difficulty, end_credits, end_text, end_text_duration, era_define, era_id, prefs::get(), string_enums::enum_base< Definition >::get_string(), utils::join(), label, mod_defines, oos_debug, random_mode, scenario_define, version_info::str(), type, and game_config::wesnoth_version.
Referenced by saved_game::to_config(), and saved_game::write_general_info().
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().
std::vector<std::string> game_classification::active_mods |
Definition at line 45 of file game_classification.hpp.
Referenced by active_addons(), ng::create_engine::active_mods(), mp::add_multiplayer_classification(), ng::create_engine::create_engine(), saved_game::expand_mp_events(), saved_game::expand_mp_options(), ng::create_engine::init_active_mods(), mp::initial_level_config(), ng::create_engine::prepare_for_era_and_mods(), to_config(), and ng::create_engine::toggle_mod().
std::string game_classification::campaign |
The id of the campaign being played.
Definition at line 48 of file game_classification.hpp.
Referenced by active_addons(), mp::add_multiplayer_classification(), saved_game::expand_mp_events(), get_tagname(), is_normal_mp_game(), campaign_controller::play_game(), ng::create_engine::prepare_for_campaign(), saved_game::set_defaults(), to_config(), and gui2::dialogs::mp_create_game::update_details().
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().
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().
std::vector<std::string> game_classification::campaign_xtra_defines |
more customization of data
Definition at line 40 of file game_classification.hpp.
Referenced by game_config_manager::load_game_config_for_game(), ng::create_engine::prepare_for_campaign(), and to_config().
std::string game_classification::difficulty = DEFAULT_DIFFICULTY |
The difficulty level the game is being played on.
Definition at line 55 of file game_classification.hpp.
Referenced by mp::add_multiplayer_classification(), game_config_manager::load_game_config_for_game(), campaign_controller::play_game(), ng::create_engine::prepare_for_campaign(), and to_config().
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().
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().
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().
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().
std::string game_classification::era_id |
Definition at line 46 of file game_classification.hpp.
Referenced by active_addons(), mp::add_multiplayer_classification(), saved_game::expand_mp_events(), saved_game::expand_mp_options(), ng::create_engine::get_parameters(), mp::initial_level_config(), ng::create_engine::prepare_for_era_and_mods(), game_launcher::set_test(), mp::start_local_game_commandline(), and to_config().
std::string game_classification::label |
Name of the game (e.g.
name of save file).
Definition at line 36 of file game_classification.hpp.
Referenced by savegame::ingame_savegame::create_initial_filename(), savegame::replay_savegame::create_initial_filename(), savegame::autosave_savegame::create_initial_filename(), savegame::scenariostart_savegame::create_initial_filename(), campaign_controller::play_game(), game_launcher::single_unit_test(), to_config(), and saved_game::update_label().
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().
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().
std::string game_classification::random_mode = "" |
Definition at line 56 of file game_classification.hpp.
Referenced by synced_context::get_rng_for_action(), playsingle_controller::play_scenario_init(), sp::select_campaign(), and to_config().
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().
campaign_type::type game_classification::type |
Definition at line 38 of file game_classification.hpp.
Referenced by ng::create_engine::create_engine(), get_tagname(), is_multiplayer(), is_scenario(), is_test(), is_tutorial(), mp::level_to_gamestate(), game_launcher::load_game(), savegame::loadgame::load_multiplayer_game(), game_launcher::new_campaign(), game_launcher::play_render_image_mode(), game_launcher::set_test(), mp::start_local_game_commandline(), to_config(), and ng::create_engine::toggle_mod().
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().