diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-03 21:06:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-03 21:06:43 +0300 |
commit | ed749ce280bf3b2d2f88fc97105cf117e1483060 (patch) | |
tree | 755fb4c3f53fc0f1285ea5f468ea3dd11b142e75 /testxml/testxml.py | |
parent | 575a168de27749e663d9fb122d7efbc4221060ba (diff) | |
download | evol-tools-ed749ce280bf3b2d2f88fc97105cf117e1483060.tar.gz evol-tools-ed749ce280bf3b2d2f88fc97105cf117e1483060.tar.bz2 evol-tools-ed749ce280bf3b2d2f88fc97105cf117e1483060.tar.xz evol-tools-ed749ce280bf3b2d2f88fc97105cf117e1483060.zip |
testxml: add check for tsx files
testxml: add partial support for extern tilesets.
Diffstat (limited to 'testxml/testxml.py')
-rwxr-xr-x | testxml/testxml.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py index 650785c..99bf386 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -16,7 +16,7 @@ from xml.dom import minidom from PIL import Image import zlib -filt = re.compile(".+[.](xml|tmx)", re.IGNORECASE) +filt = re.compile(".+[.](xml|tmx|tsx)", re.IGNORECASE) filtmaps = re.compile(".+[.]tmx", re.IGNORECASE) filtimages = re.compile(".+[.]png", re.IGNORECASE) filtxmls = re.compile(".+[.]xml", re.IGNORECASE) @@ -1216,6 +1216,17 @@ def testMap(file, path): tilesMap = dict() for tileset in dom.getElementsByTagName("tileset"): + try: + source = tileset.attributes["source"].value + if source is not None and source != "": + file2 = os.path.abspath(parentDir + os.path.sep + mapsDir + source) + if not os.path.isfile(file2): + showMsgFile(file, "missing source file in tileset " + source, True) + + continue; + except: + None + name = readAttr(tileset, "name", "", "warning: missing tile name: " + file, False) tileWidth = readAttrI(tileset, "tilewidth", mapTileWidth, \ "error: missing tile width in tileset: " + name + ", " + file, True) |