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";
|
import { useLocalStorage } from "../util";
|
||||||
|
|
||||||
function OutfitKnownGlitchesBadge({ appearance }) {
|
function OutfitKnownGlitchesBadge({ appearance }) {
|
||||||
const glitchMessages = [];
|
const [hiResMode] = useLocalStorage("DTIHiResMode", false);
|
||||||
|
|
||||||
const { petAppearance, items } = appearance;
|
const { petAppearance, items } = appearance;
|
||||||
|
|
||||||
|
const glitchMessages = [];
|
||||||
|
|
||||||
// Look for UC/Invisible/etc incompatibilities that we hid, that we should
|
// Look for UC/Invisible/etc incompatibilities that we hid, that we should
|
||||||
// just mark Incompatible someday instead; or with correctly partially-hidden
|
// just mark Incompatible someday instead; or with correctly partially-hidden
|
||||||
// art.
|
// art.
|
||||||
|
@ -236,21 +237,23 @@ function OutfitKnownGlitchesBadge({ appearance }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for pet layers with the OFFICIAL_SVG_IS_INCORRECT glitch.
|
// Look for pet layers with the OFFICIAL_SVG_IS_INCORRECT glitch.
|
||||||
|
if (hiResMode) {
|
||||||
for (const layer of petLayers) {
|
for (const layer of petLayers) {
|
||||||
const layerHasOfficialSvgIsIncorrect = (layer.knownGlitches || []).includes(
|
const layerHasOfficialSvgIsIncorrect = (
|
||||||
"OFFICIAL_SVG_IS_INCORRECT"
|
layer.knownGlitches || []
|
||||||
);
|
).includes("OFFICIAL_SVG_IS_INCORRECT");
|
||||||
if (layerHasOfficialSvgIsIncorrect) {
|
if (layerHasOfficialSvgIsIncorrect) {
|
||||||
glitchMessages.push(
|
glitchMessages.push(
|
||||||
<Box key={`official-svg-is-incorrect-for-pet-layer-${layer.id}`}>
|
<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>{" "}
|
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
|
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
|
image. Instead, we're showing a PNG, which might look a bit blurry
|
||||||
larger screens.
|
on larger screens.
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Look for pet layers with the DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN glitch.
|
// Look for pet layers with the DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN glitch.
|
||||||
for (const layer of petLayers) {
|
for (const layer of petLayers) {
|
||||||
|
|
Loading…
Reference in a new issue