mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -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:
|
case BlockType.REPORTER:
|
||||||
blockJSON.output = 'String'; // TODO: distinguish number & string here?
|
blockJSON.output = 'String'; // TODO: distinguish number & string here?
|
||||||
blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_ROUND;
|
blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_ROUND;
|
||||||
if (!blockInfo.disableMonitor) {
|
|
||||||
blockJSON.checkboxInFlyout = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case BlockType.BOOLEAN:
|
case BlockType.BOOLEAN:
|
||||||
blockJSON.output = 'Boolean';
|
blockJSON.output = 'Boolean';
|
||||||
|
@ -805,8 +802,12 @@ class Runtime extends EventEmitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
// Add icon to the bottom right of a loop block
|
||||||
if (blockInfo.blockType === BlockType.LOOP) {
|
|
||||||
blockJSON[`lastDummyAlign${outLineNum}`] = 'RIGHT';
|
blockJSON[`lastDummyAlign${outLineNum}`] = 'RIGHT';
|
||||||
blockJSON[`message${outLineNum}`] = '%1';
|
blockJSON[`message${outLineNum}`] = '%1';
|
||||||
blockJSON[`args${outLineNum}`] = [{
|
blockJSON[`args${outLineNum}`] = [{
|
||||||
|
|
Loading…
Reference in a new issue