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

Add storage type parameter to CustomEnumDefinition.FromEnum #54

Merged
merged 3 commits into from
Nov 16, 2024

Conversation

dcronqvist
Copy link
Owner

Description

As described in #53, it is currently not possible to use the FromEnum method to create CustomEnumDefinitions that have storage type = string. It does not make sense to constrain the use of FromEnum to enums that are integer based - so this change aims to fix that.

To be consistent with Tiled, the default value for the storage type parameter has been set to CustomEnumStorageType.String, even though that is a breaking change. However, since we have not had a full release (i.e. 1.0.0), this should not be a major concern, the 0.x.x development cycle is expected to contain potentially breaking changes since there hasn't been a full release yet.

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 linked an issue Nov 16, 2024 that may be closed by this pull request
@dcronqvist dcronqvist merged commit 23d218b into dev Nov 16, 2024
1 check passed
@dcronqvist dcronqvist deleted the from-enum-storage-type branch November 16, 2024 18:16
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.

Unable to set CustomEnumDefinition.StorageType using FromEnum
1 participant