summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-11-21 21:06:03 -0500
committermekolat <mekolat@users.noreply.github.com>2015-11-21 21:06:03 -0500
commit5c0af2dba65a391a08e8a6cc1a94777a662a00d3 (patch)
tree4a9d62103c6e690505c7bf0f14b92eee5d96350e
parent17396e31fede09db15c805783748b1835d8ac3cb (diff)
parentc4db3bcaf7b47a8c3d92e81c9945b80713c3d60a (diff)
downloadtools-5c0af2dba65a391a08e8a6cc1a94777a662a00d3.tar.gz
tools-5c0af2dba65a391a08e8a6cc1a94777a662a00d3.tar.bz2
tools-5c0af2dba65a391a08e8a6cc1a94777a662a00d3.tar.xz
tools-5c0af2dba65a391a08e8a6cc1a94777a662a00d3.zip
Merge pull request #19 from mekolat/warps
do not use warp names
-rwxr-xr-xtmx_converter.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/tmx_converter.py b/tmx_converter.py
index 676a2fe..9ddeaad 100755
--- a/tmx_converter.py
+++ b/tmx_converter.py
@@ -133,7 +133,6 @@ class ContentHandler(xml.sax.ContentHandler):
self.imports = imports
self.object = None
self.mob_ids = set()
- self.name_unique = 0;
def setDocumentLocator(self, loc):
self.locator = loc
@@ -266,19 +265,13 @@ class ContentHandler(xml.sax.ContentHandler):
])
)
elif isinstance(obj, Warp):
- obj_name = obj.name[:15]
- if obj.name != obj_name:
- print('Warning: warp name truncated: %r -> %r' % (obj.name, obj_name))
- obj_name += "#%s%d" % (self.base,self.name_unique)
self.warps.write(
SEPARATOR.join([
'%s,%d,%d' % (self.base, obj.x, obj.y),
'warp',
- obj_name,
'%d,%d,%s,%d,%d\n' % (obj.w, obj.h, obj.dest_map, obj.dest_tile_x, obj.dest_tile_y),
])
)
- self.name_unique += 1
if name == u'data':
if self.state is State.DATA: