From e4e1f30fcbd757d66071a884566e1a27203a9c60 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 5 Apr 2026 20:23:11 -0600 Subject: [PATCH] Add comments for the v13 shims to make it easier to find them --- module/apps/AttributeManager.mjs | 2 ++ module/documents/Actor.mjs | 1 + 2 files changed, 3 insertions(+) diff --git a/module/apps/AttributeManager.mjs b/module/apps/AttributeManager.mjs index 6b159c3..1f4d7f6 100644 --- a/module/apps/AttributeManager.mjs +++ b/module/apps/AttributeManager.mjs @@ -137,6 +137,7 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2) const attrs = []; for (const [id, data] of Object.entries(this.#attributes)) { if (data == null) { continue }; + // Remove with issue: Foundry/taf#54 if (game.release.generation >= 14 && data == _del) {continue} attrs.push({ id, @@ -186,6 +187,7 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2) static async #remove($e, element) { const attribute = element.closest(`[data-attribute]`)?.dataset.attribute; if (!attribute) { return }; + // Remove with issue: Foundry/taf#54 if (game.release.generation < 14) { delete this.#attributes[attribute]; this.#attributes[`-=${attribute}`] = null; diff --git a/module/documents/Actor.mjs b/module/documents/Actor.mjs index bebc21d..acbe5e0 100644 --- a/module/documents/Actor.mjs +++ b/module/documents/Actor.mjs @@ -16,6 +16,7 @@ export class TAFActor extends Actor { // Assign the defaults from the world setting if they exist const defaults = game.settings.get(__ID__, `actorDefaultAttributes`) ?? {}; if (!hasProperty(data, `system.attr`)) { + // Remove with issue: Foundry/taf#55 const value = game.release.generation > 13 ? _replace(defaults) : defaults; this.updateSource({ "system.==attr": value }); };