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

Serialization: Optionally strip userdata #10388

Closed
wants to merge 2 commits into from

Conversation

appgurueu
Copy link
Contributor

Like #10202 but makes stripping userdata optional (and not default behavior)

@paramat paramat added @ Script API Bugfix 🐛 PRs that fix a bug labels Sep 13, 2020
@sfan5 sfan5 added Feature ✨ PRs that add or enhance a feature and removed Bugfix 🐛 PRs that fix a bug labels Mar 1, 2021
@rubenwardy rubenwardy added the Roadmap: Needs approval The change is not part of the current roadmap and needs to be approved by coredevs beforehand. label Apr 25, 2022
@appgurueu
Copy link
Contributor Author

It's probably only dirty code that requires the stripping of userdata at the time of serialization. Modders can already fix this by recursively iterating the tables they want serialized and stripping userdata themselves.

serialize.lua is clean the way it currently is and if anything should be extended to properly serialize some userdata (such as ItemStacks) as well (see modlib for an example implementation).

Closing this.

@appgurueu appgurueu closed this May 9, 2022
@appgurueu appgurueu deleted the userdata branch March 31, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature ✨ PRs that add or enhance a feature Roadmap: Needs approval The change is not part of the current roadmap and needs to be approved by coredevs beforehand. @ Script API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants