changed "switch to scene" to be a stop block

snap7
jmoenig 2021-09-08 17:58:00 +02:00
rodzic 62647c8dee
commit c6cf2413d3
3 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

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

Wyświetl plik

@ -5202,7 +5202,8 @@ CommandBlockMorph.prototype.isStop = function () {
return ([ return ([
'doForever', 'doForever',
'doReport', 'doReport',
'removeClone' 'removeClone',
'doSwitchToScene'
].indexOf(this.selector) > -1); ].indexOf(this.selector) > -1);
}; };

Wyświetl plik

@ -4735,6 +4735,7 @@ Process.prototype.doSwitchToScene = function (id) {
idx = this.reportBasicRandom(1, scenes.length()); idx = this.reportBasicRandom(1, scenes.length());
break; break;
} }
this.stop();
ide.switchToScene(scenes.at(idx)); ide.switchToScene(scenes.at(idx));
return; return;
} }
@ -4748,6 +4749,7 @@ Process.prototype.doSwitchToScene = function (id) {
scene = scenes.at(num); scene = scenes.at(num);
} }
this.stop();
ide.switchToScene(scene); ide.switchToScene(scene);
}; };