Debounce changed to seconds.
This commit is contained in:
parent
43c630c1f7
commit
642d74c9f8
2 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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", {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue