Attack Dialog: Show the name_inactive of an inactive weapon special.
Fixes #4352
This commit is contained in:
parent
2f4c0ae227
commit
e306af9ae4
1 changed files with 4 additions and 1 deletions
|
@ -760,7 +760,10 @@ std::string attack_type::weapon_specials(bool only_active, bool is_backstab) con
|
|||
{
|
||||
const bool active = special_active(sp.cfg, AFFECT_EITHER, sp.key, is_backstab);
|
||||
|
||||
const std::string& name = sp.cfg["name"].str();
|
||||
const std::string& name =
|
||||
active
|
||||
? sp.cfg["name"].str()
|
||||
: 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue