refactor: force unconditional update of Ikonis weapon features to ensure ID and effect synchronization
This commit is contained in:
parent
ff65ee50f8
commit
bbe8da130e
1 changed files with 10 additions and 15 deletions
|
|
@ -50,21 +50,16 @@ export async function seedIkonisHomebrew() {
|
||||||
const nativeId = `ikonis-${aug.id}`;
|
const nativeId = `ikonis-${aug.id}`;
|
||||||
const existing = homebrew.itemFeatures.weaponFeatures[nativeId];
|
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)
|
// Force update to ensure 16-character IDs and correct mechanical effects are synced
|
||||||
const hasEffects = aug.effects && aug.effects.length > 0;
|
console.log(`DH-Ikonis | Seeding/Updating feature: ${aug.name}`);
|
||||||
const needsUpdate = !existing || (hasEffects && (!existing.effects || existing.effects.length === 0));
|
homebrew.itemFeatures.weaponFeatures[nativeId] = {
|
||||||
|
name: `Ikonis: ${aug.name}`,
|
||||||
if (needsUpdate) {
|
img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg",
|
||||||
console.log(`DH-Ikonis | Seeding/Updating feature: ${aug.name}`);
|
description: `<p>${aug.effect}</p><p>${aug.cost}</p>`,
|
||||||
homebrew.itemFeatures.weaponFeatures[nativeId] = {
|
actions: aug.actions || {},
|
||||||
name: `Ikonis: ${aug.name}`,
|
effects: aug.effects || []
|
||||||
img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg",
|
};
|
||||||
description: `<p>${aug.effect}</p><p>${aug.cost}</p>`,
|
updates = true;
|
||||||
actions: aug.actions || {},
|
|
||||||
effects: aug.effects || []
|
|
||||||
};
|
|
||||||
updates = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updates) {
|
if (updates) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue