#include <types.hpp>
Classes | |
class | error |
Public Types | |
enum | BUILD_STATUS { NOT_BUILT, CREATED, VARIATIONS, HELP_INDEXED, FULL } |
Records the status of the lazy building of unit types. More... | |
Public Member Functions | |
unit_type (const config &cfg, const std::string &parent_id="") | |
Creates a unit type for the given config, but delays its build till later. More... | |
unit_type (const unit_type &o) | |
~unit_type () | |
void | build (BUILD_STATUS status, const movement_type_map &movement_types, const race_map &races, const config::const_child_itors &traits) |
Performs a build of this to the indicated stage. More... | |
void | build (BUILD_STATUS status, const movement_type_map &movement_types, const race_map &races, const config::const_child_itors &traits) const |
Performs a build of this to the indicated stage. More... | |
void | add_advancement (const unit_type &advance_to, int experience) |
Adds an additional advancement path to a unit type. More... | |
std::set< std::string > | advancement_tree () const |
Get the advancement tree Build a set of unit type's id of this unit type's advancement tree. More... | |
const std::vector< std::string > & | advances_to () const |
const std::vector< std::string > | advances_from () const |
config::const_child_itors | modification_advancements () const |
const unit_type & | get_gender_unit_type (std::string gender) const |
const unit_type & | get_gender_unit_type (unit_race::GENDER gender) const |
const unit_type & | get_variation (const std::string &id) const |
const std::string & | undead_variation () const |
Info on the type of unit that the unit reanimates as. More... | |
unsigned int | num_traits () const |
const t_string & | type_name () const |
The name of the unit in the current language setting. More... | |
const std::string & | id () const |
The id for this unit_type. More... | |
const std::string | log_id () const |
A variant on id() that is more descriptive, for use with message logging. More... | |
const std::string & | base_id () const |
The id of the original type from which this (variation) descended. More... | |
t_string | unit_description () const |
int | hitpoints () const |
double | hp_bar_scaling () const |
double | xp_bar_scaling () const |
int | level () const |
int | recall_cost () const |
int | movement () const |
int | vision () const |
int | vision (bool base_value) const |
If base_value is set to true, do not fall back to movement(). More... | |
int | jamming () const |
int | max_attacks () const |
int | cost () const |
const std::string & | default_variation () const |
const std::string & | variation_name () const |
const std::string & | usage () const |
const std::string & | image () const |
const std::string & | icon () const |
const std::string & | small_profile () const |
const std::string & | big_profile () const |
std::string | halo () const |
std::string | ellipse () const |
bool | generate_name () const |
const std::vector < unit_animation > & | animations () const |
const std::string & | flag_rgb () const |
std::vector< attack_type > | attacks () const |
const movetype & | movement_type () const |
int | experience_needed (bool with_acceleration=true) const |
MAKE_ENUM (ALIGNMENT,(LAWFUL, N_("lawful"))(NEUTRAL, N_("neutral"))(CHAOTIC, N_("chaotic"))(LIMINAL, N_("liminal"))) ALIGNMENT alignment() const | |
fixed_t | alpha () const |
const std::vector< t_string > & | abilities () const |
const std::vector< t_string > & | ability_tooltips () const |
const std::vector< t_string > & | adv_abilities () const |
const std::vector< t_string > & | adv_ability_tooltips () const |
bool | can_advance () const |
bool | musthave_status (const std::string &status) const |
bool | has_zoc () const |
bool | has_ability_by_id (const std::string &ability) const |
std::vector< std::string > | get_ability_list () const |
config::const_child_itors | possible_traits () const |
const config & | abilities_cfg () const |
config::const_child_itors | advancements () const |
config::const_child_itors | events () const |
bool | has_random_traits () const |
const std::vector < unit_race::GENDER > & | genders () const |
The returned vector will not be empty, provided this has been built to the HELP_INDEXED status. More... | |
std::vector< std::string > | variations () const |
bool | has_variation (const std::string &variation_id) const |
bool | show_variations_in_help () const |
Whether the unit type has at least one help-visible variation. More... | |
std::string | race_id () const |
Returns the ID of this type's race without the need to build the type. More... | |
const unit_race * | race () const |
Never returns nullptr, but may point to the null race. More... | |
bool | hide_help () const |
bool | do_not_list () const |
const config & | get_cfg () const |
const config & | get_cfg_for_units () const |
Returns a trimmed config suitable for use with units. More... | |
int | resistance_against (const std::string &damage_name, bool attacker) const |
Gets resistance while considering custom WML abilities. More... | |
Static Public Member Functions | |
static void | check_id (std::string &id) |
static std::string | alignment_description (ALIGNMENT align, unit_race::GENDER gender=unit_race::MALE) |
Private Types | |
typedef std::map< std::string, unit_type * > | variations_map |
Private Member Functions | |
void | build_full (const movement_type_map &movement_types, const race_map &races, const config::const_child_itors &traits) |
Load data into an empty unit_type (build to FULL). More... | |
void | build_help_index (const movement_type_map &movement_types, const race_map &races, const config::const_child_itors &traits) |
Partially load data into an empty unit_type (build to HELP_INDEXED). More... | |
void | build_created (const movement_type_map &movement_types, const race_map &races, const config::const_child_itors &traits) |
Load the most needed data into an empty unit_type (build to CREATE). More... | |
const config & | build_unit_cfg () const |
Generates (and returns) a trimmed config suitable for use with units. More... | |
bool | resistance_filter_matches (const config &cfg, bool attacker, const std::string &damage_name, int res) const |
Identical to unit::resistance_filter_matches. More... | |
void | operator= (const unit_type &o) |
|
private |
|
explicit |
Creates a unit type for the given config, but delays its build till later.
Definition at line 110 of file types.cpp.
References base_id_, check_id(), gender_types_, and id_.
Referenced by build_created(), build_help_index(), and unit_type().
unit_type::unit_type | ( | const unit_type & | o | ) |
Definition at line 53 of file types.cpp.
References gender_types_, i, unit_type(), and variations_.
unit_type::~unit_type | ( | ) |
Definition at line 166 of file types.cpp.
References gender_types_, i, and variations_.
|
inline |
Definition at line 166 of file types.hpp.
References abilities_.
Referenced by help::generate_ability_topics(), get_ability_list(), dialogs::unit_types_preview_pane::get_details(), help::unit_topic_generator::operator()(), resistance_against(), and gui2::tunit_preview_pane::set_displayed_type().
|
inline |
Definition at line 185 of file types.hpp.
References cfg_, and config::child_or_empty().
Referenced by unit::advance_to().
|
inline |
Definition at line 167 of file types.hpp.
References ability_tooltips_.
Referenced by help::generate_ability_topics().
Adds an additional advancement path to a unit type.
This is used to implement the [advancefrom] tag.
Definition at line 565 of file types.cpp.
References add_advancement(), advances_to_, unit_type_data::build_unit_type(), cfg_, DBG_UT, experience_needed_, gui2::event::find(), gender_types_, config::has_child(), id_, in_advancefrom_, LOG_CONFIG, log_id(), unit_types, VARIATIONS, variations_, and WRN_CF.
Referenced by add_advancement().
|
inline |
Definition at line 170 of file types.hpp.
References adv_abilities_.
Referenced by help::generate_ability_topics(), and help::unit_topic_generator::operator()().
|
inline |
Definition at line 171 of file types.hpp.
References adv_ability_tooltips_.
Referenced by help::generate_ability_topics().
std::set< std::string > unit_type::advancement_tree | ( | ) | const |
Get the advancement tree Build a set of unit type's id of this unit type's advancement tree.
Definition at line 642 of file types.cpp.
References advancement_tree_internal(), and id_.
Referenced by ai::default_recruitment::recruitment::do_similarity_penalty().
|
inline |
Definition at line 188 of file types.hpp.
References cfg_, and config::child_range().
Referenced by unit::advance_to().
const std::vector< std::string > unit_type::advances_from | ( | ) | const |
Definition at line 649 of file types.cpp.
References unit_type_data::build_all(), HELP_INDEXED, id_, unit_type_data::types(), and unit_types.
Referenced by help::unit_topic_generator::operator()().
|
inline |
Definition at line 97 of file types.hpp.
References advances_to_.
Referenced by unit::advance_to(), advancement_tree_internal(), and help::unit_topic_generator::operator()().
|
static |
|
inline |
const std::vector< unit_animation > & unit_type::animations | ( | ) | const |
Definition at line 476 of file types.cpp.
References animations_, cfg_, and unit_animation::fill_initial_animations().
Referenced by unit_animation_component::reset_after_advance().
std::vector< attack_type > unit_type::attacks | ( | ) | const |
Definition at line 484 of file types.cpp.
References cfg_, and config::child_range().
Referenced by unit::advance_to(), help::generate_weapon_special_topics(), dialogs::unit_types_preview_pane::get_details(), unit_type_callable::get_value(), impl_unit_attacks_get(), help::unit_topic_generator::operator()(), gui2::tunit_preview_pane::set_displayed_type(), and ai::default_recruitment::recruitment::simulate_attack().
|
inline |
The id of the original type from which this (variation) descended.
Definition at line 119 of file types.hpp.
References base_id_.
Referenced by unit::apply_builtin_effect(), battle_context_unit_stats::battle_context_unit_stats(), basic_unit_filter_impl::internal_matches_filter(), statistics::recruit_unit(), actions::undo::recruit_action::redo(), statistics::un_recruit_unit(), actions::undo::recruit_action::write(), and unit::write().
|
inline |
Definition at line 141 of file types.hpp.
References profile_.
Referenced by unit::advance_to(), and help::unit_topic_generator::operator()().
void unit_type::build | ( | BUILD_STATUS | status, |
const movement_type_map & | movement_types, | ||
const race_map & | races, | ||
const config::const_child_itors & | traits | ||
) |
Performs a build of this to the indicated stage.
Definition at line 405 of file types.cpp.
References build_created(), build_full(), build_help_index(), CREATED, DBG_UT, ERR_UT, FULL, HELP_INDEXED, log_id(), NOT_BUILT, and VARIATIONS.
Referenced by build(), and unit_type_data::build_unit_type().
|
inline |
|
private |
Load the most needed data into an empty unit_type (build to CREATE).
This creates the gender-specific types (if needed) and also defines how much experience is needed to advance as well as what this advances to.
Definition at line 365 of file types.cpp.
References advances_to_, build_created(), build_status_, cfg_, config::child(), CREATED, DBG_UT, debug_id_, experience_needed_, gender_types_, i, id_, log_id(), utils::split(), and unit_type().
Referenced by build(), build_created(), and build_help_index().
|
private |
Load data into an empty unit_type (build to FULL).
Definition at line 179 of file types.cpp.
References config::add_child(), game_config::add_color_info(), unit_race::additional_traits(), alignment_, alpha_, build_full(), build_help_index(), build_status_, cfg_, config::child_range(), config::clear(), config::attribute_value::empty(), ftofxp, FULL, gender_types_, game_config::hp_bar_scaling, hp_bar_scaling_, i, level_, unit_race::null_race, possible_traits_, race_, config::attribute_value::to_double(), unit_race::undead_variation(), undead_variation_, unit_race::uses_global_traits(), variations_, game_config::xp_bar_scaling, xp_bar_scaling_, and zoc_.
Referenced by build(), and build_full().
|
private |
Partially load data into an empty unit_type (build to HELP_INDEXED).
Definition at line 243 of file types.cpp.
References abilities_, ability_tooltips_, config::add_child(), adjust_profile(), adv_abilities_, adv_ability_tooltips_, alignment_, config::all_children_range(), base_id_, build_created(), build_help_index(), build_status_, cfg_, config::child(), config::child_range(), cost_, DBG_UT, debug_id_, description_, config::attribute_value::empty(), g, gender_types_, genders(), genders_, HELP_INDEXED, hide_help_, hitpoints_, i, icon_, id_, image_, jamming_, level_, unit_race::MALE, max_attacks_, movetype::merge(), movement_, movement_type_, unit_race::null_race, unit_race::num_traits(), num_traits_, possible_traits_, profile_, race_, recall_cost_, small_profile_, utils::split(), string_gender(), config::attribute_value::t_str(), type_name_, undead_variation_, unit_type(), usage_, variations_, and vision_.
Referenced by build(), build_full(), and build_help_index().
|
private |
Generates (and returns) a trimmed config suitable for use with units.
Definition at line 756 of file types.cpp.
References config::append_attributes(), built_unit_cfg_, cfg_, config::empty(), config::remove_attribute(), and unit_cfg_.
Referenced by get_cfg_for_units().
|
inline |
Definition at line 173 of file types.hpp.
References advances_to_.
Referenced by dialogs::unit_types_preview_pane::get_details(), and help::unit_topic_generator::operator()().
|
static |
Definition at line 1292 of file types.cpp.
References ERR_UT, error(), pos, and schema_validation::valid.
Referenced by get_unit_type(), and unit_type().
|
inline |
Definition at line 134 of file types.hpp.
References cost_.
Referenced by unit::advance_to(), ai::default_recruitment::recruitment::compare_unit_types(), events::menu_handler::do_recruit(), ai::default_recruitment::recruitment::get_appropriate_recall(), ai::default_recruitment::recruitment::get_cheapest_unit_cost_for_leader(), unit_type_callable::get_value(), impl_unit_type_get(), team::minimum_recruit_price(), help::unit_topic_generator::operator()(), actions::recruit_unit(), ai::simulated_recruit(), statistics::sum_cost_str_int_map(), SYNCED_COMMAND_HANDLER_FUNCTION(), ai::recruit_result::test_enough_gold(), and actions::undo::recruit_action::undo().
|
inline |
Definition at line 135 of file types.hpp.
References default_variation_.
|
inline |
Definition at line 220 of file types.hpp.
References do_not_list_.
|
inline |
|
inline |
Definition at line 191 of file types.hpp.
References cfg_, and config::child_range().
Referenced by unit::advance_to().
int unit_type::experience_needed | ( | bool | with_acceleration = true | ) | const |
Definition at line 514 of file types.cpp.
References experience_needed_.
Referenced by unit::advance_to(), battle_context_unit_stats::battle_context_unit_stats(), dialogs::unit_types_preview_pane::get_details(), unit_type_callable::get_value(), impl_unit_type_get(), help::unit_topic_generator::operator()(), and gui2::tunit_preview_pane::set_displayed_type().
|
inline |
Definition at line 147 of file types.hpp.
References flag_rgb_.
Referenced by unit::advance_to(), mp::wait::leader_preview_pane::draw_contents(), editor::unit_palette::draw_item(), mp::wait::generate_menu(), dialogs::unit_types_preview_pane::get_details(), help::unit_topic_generator::operator()(), ng::flg_manager::reset_gender_combo(), ng::flg_manager::reset_leader_combo(), gui2::tunit_preview_pane::set_displayed_type(), and editor::mouse_action_unit::set_unit_mouse_overlay().
|
inline |
The returned vector will not be empty, provided this has been built to the HELP_INDEXED status.
Definition at line 198 of file types.hpp.
References genders_.
Referenced by build_help_index(), help::generate_faction_topics(), generate_gender(), help::generate_unit_topics(), dialogs::unit_types_preview_pane::get_details(), help::unit_topic_generator::operator()(), gui2::tunit_preview_pane::set_displayed_type(), editor::mouse_action_unit::up_left(), and ng::flg_manager::update_available_genders().
|
inline |
std::vector< std::string > unit_type::get_ability_list | ( | ) | const |
Definition at line 545 of file types.cpp.
References abilities(), config::all_children_range(), cfg_, and config::child().
Referenced by unit_type_callable::get_value(), and impl_unit_type_get().
|
inline |
Definition at line 222 of file types.hpp.
References cfg_.
Referenced by unit_type_data::add_advancement(), impl_unit_type_get(), help::unit_topic_generator::operator()(), and help::show_unit_description().
|
inline |
Returns a trimmed config suitable for use with units.
Definition at line 224 of file types.hpp.
References build_unit_cfg(), built_unit_cfg_, and unit_cfg_.
Referenced by unit::advance_to().
const unit_type & unit_type::get_gender_unit_type | ( | std::string | gender | ) | const |
Definition at line 439 of file types.cpp.
References unit_race::FEMALE, unit_race::MALE, unit_race::s_female, and unit_race::s_male.
Referenced by unit::advance_to(), mp::wait::leader_preview_pane::draw_contents(), mp::wait::generate_menu(), help::unit_topic_generator::operator()(), and ng::flg_manager::reset_gender_combo().
const unit_type & unit_type::get_gender_unit_type | ( | unit_race::GENDER | gender | ) | const |
Definition at line 446 of file types.cpp.
References gender_types_, and i.
const unit_type & unit_type::get_variation | ( | const std::string & | id | ) | const |
Definition at line 457 of file types.cpp.
References i, and variations_.
Referenced by unit::advance_to(), help::generate_unit_sections(), and help::unit_topic_generator::operator()().
|
inline |
bool unit_type::has_ability_by_id | ( | const std::string & | ability | ) | const |
Definition at line 533 of file types.cpp.
References cfg_, and config::child().
bool unit_type::has_random_traits | ( | ) | const |
Definition at line 713 of file types.cpp.
References config::attribute_value::blank(), num_traits(), possible_traits(), and config::attribute_value::str().
bool unit_type::has_variation | ( | const std::string & | variation_id | ) | const |
variation_id | The id of the variation we search for. |
Definition at line 736 of file types.cpp.
References variations_.
Referenced by basic_unit_filter_impl::internal_matches_filter().
|
inline |
bool unit_type::hide_help | ( | ) | const |
Definition at line 561 of file types.cpp.
References unit_type_data::hide_help(), hide_help_, unit_race::id(), id_, race_, and unit_types.
Referenced by help::generate_ability_topics(), help::generate_races_sections(), help::generate_unit_sections(), help::generate_unit_topics(), help::generate_weapon_special_topics(), help::make_unit_link(), help::unit_topic_generator::operator()(), and help::show_unit_description().
|
inline |
Definition at line 123 of file types.hpp.
References hitpoints_.
Referenced by unit::advance_to(), battle_context_unit_stats::battle_context_unit_stats(), ai::default_recruitment::recruitment::compare_unit_types(), ai::default_recruitment::recruitment::do_combat_analysis(), ai::default_recruitment::attack_simulation::get_avg_hp_of_combatant(), dialogs::unit_types_preview_pane::get_details(), unit_type_callable::get_value(), impl_unit_type_get(), help::unit_topic_generator::operator()(), gui2::tunit_preview_pane::set_displayed_type(), and ai::default_recruitment::recruitment::simulate_attack().
|
inline |
Definition at line 124 of file types.hpp.
References hp_bar_scaling_.
Referenced by unit::advance_to().
|
inline |
Definition at line 139 of file types.hpp.
References icon_.
Referenced by unit::absolute_image(), unit::default_anim_image(), gui2::tunit_preview_pane::set_displayed_type(), and unit::write().
|
inline |
The id for this unit_type.
Definition at line 115 of file types.hpp.
References id_.
Referenced by unit::advance_to(), help::description_type(), unit_type_callable::do_compare(), ai::recruit_result::do_execute(), events::menu_handler::do_recruit(), help::generate_ability_topics(), help::generate_unit_sections(), help::generate_unit_topics(), help::generate_weapon_special_topics(), editor::unit_palette::get_id(), unit_type_callable::get_value(), impl_unit_type_get(), help::make_unit_link(), musthave_status(), help::unit_topic_generator::operator()(), ai::default_recruitment::recruitment::recruit_matches_type(), gui2::tunit_preview_pane::set_displayed_type(), help::show_unit_description(), unit::type_id(), and editor::mouse_action_unit::up_left().
|
inline |
Definition at line 138 of file types.hpp.
References image_.
Referenced by unit::absolute_image(), unit::default_anim_image(), mp::wait::leader_preview_pane::draw_contents(), editor::unit_palette::draw_item(), mp::wait::generate_menu(), dialogs::unit_types_preview_pane::get_details(), help::unit_topic_generator::operator()(), ng::flg_manager::reset_gender_combo(), ng::flg_manager::reset_leader_combo(), gui2::tunit_preview_pane::set_displayed_type(), editor::mouse_action_unit::set_unit_mouse_overlay(), and unit::write().
|
inline |
Definition at line 132 of file types.hpp.
References jamming_.
Referenced by unit::advance_to(), and help::unit_topic_generator::operator()().
|
inline |
Definition at line 126 of file types.hpp.
References level_.
Referenced by unit::advance_to(), battle_context_unit_stats::battle_context_unit_stats(), dialogs::unit_types_preview_pane::get_details(), unit_type_callable::get_value(), impl_unit_type_get(), help::unit_topic_generator::operator()(), ai::default_recruitment::recruitment::recruit_matches_type(), and gui2::tunit_preview_pane::set_displayed_type().
|
inline |
A variant on id() that is more descriptive, for use with message logging.
Definition at line 117 of file types.hpp.
References debug_id_, and id_.
Referenced by add_advancement(), unit_type_data::add_advancement(), unit::advances_to_translated(), build(), build_created(), and unit::generate_traits().
|
inline |
Definition at line 154 of file types.hpp.
References alignment_.
|
inline |
Definition at line 133 of file types.hpp.
References max_attacks_.
Referenced by unit::advance_to().
|
inline |
Definition at line 100 of file types.hpp.
References cfg_, and config::child_range().
Referenced by dialogs::unit_types_preview_pane::get_details().
|
inline |
Definition at line 128 of file types.hpp.
References movement_.
Referenced by unit::advance_to(), dialogs::unit_types_preview_pane::get_details(), unit_type_callable::get_value(), impl_unit_type_get(), help::unit_topic_generator::operator()(), gui2::tunit_preview_pane::set_displayed_type(), and vision().
|
inline |
Definition at line 150 of file types.hpp.
References movement_type_.
Referenced by unit::advance_to(), ai::default_recruitment::recruitment::get_average_defense(), help::unit_topic_generator::operator()(), and ai::default_recruitment::recruitment::update_average_local_cost().
bool unit_type::musthave_status | ( | const std::string & | status | ) | const |
Definition at line 669 of file types.cpp.
References config::child_range(), gui2::event::find(), id(), possible_traits(), and utils::split().
Referenced by battle_context_unit_stats::battle_context_unit_stats(), and unit_type_callable::get_value().
|
inline |
Definition at line 109 of file types.hpp.
References num_traits_.
Referenced by unit::generate_traits(), has_random_traits(), and help::unit_topic_generator::operator()().
|
inline |
Definition at line 182 of file types.hpp.
References config::child_range(), and possible_traits_.
Referenced by unit::generate_traits(), dialogs::unit_types_preview_pane::get_details(), unit_type_callable::get_value(), has_random_traits(), impl_unit_type_get(), musthave_status(), help::unit_topic_generator::operator()(), and gui2::tunit_preview_pane::set_displayed_type().
|
inline |
Never returns nullptr, but may point to the null race.
Requires building to the HELP_INDEXED status to get the correct race.
Definition at line 218 of file types.hpp.
References race_.
Referenced by unit::advance_to(), dialogs::unit_types_preview_pane::get_details(), help::unit_topic_generator::operator()(), and gui2::tunit_preview_pane::set_displayed_type().
|
inline |
Returns the ID of this type's race without the need to build the type.
Definition at line 215 of file types.hpp.
References cfg_.
Referenced by help::generate_faction_topics(), help::generate_races_sections(), help::generate_unit_sections(), help::generate_unit_topics(), unit_type_callable::get_value(), impl_unit_type_get(), help::unit_topic_generator::operator()(), and gui2::tunit_preview_pane::set_displayed_type().
|
inline |
Definition at line 127 of file types.hpp.
References recall_cost_.
Referenced by unit::advance_to(), unit_type_callable::get_value(), and impl_unit_type_get().
int unit_type::resistance_against | ( | const std::string & | damage_name, |
bool | attacker | ||
) | const |
Gets resistance while considering custom WML abilities.
Attention: Filters in resistance-abilities will be ignored.
Definition at line 777 of file types.cpp.
References abilities(), cfg_, config::child(), unit_ability_list::empty(), unit_abilities::effect::get_composite_value(), unit_ability_list::highest(), movement_type_, map_location::null_location(), unit_ability_list::push_back(), movetype::resistance_against(), and resistance_filter_matches().
Referenced by battle_context_unit_stats::battle_context_unit_stats().
|
private |
Identical to unit::resistance_filter_matches.
Definition at line 800 of file types.cpp.
References unit_abilities::filter_base_matches(), gui2::event::find(), and utils::split().
Referenced by resistance_against().
bool unit_type::show_variations_in_help | ( | ) | const |
Whether the unit type has at least one help-visible variation.
Definition at line 741 of file types.cpp.
References variations_.
Referenced by help::generate_unit_sections(), help::generate_unit_topics(), help::generate_weapon_special_topics(), help::make_unit_link(), help::unit_topic_generator::operator()(), help::show_unit_description(), and unit_type().
|
inline |
Definition at line 140 of file types.hpp.
References small_profile_.
Referenced by unit::advance_to(), and help::unit_topic_generator::operator()().
|
inline |
The name of the unit in the current language setting.
Definition at line 112 of file types.hpp.
References type_name_.
Referenced by unit::advance_to(), unit::advances_to_translated(), mp::wait::leader_preview_pane::draw_contents(), editor::unit_palette::draw_item(), help::generate_ability_topics(), mp::wait::generate_menu(), help::generate_unit_sections(), help::generate_unit_topics(), help::generate_weapon_special_topics(), dialogs::unit_types_preview_pane::get_details(), editor::unit_palette::get_help_string(), unit_type_callable::get_value(), impl_unit_type_get(), help::make_unit_link(), help::unit_topic_generator::operator()(), ng::flg_manager::reset_leader_combo(), gui2::tunit_preview_pane::set_displayed_type(), and ai::simulated_recruit().
|
inline |
Info on the type of unit that the unit reanimates as.
Definition at line 107 of file types.hpp.
References undead_variation_.
Referenced by unit::advance_to(), and battle_context_unit_stats::battle_context_unit_stats().
t_string unit_type::unit_description | ( | ) | const |
Definition at line 467 of file types.cpp.
References _(), description_, and t_string::empty().
Referenced by unit::advance_to(), and help::unit_topic_generator::operator()().
|
inline |
Definition at line 137 of file types.hpp.
References usage_.
Referenced by unit::advance_to(), unit_type_callable::get_value(), and ai::default_recruitment::recruitment::recruit_matches_type().
|
inline |
Definition at line 136 of file types.hpp.
References variation_name_.
Referenced by help::generate_unit_sections(), and help::unit_topic_generator::operator()().
std::vector< std::string > unit_type::variations | ( | ) | const |
Definition at line 726 of file types.cpp.
References variations_.
Referenced by help::generate_unit_sections(), and help::unit_topic_generator::operator()().
|
inline |
Definition at line 129 of file types.hpp.
References movement(), and vision_.
Referenced by unit::advance_to(), and help::unit_topic_generator::operator()().
|
inline |
|
inline |
Definition at line 125 of file types.hpp.
References xp_bar_scaling_.
Referenced by unit::advance_to().
|
private |
Definition at line 281 of file types.hpp.
Referenced by abilities(), and build_help_index().
|
private |
Definition at line 282 of file types.hpp.
Referenced by ability_tooltips(), and build_help_index().
|
private |
Definition at line 281 of file types.hpp.
Referenced by adv_abilities(), and build_help_index().
|
private |
Definition at line 282 of file types.hpp.
Referenced by adv_ability_tooltips(), and build_help_index().
|
private |
Definition at line 286 of file types.hpp.
Referenced by add_advancement(), advances_to(), build_created(), and can_advance().
|
private |
Definition at line 291 of file types.hpp.
Referenced by build_full(), build_help_index(), and MAKE_ENUM().
|
private |
Never nullptr, but may point to the null race.
Definition at line 279 of file types.hpp.
Referenced by alpha(), and build_full().
|
mutableprivate |
Definition at line 300 of file types.hpp.
Referenced by animations().
|
private |
A suffix for id_, used when logging messages.
Definition at line 247 of file types.hpp.
Referenced by base_id(), build_help_index(), and unit_type().
|
private |
Definition at line 302 of file types.hpp.
Referenced by build_created(), build_full(), and build_help_index().
|
mutableprivate |
Generated as needed via get_cfg_for_units().
Definition at line 243 of file types.hpp.
Referenced by build_unit_cfg(), and get_cfg_for_units().
|
private |
Definition at line 241 of file types.hpp.
Referenced by abilities_cfg(), add_advancement(), advancements(), animations(), attacks(), build_created(), build_full(), build_help_index(), build_unit_cfg(), ellipse(), events(), generate_name(), get_ability_list(), get_cfg(), halo(), has_ability_by_id(), modification_advancements(), race_id(), and resistance_against().
|
private |
Definition at line 258 of file types.hpp.
Referenced by build_help_index(), and cost().
|
private |
Definition at line 246 of file types.hpp.
Referenced by build_created(), build_help_index(), and log_id().
|
private |
Definition at line 274 of file types.hpp.
Referenced by default_variation().
|
private |
Definition at line 249 of file types.hpp.
Referenced by build_help_index(), and unit_description().
|
private |
Definition at line 284 of file types.hpp.
Referenced by do_not_list().
|
private |
Definition at line 287 of file types.hpp.
Referenced by add_advancement(), build_created(), and experience_needed().
|
private |
Definition at line 266 of file types.hpp.
Referenced by flag_rgb().
|
private |
Definition at line 270 of file types.hpp.
Referenced by add_advancement(), build_created(), build_full(), build_help_index(), get_gender_unit_type(), unit_type(), and ~unit_type().
|
private |
Definition at line 297 of file types.hpp.
Referenced by build_help_index(), and genders().
|
private |
Definition at line 284 of file types.hpp.
Referenced by build_help_index(), and hide_help().
|
private |
Definition at line 250 of file types.hpp.
Referenced by build_help_index(), and hitpoints().
|
private |
Definition at line 251 of file types.hpp.
Referenced by build_full(), and hp_bar_scaling().
|
private |
Definition at line 263 of file types.hpp.
Referenced by build_help_index(), and icon().
|
private |
Definition at line 245 of file types.hpp.
Referenced by add_advancement(), advancement_tree(), advances_from(), build_created(), build_help_index(), hide_help(), id(), log_id(), and unit_type().
|
private |
Definition at line 262 of file types.hpp.
Referenced by build_help_index(), and image().
|
private |
Definition at line 288 of file types.hpp.
Referenced by add_advancement().
|
private |
Definition at line 256 of file types.hpp.
Referenced by build_help_index(), and jamming().
|
private |
Definition at line 252 of file types.hpp.
Referenced by build_full(), build_help_index(), and level().
|
private |
Definition at line 257 of file types.hpp.
Referenced by build_help_index(), and max_attacks().
|
private |
Definition at line 254 of file types.hpp.
Referenced by build_help_index(), and movement().
|
private |
Definition at line 293 of file types.hpp.
Referenced by build_help_index(), movement_type(), and resistance_against().
|
private |
Definition at line 268 of file types.hpp.
Referenced by build_help_index(), and num_traits().
|
private |
Definition at line 295 of file types.hpp.
Referenced by build_full(), build_help_index(), and possible_traits().
|
private |
Definition at line 265 of file types.hpp.
Referenced by big_profile(), and build_help_index().
|
private |
Definition at line 277 of file types.hpp.
Referenced by build_full(), build_help_index(), hide_help(), and race().
|
private |
Definition at line 253 of file types.hpp.
Referenced by build_help_index(), and recall_cost().
|
private |
Definition at line 264 of file types.hpp.
Referenced by build_help_index(), and small_profile().
|
private |
The id of the top ancestor of this unit_type.
Definition at line 248 of file types.hpp.
Referenced by build_help_index(), and type_name().
|
private |
Definition at line 260 of file types.hpp.
Referenced by build_full(), build_help_index(), and undead_variation().
|
mutableprivate |
Definition at line 242 of file types.hpp.
Referenced by build_unit_cfg(), and get_cfg_for_units().
|
private |
Definition at line 259 of file types.hpp.
Referenced by build_help_index(), and usage().
|
private |
Definition at line 275 of file types.hpp.
Referenced by variation_name().
|
private |
Definition at line 273 of file types.hpp.
Referenced by add_advancement(), build_full(), build_help_index(), get_variation(), has_variation(), show_variations_in_help(), unit_type(), variations(), and ~unit_type().
|
private |
Definition at line 255 of file types.hpp.
Referenced by build_help_index(), and vision().
|
private |
Definition at line 251 of file types.hpp.
Referenced by build_full(), and xp_bar_scaling().
|
private |
Definition at line 284 of file types.hpp.
Referenced by build_full(), and has_zoc().