diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-01 23:37:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-01 23:37:35 +0300 |
commit | 070707ab15b7b9fb13837c3e36e60dfdb1037067 (patch) | |
tree | 59017b13cad648a70076b2dbf46450234d795591 | |
parent | df0709d6ce8be17304ae80aaea46e6589d84dc12 (diff) | |
download | evol-tools-070707ab15b7b9fb13837c3e36e60dfdb1037067.tar.gz evol-tools-070707ab15b7b9fb13837c3e36e60dfdb1037067.tar.bz2 evol-tools-070707ab15b7b9fb13837c3e36e60dfdb1037067.tar.xz evol-tools-070707ab15b7b9fb13837c3e36e60dfdb1037067.zip |
textxml: fix false positive errors with 'attack' action in sprites.
Also check 'attack' action for actions with all hp.
-rwxr-xr-x | testxml/testxml.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py index 3162d40..497d9f5 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -598,6 +598,7 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser else: actset = set() frameSet = set() + hpSet = set() for action in actions: try: name = action.attributes["name"].value @@ -607,7 +608,7 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser try: hp = action.attributes["hp"].value except: - hp = "" + hp = "100" try: setname = action.attributes["imageset"].value except: @@ -623,6 +624,7 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser showMsgSprite(fileLoc, "duplicate action: " + name, iserr) continue actset.add(name + "|" + hp) + hpSet.add(hp) if len(frameSet) > 0: errIds = "" @@ -635,9 +637,10 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser if silent != True: showMsgSprite(fileLoc, "unused frames: " + errIds[0:len(errIds)-1], False) - if checkAction != "" and checkAction not in actset: - if silent != True: - showMsgSprite(fileLoc, "no attack action '" + checkAction + "' in sprite", iserr) + if checkAction != "": + for hp in hpSet: + if checkAction + "|" + hp not in actset: + showMsgSprite(fileLoc, "no attack action '" + checkAction + "' in sprite", iserr) def testSpriteAction(file, name, action, numframes, iserr): |