fix fetch script for new library schema

This commit is contained in:
Christopher Willis-Ford 2020-10-28 15:47:58 -07:00
parent 9c3cfef443
commit bf420cb764

View file

@ -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;