Oops, choose the *first* PNG from the manifest, to avoid reference art

When we moved more logic into the main app, we made some assumptions
about manifest art that were different than Impress 2020's, in hopes
that they would be More Correct for potential future edge cases.

Turns out, they were actually *less* correct for *current* edge cases!
Chips linked us to a few examples, including this Reddit post:

https://www.reddit.com/r/neopets/comments/1b8fd72/i_dont_think_thats_the_correct_image/

Fixed now!
This commit is contained in:
Emi Matchu 2024-03-07 14:16:05 -08:00
parent e1a5eaeb68
commit cf6921329d

View file

@ -131,13 +131,13 @@ class SwfAsset < ApplicationRecord
# seen! # seen!
{ js: assets_by_ext[:js].last } { js: assets_by_ext[:js].last }
else else
# Otherwise, return the last PNG and the last SVG, arbitrarily. # Otherwise, return the first PNG and the first SVG. (Unlike the JS
# (There's probably only one of each! I'm just going by the same logic # case, it's important to choose the *first* PNG, because sometimes
# we've seen in the JS library case, that later entries are more likely # reference art is included in the manifest, like with the Stealthy
# to be correct.) # Eyrie Shirt's asset 304486_b28cae0d76.)
{ {
png: assets_by_ext.fetch(:png, []).last, png: assets_by_ext.fetch(:png, []).first,
svg: assets_by_ext.fetch(:svg, []).last, svg: assets_by_ext.fetch(:svg, []).first,
} }
end end
rescue StandardError => error rescue StandardError => error