mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Corrected ActiveEffect template styling and added useage of the new 'showIcon' property
This commit is contained in:
parent
ac998adaa6
commit
115a31423e
9 changed files with 44 additions and 12 deletions
|
|
@ -500,3 +500,12 @@ export function htmlToText(html) {
|
|||
|
||||
return tempDivElement.textContent || tempDivElement.innerText || '';
|
||||
}
|
||||
|
||||
export function getIconVisibleActiveEffects(effects) {
|
||||
return effects.filter(effect => {
|
||||
const alwaysShown = effect.showIcon === CONST.ACTIVE_EFFECT_SHOW_ICON.ALWAYS;
|
||||
const conditionalShown = effect.showIcon === CONST.ACTIVE_EFFECT_SHOW_ICON.CONDITIONAL && !effect.transfer; // TODO: system specific logic
|
||||
|
||||
return !effect.disabled && (alwaysShown || conditionalShown);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue