mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Update sb2 deserialization of monitors.
This commit is contained in:
parent
1a4f0a75f2
commit
d690c76a34
1 changed files with 4 additions and 1 deletions
|
@ -287,7 +287,7 @@ const parseMonitorObject = (object, runtime, targets, extensions) => {
|
||||||
{},
|
{},
|
||||||
null, // `comments`, not needed for monitor blocks
|
null, // `comments`, not needed for monitor blocks
|
||||||
null // `commentIndex`, not needed for monitor blocks
|
null // `commentIndex`, not needed for monitor blocks
|
||||||
);
|
); // This block is needed for the `getBlockParams` call down below
|
||||||
|
|
||||||
// Monitor blocks have special IDs to match the toolbox obtained from the getId
|
// Monitor blocks have special IDs to match the toolbox obtained from the getId
|
||||||
// function in the runtime.monitorBlocksInfo. Variable monitors, however,
|
// function in the runtime.monitorBlocksInfo. Variable monitors, however,
|
||||||
|
@ -326,6 +326,9 @@ const parseMonitorObject = (object, runtime, targets, extensions) => {
|
||||||
runtime.monitorBlocks.createBlock(newBlocks[i]);
|
runtime.monitorBlocks.createBlock(newBlocks[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// In the case where a monitor block does not already exist, one will get created
|
||||||
|
// when the target is installed because the toolbox will reload.
|
||||||
|
|
||||||
|
|
||||||
// Convert numbered mode into strings for better understandability.
|
// Convert numbered mode into strings for better understandability.
|
||||||
switch (object.mode) {
|
switch (object.mode) {
|
||||||
|
|
Loading…
Reference in a new issue