Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Types Support #184

Open
xivol opened this issue Mar 13, 2024 · 2 comments · May be fixed by #188
Open

Custom Types Support #184

xivol opened this issue Mar 13, 2024 · 2 comments · May be fixed by #188

Comments

@xivol
Copy link

xivol commented Mar 13, 2024

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.

@joereynolds
Copy link

Raise a PR and then others will potentially benefit from it :)

@joereynolds
Copy link

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'

@joereynolds joereynolds linked a pull request Aug 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants