Switched textEncoder to costumeAsset.encodeTextData, and pass in version as an argument instead of in costume

This commit is contained in:
DD 2018-05-09 15:48:49 -04:00
parent b9ce26918d
commit aae1e083bc
3 changed files with 11 additions and 16 deletions
src/serialization

View file

@ -247,7 +247,6 @@ const parseScratchObject = function (object, runtime, extensions, topLevel, zip)
// will be a very extensive change across many repositories
// and should be done carefully and altogether
md5: costumeSource.baseLayerMD5,
version: 2, // Indicates loaded from sb2
skinId: null
};
const md5ext = costumeSource.baseLayerMD5;
@ -261,7 +260,7 @@ const parseScratchObject = function (object, runtime, extensions, topLevel, zip)
// the file name of the costume should be the baseLayerID followed by the file ext
const assetFileName = `${costumeSource.baseLayerID}.${ext}`;
costumePromises.push(deserializeCostume(costume, runtime, zip, assetFileName)
.then(() => loadCostume(costume.md5, costume, runtime)));
.then(() => loadCostume(costume.md5, costume, runtime, 2 /* optVersion */)));
}
}
// Sounds from JSON