diff --git a/langs/en-ca.2.json b/langs/en-ca.2.json index 6eb38bc..cc81d0a 100644 --- a/langs/en-ca.2.json +++ b/langs/en-ca.2.json @@ -115,6 +115,9 @@ "legendaryItem": "Legendary Item", "spell": "Spell", "untyped": "Custom" + }, + "ActiveEffect": { + "base": "Effect" } } } \ No newline at end of file diff --git a/module/sheets/Items/UntypedItemSheet.mjs b/module/sheets/Items/UntypedItemSheet.mjs index eb3783d..99f6862 100644 --- a/module/sheets/Items/UntypedItemSheet.mjs +++ b/module/sheets/Items/UntypedItemSheet.mjs @@ -58,6 +58,14 @@ export class UntypedItemSheet extends GenericItemSheet { if (!this.isEditable) return; console.debug(`.dungeon | Adding event listeners for Untyped Item: ${this.item.id}`); + html.find(`.create-ae`).on(`click`, async () => { + await this.item.createEmbeddedDocuments( + `ActiveEffect`, + [{name: localizer(`dotdungeon.default.name`, { document: `ActiveEffect`, type: `base` })}], + { renderSheet: true } + ); + }); + new GenericContextMenu(html, `.effect.panel`, [ { name: localizer(`dotdungeon.common.edit`), diff --git a/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs b/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs index a4e08eb..8f142a1 100644 --- a/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs +++ b/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs @@ -27,7 +27,7 @@ --}} {{/each}} -