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