mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Resolve issue with SB2 import
This commit is contained in:
parent
645a42b843
commit
57b7e9916d
1 changed files with 3 additions and 0 deletions
|
@ -21,10 +21,12 @@ const {deserializeCostume, deserializeSound} = require('./deserialize-assets.js'
|
||||||
|
|
||||||
// Constants used during deserialization of an SB2 file
|
// Constants used during deserialization of an SB2 file
|
||||||
const CORE_EXTENSIONS = [
|
const CORE_EXTENSIONS = [
|
||||||
|
'argument',
|
||||||
'control',
|
'control',
|
||||||
'data',
|
'data',
|
||||||
'event',
|
'event',
|
||||||
'looks',
|
'looks',
|
||||||
|
'math',
|
||||||
'motion',
|
'motion',
|
||||||
'operator',
|
'operator',
|
||||||
'procedures',
|
'procedures',
|
||||||
|
@ -519,6 +521,7 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension
|
||||||
const index = blockMetadata.opcode.indexOf('_');
|
const index = blockMetadata.opcode.indexOf('_');
|
||||||
const prefix = blockMetadata.opcode.substring(0, index);
|
const prefix = blockMetadata.opcode.substring(0, index);
|
||||||
if (CORE_EXTENSIONS.indexOf(prefix) === -1) {
|
if (CORE_EXTENSIONS.indexOf(prefix) === -1) {
|
||||||
|
console.log(prefix);
|
||||||
extensions.extensionIDs.add(prefix);
|
extensions.extensionIDs.add(prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue