diff --git a/extensions/Lily/ClonesPlus.js b/extensions/Lily/ClonesPlus.js index ba6ea74f04..ff03493ad0 100644 --- a/extensions/Lily/ClonesPlus.js +++ b/extensions/Lily/ClonesPlus.js @@ -10,8 +10,6 @@ const menuIconURI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ4AAAGeCAYAAACkfGcPAAAAAXNSR0IArs4c6QAAIABJREFUeF7tndl1HEeWQEFZ0ZovmTDGTHsiM9oTjTFjRbe84JwEWWChUJUZEW+Jt9z+6B/Get9yEVWg+O2N/0GgGYHvf/3+PdKVv/3zP98inYezQMCaAAlvTZj1XQlEk4rW5ZGTFknWiUAA8USIAmeYIlBVLlMQ7gYjpVVyzNtFAPHsIs++lwQQzCWi0wEIScaP2XYEEI8dW1aeJIBoJoFNDkdEk8AYbkYA8ZihZeEzAkgmRn4goxhx6HYKxNMt4pvui2g2gZ/cFhFNAmP4EgHEs4SNSSMEkM0IpbhjkFDc2GQ/GeLJHsFA50c0gYJhcBREZAC16ZKIp2ngta6NbLRI5loHCeWKV7TTIp5oEUlwHmSTIEiOR0RCjrCLbIV4igTS+hrIxppwjfWRUI04Wt8C8VgTTrw+skkcvABHR0IBghD0CIgnaGB2Hgvh7KRfb28EVC+m0hshHinBIvORTZFABr8GEgoeIKfjIR4n0BG3QTYRo9LnTEioT6wfb4p4GsYe4TQMeuArI6DAwTE6GuIxAhtxWYQTMSqc6UYAAfXJBcTTINYIp0GQC10RARUK5ourIJ6iMUY2RQPb7FpIqGbAEU+xuCKcYgHlOu8EEFCtREA8ReKJcIoEkmucEkBANRIE8SSPI8JJHkCOv0QAAS1hCzMJ8YQJxdxBEM4cL0bXJICAcsYV8SSMG9JJGDSObEYA+ZihNVsY8Zih1V8Y4egzZcU6BBBQnlgingSxQjgJgsQRwxBAQGFC8fIgiCdwjBBO4OBwtPAEEFDcECGeoLFBOkEDw7FSEUA+McOFeILFBeEECwjHKUEAAcUKI+IJEg+EEyQQHKM0AQQUI7yIJ0AckE6A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g8okVD06zhwDS2cNduivikRLcPB8BbQ4A228hgHC2YFfbFPGoody7EALay5/dfQggHB/O1rsgHmvCzusjIGfgbOdCAOG4YHbbBPG4ofbdCAH58mY3GwIIx4br7lURz+4IOOyPhBwgs4UaAWSjhjLsQognbGj0D4aA9Jmyoh4BhKPHMvpKiCd6hAzOh4AMoLLkMgGEs4wu7UTEkzZ08oMjIDlDVlgngHDW2WWfiXiyR1Dp/EhICSTLnBJANiTIQQDxkAdfCCAhkkKTALLRpFljLcRTI44mt0BAJljbLIpw2oR6+qKIZxpZzwlIqGfcZ2+NbGaJ9RyPeHrGXXRrJCTCV24ysikXUvMLIR5zxLU3QEK14/vqdsimZ9y1bo14tEiyzhsSqp0EyKZ2fD1vh3g8aTfbCxHlDjiiyR2/yKdHPJGjU+hsSChHMJFNjjhlPyXiyR7BpOdHRDECh2hixKHbKRBPt4gHvi8ysg0OkrHly+rjBBDPOCtGOhNARDLgiEbGj9l2BBCPHVtWNiKAkD6DRTBGicayZgQQjxlaFt5BoKqUkMuObGJPKwKIx4os64YlEE1OSCVsqnAwIwL/D9mA6Lk1zUVXAAAAAElFTkSuQmCC"; - const runtime = Scratch.vm.runtime; - /** * @param {VM.Target|null} target * @param {string|unknown} thing @@ -21,55 +19,31 @@ if (!target) { return ""; } - switch (thing) { - case "x position": - return target.x; - case "y position": - return target.y; - case "direction": - return target.direction; - case "costume num": - return target.currentCostume + 1; - case "costume name": - return target.getCostumes()[target.currentCostume].name; - case "size": - return target.size; - case "volume": - return target.volume; - default: - return ""; // this should never happen + if (thing === "x position") { + return target.x; } + if (thing === "y position") { + return target.y; + } + if (thing === "direction") { + return target.direction; + } + if (thing === "costume num") { + return target.currentCostume + 1; + } + if (thing === "costume name") { + return target.getCostumes()[target.currentCostume].name; + } + if (thing === "size") { + return target.size; + } + if (thing === "volume") { + return target.volume; + } + // this should never happen + return ""; }; - let isCreatingCloneWithVariable = false; - - /** - * @param {VM.RenderedTarget} target - */ - const patchMakeClone = (target) => { - // Implements "when I start as clone with [ ] set to [ ]" as an event block. - // Much faster than edge-activated hat. - const originalMakeClone = target.makeClone; - target.makeClone = function () { - // Original makeClone() also starts the vanilla "when I start as clone" blocks. - const clone = originalMakeClone.call(this); - - // If we are inside "create clone of myself with [ ] set to [ ]" then the variable isn't - // set yet. startHats() will evaluate the predicate eagerly, so it wouldn't work here. - if (!isCreatingCloneWithVariable) { - Scratch.vm.runtime.startHats( - "lmsclonesplus_whenCloneStartsWithVar", - null, - clone - ); - } - - return clone; - }; - }; - runtime.on("targetWasCreated", patchMakeClone); - runtime.targets.forEach(patchMakeClone); - class ClonesPlus { getInfo() { return { @@ -87,7 +61,6 @@ "when I start as a clone with [INPUTA] set to [INPUTB]" ), filter: [Scratch.TargetType.SPRITE], - isEdgeActivated: false, arguments: { INPUTA: { type: Scratch.ArgumentType.STRING, @@ -119,7 +92,9 @@ }, extensions: ["colours_control"], }, + "---", + { opcode: "touchingCloneWithVar", blockType: Scratch.BlockType.BOOLEAN, @@ -147,7 +122,9 @@ disableMonitor: true, extensions: ["colours_control"], }, + "---", + { opcode: "setVariableOfClone", blockType: Scratch.BlockType.COMMAND, @@ -232,7 +209,9 @@ }, extensions: ["colours_control"], }, + "---", + { opcode: "cloneExists", blockType: Scratch.BlockType.BOOLEAN, @@ -290,7 +269,9 @@ }, extensions: ["colours_control"], }, + "---", + { opcode: "stopScriptsInSprite", blockType: Scratch.BlockType.COMMAND, @@ -329,7 +310,9 @@ filter: [Scratch.TargetType.SPRITE], extensions: ["colours_control"], }, + "---", + { opcode: "deleteClonesInSprite", blockType: Scratch.BlockType.COMMAND, @@ -361,7 +344,9 @@ }, extensions: ["colours_control"], }, + "---", + { opcode: "isClone", blockType: Scratch.BlockType.BOOLEAN, @@ -370,7 +355,9 @@ disableMonitor: true, extensions: ["colours_control"], }, + "---", + { opcode: "cloneCount", blockType: Scratch.BlockType.REPORTER, @@ -439,6 +426,8 @@ } whenCloneStartsWithVar(args, util) { + // TODO: this is really not ideal. this should be an event-based hat ideally, but we don't have a good + // way to do that right now... if (util.target.isOriginal) { return false; } @@ -451,28 +440,16 @@ } createCloneWithVar(args, util) { - try { - isCreatingCloneWithVariable = true; - - const original = util.target; - const clone = util.target.makeClone(); - if (clone) { - Scratch.vm.runtime.addTarget(clone); - clone.goBehindOther(original); - - const cloneVariable = clone.lookupVariableById(args.INPUTA); - if (cloneVariable) { - cloneVariable.value = args.INPUTB; - } - - Scratch.vm.runtime.startHats( - "lmsclonesplus_whenCloneStartsWithVar", - null, - clone - ); - } - } finally { - isCreatingCloneWithVariable = false; + // @ts-expect-error - not typed yet + Scratch.vm.runtime.ext_scratch3_control._createClone( + util.target.sprite.name, + util.target + ); + const clones = util.target.sprite.clones; + const cloneNum = clones.length - 1; + const cloneVariable = clones[cloneNum].lookupVariableById(args.INPUTA); + if (cloneVariable) { + cloneVariable.value = args.INPUTB; } } @@ -579,14 +556,14 @@ } stopScriptsInSprite(args) { - const targetObj = runtime.getSpriteTargetByName(args.INPUT); + const targetObj = Scratch.vm.runtime.getSpriteTargetByName(args.INPUT); if (targetObj) { - runtime.stopForTarget(targetObj); + Scratch.vm.runtime.stopForTarget(targetObj); } } stopScriptsInMainSprite(args, util) { - runtime.stopForTarget(util.target.sprite.clones[0]); + Scratch.vm.runtime.stopForTarget(util.target.sprite.clones[0]); } stopScriptsInClone(args, util) { @@ -598,19 +575,19 @@ cloneVariable && Scratch.Cast.compare(cloneVariable.value, expectedValue) === 0 ) { - runtime.stopForTarget(clones[index]); + Scratch.vm.runtime.stopForTarget(clones[index]); } } } deleteClonesInSprite(args, util) { - const target = runtime.getSpriteTargetByName(args.INPUT); + const target = Scratch.vm.runtime.getSpriteTargetByName(args.INPUT); if (!target) { return; } const clones = target.sprite.clones; for (let index = clones.length - 1; index > 0; index--) { - runtime.disposeTarget(clones[index]); + Scratch.vm.runtime.disposeTarget(clones[index]); } } @@ -623,7 +600,7 @@ cloneVar && Scratch.Cast.compare(cloneVar.value, expectedValue) === 0 ) { - runtime.disposeTarget(clones[index]); + Scratch.vm.runtime.disposeTarget(clones[index]); } } } @@ -633,11 +610,11 @@ } cloneCount(args, util) { - return runtime._cloneCounter; + return Scratch.vm.runtime._cloneCounter; } spriteCloneCount(args, util) { - const target = runtime.getSpriteTargetByName(args.INPUT); + const target = Scratch.vm.runtime.getSpriteTargetByName(args.INPUT); if (target) { return target.sprite.clones.length - 1; } @@ -693,7 +670,7 @@ getSpriteObj(name) { //This is unused but I'm leaving it in for potential future blocks - const spriteObj = runtime.getSpriteTargetByName(name); + const spriteObj = Scratch.vm.runtime.getSpriteTargetByName(name); return JSON.stringify(spriteObj); }