diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 0e7f5d1e..1bd64e87 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -223,12 +223,11 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { * Generates a list of localized tags based on this item's type-specific properties. * @returns {string[]} An array of localized tag strings. */ - _getTags() { + _getTags(rootDocument) { const tags = [ - `${game.i18n.localize(this.parent.system.metadata.label)}: ${this.parent.name}`, - game.i18n.localize( - this.isTemporary ? 'DAGGERHEART.EFFECTS.Duration.temporary' : 'DAGGERHEART.EFFECTS.Duration.passive' - ) + rootDocument && rootDocument === this.parent + ? _loc(`DOCUMENT.${rootDocument.documentName}`) + : `${_loc(this.parent.system.metadata.label)}: ${this.parent.name}` ]; for (const statusId of this.statuses) { diff --git a/templates/sheets/global/partials/item-tags.hbs b/templates/sheets/global/partials/item-tags.hbs index 2edc1eac..e05a1095 100644 --- a/templates/sheets/global/partials/item-tags.hbs +++ b/templates/sheets/global/partials/item-tags.hbs @@ -1,5 +1,5 @@
- {{#each _getTags as |tag|}} + {{#each (_getTags @root.document) as |tag|}}
{{tag}}