zischenstand

This commit is contained in:
centron\schwoerer
2025-11-14 14:52:43 +01:00
parent 30aa03c6db
commit f054a31b20
8733 changed files with 900639 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/**
* Stop XP flag history tracking (tab-based version).
*/
const TARGET_ACTOR = game.actors.getName("Zeratal") ?? null;
const ACTOR_ID = TARGET_ACTOR?.id ?? "put-actor-id-here";
if (!ACTOR_ID || ACTOR_ID === "put-actor-id-here") {
return ui.notifications.warn("Set ACTOR_ID before running the macro.");
}
const state = game.pf1?.xpHistoryFlags;
if (!state) return ui.notifications.info("XP flag history tracking is not active.");
const logKey = `pf1-xp-history-flags-${ACTOR_ID}`;
const handler = state.hooks?.[logKey];
if (!handler) {
return ui.notifications.info(`No XP flag history hook found for ${TARGET_ACTOR?.name ?? ACTOR_ID}.`);
}
Hooks.off("updateActor", handler);
delete state.hooks[logKey];
if (state.current) delete state.current[ACTOR_ID];
const actorName = game.actors.get(ACTOR_ID)?.name ?? TARGET_ACTOR?.name ?? ACTOR_ID;
ui.notifications.info(`XP flag history tracking disabled for ${actorName}.`);