-
Notifications
You must be signed in to change notification settings - Fork 10
Description
This is a TODO (I'm happy to do this work):
Provide a means for EasyAPI users to easily save/restore state to/from Storage, using callbacks such as:
public virtual Dictionary<string, string> onSaveState(Dictionary<string, string> outState);
public virtual void onRestoreState(Dictionary<string, string> state);
And using a format to serialise/deserialise data.*
The idea with passing outState into the onSaveState callback is so EasyAPI itself/modules can include any state saving they may need to do internally, and EasyAPI users can simply add to that.
*I've noticed you can't put newlines into the Storage string, so can't use newline as a key-value pair delimiter like with DetailedInfo. Need to select an appropriate (least potentially conflicting) delimiter for Storage.