From 20160ea9a0a76a098dd88efbb173a4d64c836298 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sun, 23 Jan 2022 17:41:16 +0100 Subject: [PATCH] fix: hide effect icon if it's not present, instead of showing alt text and a broken image icon --- src/module/actor/sheets/actor-sheet.ts | 2 -- src/templates/sheets/shared/components/rollable-image.hbs | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/actor/sheets/actor-sheet.ts b/src/module/actor/sheets/actor-sheet.ts index 421246da..f4a56713 100644 --- a/src/module/actor/sheets/actor-sheet.ts +++ b/src/module/actor/sheets/actor-sheet.ts @@ -52,7 +52,6 @@ export class DS4ActorSheet extends ActorSheet { return { ...effect.toObject(), - icon: effect.data.icon ?? DS4ActiveEffect.FALLBACK_ICON, sourceName: await effect.getCurrentSourceName(), factor: effect.factor, isEffectivelyEnabled: !effect.data.disabled && !effect.isSurpressed, @@ -418,7 +417,6 @@ interface DS4ActorSheetData extends ActorSheet.Data { type ActiveEffectDataSource = foundry.data.ActiveEffectData["_source"]; interface EnrichedActiveEffectDataSource extends ActiveEffectDataSource { - icon: string; sourceName: string; } diff --git a/src/templates/sheets/shared/components/rollable-image.hbs b/src/templates/sheets/shared/components/rollable-image.hbs index c30426d1..6447aa60 100644 --- a/src/templates/sheets/shared/components/rollable-image.hbs +++ b/src/templates/sheets/shared/components/rollable-image.hbs @@ -15,7 +15,9 @@ SPDX-License-Identifier: MIT --}}
+ {{#if src}} {{alt}} + {{/if}} {{#if rollable}} {{localize 'DS4.DiceOverlayImageAltText'}}