Corrected ActiveEffect template styling and added useage of the new 'showIcon' property

This commit is contained in:
WBHarry 2026-02-04 10:15:42 +01:00
parent ac998adaa6
commit 115a31423e
9 changed files with 44 additions and 12 deletions

View file

@ -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);
});
}