From 0d0ce339f9adbcc88e8477b2ac32f61620acf6d3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Aug 2012 21:16:18 +0300 Subject: testxml: add check for last attack tag. --- testxml/testxml.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'testxml/testxml.py') diff --git a/testxml/testxml.py b/testxml/testxml.py index 23b3ad5..3340db5 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -619,7 +619,8 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser def testSpriteAction(file, name, action, numframes, iserr): framesid = set() - + + lastAttack = None try: animations = action.getElementsByTagName("animation") except: @@ -653,6 +654,9 @@ def testSpriteAction(file, name, action, numframes, iserr): labels = set() for node2 in animation.childNodes: + if name == "attack" and node2.nodeName != "#text": + lastAttack = node2.nodeName + if node2.nodeName in delayTags: try: delay = int(node2.attributes["delay"].value) @@ -862,6 +866,10 @@ def testSpriteAction(file, name, action, numframes, iserr): if delay > 0 and delay < 5000: showMsgSprite(file, "last frame\sequence in dead animation have to low limit. Need zero or >5000: " + name, False) + elif name == "attack": + if lastAttack is not None and lastAttack != "end": + showMsgSprite(file, "last attack tag should be or attack animation can be infinite.", False) + return framesid -- cgit v1.2.3-60-g2f50