File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -312,11 +312,15 @@ Blockly.Connection.prototype.canConnectWithReason_ = function(target) {
312
312
return Blockly . Connection . REASON_CHECKS_FAILED ;
313
313
} else if ( blockA . isShadow ( ) && ! blockB . isShadow ( ) ) {
314
314
return Blockly . Connection . REASON_SHADOW_PARENT ;
315
- } else if ( blockA . type == Blockly . PROCEDURES_DEFINITION_BLOCK_TYPE &&
316
- blockB . type != 'procedures_prototype' &&
317
- superiorConn == blockA . getInput ( 'custom_block' ) . connection ) {
315
+ } else if ( ( blockA . type == Blockly . PROCEDURES_DEFINITION_BLOCK_TYPE &&
316
+ blockB . type != Blockly . PROCEDURES_PROTOTYPE_BLOCK_TYPE &&
317
+ superiorConn == blockA . getInput ( 'custom_block' ) . connection ) ||
318
+ ( blockB . type == Blockly . PROCEDURES_PROTOTYPE_BLOCK_TYPE &&
319
+ blockA . type != Blockly . PROCEDURES_DEFINITION_BLOCK_TYPE ) ) {
318
320
// Hack to fix #1127: Fail attempts to connect to the custom_block input
319
321
// on a defnoreturn block, unless the connecting block is a specific type.
322
+ // And hack to fix #1534: Fail attempts to connect anything but a
323
+ // defnoreturn block to a prototype block.
320
324
return Blockly . Connection . REASON_CUSTOM_PROCEDURE ;
321
325
}
322
326
return Blockly . Connection . CAN_CONNECT ;
Original file line number Diff line number Diff line change 133
133
</ value >
134
134
</ block >
135
135
</ category >
136
+ < category name ="Statements ">
137
+ < block type ="control_forever "> </ block >
138
+ < block type ="sound_stopallsounds "> </ block >
139
+ < block type ="control_start_as_clone "> </ block >
140
+ < block type ="control_stop ">
141
+ < mutation hasnext ="false "> </ mutation >
142
+ < field name ="STOP_OPTION "> all</ field >
143
+ </ block >
144
+ </ category >
136
145
</ xml >
137
146
138
147
< script >
You can’t perform that action at this time.
0 commit comments