moves alignment_str() to header and correct documentation

This commit is contained in:
newfrenchy83 2024-10-21 17:46:19 +02:00 committed by Pentarctagon
parent 8b0909b24c
commit 82cc6d979d
2 changed files with 2 additions and 7 deletions

View file

@ -82,11 +82,6 @@ attack_type::attack_type(const config& cfg)
}
}
std::string attack_type::alignment_str() const
{
return alignment_ ? unit_alignments::get_string(*alignment()) : "";
}
std::string attack_type::accuracy_parry_description() const
{
if(accuracy_ == 0 && parry_ == 0) {

View file

@ -87,12 +87,12 @@ public:
std::string weapon_specials() const;
std::string weapon_specials_value(const std::set<std::string> checking_tags) const;
/** Returns alignment specified by alignment_str_ variable If empty or not valid returns the unit's alignment or neutral if self_ variable empty.
/** Returns alignment specified by alignment_ variable.
*/
utils::optional<unit_alignments::type> alignment() const { return alignment_; }
/** Returns alignment specified by alignment() for filtering when exist.
*/
std::string alignment_str() const;
std::string alignment_str() const { return alignment_ ? unit_alignments::get_string(*alignment_) : ""; }
/** Calculates the number of attacks this weapon has, considering specials. */
void modified_attacks(unsigned & min_attacks,