summaryrefslogtreecommitdiff
path: root/tmx_converter.py
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-03-03 13:38:36 -0500
committergumi <git@gumi.ca>2018-03-03 13:38:36 -0500
commit6d424594e01d129f3c219190310a9535032ab593 (patch)
tree0255507f94d314a0e56fcfd316de33e469dd1a22 /tmx_converter.py
parente6fb3a07714dec721d0216982fcc1ccef68af2c8 (diff)
downloadtools-6d424594e01d129f3c219190310a9535032ab593.tar.gz
tools-6d424594e01d129f3c219190310a9535032ab593.tar.bz2
tools-6d424594e01d129f3c219190310a9535032ab593.tar.xz
tools-6d424594e01d129f3c219190310a9535032ab593.zip
allow the tmx converter to ignore objects
Diffstat (limited to 'tmx_converter.py')
-rwxr-xr-xtmx_converter.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmx_converter.py b/tmx_converter.py
index 0e60134..c6b4e52 100755
--- a/tmx_converter.py
+++ b/tmx_converter.py
@@ -76,6 +76,7 @@ class Object(object):
#'map',
'x', 'y',
'w', 'h',
+ 'ignore',
)
class Mob(Object):
__slots__ = (
@@ -264,6 +265,8 @@ class ContentHandler(xml.sax.ContentHandler):
print('</%s>' % name)
if name == u'object':
+ if hasattr(self.object, 'ignore'):
+ return;
obj = self.object
if isinstance(obj, Mob):
mob_id = obj.monster_id