From 4bc4e98a0adf8afe97792e4e72c7b61e8f05e95b Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 13 Apr 2021 17:17:42 -0700 Subject: [PATCH] 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. --- .../WardrobePage/OutfitKnownGlitchesBadge.js | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js index 625f46f..a05ff4b 100644 --- a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js +++ b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js @@ -117,7 +117,7 @@ function OutfitKnownGlitchesBadge({ appearance }) { There's a glitch in the art for {item.name} that causes it to display incorrectly—but 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! ); } @@ -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( + + There's a glitch in the art for this pet's {layer.zone.label}{" "} + zone that causes it to display incorrectly—but 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! + + ); + } + } + if (glitchMessages.length === 0) { return null; }