(1.16) remove only_active argument to weapon_specials()
This commit is contained in:
parent
359e4c8270
commit
3fe24cade9
3 changed files with 6 additions and 6 deletions
|
@ -115,9 +115,9 @@ void unit_attack::pre_show(window& window)
|
|||
attacker_itor_->get_location(), false, attacker.weapon
|
||||
);
|
||||
|
||||
std::string attw_specials = attacker_weapon.weapon_specials(true, attacker.backstab_pos);
|
||||
std::string attw_specials = attacker_weapon.weapon_specials(attacker.backstab_pos);
|
||||
bool defender_attack = !(defender_weapon.name().empty() && defender_weapon.damage() == 0 && defender_weapon.num_attacks() == 0 && defender.chance_to_hit == 0);
|
||||
std::string defw_specials = defender_attack ? defender_weapon.weapon_specials(true) : "";
|
||||
std::string defw_specials = defender_attack ? defender_weapon.weapon_specials() : "";
|
||||
|
||||
if(!attw_specials.empty()) {
|
||||
attw_specials = " " + attw_specials;
|
||||
|
|
|
@ -860,7 +860,7 @@ static void add_name(std::string& weapon_abilities, bool active, const config::a
|
|||
* special is active depends on the current context (see set_specials_context)
|
||||
* and the @a is_backstab parameter.
|
||||
*/
|
||||
std::string attack_type::weapon_specials(bool only_active, bool is_backstab) const
|
||||
std::string attack_type::weapon_specials(bool is_backstab) const
|
||||
{
|
||||
//log_scope("weapon_specials");
|
||||
std::string res;
|
||||
|
@ -874,9 +874,9 @@ std::string attack_type::weapon_specials(bool only_active, bool is_backstab) con
|
|||
: default_value(sp.cfg, "name_inactive", "name").str();
|
||||
if (!name.empty()) {
|
||||
if (!res.empty()) res += ", ";
|
||||
if (only_active && !active) res += font::span_color(font::inactive_details_color);
|
||||
if (!active) res += font::span_color(font::inactive_details_color);
|
||||
res += name;
|
||||
if (only_active && !active) res += "</span>";
|
||||
if (!active) res += "</span>";
|
||||
}
|
||||
}
|
||||
std::string weapon_abilities;
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
bool has_special(const std::string& special, bool simple_check=false, bool special_id=true, bool special_tags=true) const;
|
||||
unit_ability_list get_specials(const std::string& special) const;
|
||||
std::vector<std::pair<t_string, t_string>> special_tooltips(boost::dynamic_bitset<>* active_list = nullptr) const;
|
||||
std::string weapon_specials(bool only_active=false, bool is_backstab=false) const;
|
||||
std::string weapon_specials(bool is_backstab=false) const;
|
||||
|
||||
/** Calculates the number of attacks this weapon has, considering specials. */
|
||||
void modified_attacks(bool is_backstab, unsigned & min_attacks,
|
||||
|
|
Loading…
Add table
Reference in a new issue