diff --git a/src/gui.js b/src/gui.js index 5d8709d0..49990d3d 100644 --- a/src/gui.js +++ b/src/gui.js @@ -2831,7 +2831,7 @@ IDE_Morph.prototype.isPaused = function () { IDE_Morph.prototype.stopAllScripts = function () { if (this.world().currentKey === 16) { // shiftClicked - this.scenes.map(scn => scn.stop()); + this.scenes.map(scn => scn.stop(true)); } else { this.scene.stop(); } diff --git a/src/scenes.js b/src/scenes.js index 10c64ab8..40aadd63 100644 --- a/src/scenes.js +++ b/src/scenes.js @@ -225,10 +225,10 @@ Scene.prototype.updateTrash = function () { this.trash = this.trash.filter(sprite => sprite.isCorpse); }; -Scene.prototype.stop = function () { +Scene.prototype.stop = function (forGood) { if (this.stage.enableCustomHatBlocks) { - this.stage.threads.pauseCustomHatBlocks = - !this.stage.threads.pauseCustomHatBlocks; + this.stage.threads.pauseCustomHatBlocks = forGood ? true + : !this.stage.threads.pauseCustomHatBlocks; } else { this.stage.threads.pauseCustomHatBlocks = false; } diff --git a/src/threads.js b/src/threads.js index 698cc934..e250f68d 100644 --- a/src/threads.js +++ b/src/threads.js @@ -2442,14 +2442,14 @@ Process.prototype.doStop = function () { this.stop(); }; -Process.prototype.doStopAll = function () { +Process.prototype.doStopAll = function (forGood) { var stage, ide; if (this.homeContext.receiver) { stage = this.homeContext.receiver.parentThatIsA(StageMorph); if (stage) { if (stage.enableCustomHatBlocks) { - stage.threads.pauseCustomHatBlocks = - !stage.threads.pauseCustomHatBlocks; + stage.threads.pauseCustomHatBlocks = forGood ? true + : !stage.threads.pauseCustomHatBlocks; } else { stage.threads.pauseCustomHatBlocks = false; } @@ -2482,11 +2482,11 @@ Process.prototype.doStopAllScenes = function () { ide = this.homeContext.receiver.parentThatIsA(IDE_Morph); ide.scenes.map(scn => { if (scn !== ide.scene) { - scn.stop(); + scn.stop(true); } }); } - this.doStopAll(); + this.doStopAll(true); }; Process.prototype.doStopThis = function (choice) {