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

Save state Interop #26

Closed
nhruo123 opened this issue Apr 26, 2023 · 2 comments
Closed

Save state Interop #26

nhruo123 opened this issue Apr 26, 2023 · 2 comments

Comments

@nhruo123
Copy link

Hey, I was wondering if it could be possible to expose an API for saving a state and then restoring to a given state. I have an idea for a mod that could use this functionality.
I looked at SpeedrunToolInterop.cs and I only found support for adding other modded content into the save state.

Something like this would be awesome:

public static State SaveState() {...}
public static void LoadState(State state) {...}
@DemoJameson
Copy link
Owner

Current implementation cannot store state in an object, so it can only do something like this

public static bool TrySaveState() {...}
public static bool TryLoadState() {...}

@nhruo123
Copy link
Author

Aight looks good, Ill try playing around with the code at the SaveLoad dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants