Attack Enemy: Inactive weapon specials are now shown muted, rather than elided altogether.
This commit is contained in:
parent
e569d896d8
commit
3c9f425a6c
1 changed files with 4 additions and 2 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "display.hpp"
|
||||
#include "display_context.hpp"
|
||||
#include "font/text_formatting.hpp"
|
||||
#include "game_board.hpp"
|
||||
#include "lexical_cast.hpp"
|
||||
#include "log.hpp"
|
||||
|
@ -705,13 +706,14 @@ std::string attack_type::weapon_specials(bool only_active, bool is_backstab) con
|
|||
std::string res;
|
||||
for (const config::any_child &sp : specials_.all_children_range())
|
||||
{
|
||||
if ( only_active && !special_active(sp.cfg, AFFECT_EITHER, is_backstab) )
|
||||
continue;
|
||||
const bool active = special_active(sp.cfg, AFFECT_EITHER, is_backstab);
|
||||
|
||||
const std::string& name = sp.cfg["name"].str();
|
||||
if (!name.empty()) {
|
||||
if (!res.empty()) res += ", ";
|
||||
if (only_active && !active) res += font::span_color(font::inactive_details_color);
|
||||
res += name;
|
||||
if (only_active && !active) res += "</span>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue