Simplify ActiveEffect sheet tags

This commit is contained in:
Carlos Fernandez 2026-06-23 03:36:45 -04:00
parent 9f29229c94
commit cc6fdb47a9
2 changed files with 5 additions and 6 deletions

View file

@ -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. * Generates a list of localized tags based on this item's type-specific properties.
* @returns {string[]} An array of localized tag strings. * @returns {string[]} An array of localized tag strings.
*/ */
_getTags() { _getTags(rootDocument) {
const tags = [ const tags = [
`${game.i18n.localize(this.parent.system.metadata.label)}: ${this.parent.name}`, rootDocument && rootDocument === this.parent
game.i18n.localize( ? _loc(`DOCUMENT.${rootDocument.documentName}`)
this.isTemporary ? 'DAGGERHEART.EFFECTS.Duration.temporary' : 'DAGGERHEART.EFFECTS.Duration.passive' : `${_loc(this.parent.system.metadata.label)}: ${this.parent.name}`
)
]; ];
for (const statusId of this.statuses) { for (const statusId of this.statuses) {

View file

@ -1,5 +1,5 @@
<div class="item-tags"> <div class="item-tags">
{{#each _getTags as |tag|}} {{#each (_getTags @root.document) as |tag|}}
<div class="tag"> <div class="tag">
{{tag}} {{tag}}
</div> </div>