SnD isn't the best about saving its state. Sure, variables are set, but the state file is only changed when the plugin or world is closed gracefully. I suspect they're not saving on snd update (something we as devs probably don't encounter since we're doing snd reloads for dev purposes in between updates, which does save the state) so people are susceptible to losing data on upgrades.
This change is simple: automatically save the plugin state after changing a variable. There's up to a second delay between changing state and saving, this is done so that if we have many SetVariable calls in quick succession, like when the window is resized or quest state changes, we only save the state once at the end.
SnD isn't the best about saving its state. Sure, variables are set, but the state file is only changed when the plugin or world is closed gracefully. I suspect they're not saving on
snd update
(something we as devs probably don't encounter since we're doing snd reloads for dev purposes in between updates, which does save the state) so people are susceptible to losing data on upgrades.This change is simple: automatically save the plugin state after changing a variable. There's up to a second delay between changing state and saving, this is done so that if we have many SetVariable calls in quick succession, like when the window is resized or quest state changes, we only save the state once at the end.