mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Simplify ActiveEffect sheet tags
This commit is contained in:
parent
9f29229c94
commit
cc6fdb47a9
2 changed files with 5 additions and 6 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue