wmllint: Only parse terrain strings if maptype==map

This commit is contained in:
Andrey Bienkowski 2021-01-16 11:54:39 +03:00 committed by Elvish_Hunter
parent 5735a16abf
commit 5826262023

View file

@ -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))