mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-09 12:33:58 -04:00
Configuring scratch-vm to use changes made to scratch-parser.
This commit is contained in:
parent
e0b23cde31
commit
605ce4b16d
2 changed files with 18 additions and 2 deletions
src/serialization
|
@ -27,7 +27,13 @@ const deserializeSound = function (sound, runtime, zip) {
|
|||
// This sound has already been cached.
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
if (!zip) {
|
||||
// TODO adding this case to make integration tests pass, need to rethink
|
||||
// the entire structure of saving/loading here (w.r.t. differences between
|
||||
// loading from local zip file or from server)
|
||||
log.error('Zipped assets were not provided.');
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
const soundFile = zip.file(fileName);
|
||||
if (!soundFile) {
|
||||
log.error(`Could not find sound file associated with the ${sound.name} sound.`);
|
||||
|
@ -82,6 +88,14 @@ const deserializeCostume = function (costume, runtime, zip) {
|
|||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
if (!zip) {
|
||||
// TODO adding this case to make integration tests pass, need to rethink
|
||||
// the entire structure of saving/loading here (w.r.t. differences between
|
||||
// loading from local zip file or from server)
|
||||
log.error('Zipped assets were not provided.');
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
const costumeFile = zip.file(fileName);
|
||||
if (!costumeFile) {
|
||||
log.error(`Could not find costume file associated with the ${costume.name} costume.`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue