Save controller plugin data on the save hook (#513)

exp_groups and exp_roles only saved their datastores on shutdown, and
exp_scenario saved the player store but not the feature store on the
save hook. The controller runs the save hook on its autosave interval,
so a crash or kill lost every change since the controller started.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
BastiaanandClaude Opus 5.5 authored and GitHub committed 2026-10-25 21:57:21 +00:00
1 parent 82abc2c332
commit 20ca539af3
5 files changed
+33 -5

No files matched your search

+1
View File
@@ -239,6 +239,7 @@ export default async function (context: ControllerPluginContext) {
});
controller.hooks.save.attach(plugin.name, async () => {
await featureStore.save();
await playerStore.save();
});