From bbe8da130ef2ddeac8a2e127e60f6be28e527528 Mon Sep 17 00:00:00 2001 From: cosmo Date: Sun, 26 Apr 2026 20:04:45 +0200 Subject: [PATCH] refactor: force unconditional update of Ikonis weapon features to ensure ID and effect synchronization --- scripts/ikonis-data.js | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/scripts/ikonis-data.js b/scripts/ikonis-data.js index 9122513..9b77914 100644 --- a/scripts/ikonis-data.js +++ b/scripts/ikonis-data.js @@ -50,21 +50,16 @@ export async function seedIkonisHomebrew() { const nativeId = `ikonis-${aug.id}`; const existing = homebrew.itemFeatures.weaponFeatures[nativeId]; - // We update if it's missing OR if it's an Ikonis feature that needs an update (like Bonded getting effects) - const hasEffects = aug.effects && aug.effects.length > 0; - const needsUpdate = !existing || (hasEffects && (!existing.effects || existing.effects.length === 0)); - - if (needsUpdate) { - console.log(`DH-Ikonis | Seeding/Updating feature: ${aug.name}`); - homebrew.itemFeatures.weaponFeatures[nativeId] = { - name: `Ikonis: ${aug.name}`, - img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg", - description: `

${aug.effect}

${aug.cost}

`, - actions: aug.actions || {}, - effects: aug.effects || [] - }; - updates = true; - } + // Force update to ensure 16-character IDs and correct mechanical effects are synced + console.log(`DH-Ikonis | Seeding/Updating feature: ${aug.name}`); + homebrew.itemFeatures.weaponFeatures[nativeId] = { + name: `Ikonis: ${aug.name}`, + img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg", + description: `

${aug.effect}

${aug.cost}

`, + actions: aug.actions || {}, + effects: aug.effects || [] + }; + updates = true; } if (updates) {