pytmx
pytmx copied to clipboard
Custom Types Support
It seems that support for custom types in Tiled Project files is broken. The code is all there for it to work but it doesn't pass the right arguments around.
546 self.parse_json(json.load(open(custom_property_filename))["propertyTypes"])
559 TiledElement._set_properties(self, node, self.custom_types)
1262 p.update(parse_properties(child, self.parent.custom_types))
I fixed it in couple of lines, should we do a PR or can the author just fix it? Idk how community works here.
Raise a PR and then others will potentially benefit from it :)
Just a bump to say this is also happening on custom classes. I imagine they're closely linked.
If I create a custom class type and then run my game, I get
return deepcopy(custom_types[value])
~~~~~~~~~~~~^^^^^^^
KeyError: 'state-returning'