#include <carryover.hpp>
Public Member Functions | |
carryover_info () | |
carryover_info (const config &cfg, bool from_snapshot=false) | |
Turns config from a loaded savegame into carryover_info. More... | |
carryover * | get_side (const std::string &save_id) |
std::vector< carryover > & | get_all_sides () |
void | add_side (const config &cfg) |
void | add_side (const team &t, const int gold, const bool add) |
void | remove_side (const std::string &id) |
void | transfer_all_to (config &side_cfg) |
void | transfer_to (config &level) |
void | set_variables (const config &vars) |
const config & | get_variables () const |
const randomness::mt_rng & | rng () const |
randomness::mt_rng & | rng () |
const std::string & | next_scenario () const |
const config | to_config () |
void | merge_old_carryover (const carryover_info &old_carryover) |
Private Attributes | |
std::vector< carryover > | carryover_sides_ |
config | variables_ |
randomness::mt_rng | rng_ |
std::vector< config > | wml_menu_items_ |
std::string | next_scenario_ |
the scenario coming next (for campaigns) More... | |
int | next_underlying_unit_id_ |
Definition at line 61 of file carryover.hpp.
|
inline |
Definition at line 64 of file carryover.hpp.
|
explicit |
Turns config from a loaded savegame into carryover_info.
cfg | the config to use |
from_snapshot | true if cfg is a [snapshot], false if cfg is [carryover_sides(_start)] |
Definition at line 110 of file carryover.cpp.
References carryover_sides_, config::child_range(), ERR_NG, and wml_menu_items_.
void carryover_info::add_side | ( | const config & | cfg | ) |
Definition at line 142 of file carryover.cpp.
References carryover_sides_.
void carryover_info::add_side | ( | const team & | t, |
const int | gold, | ||
const bool | add | ||
) |
std::vector< carryover > & carryover_info::get_all_sides | ( | ) |
Definition at line 138 of file carryover.cpp.
References carryover_sides_.
carryover * carryover_info::get_side | ( | const std::string & | save_id | ) |
Definition at line 244 of file carryover.cpp.
References carryover_sides_.
|
inline |
Definition at line 90 of file carryover.hpp.
References variables_.
void carryover_info::merge_old_carryover | ( | const carryover_info & | old_carryover | ) |
Definition at line 254 of file carryover.cpp.
References carryover_sides_, and carryover::get_save_id().
Referenced by saved_game::convert_to_start_save().
|
inline |
Definition at line 95 of file carryover.hpp.
References next_scenario_.
void carryover_info::remove_side | ( | const std::string & | id | ) |
Definition at line 146 of file carryover.cpp.
References carryover_sides_.
|
inline |
Definition at line 93 of file carryover.hpp.
References rng_.
|
inline |
Definition at line 92 of file carryover.hpp.
References rng_.
Referenced by saved_game::convert_to_start_save().
|
inline |
Definition at line 89 of file carryover.hpp.
References variables_.
const config carryover_info::to_config | ( | ) |
Definition at line 223 of file carryover.cpp.
References config::add_child(), c, carryover_sides_, randomness::mt_rng::get_random_calls(), randomness::mt_rng::get_random_seed_str(), next_scenario_, next_underlying_unit_id_, rng_, variables_, and wml_menu_items_.
Referenced by saved_game::convert_to_start_save(), and saved_game::expand_carryover().
void carryover_info::transfer_all_to | ( | config & | side_cfg | ) |
Definition at line 168 of file carryover.cpp.
References carryover_sides_, default_gold_qty, config::empty(), and config::has_attribute().
Referenced by saved_game::expand_carryover().
void carryover_info::transfer_to | ( | config & | level | ) |
Definition at line 194 of file carryover.cpp.
References config::clear(), config_attribute_value::empty(), randomness::mt_rng::get_random_calls(), randomness::mt_rng::get_random_seed_str(), game_config::images::level, next_scenario_, next_underlying_unit_id_, rng_, variables_, and wml_menu_items_.
Referenced by saved_game::expand_carryover().
|
private |
Definition at line 101 of file carryover.hpp.
Referenced by add_side(), carryover_info(), get_all_sides(), get_side(), merge_old_carryover(), remove_side(), to_config(), and transfer_all_to().
|
private |
the scenario coming next (for campaigns)
Definition at line 105 of file carryover.hpp.
Referenced by next_scenario(), to_config(), and transfer_to().
|
private |
Definition at line 106 of file carryover.hpp.
Referenced by to_config(), and transfer_to().
|
private |
Definition at line 103 of file carryover.hpp.
Referenced by rng(), to_config(), and transfer_to().
|
private |
Definition at line 102 of file carryover.hpp.
Referenced by get_variables(), set_variables(), to_config(), and transfer_to().
|
private |
Definition at line 104 of file carryover.hpp.
Referenced by carryover_info(), to_config(), and transfer_to().