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

Enum properties were not being properly parsed due to incorrect usage of Optional #65

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

dcronqvist
Copy link
Owner

@dcronqvist dcronqvist commented Nov 27, 2024

Description

When parsing enum properties in the .tmx file format, an incorrect null-coalesce caused string enums to be attempted to be parsed as uints. This therefore throws a format exception due to the incorrect number format. This has been fixed in this PR, along with simplifying undefined enum parsing to just give a StringProperty or IntProperty in cases where the enum type is not defined in DotTiled.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • Tests have been added/updated to cover new functionality.
  • Documentation has been updated for all new changes (e.g., usage examples, API documentation).

@dcronqvist dcronqvist merged commit fc710da into dev Dec 2, 2024
1 check passed
@dcronqvist dcronqvist deleted the enum-bug branch December 2, 2024 19:55
@dcronqvist dcronqvist mentioned this pull request Dec 2, 2024
3 tasks
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 this pull request may close these issues.

Automatic custom enum parsing doesn't work with "Save as String"
1 participant