Merge branch 'explosivegaming:main' into aperx

This commit is contained in:
phidias authored and GitHub committed 2026-10-26 16:38:13 +09:00
commit 0fee2bce5d
19 files changed
+932 -51

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();
});
+11
View File
@@ -216,6 +216,17 @@ t.test("controller plugin", t2 => {
);
});
t2.test("features are saved on the save hook", async t3 => {
const databaseDirectory = t3.testdir();
const { updateFeature, save } = await startPlugin(t3, { withPlugins: false, databaseDirectory });
await updateFeature(new messages.FeatureUpdateRequest("afk_kick", false, { afk_minutes: 5 }));
await save();
const { listFeatures } = await startPlugin(t3, { withPlugins: false, databaseDirectory });
const record = await getFeature(listFeatures, "afk_kick");
t3.strictSame([record.enabled, record.values], [false, { afk_minutes: 5 }], "the saved record is loaded");
});
t2.test("stored features are kept across restarts", async t3 => {
const databaseDirectory = t3.testdir();
const { updateFeature, shutdown } = await startPlugin(t3, { withPlugins: false, databaseDirectory });