mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Simplify ActiveEffect sheet tags (#2037)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
* Simplify ActiveEffect sheet tags * Show origin actor and exclude tag if it is a top level actor tag without origin
This commit is contained in:
parent
f5fa59b3bd
commit
958eaa310c
2 changed files with 9 additions and 7 deletions
|
|
@ -224,12 +224,13 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
|||
* @returns {string[]} An array of localized tag strings.
|
||||
*/
|
||||
_getTags() {
|
||||
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'
|
||||
)
|
||||
];
|
||||
const tags = [];
|
||||
const originActor = DhActiveEffect.#resolveParentDocument(fromUuidSync(this.origin), Actor);
|
||||
if (originActor && originActor !== this.actor) {
|
||||
tags.push(_loc('DAGGERHEART.EFFECTS.OriginTag', { name: originActor.name }));
|
||||
} else if (!(this.parent instanceof Actor)) {
|
||||
tags.push(`${_loc(this.parent.system.metadata.label)}: ${this.parent.name}`);
|
||||
}
|
||||
|
||||
for (const statusId of this.statuses) {
|
||||
const status = CONFIG.statusEffects.find(s => s.id === statusId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue