FEAT: add _gettags and _getLabels to armor, domainCard, weapons and ActiveEffect

This commit is contained in:
Joaquin Pereyra 2025-07-29 22:30:49 -03:00
parent faa412bfc1
commit e5c617d62e
6 changed files with 140 additions and 133 deletions

View file

@ -115,4 +115,26 @@ export default class DHArmor extends AttachableItem {
}
}
}
/**
* Generates a list of localized tags based on this item's type-specific properties.
* @returns {string[]} An array of localized tag strings.
*/
_getTags() {
const tags = [
`${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.baseScore}`,
`${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseThresholds.base')}: ${this.baseThresholds.major} / ${this.baseThresholds.severe}`
];
return tags;
}
/**
* Generate a localized label array for this item subtype.
* @returns {(string | { value: string, icons: string[] })[]} An array of localized strings and damage label objects.
*/
_getLabels() {
const labels = [`${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.baseScore}`];
return labels;
}
}