From 0f9c20a041b1d19e8a68c00205f3b32034d934e3 Mon Sep 17 00:00:00 2001 From: cosmo Date: Sun, 26 Apr 2026 18:07:35 +0200 Subject: [PATCH] replace static implementation properties with getDocumentClass calls for improved compatibility --- scripts/ikonis-data.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/ikonis-data.js b/scripts/ikonis-data.js index 8c262bb..a3b35de 100644 --- a/scripts/ikonis-data.js +++ b/scripts/ikonis-data.js @@ -99,7 +99,7 @@ export function patchIkonisLogic() { // Clone the effect and set this actor as parent to ensure application const effectData = effect.toObject(); effectData.disabled = false; - const effectInstance = ActiveEffect.implementation.fromObject(effectData, { parent: this }); + const effectInstance = getDocumentClass("ActiveEffect").fromObject(effectData, { parent: this }); yield effectInstance; } } @@ -115,7 +115,7 @@ export function patchIkonisLogic() { const effectData = effect.toObject(); effectData.disabled = false; - const effectInstance = ActiveEffect.implementation.fromObject(effectData, { parent: this }); + const effectInstance = getDocumentClass("ActiveEffect").fromObject(effectData, { parent: this }); yield effectInstance; } } @@ -159,8 +159,9 @@ export function patchDhCharacter(DhCharacter) { if (bondedUuid) { const feature = _featureCache.get(bondedUuid) || fromUuidSync(bondedUuid); if (feature) { - // Use fromObject with parent to ensure all Action models link correctly - const featureClone = Item.implementation.fromObject(feature.toObject(), { parent: this.parent }); + // Use getDocumentClass to ensure we have the correct Item class + const ItemClass = getDocumentClass("Item"); + const featureClone = ItemClass.fromObject(feature.toObject(), { parent: this.parent }); ikonisFeatures.push(featureClone); console.log(`DH-Ikonis | Resolved bonded feature: ${feature.name}`); } @@ -177,8 +178,9 @@ export function patchDhCharacter(DhCharacter) { const feature = _featureCache.get(aug.featureUuid) || fromUuidSync(aug.featureUuid); if (feature) { - // Use fromObject with parent to ensure all Action models link correctly - const featureClone = Item.implementation.fromObject(feature.toObject(), { parent: this.parent }); + // Use getDocumentClass to ensure we have the correct Item class + const ItemClass = getDocumentClass("Item"); + const featureClone = ItemClass.fromObject(feature.toObject(), { parent: this.parent }); ikonisFeatures.push(featureClone); console.log(`DH-Ikonis | Resolved augment feature: ${feature.name}`); }