You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the feature
Consider making a more generic helper for "create a delayed action that accounts for game state, and which also saves and loads partial progression successfully". It seems like a helpful utility in general, and we have two use cases already with illegal status modifiers and input suppression entries.
Feature usage
Plugins would use it to simplify handling persistent states. It would be useful any time a mod wants to temporarily change the state of something which, if that state change is not persisted across saving and loading, would cause broken functionality.
Dependencies and Prerequisites
None
Implementation details
Might look like this (or maybe it would be named something like PersistentState):
publicabstractclassGameTimeAwareAction{// time tracking instance properties go here...// Start, Stop, Pause, and Tick are implemented methods in the abstract classpublicabstractstringGetUniqueString();publicabstractstringGetSavestorePathPrefix();publicabstractstringGetStateAsJson();publicabstractvoidLoadStateFromJson(stringjson);publicabstractvoidOnAfterStarted();publicabstractvoidOnAfterTicked(deltaTime,timeSinceStarted,duration);publicabstractvoidOnAfterExpiration();}// In a helper library elsewhere...public GameTimeAwareAction CreateGameTimeAwareAction(...);// not sure of the params here, might involve plugin metadatapublic List<GameTimeAwareAction> GetGameTimeAwareActions(predicate);
SOD.Common would handle saving and loading for the mods, like it does now with illegal status modifiers.
The text was updated successfully, but these errors were encountered:
Introduction
Description of the feature
Consider making a more generic helper for "create a delayed action that accounts for game state, and which also saves and loads partial progression successfully". It seems like a helpful utility in general, and we have two use cases already with illegal status modifiers and input suppression entries.
Feature usage
Plugins would use it to simplify handling persistent states. It would be useful any time a mod wants to temporarily change the state of something which, if that state change is not persisted across saving and loading, would cause broken functionality.
Dependencies and Prerequisites
None
Implementation details
Might look like this (or maybe it would be named something like PersistentState):
SOD.Common would handle saving and loading for the mods, like it does now with illegal status modifiers.
The text was updated successfully, but these errors were encountered: