From dc9ffb0d74c7c2c8d83e7dbaa2dcd358e1f5e412 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Thu, 24 Dec 2020 18:28:27 -0600 Subject: [PATCH] saveProjectSb3 should tell the GUI whether this project uses any TW-exclusive blocks --- src/virtual-machine.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/virtual-machine.js b/src/virtual-machine.js index f1448aa6..b0bb5229 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -444,6 +444,10 @@ class VirtualMachine extends EventEmitter { compressionOptions: { level: 6 // Tradeoff between best speed (1) and best compression (9) } + }).then(result => { + // tw: We want to let the GUI know whether this project uses block that won't work in Scratch. + result.usesExtendedExtensions = JSON.parse(projectJson).extensions.includes('tw'); + return result; }); }