Skip to content

Commit

Permalink
Display number of random traits with the list, and skip if zero.
Browse files Browse the repository at this point in the history
This fixes up an issue with dc4470d
where woses would get a list of traits displayed.
  • Loading branch information
cbeck88 committed Jul 16, 2014
1 parent 241faeb commit ea9a76d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/help.cpp
Expand Up @@ -1519,8 +1519,8 @@ class unit_topic_generator: public topic_generator
// Print the possible traits of the unit, cross-reference them
// to their respective topics.
config::const_child_itors traits = type_.possible_traits();
if (traits.first != traits.second) {
ss << _("Traits: ");
if (traits.first != traits.second && type_.num_traits() > 0) {
ss << _("Traits") << " (" << type_.num_traits() << ") : ";
bool needs_comma = false;
BOOST_FOREACH(const config & trait, traits) {
if (needs_comma)
Expand Down

0 comments on commit ea9a76d

Please sign in to comment.