32 flg_manager(
const std::vector<const config*>& era_factions,
33 const config& side,
bool lock_settings,
bool use_map_settings,
bool saved_game);
A config object defines a single node in a WML file, with access to child nodes.
FLG stands for faction, leader and gender.
void update_available_factions()
const bool faction_from_recruit_
const std::vector< const config * > & choosable_factions() const
void update_choosable_leaders()
void update_choosable_factions()
std::string default_leader_type_
void update_available_leaders()
const std::vector< std::string > original_recruit_
std::string current_leader_
const std::string & current_gender() const
const bool has_no_recruits_
void update_available_genders()
void set_current_faction(const unsigned index)
void set_current_faction(const config &faction)
void select_default_faction()
void resolve_random(randomness::mt_rng &rng, const std::vector< std::string > &avoid)
flg_manager & operator=(const flg_manager &)=delete
const std::vector< std::string > & choosable_genders() const
std::vector< std::string > choosable_leaders_
std::vector< std::string > choosable_genders_
std::vector< std::string > available_genders_
bool is_saved_game() const
const std::string original_type_
flg_manager(const flg_manager &)=delete
int current_gender_index() const
int current_leader_index() const
const config * default_leader_cfg() const
void update_choosable_genders()
const config * current_faction_
const std::vector< std::string > & choosable_leaders() const
int faction_index(const config &faction) const
const std::string choose_faction_by_leader_
const std::string original_faction_
void set_current_leader(const unsigned index)
int leader_index(const std::string &leader) const
returns -1 if no leader with that name was found
const std::string original_gender_
int gender_index(const std::string &gender) const
returns -1 if no gender with that name was found
int current_faction_index() const
static const config & get_default_faction(const config &cfg)
std::string default_leader_gender_
std::vector< const config * > available_factions_
std::vector< const config * > choosable_factions_
flg_manager(const std::vector< const config * > &era_factions, const config &side, bool lock_settings, bool use_map_settings, bool saved_game)
void set_current_gender(const unsigned index)
const config & current_faction() const
const std::string & current_leader() const
std::string savegame_gender_
void append_leaders_from_faction(const config *faction)
const config * default_leader_cfg_
const std::vector< const config * > & era_factions_
std::string current_gender_
int find_suitable_faction() const
std::vector< std::string > available_leaders_
const std::string random_enemy_picture("units/random-dice.png")
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.