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

Lua table serde: allow non-string types as table keys #3140

Merged
merged 6 commits into from
Sep 20, 2023

Conversation

olanti-p
Copy link
Contributor

Summary

SUMMARY: Infrastructure "Lua mods can now use non-strings as keys in storage table"

Purpose of change

Fixes issue reported on Discord: if Lua table in mod_storage has a non-string key, the game would crash on save.

Describe the solution

Overhaul table de-serialization to support same values as keys do.

Describe alternatives you've considered

Forbidding non-strings as keys in storage

Testing

Added tests

@github-actions github-actions bot added src changes related to source code. tests changes related to tests labels Sep 14, 2023
@chaosvolt chaosvolt merged commit 7a551f0 into cataclysmbnteam:upload Sep 20, 2023
16 checks passed
@olanti-p olanti-p deleted the lua-table-serde-2 branch November 16, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code. tests changes related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants