mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
Merged with main
This commit is contained in:
commit
ee52eb887d
26 changed files with 1059 additions and 204 deletions
|
|
@ -96,6 +96,28 @@ export default class DHItem extends foundry.documents.Item {
|
|||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Generate an array of localized tag.
|
||||
* @returns {string[]} An array of localized tag strings.
|
||||
*/
|
||||
getTags() {
|
||||
const tags = [];
|
||||
if (this.system.getTags) tags.push(...this.system.getTags());
|
||||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a localized label array for this item.
|
||||
* @returns {(string | { value: string, icons: string[] })[]} An array of localized strings and damage label objects.
|
||||
*/
|
||||
getLabels() {
|
||||
const labels = [];
|
||||
if (this.system.getLabels) labels.push(...this.system.getLabels());
|
||||
return labels;
|
||||
}
|
||||
|
||||
async use(event) {
|
||||
const actions = new Set(this.system.actionsList);
|
||||
if (actions?.size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue