wmllint: fix minor issue in terrain alias replacements

Also ran wmllint on data/core
This commit is contained in:
Celtic Minstrel 2017-01-20 14:45:49 -05:00
parent 1e9454b6f9
commit a53ba5a1c2
2 changed files with 6 additions and 5 deletions

View file

@ -1809,7 +1809,7 @@ Merfolk and nagas have 60% defense in submerged villages, whereas land based uni
name= _ "Encampment"
editor_name= _ "Aquatic Encampment"
string=Cme
aliasof=Ct,Wwr
aliasof=Ct,Wrt
submerge=0.3
unit_height_adjust=0
recruit_onto=yes
@ -1822,7 +1822,7 @@ Merfolk and nagas have 60% defense in submerged villages, whereas land based uni
name= _ "Castle"
editor_name= _ "Aquatic Castle"
string=Cm
aliasof=Ct,Wwr
aliasof=Ct,Wrt
submerge=0.4
unit_height_adjust=3
recruit_onto=yes
@ -2020,7 +2020,7 @@ Merfolk and nagas have 60% defense in submerged villages, whereas land based uni
name= _ "Encampment Keep"
editor_name= _ "Aquatic Encampment Keep"
string=Kme
aliasof=Ct, Wwr
aliasof=Ct, Wrt
unit_height_adjust=2
recruit_onto=yes
recruit_from=yes
@ -2033,7 +2033,7 @@ Merfolk and nagas have 60% defense in submerged villages, whereas land based uni
name= _ "Keep"
editor_name= _ "Aquatic Keep"
string=Km
aliasof=Ct, Wwr
aliasof=Ct, Wrt
submerge=0.4
unit_height_adjust=10
recruit_onto=yes

View file

@ -2922,7 +2922,8 @@ directory.""")
if match:
aliases = match.group()
for (old, new) in aliaschanges:
aliases = aliases.replace(old, new)
old = r'\b' + old + r'\b'
aliases = re.sub(old, new, aliases)
line = line.replace(match.group(), aliases)
# Perform tag renaming for 1.5. Note: this has to happen before
# the sanity check, which assumes [unit] has already been