openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

save settings in the background #465

Closed ezio416 closed 3 months ago

ezio416 commented 3 months ago

If a plugin has settings that are changed from outside Openplanet's settings menu, or if a developer chooses to toggle plugins, those will not be saved until the settings menu is opened and closed again, or if a plugin calls Meta::SaveSettings(). If this never happens, the settings are lost when the game crashes. It would be very helpful for settings to periodically save in the background (if they don't already and I don't believe they do), maybe with a way to set how frequently they should save on their own, i.e. every 5 minutes, 15 minutes, etc.

codecat commented 3 months ago

Having the settings save on a timer feels a bit hacky to me. What would be better is if plugins decide by themselves the best time that they can trigger a settings save, but I'm open to suggestions here.

ezio416 commented 3 months ago

If the timer feels hacky, I at least think settings should save when plugins are toggled

codecat commented 3 months ago

I've made it so that when plugins are toggled, the settings save as well.

ezio416 commented 3 months ago

Thank you!