Fix #321 : Fix exceptions when calling EnumExtensions.displayDescription()#322
Merged
Conversation
…layDescription()` whith an enum value that isn't defined, a stock bug occuring more consistently when the KSPCF KSPFieldEnumDesc patch is enabled. As part of this new FastAndFixedEnumExtensions patch, also implement a cache for the enum descriptions.
Contributor
|
I'm not sure it makes sense to have 2 separate toogleable patches for enum descriptions. I don't see anyone wanting to use one without the other. Besides that, looks like RA is the only KSPFieldEnumDesc user currently. |
Contributor
Author
|
The KSPFieldEnumDesc patch is a modding API optional patch extending a stock feature to PAW items, while this new FastAndFixedEnumExtensions patch is an enabled by default bugfix and performance patch for that base stock feature, so it will benefit to everyone and not just RA users. Admittedly, the feature isn't widely used in the stock codebase. Do note that KSPFieldEnumDesc is hardwired to use the FastAndFixedEnumExtensions methods, so disabling the latter while enabling the former would still fix the original problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix exceptions when calling
EnumExtensions.displayDescription()with an enum value that isn't defined, a stock bug occuring more consistently when the KSPCF KSPFieldEnumDesc patch is enabled. As part of this new FastAndFixedEnumExtensions patch, also implement a cache for the enum descriptions.