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 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: `<p>${aug.effect}</p><p>${aug.cost}</p>`,
|
||||
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: `<p>${aug.effect}</p><p>${aug.cost}</p>`,
|
||||
actions: aug.actions || {},
|
||||
effects: aug.effects || []
|
||||
};
|
||||
updates = true;
|
||||
}
|
||||
|
||||
if (updates) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue