Reuse enums - #1164
Open
arlocomotive wants to merge 3 commits into
Open
Conversation
Signed-off-by: arlocomotive <arloyamins@gmail.com>
arlocomotive
marked this pull request as ready for review
August 23, 2026 02:46
Collaborator
|
this pr adds a cross vm bug inside PushEnum </3 to reproduce, open two different world files in the creator and run the same script that touches enums, first world will work fine, the second one on the other hand will fail |
arlocomotive
marked this pull request as draft
August 24, 2026 02:18
Signed-off-by: arlocomotive <arloyamins@gmail.com>
Signed-off-by: arlocomotive <arloyamins@gmail.com>
Contributor
Author
thought this might happen but didn't test enough 💔 turned the cache into a lua table in the registry, should work now |
arlocomotive
marked this pull request as ready for review
August 24, 2026 04:18
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.
Summary
reuses previously created enums instead of pushing a new one every time. makes all enum values identical internally, which notably allows them to be used as keys in tables. might also reduce memory usage a tiny bit idk
Related issue or discussion
Fixes #1162
Type of change
Area affected
Checklist
dotnet restoredotnet formatdotnet builddotnet test --project Polytoria.Tests/Polytoria.Tests.csprojAI/LLM use
None