mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 21:52:31 -05:00
fix fetch script for new library schema
This commit is contained in:
parent
9c3cfef443
commit
bf420cb764
1 changed files with 4 additions and 9 deletions
|
@ -46,16 +46,11 @@ const collectAssets = function (dest) {
|
||||||
collectSimple(libraries.costumes, dest, 'Costume');
|
collectSimple(libraries.costumes, dest, 'Costume');
|
||||||
collectSimple(libraries.sounds, dest, 'Sound');
|
collectSimple(libraries.sounds, dest, 'Sound');
|
||||||
libraries.sprites.forEach(sprite => {
|
libraries.sprites.forEach(sprite => {
|
||||||
if (sprite.md5) {
|
if (sprite.costumes) {
|
||||||
dest.add(sprite.md5);
|
collectSimple(sprite.costumes, dest, `Costume for sprite ${sprite.name}`);
|
||||||
} else {
|
|
||||||
console.warn(`Sprite has no MD5 property:\n${describe(sprite)}`);
|
|
||||||
}
|
}
|
||||||
if (sprite.json.costumes) {
|
if (sprite.sounds) {
|
||||||
collectSimple(sprite.json.costumes, dest, `Costume for sprite ${sprite.name}`);
|
collectSimple(sprite.sounds, dest, `Sound for sprite ${sprite.name}`);
|
||||||
}
|
|
||||||
if (sprite.json.sounds) {
|
|
||||||
collectSimple(sprite.json.sounds, dest, `Sound for sprite ${sprite.name}`);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return dest;
|
return dest;
|
||||||
|
|
Loading…
Reference in a new issue