mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-26 06:10:26 -04:00
Merge pull request #1755 from kchadha/cloud-var-create
Create cloud variables
This commit is contained in:
commit
0c9da5d963
6 changed files with 176 additions and 12 deletions
src/engine
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue