#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 (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 rand_rng::mt_rng & | rng () const |
rand_rng::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_ |
rand_rng::mt_rng | rng_ |
boost::ptr_vector< config > | wml_menu_items_ |
std::string | next_scenario_ |
the scenario coming next (for campaigns) More... | |
int | next_underlying_unit_id_ |
Definition at line 53 of file carryover.hpp.
|
inline |
Definition at line 56 of file carryover.hpp.
|
explicit |
Turns config from a loaded savegame into carryover_info.
from_snapshot | true if cfg is a [snapshot], false if cfg is [carryover_sides(_start)] |
Definition at line 123 of file carryover.cpp.
References carryover_sides_, config::child_range(), and wml_menu_items_.
Definition at line 151 of file carryover.cpp.
References carryover_sides_.
std::vector< carryover > & carryover_info::get_all_sides | ( | ) |
Definition at line 147 of file carryover.cpp.
References carryover_sides_.
carryover * carryover_info::get_side | ( | std::string | save_id | ) |
Definition at line 255 of file carryover.cpp.
References carryover_sides_.
|
inline |
Definition at line 79 of file carryover.hpp.
References variables_.
void carryover_info::merge_old_carryover | ( | const carryover_info & | old_carryover | ) |
Definition at line 265 of file carryover.cpp.
References carryover_sides_, and carryover::get_save_id().
Referenced by saved_game::convert_to_start_save().
|
inline |
Definition at line 84 of file carryover.hpp.
References next_scenario_.
void carryover_info::remove_side | ( | const std::string & | id | ) |
Definition at line 155 of file carryover.cpp.
References carryover_sides_.
|
inline |
Definition at line 81 of file carryover.hpp.
References rng_.
Referenced by saved_game::convert_to_start_save().
|
inline |
Definition at line 82 of file carryover.hpp.
References rng_.
Definition at line 78 of file carryover.hpp.
References variables_.
const config carryover_info::to_config | ( | ) |
Definition at line 234 of file carryover.cpp.
References config::add_child(), carryover_sides_, rand_rng::mt_rng::get_random_calls(), rand_rng::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().
Definition at line 177 of file carryover.cpp.
References carryover_sides_, default_gold_qty, config::empty(), and config::has_attribute().
Referenced by saved_game::expand_carryover().
Definition at line 203 of file carryover.cpp.
References config::add_child(), config::attribute_value::empty(), rand_rng::mt_rng::get_random_calls(), rand_rng::mt_rng::get_random_seed_str(), config::has_attribute(), config::has_child(), next_scenario_, next_underlying_unit_id_, rng_, config::swap(), variables_, and wml_menu_items_.
Referenced by saved_game::expand_carryover().
|
private |
Definition at line 90 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 94 of file carryover.hpp.
Referenced by next_scenario(), to_config(), and transfer_to().
|
private |
Definition at line 95 of file carryover.hpp.
Referenced by to_config(), and transfer_to().
|
private |
Definition at line 92 of file carryover.hpp.
Referenced by rng(), to_config(), and transfer_to().
|
private |
Definition at line 91 of file carryover.hpp.
Referenced by get_variables(), set_variables(), to_config(), and transfer_to().
|
private |
Definition at line 93 of file carryover.hpp.
Referenced by carryover_info(), to_config(), and transfer_to().