-
Notifications
You must be signed in to change notification settings - Fork 105
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
Support for class properties #282
Conversation
Thanks for the PR! I'll look at this on PC whenever I have time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, I'll let @bjorn also take a look at it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too! I had just one suggestion.
- Open and save the test map so we know for certain it's in line with Tiled output - If we can't find a property type on a class property, default to an empty string instead of "class"
Only thing missing are the changes in the CHANGELOG.md file, after that it's good to go! Thanks! |
I forgot this is a breaking change (adds new variant to PropertyValue), so it should be based against |
@Deukhoofd I've tried to change the base branch of the PR, but it's a bit tricky, since you've created it directly from your Or we could just use this PR to update the |
Couldn't these changes be rebased on next? |
Adds support for the new class properties introduced in Tiled 1.8, as described here.
I had to write some slightly hacky code to work around the fact that its child tag is optional, which would break the parser when it tried to parse it anyway.
The new property value ClassValue differs from the other PropertyValues in that its a struct enum variant, instead of a tuple one. I did this due to the additional property type that is included in it. Having it as a struct variant feels cleaner to me than having it as a two element tuple.