Merge pull request from kchadha/cloud-var-create

Create cloud variables
This commit is contained in:
Karishma Chadha 2018-11-14 21:39:29 -05:00 committed by GitHub
commit 0c9da5d963
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 176 additions and 12 deletions
src/engine

View file

@ -373,7 +373,7 @@ class Blocks {
// into a state where a local var was requested for the stage,
// create a stage (global) var after checking for name conflicts
// on all the sprites.
if (e.isLocal && editingTarget && !editingTarget.isStage) {
if (e.isLocal && editingTarget && !editingTarget.isStage && !e.isCloud) {
if (!editingTarget.lookupVariableById(e.varId)) {
editingTarget.createVariable(e.varId, e.varName, e.varType);
}
@ -385,7 +385,7 @@ class Blocks {
return;
}
}
stage.createVariable(e.varId, e.varName, e.varType);
stage.createVariable(e.varId, e.varName, e.varType, e.isCloud);
}
break;
case 'var_rename':