Attack Dialog: Show the name_inactive of an inactive weapon special.

Fixes #4352
This commit is contained in:
josteph 2019-09-26 15:54:29 +00:00
parent 2f4c0ae227
commit e306af9ae4

View file

@ -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);