diff options
author | gumi <git@gumi.ca> | 2018-03-03 13:38:36 -0500 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-03-03 13:38:36 -0500 |
commit | 6d424594e01d129f3c219190310a9535032ab593 (patch) | |
tree | 0255507f94d314a0e56fcfd316de33e469dd1a22 | |
parent | e6fb3a07714dec721d0216982fcc1ccef68af2c8 (diff) | |
download | tools-6d424594e01d129f3c219190310a9535032ab593.tar.gz tools-6d424594e01d129f3c219190310a9535032ab593.tar.bz2 tools-6d424594e01d129f3c219190310a9535032ab593.tar.xz tools-6d424594e01d129f3c219190310a9535032ab593.zip |
allow the tmx converter to ignore objects
-rwxr-xr-x | tmx_converter.py | 3 |
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 |