Add storage type parameter to CustomEnumDefinition.FromEnum #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Checklist