DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN pet layers

Now we show a message for pet layers with the DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN glitch applied! Previously, there would just be no message, because we only had UI logic for when it was applied to an _item_ layer.
This commit is contained in:
Emi Matchu 2021-04-13 17:17:42 -07:00
parent 3e3188786c
commit 4bc4e98a0a

View file

@ -117,7 +117,7 @@ function OutfitKnownGlitchesBadge({ appearance }) {
There's a glitch in the art for <i>{item.name}</i> that causes it to
display incorrectlybut we're not sure if it's on our end, or TNT's.
If you own this item, please email me at matchu@openneo.net to let us
know how it looks on-site!
know how it looks in the on-site customizer!
</Box>
);
}
@ -187,8 +187,9 @@ function OutfitKnownGlitchesBadge({ appearance }) {
);
}
// Check whether the pet has OFFICIAL_SVG_IS_INCORRECT.
const petLayers = petAppearance?.layers || [];
// 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"
@ -205,6 +206,26 @@ function OutfitKnownGlitchesBadge({ appearance }) {
}
}
// Look for pet layers with the DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN glitch.
for (const layer of petLayers) {
const layerHasGlitch = (layer.knownGlitches || []).includes(
"DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"
);
if (layerHasGlitch) {
glitchMessages.push(
<Box
key={`displays-incorrectly-but-cause-unknown-for-pet-layer-${layer.id}`}
>
There's a glitch in the art for this pet's <i>{layer.zone.label}</i>{" "}
zone that causes it to display incorrectlybut we're not sure if it's
on our end, or TNT's. If you have this pet, please email me at
matchu@openneo.net to let us know how it looks in the on-site
customizer!
</Box>
);
}
}
if (glitchMessages.length === 0) {
return null;
}