mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-12 05:54:02 -04:00
Remove code that was temporarily accomodating for the old version of the default project in gui.
This commit is contained in:
parent
4ec25b32b1
commit
8c1e6095cb
1 changed files with 7 additions and 18 deletions
|
@ -762,24 +762,13 @@ const parseScratchObject = function (object, runtime, extensions, zip) {
|
|||
if (object.hasOwnProperty('variables')) {
|
||||
for (const varId in object.variables) {
|
||||
const variable = object.variables[varId];
|
||||
let newVariable;
|
||||
if (Array.isArray(variable)) {
|
||||
newVariable = new Variable(
|
||||
varId, // var id is the index of the variable desc array in the variables obj
|
||||
variable[0], // name of the variable
|
||||
Variable.SCALAR_TYPE, // type of the variable
|
||||
(variable.length === 3) ? variable[2] : false // isPersistent/isCloud
|
||||
);
|
||||
newVariable.value = variable[1];
|
||||
} else {
|
||||
newVariable = new Variable(
|
||||
variable.id,
|
||||
variable.name,
|
||||
variable.type,
|
||||
variable.isPersistent
|
||||
);
|
||||
newVariable.value = variable.value;
|
||||
}
|
||||
const newVariable = new Variable(
|
||||
varId, // var id is the index of the variable desc array in the variables obj
|
||||
variable[0], // name of the variable
|
||||
Variable.SCALAR_TYPE, // type of the variable
|
||||
(variable.length === 3) ? variable[2] : false // isPersistent/isCloud
|
||||
);
|
||||
newVariable.value = variable[1];
|
||||
target.variables[newVariable.id] = newVariable;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue