|
6 | 6 | // By: 0znzw <https://scratch.mit.edu/users/0znzw/> |
7 | 7 | // License: MIT |
8 | 8 |
|
9 | | -// Version V.1.2.4 |
| 9 | +// Version V.1.2.41 |
10 | 10 |
|
11 | 11 | (function(Scratch) { |
12 | 12 | "use strict"; |
|
919 | 919 | let connection, newInput; |
920 | 920 | if (type === "brc") { |
921 | 921 | connection = this.makeConnection_(SB.NEXT_STATEMENT); |
| 922 | + if (isPM) connection.setCheck("normal"); |
922 | 923 | newInput = new SB.Input(SB.NEXT_STATEMENT, input.name, this, connection); |
923 | 924 | } else { |
924 | 925 | const imageURL = getStoredImage(store.inputs[input.name].src); |
|
958 | 959 | // ScratchBlocks ways of getting the next block won't work while the blocks are being created |
959 | 960 | const actualNextBlock = this.getNextBlock() || vm?.editingTarget?.blocks?.getBlock(this.id)?.next || (domToBlockXml && domToBlockXml.querySelector("next")); |
960 | 961 | const isReturner = isPM ? this.output_ : this.return_; |
961 | | - if (!store.isTerminal !== undefined && !isReturner && !actualNextBlock) this.setNextStatement(!store.isTerminal, this.type === "procedures_prototype" ? true : undefined); |
| 962 | + if (!store.isTerminal !== undefined && !isReturner && !actualNextBlock) { |
| 963 | + this.setNextStatement( |
| 964 | + !store.isTerminal, |
| 965 | + this.type === "procedures_prototype" ? true : isPM ? "normal" : undefined |
| 966 | + ); |
| 967 | + } |
962 | 968 | } else { |
963 | 969 | // The insertion marker should copy the terminal-ness of the source block, |
964 | 970 | // otherwise Blockly will throw an error |
965 | 971 | const targetBlock = this.workspace?.currentGesture_?.targetBlock_; |
966 | 972 | // targetBlock doesn't exist when dragging to the start of a stack |
967 | 973 | // In this case, it should always be a stack block |
968 | | - this.setNextStatement(targetBlock ? !!targetBlock?.nextConnection : true); |
| 974 | + this.setNextStatement(targetBlock ? !!targetBlock?.nextConnection : true, isPM ? "normal" : undefined); |
969 | 975 | } |
970 | 976 | } |
971 | 977 | for (const opcode of ["procedures_call", "procedures_prototype", "procedures_declaration"]) { |
|
1086 | 1092 | if (!block.isInsertionMarker()) { |
1087 | 1093 | const store = storeGet(block.procCode_); |
1088 | 1094 | if (store && store.isTerminal && block.nextConnection && !block.getNextBlock()) |
1089 | | - block.setNextStatement(!store.isTerminal); |
| 1095 | + block.setNextStatement(!store.isTerminal, isPM ? "normal" : undefined); |
1090 | 1096 | } else { |
1091 | 1097 | // The insertion marker should copy the next connection of the source block |
1092 | | - block.setNextStatement(Boolean(block.getNextBlock())); |
| 1098 | + block.setNextStatement(Boolean(block.getNextBlock()), isPM ? "normal" : undefined); |
1093 | 1099 | } |
1094 | 1100 | } |
1095 | 1101 | // For the previous block when starting a drag of the current block |
|
0 commit comments