From bf420cb7647d849763a862f34efb75512515120c Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Wed, 28 Oct 2020 15:47:58 -0700 Subject: [PATCH] fix fetch script for new library schema --- scripts/fetchMediaLibraryAssets.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/fetchMediaLibraryAssets.js b/scripts/fetchMediaLibraryAssets.js index f1e6fb3..23350a7 100644 --- a/scripts/fetchMediaLibraryAssets.js +++ b/scripts/fetchMediaLibraryAssets.js @@ -46,16 +46,11 @@ const collectAssets = function (dest) { collectSimple(libraries.costumes, dest, 'Costume'); collectSimple(libraries.sounds, dest, 'Sound'); libraries.sprites.forEach(sprite => { - if (sprite.md5) { - dest.add(sprite.md5); - } else { - console.warn(`Sprite has no MD5 property:\n${describe(sprite)}`); + if (sprite.costumes) { + collectSimple(sprite.costumes, dest, `Costume for sprite ${sprite.name}`); } - if (sprite.json.costumes) { - collectSimple(sprite.json.costumes, dest, `Costume for sprite ${sprite.name}`); - } - if (sprite.json.sounds) { - collectSimple(sprite.json.sounds, dest, `Sound for sprite ${sprite.name}`); + if (sprite.sounds) { + collectSimple(sprite.sounds, dest, `Sound for sprite ${sprite.name}`); } }); return dest;