From 0dfb32e64f0f0c7bc948d5c1991c840d41ffc093 Mon Sep 17 00:00:00 2001 From: LilyMakesThings <127533508+LilyMakesThings@users.noreply.github.com> Date: Sun, 11 Feb 2024 20:35:38 +0000 Subject: [PATCH 1/2] Update scratch3_control.js --- src/blocks/scratch3_control.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/blocks/scratch3_control.js b/src/blocks/scratch3_control.js index ebf1951514e..8946e71efd2 100644 --- a/src/blocks/scratch3_control.js +++ b/src/blocks/scratch3_control.js @@ -193,13 +193,13 @@ class Scratch3ControlBlocks { } allAtOnce (args, util) { - // Since the "all at once" block is implemented for compatiblity with - // Scratch 2.0 projects, it behaves the same way it did in 2.0, which - // is to simply run the contained script (like "if 1 = 1"). - // (In early versions of Scratch 2.0, it would work the same way as - // "run without screen refresh" custom blocks do now, but this was - // removed before the release of 2.0.) + // In Scratch 3.0 and TurboWarp, this would simply + // run the contained substack. In Unsandboxed, + // we've reimplemented the intended functionality + // of running the stack all in one frame. + util.thread.peekStackFrame().warpMode = false; util.startBranch(1, false); + util.thread.peekStackFrame().warpMode = true; } } From 8f2fa68acc9b07ef9f5a05436769010382707b14 Mon Sep 17 00:00:00 2001 From: LilyMakesThings <127533508+LilyMakesThings@users.noreply.github.com> Date: Sun, 11 Feb 2024 20:37:19 +0000 Subject: [PATCH 2/2] Update jsgen.js --- src/compiler/jsgen.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/jsgen.js b/src/compiler/jsgen.js index ff07f3f0d57..b9a6c5e538b 100644 --- a/src/compiler/jsgen.js +++ b/src/compiler/jsgen.js @@ -876,6 +876,13 @@ class JSGenerator { this.source += `}\n`; break; + case 'control.allAtOnce': + const previousWarp = this.isWarp; + this.isWarp = true; + this.descendStack(node.code, new Frame(false, 'control.allAtOnce')); + this.isWarp = previousWarp; + break; + case 'counter.clear': this.source += 'runtime.ext_scratch3_control._counter = 0;\n'; break;