Skip to content

Commit

Permalink
Fixed campaign2wiki script not working with the new difficulty syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvish-Hunter committed Jun 22, 2016
1 parent 0b48b77 commit ad5b923
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions data/tools/campaign2wiki.py
Expand Up @@ -26,9 +26,7 @@ def __init__(self, parser):
self.name = self.parser.get_text_val("name")
self.id = self.parser.get_text_val("id")
self.description = self.parser.get_text_val("description")
# Difficulty levels are separated by commas, so there are
# count(',')+1 difficulty levels.
self.levels = self.parser.get_text_val("difficulties").count(',') + 1
self.levels = len(self.parser.get_all(tag="difficulty"))
self.credits_link = "http://wiki.wesnoth.org/Credits#" + self.id
self.units_link = "http://units.wesnoth.org/trunk/mainline/en_US/%s.html" % self.id

Expand Down

0 comments on commit ad5b923

Please sign in to comment.