mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 19:23:25 +00:00
Fix a regexp bug that was preventing proper map translation.
This commit is contained in:
parent
f5c2c236f6
commit
1acda064cf
@ -369,9 +369,9 @@ def maptransform1(input, baseline, inmap, y):
|
|||||||
|
|
||||||
# 1.3.1 -> 1.3.2 terrain conversions
|
# 1.3.1 -> 1.3.2 terrain conversions
|
||||||
conversion2 = {
|
conversion2 = {
|
||||||
re.compile(r"(?<!\^)Bww([|/\\])\b") : "Ww^Bw\\1",
|
re.compile(r"(?<!\^)Bww([|/\\])") : "Ww^Bw\\1",
|
||||||
re.compile(r"(?<!\^)Bwo([|/\\])\b") : "Wo^Bw\\1",
|
re.compile(r"(?<!\^)Bwo([|/\\])") : "Wo^Bw\\1",
|
||||||
re.compile(r"(?<!\^)Bss([|/\\])\b") : "Ss^Bw\\1",
|
re.compile(r"(?<!\^)Bss([|/\\])") : "Ss^Bw\\1",
|
||||||
re.compile(r"(?<!\^)Dc\b") : "Dd^Dc",
|
re.compile(r"(?<!\^)Dc\b") : "Dd^Dc",
|
||||||
re.compile(r"(?<!\^)Dr\b") : "Dd^Dr",
|
re.compile(r"(?<!\^)Dr\b") : "Dd^Dr",
|
||||||
re.compile(r"(?<!\^)Do\b") : "Dd^Do",
|
re.compile(r"(?<!\^)Do\b") : "Dd^Do",
|
||||||
@ -404,7 +404,6 @@ conversion2 = {
|
|||||||
def maptransform2(input, baseline, inmap, y):
|
def maptransform2(input, baseline, inmap, y):
|
||||||
"Convert a map line from 1.3.1 multiletter format to 1.3.2 format."
|
"Convert a map line from 1.3.1 multiletter format to 1.3.2 format."
|
||||||
mapline = inmap[y]
|
mapline = inmap[y]
|
||||||
print "Called on:", mapline
|
|
||||||
for (old, new) in conversion2.items():
|
for (old, new) in conversion2.items():
|
||||||
mapline = old.sub(new, mapline)
|
mapline = old.sub(new, mapline)
|
||||||
return mapline
|
return mapline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user