define tags for actions

This commit is contained in:
Joaquin Pereyra 2025-07-31 22:52:49 -03:00
parent e5c617d62e
commit d355d1677d
2 changed files with 15 additions and 14 deletions

View file

@ -351,4 +351,17 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
});
}
}
/**
* Generates a list of localized tags for this action.
* @returns {string[]} An array of localized tag strings.
*/
_getTags() {
const tags = [
game.i18n.localize(`DAGGERHEART.ACTIONS.TYPES.${this.type}.name`),
game.i18n.localize(`DAGGERHEART.CONFIG.ActionType.${this.actionType}`)
];
return tags;
}
}

View file

@ -44,6 +44,7 @@ Parameters:
</div>
{{!-- Attack Tags End --}}
{{else}}
{{!-- Other elements Tags Start --}}
{{#with item}}
{{#if (not ../hideTags)}}
<div class="item-tags">
@ -70,20 +71,7 @@ Parameters:
{{/if}}
{{/with}}
{{/if}}
{{!-- Action Block Start --}}
{{#if (eq type 'action')}}
{{#if (not hideTags)}}
<div class="item-tags">
<div class="tag">{{localize (concat 'DAGGERHEART.ACTIONS.TYPES.' item.type '.name')}}</div>
<div class="tag">{{localize (concat 'DAGGERHEART.CONFIG.ActionType.' item.actionType)}}</div>
</div>
{{else if (not hideLabels)}}
{{!-- Empty --}}
{{/if}}
{{/if}}
{{!-- Action Block End --}}
{{!-- Other elements Tags End --}}
</div>
{{!-- Simple Resource --}}