diff --git a/src/tracker/stores/tracker.ts b/src/tracker/stores/tracker.ts index 7dc2916e..6d54e86d 100644 --- a/src/tracker/stores/tracker.ts +++ b/src/tracker/stores/tracker.ts @@ -564,6 +564,7 @@ function createTracker() { }); }, update: () => update((c) => c), + updateAndSave: () => updateAndSave((c) => c), roll: (plugin: InitiativeTracker) => updateAndSave((creatures) => { for (let creature of creatures) { diff --git a/src/tracker/ui/creatures/CreatureControls.svelte b/src/tracker/ui/creatures/CreatureControls.svelte index 92acae36..a83717c2 100644 --- a/src/tracker/ui/creatures/CreatureControls.svelte +++ b/src/tracker/ui/creatures/CreatureControls.svelte @@ -7,7 +7,7 @@ HP, MAPMARKER, REMOVE, - TAG, + TAG } from "src/utils"; import type { Creature } from "src/utils/creature"; import type TrackerView from "src/tracker/view"; @@ -42,7 +42,7 @@ .setTitle("Reset AC") .onClick((e: MouseEvent) => { creature.current_ac = creature.ac; - tracker.update(); + tracker.updateAndSave(); }); }); } @@ -60,7 +60,7 @@ .onClick(() => { tracker.updateCreatures({ creature, - change: { hidden: false }, + change: { hidden: false } }); }); }); @@ -71,7 +71,7 @@ .onClick(() => { tracker.updateCreatures({ creature, - change: { hidden: true }, + change: { hidden: true } }); }); }); @@ -83,7 +83,7 @@ .onClick(() => { tracker.updateCreatures({ creature, - change: { enabled: false }, + change: { enabled: false } }); }); }); @@ -94,7 +94,7 @@ .onClick(() => { tracker.updateCreatures({ creature, - change: { enabled: true }, + change: { enabled: true } }); }); }); @@ -112,7 +112,7 @@ item.onClick(() => { tracker.updateCreatures({ creature, - change: { marker: marker.type }, + change: { marker: marker.type } }); }); });