Skip to content

Commit

Permalink
wmlunits: Do not list abilities without name attributes
Browse files Browse the repository at this point in the history
This reflects the in-game behavior, which is used to build compound
abilities with only one help entry.
  • Loading branch information
irydacea committed Aug 15, 2017
1 parent c603736 commit 7385762
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions data/tools/unit_tree/html_output.py
Expand Up @@ -737,11 +737,13 @@ def get_abilities(self, u):
continue
already[id] = True
name = T(ability, "name")
if not name:
name = id
if not name:
name = ability.name.decode("utf8")
anames.append(name)
# Only add abilities with a label, since those that lack one
# are normally hidden in the game and used to implement more
# complex ones.
if name:
anames.append(name)
return anames

def get_recursive_attacks(self, this_unit):
Expand Down

0 comments on commit 7385762

Please sign in to comment.