diff --git a/module/dotdungeon.mjs b/module/dotdungeon.mjs index c76f259..8731314 100644 --- a/module/dotdungeon.mjs +++ b/module/dotdungeon.mjs @@ -41,6 +41,7 @@ import DOTDUNGEON from "./config.mjs"; Hooks.once(`init`, async () => { console.debug(`.dungeon | Initializing`); + CONFIG.ActiveEffect.legacyTransferral = false; loadSettings(); diff --git a/module/sheets/Items/GenericItemSheet.mjs b/module/sheets/Items/GenericItemSheet.mjs index 31821e1..936bd6c 100644 --- a/module/sheets/Items/GenericItemSheet.mjs +++ b/module/sheets/Items/GenericItemSheet.mjs @@ -30,6 +30,7 @@ export class GenericItemSheet extends ItemSheet { ctx.item = this.item; ctx.system = this.item.system; ctx.flags = this.item.flags; + ctx.effects = this.item.effects; ctx.config = DOTDUNGEON; ctx.icons = {}; diff --git a/module/sheets/Items/UntypedItemSheet.mjs b/module/sheets/Items/UntypedItemSheet.mjs index 1154842..eb3783d 100644 --- a/module/sheets/Items/UntypedItemSheet.mjs +++ b/module/sheets/Items/UntypedItemSheet.mjs @@ -57,6 +57,21 @@ export class UntypedItemSheet extends GenericItemSheet { if (!this.isEditable) return; console.debug(`.dungeon | Adding event listeners for Untyped Item: ${this.item.id}`); + + new GenericContextMenu(html, `.effect.panel`, [ + { + name: localizer(`dotdungeon.common.edit`), + callback: async (html) => { + (await fromUuid(html.closest(`.effect`)[0].dataset.embeddedId))?.sheet.render(true); + }, + }, + { + name: localizer(`dotdungeon.common.delete`), + callback: async () => { + (await fromUuid(html.closest(`.effect`)[0].dataset.embeddedId))?.delete(true); + }, + } + ]); }; async getData() { diff --git a/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs b/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs index 630bce2..a4e08eb 100644 --- a/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs +++ b/templates/items/untyped/v2/tabs/effects.v2.untyped.hbs @@ -1,7 +1,32 @@