Don't store costume data uris on costumes

This commit is contained in:
Ray Schamp 2017-05-04 12:29:28 -04:00
parent c5cf6d9b40
commit 2181e51c38

View file

@ -13,7 +13,6 @@ const log = require('../util/log');
* @returns {?Promise} - a promise which will resolve after skinId is set, or null on error. * @returns {?Promise} - a promise which will resolve after skinId is set, or null on error.
*/ */
const loadCostume = function (md5ext, costume, runtime) { const loadCostume = function (md5ext, costume, runtime) {
costume.md5ext = md5ext;
if (!runtime.storage) { if (!runtime.storage) {
log.error('No storage module present; cannot load costume asset: ', md5ext); log.error('No storage module present; cannot load costume asset: ', md5ext);
return Promise.resolve(costume); return Promise.resolve(costume);
@ -31,7 +30,8 @@ const loadCostume = function (md5ext, costume, runtime) {
]; ];
let promise = runtime.storage.load(assetType, md5).then(costumeAsset => { let promise = runtime.storage.load(assetType, md5).then(costumeAsset => {
costume.url = costumeAsset.encodeDataURI(); costume.assetId = costumeAsset.assetId;
costume.assetType = assetType;
return costumeAsset; return costumeAsset;
}); });