Fix movie bugs with Dandan, Electric Dress, etc

Huh, so it turns out sometimes the manifest will include old broken conversion attempts!

This fixed the "MiniMME18-S2c: Holomorphic Foliage and Dandan Set", the "Electric Dress" on various species (incl. Aisha), and yeah!

What an interesting discovery 😂
This commit is contained in:
Emi Matchu 2021-06-24 18:54:48 -07:00
parent ea33741594
commit 35a1096da3

View file

@ -417,6 +417,14 @@ async function loadAndCacheAssetDataFromManifest(db, layer) {
(ad) => new URL(ad.path, "http://images.neopets.com") (ad) => new URL(ad.path, "http://images.neopets.com")
); );
// Now, we search the asset URLs for the *last* asset matching each filetype.
// (This is because sometimes there will be older and newer animations in the
// same file, and the newer one comes second, I guess!)
//
// NOTE: I'm not sure how reliable this actually is. I wonder if the more
// correct behavior is to like... play all of them? 😳
assetUrls.reverse();
const jsAssetUrl = assetUrls.find( const jsAssetUrl = assetUrls.find(
// NOTE: Sometimes the path ends with a ?v= query string, so we need // NOTE: Sometimes the path ends with a ?v= query string, so we need
// to use `extname` to find the real extension! // to use `extname` to find the real extension!