From 642d74c9f88f98355255b66e033ded4e33e912a2 Mon Sep 17 00:00:00 2001 From: Vassili Minaev Date: Tue, 12 May 2026 18:34:31 -0600 Subject: [PATCH] Debounce changed to seconds. --- scripts/main.js | 2 +- scripts/settings.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/main.js b/scripts/main.js index bd4ce8a..f89c7a1 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -41,7 +41,7 @@ function scheduleSnapshotPush(actor) { let debouncer = snapshotDebouncers.get(actor.id); if (!debouncer) { - const debounceMs = game.settings.get(MODULE_ID, "snapshotDebounceMs"); + const debounceMs = game.settings.get(MODULE_ID, "snapshotDebounceSeconds") * 1000; debouncer = foundry.utils.debounce((a) => { pushSnapshot(a).catch((err) => { console.warn(`[${MODULE_ID}] snapshot push for ${a.name} failed:`, err); diff --git a/scripts/settings.js b/scripts/settings.js index 5ab7470..bf17f17 100644 --- a/scripts/settings.js +++ b/scripts/settings.js @@ -14,11 +14,11 @@ import { MODULE_ID } from "./constants.js"; export function registerSettings() { game.settings.register(MODULE_ID, "frappeBaseUrl", { name: "Frappe Base URL", - hint: "Base URL of your Seitime Frappe site, e.g. https://seitime.vassi.li (no trailing slash).", + hint: "Base URL of your Seitime Frappe site, e.g. https://seitimegames.com (no trailing slash).", scope: "world", config: true, type: String, - default: "", + default: "https://seitimegames.com", }); game.settings.register(MODULE_ID, "sharedSecret", { @@ -50,14 +50,14 @@ export function registerSettings() { range: { min: 0, max: 120, step: 1 }, }); - game.settings.register(MODULE_ID, "snapshotDebounceMs", { - name: "Snapshot Debounce (ms)", + game.settings.register(MODULE_ID, "snapshotDebounceSeconds", { + name: "Snapshot Debounce (seconds)", hint: "How long to wait after the last actor edit before pushing a snapshot. Combat causes frequent edits, so a few seconds is usually right.", scope: "world", config: true, type: Number, - default: 5000, - range: { min: 500, max: 60000, step: 500 }, + default: 5, + range: { min: 1, max: 60, step: 1 }, }); game.settings.register(MODULE_ID, "snapshotAutoSync", {