From 6d424594e01d129f3c219190310a9535032ab593 Mon Sep 17 00:00:00 2001 From: gumi Date: Sat, 3 Mar 2018 13:38:36 -0500 Subject: allow the tmx converter to ignore objects --- tmx_converter.py | 3 +++ 1 file changed, 3 insertions(+) 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('' % name) if name == u'object': + if hasattr(self.object, 'ignore'): + return; obj = self.object if isinstance(obj, Mob): mob_id = obj.monster_id -- cgit v1.2.3-70-g09d2