Report missing storage module as an error

This commit is contained in:
Christopher Willis-Ford 2017-03-23 16:00:01 -07:00
parent 3d7f1187e5
commit 10cb97c52e
2 changed files with 4 additions and 4 deletions

View file

@ -162,11 +162,11 @@ var parseScratchObject = function (object, runtime, topLevel) {
*/
var loadCostume = function (md5ext, costume, runtime) {
if (!runtime.storage) {
log('No storage module present; cannot load costume asset: ', md5ext);
log.error('No storage module present; cannot load costume asset: ', md5ext);
return null;
}
if (!runtime.renderer) {
log('No rendering module present; cannot load costume asset: ', md5ext);
log.error('No rendering module present; cannot load costume asset: ', md5ext);
return null;
}
@ -223,7 +223,7 @@ var loadCostume = function (md5ext, costume, runtime) {
*/
var loadSound = function (sound, runtime) {
if (!runtime.storage) {
log('No storage module present; cannot load sound asset: ', sound.md5);
log.error('No storage module present; cannot load sound asset: ', sound.md5);
return;
}
var idParts = sound.md5.split('.');

View file

@ -163,7 +163,7 @@ VirtualMachine.prototype.loadProject = function (json) {
*/
VirtualMachine.prototype.downloadProjectId = function (id) {
if (!this.runtime.storage) {
log('No storage module present; cannot load project: ', id);
log.error('No storage module present; cannot load project: ', id);
return;
}
var vm = this;