Skip to content

Commit

Permalink
wmllint: Only parse terrain strings if maptype==map
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion authored and Elvish-Hunter committed Feb 2, 2021
1 parent 5735a16 commit 5826262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/tools/wmllint
Expand Up @@ -2871,8 +2871,8 @@ def translator(filename, mapxforms, textxform):
else:
fields = [x for x in line]
outmap.append(fields)
terrain_strings = (f.split()[-1] for f in fields)
if not maskwarn and maptype == 'map':
terrain_strings = (f.split()[-1] for f in fields)
if any(re.search('_s|_f(?!me)', t) for t in terrain_strings):
print('"%s", line %d: warning, fog or shroud in map file' \
% (filename, lineno+1))
Expand Down

0 comments on commit 5826262

Please sign in to comment.