From 3642e4c32afd1dfe2f23977d3ca703f914182dc0 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 27 Nov 2021 19:57:49 -0800 Subject: [PATCH] Only show SVG glitch messages if SVGs are on It's confusing to see a message that says "instead we're showing a PNG" if you don't have hi-res mode on and actually everything is PNG anyway! --- .../WardrobePage/OutfitKnownGlitchesBadge.js | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js index 8bbf88b..e9beb55 100644 --- a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js +++ b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js @@ -7,10 +7,11 @@ import getVisibleLayers from "../../shared/getVisibleLayers"; import { useLocalStorage } from "../util"; function OutfitKnownGlitchesBadge({ appearance }) { - const glitchMessages = []; - + const [hiResMode] = useLocalStorage("DTIHiResMode", false); const { petAppearance, items } = appearance; + const glitchMessages = []; + // Look for UC/Invisible/etc incompatibilities that we hid, that we should // just mark Incompatible someday instead; or with correctly partially-hidden // art. @@ -236,19 +237,21 @@ function OutfitKnownGlitchesBadge({ appearance }) { } // Look for pet layers with the OFFICIAL_SVG_IS_INCORRECT glitch. - for (const layer of petLayers) { - const layerHasOfficialSvgIsIncorrect = (layer.knownGlitches || []).includes( - "OFFICIAL_SVG_IS_INCORRECT" - ); - if (layerHasOfficialSvgIsIncorrect) { - glitchMessages.push( - - There's a glitch in the art for this pet's {layer.zone.label}{" "} - zone that prevents us from showing the full-scale SVG version of the - image. Instead, we're showing a PNG, which might look a bit blurry on - larger screens. - - ); + if (hiResMode) { + for (const layer of petLayers) { + const layerHasOfficialSvgIsIncorrect = ( + layer.knownGlitches || [] + ).includes("OFFICIAL_SVG_IS_INCORRECT"); + if (layerHasOfficialSvgIsIncorrect) { + glitchMessages.push( + + There's a glitch in the art for this pet's {layer.zone.label}{" "} + zone that prevents us from showing the full-scale SVG version of the + image. Instead, we're showing a PNG, which might look a bit blurry + on larger screens. + + ); + } } }