disabled "when this scene starts" hat blocks to directly switch to another scene

snap7
jmoenig 2021-09-08 18:05:29 +02:00
rodzic c6cf2413d3
commit 941664eef4
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -37,6 +37,7 @@
* objects: changed category for "switch to scene" to control
* blocks, objects, threads: new hat block for "when this scene starts"
* blocks, threads: changed "switch to scene" to be a stop block
* threads: disabled "when this scene starts" hat blocks to directly switch to another scene
### 2021-09-07
* blocks, objects, threads: new change-of-scene event

Wyświetl plik

@ -4710,7 +4710,12 @@ Process.prototype.doSwitchToScene = function (id) {
ide, scenes, num, scene;
this.assertAlive(rcvr);
if (this.readyToTerminate) {return; } // let the user press "stop" or "esc"
if (this.readyToTerminate || this.topBlock.selector === 'receiveOnScene') {
// let the user press "stop" or "esc",
// prevent "when this scene starts" hat blocks from directly
// switching to another
return;
}
ide = rcvr.parentThatIsA(IDE_Morph);
scenes = ide.scenes;