Handle OFFICIAL_SWF_IS_INCORRECT for pet layers
Marking this glitch on the Yellow Lutari head today, and oops there isn't UI copy for it yet! Added! Also fixed some bugs in here, like old text about the position of the pose picker relative to the glitch badge, and I noticed while debugging that `layerUsesHTML5` returns a truthy string instead of a boolean which seems error-prone!
This commit is contained in:
parent
ba8e4d8aa7
commit
f9b4852da1
2 changed files with 27 additions and 7 deletions
|
@ -176,7 +176,8 @@ function OutfitKnownGlitchesBadge({ appearance }) {
|
||||||
Invisible pets are affected by a number of glitches, including faces
|
Invisible pets are affected by a number of glitches, including faces
|
||||||
sometimes being visible on-site, and errors in the HTML5 conversion. If
|
sometimes being visible on-site, and errors in the HTML5 conversion. If
|
||||||
this pose looks incorrect, you can try another by clicking the emoji
|
this pose looks incorrect, you can try another by clicking the emoji
|
||||||
face to the right. But be aware that Neopets.com might look different!
|
face next to the species/color picker. But be aware that Neopets.com
|
||||||
|
might look different!
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -208,13 +209,32 @@ function OutfitKnownGlitchesBadge({ appearance }) {
|
||||||
We know that the art for this pet is incorrect, but we still haven't
|
We know that the art for this pet is incorrect, but we still haven't
|
||||||
seen a <em>correct</em> model for this pose yet. Once someone models the
|
seen a <em>correct</em> model for this pose yet. Once someone models the
|
||||||
correct data, we'll use that instead. For now, you could also try
|
correct data, we'll use that instead. For now, you could also try
|
||||||
switching to another pose, by clicking the emoji face to the right!
|
switching to another pose, by clicking the emoji face next to the
|
||||||
|
species/color picker!
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const petLayers = petAppearance?.layers || [];
|
const petLayers = petAppearance?.layers || [];
|
||||||
|
|
||||||
|
// Look for pet layers with the OFFICIAL_SWF_IS_INCORRECT glitch.
|
||||||
|
for (const layer of petLayers) {
|
||||||
|
const layerHasGlitch = (layer.knownGlitches || []).includes(
|
||||||
|
"OFFICIAL_SWF_IS_INCORRECT"
|
||||||
|
);
|
||||||
|
if (layerHasGlitch) {
|
||||||
|
glitchMessages.push(
|
||||||
|
<Box key={`official-swf-is-incorrect-for-pet-layer-${layer.id}`}>
|
||||||
|
We're aware of a glitch affecting the art for this pet's{" "}
|
||||||
|
<i>{layer.zone.label}</i> zone. Last time we checked, this glitch
|
||||||
|
affected its appearance on Neopets.com, too. But our version might be
|
||||||
|
out of date! If you've seen it look better on-site, please email me at
|
||||||
|
matchu@openneo.net so we can fix it!
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Look for pet layers with the OFFICIAL_SVG_IS_INCORRECT glitch.
|
// Look for pet layers with the OFFICIAL_SVG_IS_INCORRECT glitch.
|
||||||
for (const layer of petLayers) {
|
for (const layer of petLayers) {
|
||||||
const layerHasOfficialSvgIsIncorrect = (layer.knownGlitches || []).includes(
|
const layerHasOfficialSvgIsIncorrect = (layer.knownGlitches || []).includes(
|
||||||
|
|
|
@ -135,7 +135,7 @@ export function GlitchBadgeLayout({
|
||||||
}
|
}
|
||||||
|
|
||||||
export function layerUsesHTML5(layer) {
|
export function layerUsesHTML5(layer) {
|
||||||
return (
|
return Boolean(
|
||||||
layer.svgUrl ||
|
layer.svgUrl ||
|
||||||
layer.canvasMovieLibraryUrl ||
|
layer.canvasMovieLibraryUrl ||
|
||||||
// If this glitch is applied, then `svgUrl` will be null, but there's still
|
// If this glitch is applied, then `svgUrl` will be null, but there's still
|
||||||
|
|
Loading…
Reference in a new issue