From a848533c7cbb09f08fc6e5aaf8de8f3f224102b8 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 18 Mar 2021 06:59:21 -0700 Subject: [PATCH] Add OFFICIAL_SWF_IS_BROKEN glitch Snug Hissi and Old School Draik outfits are gonna be labeled with this! --- .../WardrobePage/OutfitKnownGlitchesBadge.js | 33 +++++++++++++++++++ .../support/ItemLayerSupportModal.js | 9 ++++- src/server/types/AppearanceLayer.js | 10 ++++++ 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js index f3d3cf0..d666145 100644 --- a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js +++ b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js @@ -40,6 +40,39 @@ function OutfitKnownGlitchesBadge({ appearance }) { } } + // Look for items with the OFFICIAL_SWF_IS_INCORRECT glitch. + for (const item of items) { + const itemHasBrokenOnNeopetsDotCom = item.appearance.layers.some((l) => + (l.knownGlitches || []).includes("OFFICIAL_SWF_IS_INCORRECT") + ); + const itemHasBrokenUnconvertedLayers = item.appearance.layers.some( + (l) => + (l.knownGlitches || []).includes("OFFICIAL_SWF_IS_INCORRECT") && + !layerUsesHTML5(l) + ); + if (itemHasBrokenOnNeopetsDotCom) { + glitchMessages.push( + + {itemHasBrokenUnconvertedLayers ? ( + <> + We're aware of a glitch affecting the art for {item.name}. + Last time we checked, this glitch affected its appearance on + Neopets.com, too. Hopefully this will be fixed once it's converted + to HTML5! + + ) : ( + <> + We're aware of a previous glitch affecting the art for{" "} + {item.name}, but it might have been resolved during HTML5 + conversion. Please use the feedback form on the homepage to let us + know if it looks right, or still looks wrong! Thank you! + + )} + + ); + } + } + // Look for items with the OFFICIAL_SVG_IS_INCORRECT glitch. for (const item of items) { const itemHasOfficialSvgIsIncorrect = item.appearance.layers.some((l) => diff --git a/src/app/WardrobePage/support/ItemLayerSupportModal.js b/src/app/WardrobePage/support/ItemLayerSupportModal.js index b09e47b..d88f8bf 100644 --- a/src/app/WardrobePage/support/ItemLayerSupportModal.js +++ b/src/app/WardrobePage/support/ItemLayerSupportModal.js @@ -430,6 +430,12 @@ function ItemLayerSupportKnownGlitchesFields({ Known glitches + + Official SWF is incorrect{" "} + + (Will display a message) + + Official SVG is incorrect{" "} @@ -439,7 +445,8 @@ function ItemLayerSupportKnownGlitchesFields({ Only fits pets with other body-specific assets{" "} - (DTI's fault: bodyId=0 is a lie!) + (DTI's fault: bodyId=0 is a lie! Will mark incompatible for some + pets.) diff --git a/src/server/types/AppearanceLayer.js b/src/server/types/AppearanceLayer.js index e6abcac..5c74843 100644 --- a/src/server/types/AppearanceLayer.js +++ b/src/server/types/AppearanceLayer.js @@ -83,6 +83,16 @@ const typeDefs = gql` } enum AppearanceLayerKnownGlitch { + # This glitch means that the official SWF art for this layer is known to + # contain a glitch. (It probably also affects the PNG captured by Classic + # DTI, too.) + # + # In this case, there's no correct art we _can_ show until it's converted + # to HTML5. We'll show a message explaining the situation, and automatically + # change it to be more hesitant after HTML5 conversion, because we don't + # know in advance whether the layer will be fixed during conversion. + OFFICIAL_SWF_IS_INCORRECT + # This glitch means that, while the official manifest declares an SVG # version of this layer, it is incorrect and does not visually match the # PNG version that the official pet editor users.