diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-03-12 19:56:13 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-03-12 19:56:13 -0300 |
commit | 6eb5ec084af85d3b27f6c2569d4a1688e70c43fd (patch) | |
tree | 23c4527c74179cf53d3700b7b67e3e7fe156e786 | |
parent | e0fa661d7a5c426d83652a8dc8841e44b8afa7ad (diff) | |
download | tools-6eb5ec084af85d3b27f6c2569d4a1688e70c43fd.tar.gz tools-6eb5ec084af85d3b27f6c2569d4a1688e70c43fd.tar.bz2 tools-6eb5ec084af85d3b27f6c2569d4a1688e70c43fd.tar.xz tools-6eb5ec084af85d3b27f6c2569d4a1688e70c43fd.zip |
testxml: add support for highlightName attribute in groups.xml
-rwxr-xr-x | hercules/tmx_converter.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py index 8638a9c..063fe53 100755 --- a/hercules/tmx_converter.py +++ b/hercules/tmx_converter.py @@ -190,6 +190,7 @@ class ContentHandler(xml.sax.ContentHandler): self.firstgid = int(attr[u'firstgid']) if name == u'layer' and attr[u'name'].lower().startswith(u'height'): + print("HEIGHT LAYER PRESENT") self.width = int(attr[u'width']) self.height = int(attr[u'height']) self.state = State.LAYER @@ -262,6 +263,9 @@ class ContentHandler(xml.sax.ContentHandler): except ValueError: pass setattr(obj, key, value) + else: + print(str(self.state)) + def add_warp_line(self, line): self.warps.write(line) @@ -309,6 +313,7 @@ class ContentHandler(xml.sax.ContentHandler): elif isinstance(obj, Warp): if (obj.npc_id == u'WARP'): obj_name = "#%s_%s_%s" % (self.base, obj.x, obj.y) + print("its a warp: %s" % obj_name) y_offset = int(self.heightmap[((obj.y * self.width) + obj.x)])/2 self.warps.write( SEPARATOR.join([ |