mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-03 17:50:28 -04:00
Update specmap and sb2 import to add new fields to layering blocks.
This commit is contained in:
parent
fe51bd6450
commit
477ef531ba
3 changed files with 21 additions and 3 deletions
src/serialization
|
@ -601,6 +601,20 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Updated layering blocks
|
||||
if (oldOpcode === 'comeToFront') {
|
||||
activeBlock.fields.FRONT_BACK = {
|
||||
name: 'FRONT_BACK',
|
||||
value: 'front'
|
||||
};
|
||||
} else if (oldOpcode === 'goBackByLayers:') {
|
||||
activeBlock.fields.FORWARD_BACKWARD = {
|
||||
name: 'FORWARD_BACKWARD',
|
||||
value: 'backward'
|
||||
};
|
||||
}
|
||||
|
||||
// Special cases to generate mutations.
|
||||
if (oldOpcode === 'stopScripts') {
|
||||
// Mutation for stop block: if the argument is 'other scripts',
|
||||
|
|
|
@ -345,12 +345,12 @@ const specMap = {
|
|||
]
|
||||
},
|
||||
'comeToFront': {
|
||||
opcode: 'looks_gotofront',
|
||||
opcode: 'looks_gotofrontback',
|
||||
argMap: [
|
||||
]
|
||||
},
|
||||
'goBackByLayers:': {
|
||||
opcode: 'looks_gobacklayers',
|
||||
opcode: 'looks_goforwardbackwardlayers',
|
||||
argMap: [
|
||||
{
|
||||
type: 'input',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue