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!
This commit is contained in:
parent
19f1ec092e
commit
3642e4c32a
1 changed files with 18 additions and 15 deletions
|
@ -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(
|
||||
<Box key={`official-svg-is-incorrect-for-pet-layer-${layer.id}`}>
|
||||
There's a glitch in the art for this pet's <i>{layer.zone.label}</i>{" "}
|
||||
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.
|
||||
</Box>
|
||||
);
|
||||
if (hiResMode) {
|
||||
for (const layer of petLayers) {
|
||||
const layerHasOfficialSvgIsIncorrect = (
|
||||
layer.knownGlitches || []
|
||||
).includes("OFFICIAL_SVG_IS_INCORRECT");
|
||||
if (layerHasOfficialSvgIsIncorrect) {
|
||||
glitchMessages.push(
|
||||
<Box key={`official-svg-is-incorrect-for-pet-layer-${layer.id}`}>
|
||||
There's a glitch in the art for this pet's <i>{layer.zone.label}</i>{" "}
|
||||
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.
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue