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

Character references are unintentionally saved onto activity instances #348

Open
Ruin0x11 opened this issue May 5, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Ruin0x11
Copy link
Owner

Ruin0x11 commented May 5, 2021

If a map is saved with a character who is performing an activity, when it is loaded the reference to the character on the activity will not be loaded properly.

It's the same issue with mef origins not being saved properly. The solution I had there was to use the UID of the mef instead.

@Ruin0x11 Ruin0x11 added the bug Something isn't working label May 5, 2021
@Ruin0x11 Ruin0x11 changed the title Characters are saved onto activity instances Character referencess are unintentionally saved onto activity instances May 5, 2021
@Ruin0x11
Copy link
Owner Author

Ruin0x11 commented Jun 3, 2021

I think the usage of Object.make_prototype() is what's at fault here. If the reference and ILocation containing it are saved together in one table (which should usually be the case), then binser should be able to reconnect the reference appropriately. It would still need some amount of checking to handle that not being the case, though.

@Ruin0x11
Copy link
Owner Author

Maybe instead of requiring the user to correctly implement serialization, the serializer could detect common classes (like data_table) and save special metadata there.

@Ruin0x11 Ruin0x11 changed the title Character referencess are unintentionally saved onto activity instances Character references are unintentionally saved onto activity instances Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant