mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Allow extension reporter only if no block args
This commit is contained in:
parent
f5182a231e
commit
8602d5798a
1 changed files with 6 additions and 5 deletions
|
@ -745,9 +745,6 @@ class Runtime extends EventEmitter {
|
|||
case BlockType.REPORTER:
|
||||
blockJSON.output = 'String'; // TODO: distinguish number & string here?
|
||||
blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_ROUND;
|
||||
if (!blockInfo.disableMonitor) {
|
||||
blockJSON.checkboxInFlyout = true;
|
||||
}
|
||||
break;
|
||||
case BlockType.BOOLEAN:
|
||||
blockJSON.output = 'Boolean';
|
||||
|
@ -805,8 +802,12 @@ class Runtime extends EventEmitter {
|
|||
}
|
||||
}
|
||||
|
||||
// Add icon to the bottom right of a loop block
|
||||
if (blockInfo.blockType === BlockType.LOOP) {
|
||||
if (blockInfo.blockType === BlockType.REPORTER) {
|
||||
if (!blockInfo.disableMonitor && context.inputList.length === 0) {
|
||||
blockJSON.checkboxInFlyout = true;
|
||||
}
|
||||
} else if (blockInfo.blockType === BlockType.LOOP) {
|
||||
// Add icon to the bottom right of a loop block
|
||||
blockJSON[`lastDummyAlign${outLineNum}`] = 'RIGHT';
|
||||
blockJSON[`message${outLineNum}`] = '%1';
|
||||
blockJSON[`args${outLineNum}`] = [{
|
||||
|
|
Loading…
Reference in a new issue