Initial commit of 001code-html Scratch frontend project.
Includes scratch-gui, scratch-vm, scratch-blocks, scratch-render, scratch-l10n, and deployment config. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
scratch-vm/test/snapshot/README.md
Normal file
21
scratch-vm/test/snapshot/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Snapshot tests
|
||||
|
||||
Snapshot testing runs the compiler on many of the test projects in test/fixtures/execute and verifies that the compiled output is identical to a pre-calculated "snapshot". This verifies:
|
||||
|
||||
- The compiler is deterministic (mostly)
|
||||
- The compiler's output does not change unexpectedly
|
||||
- Optimizations and type analysis in the generated code are working properly
|
||||
|
||||
These snapshots are automatically verified as part of the integration tests. There is also a more readable CLI for humans. To verify the snapshots:
|
||||
|
||||
```
|
||||
node test/snapshot
|
||||
```
|
||||
|
||||
When the compiler's output or the test projects have intentionally changed, run:
|
||||
|
||||
```
|
||||
node test/snapshot --update
|
||||
```
|
||||
|
||||
Verify that the snapshot diff is what you expect, then commit the changes.
|
||||
@@ -0,0 +1,84 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b677669506b60e3ba350be8ae545db93d7bcbb5f368ba21d86b0d4e966e7e09c
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["p]KODv+)+:l=%NT~j3/d-order"];
|
||||
const b1 = stage.variables["p]KODv+)+:l=%NT~j3/d-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (1)",}, b2, false, false, "]4hbk*5ix]V00h|!x1oy", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 1 != " + ("" + b0.value)),}, b2, false, false, "H=x@7SpNJeX|!}8x5y4,", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite3 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["p]KODv+)+:l=%NT~j3/d-wait"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "1Ba%a0GIK#hwJ46y=WVt", null);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a2 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a2) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "}-I/zE+.RSi`:h[RxMvQ", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["p]KODv+)+:l=%NT~j3/d-order"];
|
||||
const b1 = stage.variables["p]KODv+)+:l=%NT~j3/d-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (2)",}, b2, false, false, "0i[-T:vYTt=bi47@byUE", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 2 != " + ("" + b0.value)),}, b2, false, false, "Coc1aZ;L9M-RyEt`syps", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,84 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 7f0df1e9c4a6b87f8bbea53b22d5a1201ebe774e535661cef5da3bd75af45c11
|
||||
|
||||
// Sprite3 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["):/PVGTvoVRvq(ikGwRE-wait"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "s+@:|^WPr8]N1Y9Hk2f5", null);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a2 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a2) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "7e7aA!PF-sxf1uka+sh2", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["):/PVGTvoVRvq(ikGwRE-order"];
|
||||
const b1 = stage.variables["):/PVGTvoVRvq(ikGwRE-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (1)",}, b2, false, false, "RSQ{nVCc)6E)(`KlnFCF", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 1 != " + ("" + b0.value)),}, b2, false, false, "8k^j~`c^|YO@hkFd?~2d", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["):/PVGTvoVRvq(ikGwRE-order"];
|
||||
const b1 = stage.variables["):/PVGTvoVRvq(ikGwRE-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (2)",}, b2, false, false, "KP?op(=Vg2#;@]!,C#.~", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 2 != " + ("" + b0.value)),}, b2, false, false, "=]|}L~4uQXTNtwJKw_;R", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,71 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2c124b6184d3cbeb3d692ba7a04266d8bf141c650a9cc43b28faf59ac394ee16
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 20",}, b0, false, false, "v", null);
|
||||
if ((("" + (0 * Infinity)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "6", null);
|
||||
}
|
||||
if (compareEqual((((0 * Infinity) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "#", null);
|
||||
}
|
||||
if ((("" + ((Math.acos(1.01) * 180) / Math.PI)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "9", null);
|
||||
}
|
||||
if (compareEqual(((((Math.acos(1.01) * 180) / Math.PI) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "(", null);
|
||||
}
|
||||
if ((("" + ((Math.asin(1.01) * 180) / Math.PI)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "*", null);
|
||||
}
|
||||
if (compareEqual(((((Math.asin(1.01) * 180) / Math.PI) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ",", null);
|
||||
}
|
||||
if ((("" + (0 / 0)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ".", null);
|
||||
}
|
||||
if (compareEqual((((0 / 0) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ":", null);
|
||||
}
|
||||
if ((("" + Math.sqrt(-1)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "?", null);
|
||||
}
|
||||
if (compareEqual(((Math.sqrt(-1) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "@", null);
|
||||
}
|
||||
if ((("" + mod(0, 0)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "]", null);
|
||||
}
|
||||
if (compareEqual(((mod(0, 0) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "_", null);
|
||||
}
|
||||
if ((("" + Math.log(-1)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "{", null);
|
||||
}
|
||||
if (compareEqual(((Math.log(-1) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "}", null);
|
||||
}
|
||||
if ((("" + (Math.log(-1) / Math.LN10)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "aa", null);
|
||||
}
|
||||
if (compareEqual((((Math.log(-1) / Math.LN10) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ac", null);
|
||||
}
|
||||
if (compareEqual((((Math.round(Math.sin((Math.PI * ((1 / 0) || 0)) / 180) * 1e10) / 1e10) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ae", null);
|
||||
}
|
||||
if (compareEqual((((Math.round(Math.cos((Math.PI * ((1 / 0) || 0)) / 180) * 1e10) / 1e10) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ag", null);
|
||||
}
|
||||
if (compareEqual(((tan(((1 / 0) || 0)) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ai", null);
|
||||
}
|
||||
if (compareEqual(((runtime.ext_scratch3_operators._random((-1 / 0), (1 / 0)) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ak", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "7", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b435d9356099286cb062435cc2eb968544bcbcd9213e2b6da902eb3bb689f425
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "6_?4sPB-|g:DtjdOm5Q-", null);
|
||||
if (!((Infinity + -Infinity) <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ")-u2YbbMb;gXMPOidjPj", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "zqE}hdaes.b)@mO1{R;X", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 428175715a6d8670b809c69bdda12e5043eff9921ccdd908507636a625938702
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "1TRvh{mBarwY!BX8`o$R", null);
|
||||
if (true) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "K|r`QjC126S.93lMawiD", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "QaZ%(g:;bB~D+24z:U?l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,24 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 9ecff9e3c4b1dcdf3e23d0e49c0a2da3de446b6d626a2b5ee39d761be20344ca
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "f", null);
|
||||
yield* thread.procedures["ZBlock A %s"]("Hai!!!");
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 ZBlock A %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_Block_A_ (p0) {
|
||||
if ((("" + p0).toLowerCase() === "Hai!!!".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass did not cast",}, b0, false, false, "m", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail was casted",}, b0, false, false, "n", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,20 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: f2d984762d77ff375ba3e39b5d57190b71a131f0d8620d2becb2735b7da116c3
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "?@x?KlY[GHB#^le;O^;Z", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "*S!`s:/sOEm#Bd%7=h7E", null);
|
||||
yield* waitThreads(startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }));
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g#w*ISI)$Wi.45AszY|1", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,22 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: d1f532866d8de3d81185db7ecb94ecaa4e7549feb4e26ee4f849cd0aaf1bb154
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "()*H*UE)$Jc!c}qb{,O)", null);
|
||||
target.setSize(96);
|
||||
b1.value = 0;
|
||||
while (!(100 === Math.round(target.size))) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
target.setSize(target.size + ((((100 - Math.round(target.size)) || 0) / 10) || 0));
|
||||
yield;
|
||||
}
|
||||
if (((+b1.value || 0) === 20)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "FPDFR?Wwq)kLj0A$0D{@", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "1,vLoJ4OQBv+Q#$VoYf=", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,16 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 28a59bb79ba328f31ac0b79f49143a2513080e30a7383fda80579d08021c3c82
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "c", null);
|
||||
b1.value = "#22388a";
|
||||
if ((("" + b1.value).toLowerCase() === "#22388a".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "f", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "e", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,131 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 698b7a46d7ae7b0ea802888a6515a629f9a13721cae399629902031b0aa9c633
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "ae", null);
|
||||
yield* thread.procedures["Wrun test"]();
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "aZ", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wrun test
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["mfV;yS}9e:%h5UZ)QyiY"];
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = stage.variables["n^wm8jw#b24sggt.S^tD"];
|
||||
const b3 = stage.variables["_]6^lq+-%H0{ov`tKt7$"];
|
||||
const b4 = stage.variables["3lyKRepBc$tx)EWlpr!y"];
|
||||
const b5 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_run_test () {
|
||||
thread.procedures["Wsetup values"]();
|
||||
b0.value = 0;
|
||||
b1.value = 0;
|
||||
for (var a0 = b2.value.length; a0 >= 0.5; a0--) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
b3.value = 0;
|
||||
for (var a1 = b2.value.length; a1 >= 0.5; a1--) {
|
||||
b3.value = ((+b3.value || 0) + 1);
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (!compareEqual(compareGreaterThan(listGet(b2.value, b1.value), (b2.value[((b3.value || 0) | 0) - 1] ?? "")), (b4.value[((b0.value || 0) | 0) - 1] ?? ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail " + (("" + listGet(b2.value, b1.value)) + (" should be > " + ("" + listGet(b2.value, b3.value))))),}, b5, true, false, "]", null);
|
||||
}
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (!compareEqual(compareEqual(listGet(b2.value, b1.value), listGet(b2.value, b3.value)), (b4.value[((b0.value || 0) | 0) - 1] ?? ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail " + (("" + listGet(b2.value, b1.value)) + (" should be = " + ("" + listGet(b2.value, b3.value))))),}, b5, true, false, "|", null);
|
||||
}
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (!compareEqual(compareLessThan(listGet(b2.value, b1.value), listGet(b2.value, b3.value)), (b4.value[((b0.value || 0) | 0) - 1] ?? ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail " + (("" + listGet(b2.value, b1.value)) + (" should be < " + ("" + listGet(b2.value, b3.value))))),}, b5, true, true, "ab", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wsetup values
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["n^wm8jw#b24sggt.S^tD"];
|
||||
return function funXYZ_setup_values () {
|
||||
b0.value = [];
|
||||
b0.value.push(0);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(1);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(2);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(-1);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(-2);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("0.0");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-0.");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-0.0");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(".123");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-.123");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("1.");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((0 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((2 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-1 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-2 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((0.123 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-0.123 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("1e99");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1e+99 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(Infinity);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(-Infinity);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-infinitY");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1 / 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-1 / 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((0 / 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(NaN);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("nan");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-NaN");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("true");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("false");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(!false);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(!!false);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("Banana");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(" ");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("🎉");
|
||||
b0._monitorUpToDate = false;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,36 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b1e62179f7a495c46c7e9c64a03d405924f6011b66aa71f6ec0f1781b936d38c
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = runtime.getSpriteTargetByName("Sprite1");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "`f)8`e7_V%]cmRy7eZ?*", null);
|
||||
target.setXY(1e-9, target.y);
|
||||
if ((limitPrecision(target.x) === 1e-9)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass much above x does not round",}, b0, false, false, "wnAyae772?^VZ]bq?#*p", null);
|
||||
}
|
||||
if (((b1 ? b1.x : 0) === 1e-9)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass initial 'of' test",}, b0, false, false, "${qf}t3_Wf_/sqC#i0WN", null);
|
||||
}
|
||||
target.setXY(target.x + 0, target.y);
|
||||
runtime.ext_scratch3_motion._moveSteps(0, target);
|
||||
target.setXY(target.x + -9e-10, target.y);
|
||||
if (((b1 ? b1.x : 0) === 1.0000000000000007e-10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 'of' never rounds - positive x",}, b0, false, false, "zt/Fd,i768/rohNq-OU/", null);
|
||||
}
|
||||
if ((limitPrecision(target.x) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass x slightly above 0 rounds",}, b0, false, false, "p5a6(?e#B|B(d.fe;b6F", null);
|
||||
}
|
||||
target.setXY(target.x + -9e-10, target.y);
|
||||
target.setXY(target.x, target.y + 0);
|
||||
if (((b1 ? b1.x : 0) === -7.999999999999999e-10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 'of' never rounds and change x - negative x",}, b0, false, false, "![=|9E8]xp_9QR]fu}4M", null);
|
||||
}
|
||||
if ((limitPrecision(target.x) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass x slightly below 0 rounds",}, b0, false, false, "4o-vB]D}HJ1/*qW~k3Cd", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "8We]d__[]7X;@+e*x~^@", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,41 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 29dd30c632645f071bfd450530dab86dc85a2c1cf30564bee984394a790eca6a
|
||||
|
||||
// 2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if ((runtime.ext_scratch3_control._counter === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass global",}, b0, false, false, "C", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "B", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// 1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 5",}, b0, false, false, "g", null);
|
||||
if ((runtime.ext_scratch3_control._counter === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass initial value = 0",}, b0, false, false, "q", null);
|
||||
}
|
||||
runtime.ext_scratch3_control._counter++;
|
||||
if ((runtime.ext_scratch3_control._counter === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass incr 1",}, b0, false, false, "s", null);
|
||||
}
|
||||
runtime.ext_scratch3_control._counter++;
|
||||
if ((runtime.ext_scratch3_control._counter === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass incr 2",}, b0, false, false, "u", null);
|
||||
}
|
||||
runtime.ext_scratch3_control._counter = 0;
|
||||
if ((runtime.ext_scratch3_control._counter === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass clear = 0",}, b0, false, false, "w", null);
|
||||
}
|
||||
for (var a0 = 10; a0 >= 0.5; a0--) {
|
||||
runtime.ext_scratch3_control._counter++;
|
||||
yield;
|
||||
}
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "check globalness" });
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,27 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: d293b52c4330db5d33eddb66742496017b5c96baacc41654961cfa97d08668d8
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null);
|
||||
b1.value = 0;
|
||||
for (var a0 = (+thread.procedures["Zblock name"]() || 0); a0 >= 0.5; a0--) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
yield;
|
||||
}
|
||||
if (((+b1.value || 0) === 40)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "n", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zblock name
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_block_name () {
|
||||
return 40;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,23 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: fd48053df5e75de0ec56ac106699076335b2bd46266f8da4e4d81d52e29f5c29
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 4",}, b0, false, false, "i", null);
|
||||
if (compareGreaterThan(("something".toLowerCase() === "something".toLowerCase()), ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "k", null);
|
||||
}
|
||||
if (compareLessThan(("something".toLowerCase() === "else".toLowerCase()), ("1" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null);
|
||||
}
|
||||
if (compareGreaterThan(("something".toLowerCase() === "something".toLowerCase()), (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "n", null);
|
||||
}
|
||||
if (compareLessThan(("something".toLowerCase() === "else".toLowerCase()), (1 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "o", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,28 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 1fa5a314682ce218a097be41607e4eb456a2b046a47ca46d01a1033323afa544
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = runtime.getOpcodeFunction("motion_pointtowards");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 4",}, b0, false, false, "h", null);
|
||||
target.setDirection(95);
|
||||
if ((target.direction === 95)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "o", null);
|
||||
}
|
||||
target.setDirection(((1 / 0) || 0));
|
||||
if ((target.direction === 95)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 2",}, b0, false, false, "r", null);
|
||||
}
|
||||
target.setDirection(((0 / 0) || 0));
|
||||
if ((target.direction === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 3",}, b0, false, false, "u", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"TOWARDS":"Sprite2",}, b1, false, false, "g", null);
|
||||
if ((target.direction === 90)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 4",}, b0, false, false, "y", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "w", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,32 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 725e0683c8cd39c78a143727bf26f8827d1e9fd627eef68a772d8a3a06806c65
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "j", null);
|
||||
b1.value = runtime.ext_scratch3_operators._random(("an invalid number" + "."), 1);
|
||||
if (!(b1.value <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null);
|
||||
}
|
||||
if (compareLessThan(b1.value, 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "r", null);
|
||||
}
|
||||
if ((("" + b1.value).toLowerCase().indexOf(".".toLowerCase()) !== -1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "s", null);
|
||||
}
|
||||
b1.value = runtime.ext_scratch3_operators._random(1, ("an invalid number" + "."));
|
||||
if (!(b1.value <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "v", null);
|
||||
}
|
||||
if (compareLessThan(b1.value, 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "x", null);
|
||||
}
|
||||
if ((("" + b1.value).toLowerCase().indexOf(".".toLowerCase()) !== -1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "A", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "y", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,23 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 1d02d01ddcd53c67e093bda79912f19683829f86fd23e1f77cbfc0aef03dc0f3
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = target.variables["gTtSj;o_E;Snkn620KF."];
|
||||
const b2 = target.variables["zShM`!CD?d_|Z,]5X}N6"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "d", null);
|
||||
b1.value = 2;
|
||||
if (((+b1.value || 0) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass variable",}, b0, false, false, "k", null);
|
||||
}
|
||||
b2.value = [];
|
||||
b2.value.push(3);
|
||||
b2._monitorUpToDate = false;
|
||||
if (((+(b2.value[(1 | 0) - 1] ?? "") || 0) === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass list",}, b0, false, false, "m", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,80 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: a8576b7695ad77f7d5a7ac9fb76d31f026c0869f16f55d16fa40b85972b43e30
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("sound_setvolumeto");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"VOLUME":0,}, b0, false, false, "d", null);
|
||||
b1.value = 0;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b2, false, false, "g", null);
|
||||
yield* thread.procedures["Wno refresh"]();
|
||||
yield* thread.procedures["Wruns below with no refresh"]();
|
||||
if (compareEqual(b1.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b2, false, false, "v", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b2, false, false, "f", null);
|
||||
runtime.stopAll();
|
||||
retire(); return;
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wno refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("music_restForBeats");
|
||||
const b1 = runtime.getOpcodeFunction("music_playDrumForBeats");
|
||||
return function* genXYZ_no_refresh () {
|
||||
for (var a0 = 30; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"BEATS":0,}, b0, true, false, "m", null);
|
||||
yield* executeInCompatibilityLayer({"DRUM":1,"BEATS":0,}, b1, true, false, "b", null);
|
||||
runtime.ext_scratch3_motion._moveSteps(0, target);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wruns below with no refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ_runs_below_with_no_r () {
|
||||
yield* thread.procedures["Whas refresh"]();
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Whas refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("music_restForBeats");
|
||||
const b1 = runtime.getOpcodeFunction("music_playDrumForBeats");
|
||||
return function* genXYZ_has_refresh () {
|
||||
for (var a0 = 30; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"BEATS":0,}, b0, true, false, "r", null);
|
||||
yield* executeInCompatibilityLayer({"DRUM":1,"BEATS":0,}, b1, true, false, "c", null);
|
||||
runtime.ext_scratch3_motion._moveSteps(0, target);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,25 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: fd981742e0e4299bad5a89349635d3a7d0467d8163ae77ba4bafe43c97849bae
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "d", null);
|
||||
thread.procedures["Zfoo %s"]("");
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zfoo %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_foo_ (p0) {
|
||||
return "";
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zno op
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_no_op () {
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,38 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: a4ae71d2c1b70f29a667c2d582b24702068f1d128512b7aee53b2feddd274527
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["eFlmP1{XC+I1:h0Yln.K"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 7",}, b0, false, false, "h", null);
|
||||
b1.value = [];
|
||||
listInsert(b1, "any", "a");
|
||||
listInsert(b1, "any", "b");
|
||||
listInsert(b1, "any", "c");
|
||||
if ((b1.value.length === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "s", null);
|
||||
}
|
||||
if (listContains(b1, "a")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "v", null);
|
||||
}
|
||||
if (listContains(b1, "b")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "x", null);
|
||||
}
|
||||
if (listContains(b1, "c")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "z", null);
|
||||
}
|
||||
if (listContains(b1, listGet(b1.value, "any"))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "A", null);
|
||||
}
|
||||
listDelete(b1, "any");
|
||||
if ((b1.value.length === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "C", null);
|
||||
}
|
||||
if (compareEqual(listGet(b1.value, "*"), "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "F", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "E", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,27 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 360d8b29e0e690dda9e91faed6881057d1f38d98258ed8e11c75bdd30536b560
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, null, null);
|
||||
b1.value = 0;
|
||||
for (var a0 = (+thread.procedures["Zblock name"]() || 0); a0 >= 0.5; a0--) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
yield;
|
||||
}
|
||||
if (((+b1.value || 0) === 4)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, null, null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, null, null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 block name
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_block_name () {
|
||||
return 4;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,33 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 58dd6f369897907ea46fffbb8210d8bc15db59f26ce117ff4211035afff17f23
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = runtime.getOpcodeFunction("sensing_userid");
|
||||
const b3 = runtime.getOpcodeFunction("motion_xscroll");
|
||||
const b4 = runtime.getOpcodeFunction("motion_yscroll");
|
||||
const b5 = runtime.getOpcodeFunction("motion_scroll_right");
|
||||
const b6 = runtime.getOpcodeFunction("motion_scroll_up");
|
||||
const b7 = runtime.getOpcodeFunction("motion_align_scene");
|
||||
const b8 = runtime.getOpcodeFunction("looks_setstretchto");
|
||||
const b9 = runtime.getOpcodeFunction("looks_changestretchby");
|
||||
const b10 = runtime.getOpcodeFunction("looks_hideallsprites");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "pW2KnJW$%KXFoppMJBAi", null);
|
||||
b1.value = (yield* executeInCompatibilityLayer({}, b2, false, false, "X[|X;C.(v[|^i|@0Eqy4", null));
|
||||
b1.value = (yield* executeInCompatibilityLayer({}, b3, false, false, "z;H$hVK7X;MZSyO9U/#1", null));
|
||||
b1.value = (yield* executeInCompatibilityLayer({}, b4, false, false, ";Q94_J}Jv36TqTll;ji*", null));
|
||||
yield* executeInCompatibilityLayer({"DISTANCE":10,}, b5, false, false, "_TLJeW5hG9gAtYO2c*D9", null);
|
||||
yield* executeInCompatibilityLayer({"DISTANCE":10,}, b6, false, false, "o=l#1WJR!L37RN`q:`8E", null);
|
||||
yield* executeInCompatibilityLayer({"ALIGNMENT":"bottom-left",}, b7, false, false, "idkZ9I+=Q:@xXm;N-2Oy", null);
|
||||
yield* executeInCompatibilityLayer({"STRETCH":100,}, b8, false, false, "AMs-%pRGK*v6a[.XifN1", null);
|
||||
yield* executeInCompatibilityLayer({"STRETCH":100,}, b8, false, false, "g+bBVCHp+A[-X2E7-7#|", null);
|
||||
yield* executeInCompatibilityLayer({"CHANGE":10,}, b9, false, false, "ZN24~,cX56Dc2k4vt}HB", null);
|
||||
yield* executeInCompatibilityLayer({"CHANGE":10,}, b9, false, false, "Zjds+5Is*:nb7wnX{rYN", null);
|
||||
yield* executeInCompatibilityLayer({}, b10, false, false, "8X_d`@6,B7%wzr7.xE}t", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "C/%^M/1/S`iX8*M~Q;!3", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "(C;YJ2L~?zR[Y)Wti?3m", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 169af11f112ebea3d6768317652a72a6374c407f432537990689d46080fe2b92
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "@|B*yJ0zKh!acN`7L-N5", null);
|
||||
if ((((1 / -0) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "=enYDFG11Nj/0BL:y56w", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, ",Cpv8W0RH0RgNky[1xb:", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,51 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 19e0b3f9dcac763041039a8ffe87b6732eb744f9ebb136e8d61a53ccf19118e3
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["PsY$$vp$IVH;dDAr[q2h"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
const b2 = stage.variables["l^q!%fq]Bv;72dlGf}^Z"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b1, false, false, "}fY]VN(X|v/[G`P0?@s2", null);
|
||||
for (var a0 = 30; a0 >= 0.5; a0--) {
|
||||
b2.value = runtime.ioDevices.clock.projectTimer();
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
b0.value = 1;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "mDG0BTTG/wwr;/Uz~u^c", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["l^q!%fq]Bv;72dlGf}^Z"];
|
||||
const b1 = runtime.getOpcodeFunction("event_whengreaterthan");
|
||||
const b2 = stage.variables["PsY$$vp$IVH;dDAr[q2h"];
|
||||
const b3 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
{
|
||||
const resolvedValue = toBoolean((yield* executeInCompatibilityLayer({"VALUE":b0.value,"WHENGREATERTHANMENU":"TIMER",}, b1, false, false, "iNmua~6veGey6O-_UB9.", null)));
|
||||
const id = "iNmua~6veGey6O-_UB9.";
|
||||
const hasOldEdgeValue = target.hasEdgeActivatedValue(id);
|
||||
const oldEdgeValue = target.updateEdgeActivatedValue(id, resolvedValue);
|
||||
const edgeWasActivated = hasOldEdgeValue ? (!oldEdgeValue && resolvedValue) : resolvedValue;
|
||||
if (!edgeWasActivated) {
|
||||
retire(); return;
|
||||
}
|
||||
yield;
|
||||
}
|
||||
if (compareEqual(b2.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b3, false, false, "JE9*Ms@I!EKJ-|Bcga#W", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,20 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 5b964fa791468016b188af74e50cadad73d482be066b104bb22faff7e4a156dc
|
||||
|
||||
// Player script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "#0F2+kcgu;or|hdwuT9{", null);
|
||||
yield* thread.procedures["ZSet Costume"]();
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Q^(MKge)QH2e:WH6b6g@", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Player ZSet Costume
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_Set_Costume () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "Z$W^@c(f)rHu:DL/SGuQ", null);
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,33 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: a340f37844807c66f3b85eb4e85c8092a779d33d50e5655e035420ae05cea26c
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "J#qm1yA(@Z6mj%Mgh;0X", null);
|
||||
yield* thread.procedures["Znumber or text %s %s"]("bad","ok");
|
||||
yield* thread.procedures["Zboolean %b %b"]("false",!false);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "$R-1lb(Mu?gdTIH^;kC_", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Znumber or text %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_number_or_text__ (p0,p1) {
|
||||
if ((("" + p1).toLowerCase() === "ok".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "HH`yRe9(x5%D:eV@EmkE", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zboolean %b %b
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_boolean__ (p0,p1) {
|
||||
if (toBoolean(p1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "M^!cgco]B(V)je$a6lF7", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,25 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2afbb43dad9e66e37997e13bf3ffb90bf39effd8974c2eb1a95bed61d437b6de
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "qf{MD}-f+l?U+)KA#Vnm", null);
|
||||
b1.value = "";
|
||||
thread.procedures["Zdo something"]();
|
||||
if (!compareEqual(b1.value, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "Sgf_#7|GOpx!R]?Q3]$s", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, ",vD-ZG7f{]FoJ`,))JWh", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zdo something
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function funXYZ_do_something () {
|
||||
b0.value = "help";
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,11 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 9805621c896afb4a8ed71236417a0311e5f4f38378214914625248b6157178b4
|
||||
|
||||
// Apple script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "a", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "f", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,54 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b9110339d39947f68168cbb129a20b23b7d4e607ffd5624bd67e096451f6a329
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * -1);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "o", null);
|
||||
b1.value = 0;
|
||||
if (compareEqual(thread.procedures["Zinvalid params - reporter"](), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass invalid params reporter",}, b0, false, false, "L", null);
|
||||
}
|
||||
if (compareEqual(thread.procedures["Zinvalid params - boolean"](), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass invalid params boolean",}, b0, false, false, "N", null);
|
||||
}
|
||||
runtime.stopForTarget(target, thread);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "P", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zinvalid params - reporter
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_invalid_params___rep () {
|
||||
return 0;
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zinvalid params - boolean
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_invalid_params___boo () {
|
||||
return 0;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,17 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2d07ab31e7f1e6f263996fa42ff79f849fed048a047d68960bd324960bcc1452
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null);
|
||||
b1.value = "discard me";
|
||||
b1.value = "";
|
||||
if (compareEqual(b1.value, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non existent procedure returned empty string",}, b0, false, false, "h", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,146 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b1802636bbbd479dcf8634a525798c5b4dd9b0201cf6af6f5b4879455368c328
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 18",}, b0, false, false, "G", null);
|
||||
b1.value = 0;
|
||||
b2.value = (yield* thread.procedures["Znon warp recursion should yield %s"](8));
|
||||
if (((+b1.value || 0) === 4)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp recursion yields",}, b0, false, false, "ao", null);
|
||||
}
|
||||
b1.value = 0;
|
||||
b2.value = thread.procedures["Wwarp recursion should not yield %s"](8);
|
||||
if (((+b1.value || 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass warp recursion does not yield",}, b0, false, false, "ar", null);
|
||||
}
|
||||
b1.value = 0;
|
||||
b2.value = (yield* thread.procedures["Zfib %s"](7));
|
||||
if (((+b1.value || 0) === 20)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp fib yielded",}, b0, false, false, "au", null);
|
||||
}
|
||||
yield* thread.procedures["Zrecursing yields between each %s"]("initial");
|
||||
yield* thread.procedures["Zrecursing arguments eval order %s %s %s %s"]("initial","","","");
|
||||
runtime.stopForTarget(target, thread);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "av", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Znon warp recursion should yield %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ_non_warp_recursion_s (p0) {
|
||||
if (compareGreaterThan(p0, 0)) {
|
||||
return (yield* yieldThenCallGenerator(thread.procedures["Znon warp recursion should yield %s"], ((+p0 || 0) - 1)));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wwarp recursion should not yield %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_warp_recursion_shoul (p0) {
|
||||
if (compareGreaterThan(p0, 0)) {
|
||||
return thread.procedures["Wwarp recursion should not yield %s"](((+p0 || 0) - 1));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zfib %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ_fib_ (p0) {
|
||||
if (compareLessThan(p0, 2)) {
|
||||
return p0;
|
||||
} else {
|
||||
return ((+(yield* yieldThenCallGenerator(thread.procedures["Zfib %s"], ((+p0 || 0) - 1))) || 0) + (+(yield* yieldThenCallGenerator(thread.procedures["Zfib %s"], ((+p0 || 0) - 2))) || 0));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zrecursing yields between each %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_recursing_yields_bet (p0) {
|
||||
if ((("" + p0).toLowerCase() === "initial".toLowerCase())) {
|
||||
b0.value = 0;
|
||||
b1.value = ((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 1)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 1)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 2)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 2)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 3)) || 0) + (+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 3)) || 0)) || 0)) || 0)) || 0)) || 0));
|
||||
if (((+b0.value || 0) === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recursing between calls yields final",}, b2, false, false, "aK", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail recursing between calls yields final",}, b2, false, false, "aL", null);
|
||||
}
|
||||
} else {
|
||||
if (compareEqual(b0.value, p0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("pass recursing between calls yields " + ("" + p0)),}, b2, false, false, "#", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail recursing between calls yields " + ("" + p0)),}, b2, false, false, "%", null);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zrecursing arguments eval order %s %s %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["4HH82mPlVMOONdl(Ot*7"];
|
||||
const b1 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b3 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_recursing_arguments_ (p0,p1,p2,p3) {
|
||||
if ((("" + p0).toLowerCase() === "initial".toLowerCase())) {
|
||||
b0.value = [];
|
||||
b1.value = 0;
|
||||
b2.value = (yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 1",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 2",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 3",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 4","","","")),(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 5","","","")),(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 6","","","")))),"","")),"",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 7","","",""))));
|
||||
if ((("" + (b0.value[(1 | 0) - 1] ?? "")).toLowerCase() === "1/child 4".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 1",}, b3, false, false, "aZ", null);
|
||||
}
|
||||
if ((("" + (b0.value[(2 | 0) - 1] ?? "")).toLowerCase() === "1/child 5".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 2",}, b3, false, false, "a#", null);
|
||||
}
|
||||
if ((("" + (b0.value[(3 | 0) - 1] ?? "")).toLowerCase() === "2/child 6".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 3",}, b3, false, false, "a(", null);
|
||||
}
|
||||
if ((("" + (b0.value[(4 | 0) - 1] ?? "")).toLowerCase() === "2/child 3".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 4",}, b3, false, false, "a*", null);
|
||||
}
|
||||
if ((("" + (b0.value[(5 | 0) - 1] ?? "")).toLowerCase() === "3/child 2".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 5",}, b3, false, false, "a,", null);
|
||||
}
|
||||
if ((("" + (b0.value[(6 | 0) - 1] ?? "")).toLowerCase() === "3/child 7".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 6",}, b3, false, false, "a.", null);
|
||||
}
|
||||
if ((("" + (b0.value[(7 | 0) - 1] ?? "")).toLowerCase() === "4/child 1".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 7",}, b3, false, false, "a:", null);
|
||||
}
|
||||
if ((b0.value.length === 7)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - length is correct",}, b3, false, false, "a=", null);
|
||||
}
|
||||
} else {
|
||||
b0.value.push((("" + b1.value) + ("/" + ("" + p0))));
|
||||
b0._monitorUpToDate = false;
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * -1);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,111 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: cd516553f3cbf4a41ae9a8bc1f5d06a3392d365226bccdfa294578314f18facb
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 8",}, b0, false, false, "x", null);
|
||||
if ((("" + thread.procedures["Zsimplest"]()).toLowerCase() === "It works!".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass simplest",}, b0, false, false, ":", null);
|
||||
}
|
||||
if ((("" + thread.procedures["Znesting 1"]()).toLowerCase() === "42-54".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass nesting1",}, b0, false, false, "=", null);
|
||||
}
|
||||
if (((+thread.procedures["Wwarp fib %s"](12) || 0) === 144)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass fib 12",}, b0, false, false, "@", null);
|
||||
}
|
||||
if (((+thread.procedures["Wfactorial %s"](12) || 0) === 479001600)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass factorial 12",}, b0, false, false, "]", null);
|
||||
}
|
||||
b1.value = (yield* thread.procedures["Zno shadowing 1 %s %s"]("f","g"));
|
||||
if (compareEqual(b1.value, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass default return value",}, b0, false, false, "|", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "`", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zsimplest
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_simplest () {
|
||||
return "It works!";
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Znesting 1
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_nesting_1 () {
|
||||
thread.procedures["Znesting 2"]();
|
||||
return (("" + thread.procedures["Znesting 3 %s %s"](6,7)) + ("" + thread.procedures["Znesting 3 %s %s"](-1,54)));
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wwarp fib %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_warp_fib_ (p0) {
|
||||
return thread.procedures["Wfib %s"](p0);
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wfactorial %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_factorial_ (p0) {
|
||||
if (compareGreaterThan(p0, 1)) {
|
||||
return ((+p0 || 0) * (+thread.procedures["Wfactorial %s"](((+p0 || 0) - 1)) || 0));
|
||||
}
|
||||
return 1;
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zno shadowing 1 %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ_no_shadowing_1__ (p0,p1) {
|
||||
if (((("" + p0).toLowerCase() === "f".toLowerCase()) && (("" + p1).toLowerCase() === "g".toLowerCase()))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass shadow check 1",}, b0, false, false, "aq", null);
|
||||
}
|
||||
b1.value = thread.procedures["Zno shadowing 2 %s %s"](1,2);
|
||||
if (((("" + p0).toLowerCase() === "f".toLowerCase()) && (("" + p1).toLowerCase() === "g".toLowerCase()))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass shadow check 2",}, b0, false, false, "au", null);
|
||||
}
|
||||
b1.value = thread.procedures["Zno shadowing 2 %s %s"](3,4);
|
||||
if (((("" + p0).toLowerCase() === "f".toLowerCase()) && (("" + p1).toLowerCase() === "g".toLowerCase()))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass shadow check 3",}, b0, false, false, "ax", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Znesting 2
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_nesting_2 () {
|
||||
return "discard nesting 2";
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Znesting 3 %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_nesting_3__ (p0,p1) {
|
||||
return ((+p0 || 0) * (+p1 || 0));
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wfib %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_fib_ (p0) {
|
||||
if (compareLessThan(p0, 2)) {
|
||||
return p0;
|
||||
} else {
|
||||
return ((+thread.procedures["Wfib %s"](((+p0 || 0) - 1)) || 0) + (+thread.procedures["Wfib %s"](((+p0 || 0) - 2)) || 0));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zno shadowing 2 %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_no_shadowing_2__ (p0,p1) {
|
||||
return "discard shadow 2";
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,51 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 27368530b97e0ab5053bf4faf8fd116aa30cea34adcbd95fc6ddcf0a9d6d4976
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["PsAI*C{QHI3*4?O8p#TM"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "f", null);
|
||||
yield* thread.procedures["Wreturn stops the script immediately"]();
|
||||
if (((+b1.value || 0) === 25)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass return stopped the script immediately",}, b0, false, false, "u", null);
|
||||
}
|
||||
yield* waitThreads(startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "Test return outside of custom block" }));
|
||||
if (((+b1.value || 0) === 18)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass return worked to stop outside of custom block",}, b0, false, false, "x", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "v", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wreturn stops the script immediately
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["PsAI*C{QHI3*4?O8p#TM"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_return_stops_the_scr () {
|
||||
b0.value = 0;
|
||||
for (var a0 = 100; a0 >= 0.5; a0--) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 25)) {
|
||||
return "stopped!";
|
||||
}
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail return did not stop the script immediately",}, b1, true, false, "z", null);
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["PsAI*C{QHI3*4?O8p#TM"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 18)) {
|
||||
retire(); return;
|
||||
}
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,120 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: e652f448fbf09a37afacb03afa9f3448cce43aef06439b58b44aeec73edb0438
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * -1);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 3",}, b0, false, false, "k", null);
|
||||
yield* thread.procedures["Znon warp"]();
|
||||
runtime.stopForTarget(target, thread);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "N", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Znon warp
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_non_warp () {
|
||||
b0.value = 0;
|
||||
for (var a0 = 5; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
if (((+b0.value || 0) === 5)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp 1",}, b1, false, false, "R", null);
|
||||
}
|
||||
if ((("" + (yield* thread.procedures["Wverify runs warp %s"]((yield* thread.procedures["Zverify runs non warp %s"]((yield* thread.procedures["Wverify runs warp %s"]("abc"))))))).toLowerCase() === "warp: non warp: warp: abc".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp and warp mix",}, b1, false, false, "S", null);
|
||||
}
|
||||
b0.value = 0;
|
||||
for (var a2 = 5; a2 >= 0.5; a2--) {
|
||||
thread.timer = timer();
|
||||
var a3 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a3) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
if (((+b0.value || 0) === 5)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp 2",}, b1, false, false, "W", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wverify runs warp %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_verify_runs_warp_ (p0) {
|
||||
b0.value = 0;
|
||||
for (var a0 = 5; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
}
|
||||
if (!compareEqual(b0.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail did not run warp",}, b1, true, false, "Z", null);
|
||||
}
|
||||
return ("warp: " + ("" + p0));
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zverify runs non warp %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_verify_runs_non_warp (p0) {
|
||||
b0.value = 0;
|
||||
for (var a0 = 5; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
if (compareEqual(b0.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail ran warp",}, b1, false, false, "L", null);
|
||||
}
|
||||
return ("non warp: " + ("" + p0));
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,52 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: f8c5c7c3ba1afbd140646e67d9987964cdcdf0cb30b53a0f6276b11f460e7d25
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["JbF5exWEi*m?-UEmkASS"];
|
||||
const b1 = stage.variables["[G/@.KGc-4y[(GZ(bt7o"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
const b3 = runtime.getOpcodeFunction("sound_seteffectto");
|
||||
return function* genXYZ () {
|
||||
while (true) {
|
||||
if (compareEqual(b0.value, b1.value)) {
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b2, false, false, "89/dl$1dp$~nj81:jj@H", null);
|
||||
b1.value = b0.value;
|
||||
yield* executeInCompatibilityLayer({"VALUE":b0.value,"EFFECT":"pitch",}, b3, false, true, "*=8r,g4Pzvxo?aSMcpfX", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["[G/@.KGc-4y[(GZ(bt7o"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
const b2 = stage.variables["JbF5exWEi*m?-UEmkASS"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 15",}, b1, false, false, "0/2-)Gp^^=haQ1OMD.xb", null);
|
||||
for (var a0 = 15; a0 >= 0.5; a0--) {
|
||||
if (((+b2.value || 0) === 200)) {
|
||||
b2.value = 50;
|
||||
} else {
|
||||
b2.value = 200;
|
||||
}
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "--nBRXyJfqS0MM9`#S3}", null);
|
||||
runtime.stopAll();
|
||||
retire(); return;
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,34 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 128cc735fefc374c5935e2c3d9c28b7d07c03d58cd0d6abec4e879c41f4afb1c
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aQ(Y!Bs3;[rV^Q%AQ,NX", null);
|
||||
b1.value = 0;
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
if (((+b1.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "`SX*FG*Lwo*0_T=box-@", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "|#`zzPA_x%{`FyIAQhb4", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,26 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 89920bf89edf85596d13e7781c1ea5de2fea61c0adf78ecdd41e4a7ab824aebe
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "J#qm1yA(@Z6mj%Mgh;0X", null);
|
||||
thread.procedures["Zswitch %s"]("1");
|
||||
if ((((target.currentCostume + 1) === 2) && ((+target.getCostumes()[target.currentCostume].name || 0) === 1))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ";DM$.QW6o-O+T/oBdqt!", null);
|
||||
}
|
||||
thread.procedures["Zswitch %s"]("2");
|
||||
if ((((target.currentCostume + 1) === 1) && ((+target.getCostumes()[target.currentCostume].name || 0) === 2))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "71a9Slk0w=^~x;5T@nw,", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "$R-1lb(Mu?gdTIH^;kC_", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zswitch %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_switch_ (p0) {
|
||||
runtime.ext_scratch3_looks._setCostume(target, p0);
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,38 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: dc029abbf128cea0830f4578e89619949837ec26dfa76f110ca599a9ee12e66e
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["G{NQ*NXG*qzywe1Q3?FM"];
|
||||
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "c", null);
|
||||
b1.value = 0;
|
||||
b2.value = 0;
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b1 = stage.variables["G{NQ*NXG*qzywe1Q3?FM"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if (compareEqual(b0.value, 0)) {
|
||||
b0.value = 1;
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
b1.value = 1;
|
||||
for (var a0 = 1; a0 >= 0.5; a0--) {
|
||||
yield;
|
||||
}
|
||||
b1.value = 2;
|
||||
} else {
|
||||
if (((+b1.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b2, false, false, "p", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b2, false, false, "n", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,114 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2086fa5dfdd5f98dcafc01064231a018edb5698b3b4cc403a9cfaeabb5125c06
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage && stage.lookupVariableByNameAndType("Stage variable", "", true);
|
||||
const b2 = runtime.getSpriteTargetByName("Test sprite");
|
||||
const b3 = b2 && b2.lookupVariableByNameAndType("Private variable", "", true);
|
||||
const b4 = stage && stage.lookupVariableByNameAndType("This variable used to exist", "", true);
|
||||
const b5 = stage.variables["GTmK+*w8mNQP,z`4WG8#"];
|
||||
const b6 = runtime.getSpriteTargetByName("Sprite that doesn't exist");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 32",}, b0, false, false, "oX(r}qUQo7fd[u~D_4@T", null);
|
||||
if (((stage.currentCostume + 1) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass backdrop #",}, b0, false, false, "T9..K[5LEO1f~{%eoPU;", null);
|
||||
}
|
||||
if ((stage.getCostumes()[stage.currentCostume].name.toLowerCase() === "Backdrop name test".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass backdrop name",}, b0, false, false, "q63|^NKAu?OMK%W-s}+~", null);
|
||||
}
|
||||
if (((stage ? stage.volume : 0) === 45)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass stage volume",}, b0, false, false, "9Coi(uM:DG!WPZ($,SnY", null);
|
||||
}
|
||||
if ((("" + (b1 ? b1.value : 0)).toLowerCase() === "Variable in stage".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass stage variable",}, b0, false, false, "D_EA]xN%|[NsTKqc4up9", null);
|
||||
}
|
||||
if (((b2 ? b2.x : 0) === 19)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass x",}, b0, false, false, "ek^n,6zjHyX;YOW;H@]?", null);
|
||||
}
|
||||
if (((b2 ? b2.y : 0) === 20)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass y",}, b0, false, false, "-DZ%ny~~x.m12l9I64~W", null);
|
||||
}
|
||||
if (((b2 ? b2.direction : 0) === 89)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass direction",}, b0, false, false, "$Y=E2o@3oa-^OHt5v:-b", null);
|
||||
}
|
||||
if (((b2 ? b2.currentCostume + 1 : 0) === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass costume #",}, b0, false, false, "+zO[+f?c7F`ZGTbD.oqI", null);
|
||||
}
|
||||
if ((("" + (b2 ? b2.getCostumes()[b2.currentCostume].name : 0)).toLowerCase() === "Costume name test".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass costume name",}, b0, false, false, "Y6L|T0Pvwsct2gq+HGvv", null);
|
||||
}
|
||||
if (((b2 ? b2.size : 0) === 76.01)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass size",}, b0, false, false, "IBZv@o)qX~r6)!;hqaWa", null);
|
||||
}
|
||||
if (((b2 ? b2.volume : 0) === 14.3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass volume",}, b0, false, false, "JBHJ,)N)@]~;;yFTY`RG", null);
|
||||
}
|
||||
if ((("" + (b3 ? b3.value : 0)).toLowerCase() === "Private variable value".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass private variable",}, b0, false, false, "#jYbx])r8^`95~ZgPtZD", null);
|
||||
}
|
||||
if (compareEqual((b4 ? b4.value : 0), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non existent variable",}, b0, false, false, ")nnN?*l+E)dC(fT5(_@q", null);
|
||||
}
|
||||
b5.value = (("" + randomInt(1, 9)) + ("" + randomInt(1, 9)));
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: b5.value, PROPERTY: "backdrop #" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop #",}, b0, false, false, "UFr{fbR3@a.u_paq:r]F", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "backdrop name" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop name",}, b0, false, false, "wzVsIitt0^t(wDS-V3?Z", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "volume" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE volume",}, b0, false, false, ":SZx%]xR5t`;;@M~:jT:", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "Stage variable" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE stage variable",}, b0, false, false, "!eEjdEJj!yYb{buag^M[", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "x position" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE x",}, b0, false, false, "!6!o,FiLV=w2bS~{R|AK", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "y position" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE y",}, b0, false, false, "5K7_7*adzRDbfFjxanQF", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "direction" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE direction",}, b0, false, false, "D{z)e;(*H|.gAykbuSkE", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "costume #" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE costume #",}, b0, false, false, "WgCH3j9ObHA,;P3T=now", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "costume name" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE costume name",}, b0, false, false, "qhxQy$^wiOTOEu.=2^i)", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "size" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE size",}, b0, false, false, "+6V.t=]xZ=Gl?%-OWbFy", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "volume" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE volume",}, b0, false, false, "*E:B}?C@H2ce2uRr9.9=", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "Private variable" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE private variable",}, b0, false, false, "B6r;3{7R7g4Z.pzeGiCM", null);
|
||||
}
|
||||
if (((b6 ? b6.x : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop #",}, b0, false, false, "q[X%xv.u6==Riu20?y{I", null);
|
||||
}
|
||||
if (((b6 ? b6.y : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop name",}, b0, false, false, "?M4CH@e3~]30+$4[brH[", null);
|
||||
}
|
||||
if (((b6 ? b6.direction : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE volume",}, b0, false, false, "H:D~v_)nZ?oJ8X|qHag#", null);
|
||||
}
|
||||
if (((b6 ? b6.currentCostume + 1 : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE stage variable",}, b0, false, false, "lqwZ[26e,$PwYz,OlO0X", null);
|
||||
}
|
||||
if (compareEqual((b6 ? b6.getCostumes()[b6.currentCostume].name : 0), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE x",}, b0, false, false, "I@zdHi0kl|{:ze_J.}S_", null);
|
||||
}
|
||||
if (((b6 ? b6.size : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE y",}, b0, false, false, "qD{Ni|{SL:`04:Gj/A7B", null);
|
||||
}
|
||||
if (((b6 ? b6.volume : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE direction",}, b0, false, false, "vvB(iq@jjvj{=_{:6DXZ", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "dJRK.)mKX6,r26Jy]5qr", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,47 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 5592b1a64924003352fa3d2d9157c797689a702f55ba39c73a5e0bc862f57e59
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "5,snC%48IW(1ZVM(k0l2", null);
|
||||
b1.value = "Initial";
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* waitThreads(startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "Test 1" }));
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "5.$W?rkoLYkKo1qX@%@?", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if ((("" + b0.value).toLowerCase() === "Initial".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b1, false, false, "eR%8T)3MQjkbQkAh~L0%", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Stage script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ () {
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Stage script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = target.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
b0.value = "Stage callback";
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: f54b97baf31500c1b6bd5b9865ce96b8aeef1001169bbe4550bbcbff84f2dae6
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "6_?4sPB-|g:DtjdOm5Q-", null);
|
||||
if (!((Infinity - Infinity) <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ")-u2YbbMb;gXMPOidjPj", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "zqE}hdaes.b)@mO1{R;X", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,40 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 86c1734c101ee85e6f737f891d6ca338d72b17026ab60d289ea7861351c65124
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["Kl,Own0m6{^v3$E{Wsc="];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "i", null);
|
||||
b1.value = "\t";
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Kl,Own0m6{^v3$E{Wsc="];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if (compareEqual(b0.value, ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t in a variable = string 0",}, b1, false, false, "q", null);
|
||||
}
|
||||
if (compareEqual("\t", ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass literal \\t = string 0",}, b1, false, false, "u", null);
|
||||
}
|
||||
if (compareEqual((" " + ("" + b0.value)), ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t and other spaces = string 0",}, b1, false, false, "w", null);
|
||||
}
|
||||
if (compareEqual(b0.value, (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t in a variable = number 0",}, b1, false, false, "z", null);
|
||||
}
|
||||
if (compareEqual("\t", (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass literal \\t = number 0",}, b1, false, false, "B", null);
|
||||
}
|
||||
if (compareEqual((" " + ("" + b0.value)), (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t and other spaces = number 0",}, b1, false, false, "E", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "D", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,56 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 1446684578b41ff41cf29fbe14696ef717cca636e8d46babd7d9dec6df723a33
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 15",}, b0, false, false, "p", null);
|
||||
if (compareEqual(tan(0), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 0",}, b0, false, false, "O", null);
|
||||
}
|
||||
if (((tan(90) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 90",}, b0, false, false, "G", null);
|
||||
}
|
||||
if (compareEqual(tan(180), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 180",}, b0, false, false, "I", null);
|
||||
}
|
||||
if (((tan(270) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 270",}, b0, false, false, "K", null);
|
||||
}
|
||||
if (compareEqual(tan(360), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 360",}, b0, false, false, "M", null);
|
||||
}
|
||||
if (((tan(450) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 450",}, b0, false, false, "Q", null);
|
||||
}
|
||||
if (compareEqual(tan(540), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 540",}, b0, false, false, "S", null);
|
||||
}
|
||||
if (((tan(630) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 630",}, b0, false, false, "U", null);
|
||||
}
|
||||
if (compareEqual(tan(720), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 720",}, b0, false, false, "W", null);
|
||||
}
|
||||
if (((tan(810) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 810",}, b0, false, false, "Y", null);
|
||||
}
|
||||
if (((tan(-90) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -90",}, b0, false, false, "0", null);
|
||||
}
|
||||
if (compareEqual(tan(-180), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -180",}, b0, false, false, "2", null);
|
||||
}
|
||||
if (((tan(-270) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -270",}, b0, false, false, "4", null);
|
||||
}
|
||||
if (compareEqual(tan(-360), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -360",}, b0, false, false, "6", null);
|
||||
}
|
||||
if (((tan(-450) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -450",}, b0, false, false, "9", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "8", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,86 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: badd564b5bce22a82223511c91ba701da5314e5ad83e46a08ea5f401a4338b20
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables[",OktMIwz{~bdgWnPEa8u"];
|
||||
const b2 = stage.variables["yfy(G`K5K^fJcXAfiN4i"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 14",}, b0, false, false, "S8W[CSRh5A:[y8s/Ridj", null);
|
||||
if ((10 === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "1ove2a-$DQw7qy5PGdgq", null);
|
||||
}
|
||||
if ((10 === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 2",}, b0, false, false, "@A5}x{mm-Gk?CVz3o0Yn", null);
|
||||
}
|
||||
b1.value = 10;
|
||||
if (((+b1.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 3",}, b0, false, false, "Ul:BCck-}Fvdux~x#$${", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 4",}, b0, false, false, "8]2$7P)o#+#Lo]mFSBbx", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 5",}, b0, false, false, "ZU^{OfKTg|+Au$$q0[]u", null);
|
||||
}
|
||||
for (var a0 = 1; a0 >= 0.5; a0--) {
|
||||
if (((+b1.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 6",}, b0, false, false, "HB+_IN}6=K[*ksxKXH0`", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 7",}, b0, false, false, ";73ODiwcp8IthYURTX;S", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 8",}, b0, false, true, "${[MFmBL-D*1rbas9Q89", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
yield;
|
||||
}
|
||||
b2.value = "010";
|
||||
if (((+b2.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 9",}, b0, false, false, "#.`@SBj!g-c0:_q/tMZo", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 10",}, b0, false, false, "B`o?V6/q6g),/2w};a#y", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 11",}, b0, false, false, "TJ:#TkYBys*!RYiKLXb)", null);
|
||||
}
|
||||
for (var a1 = 1; a1 >= 0.5; a1--) {
|
||||
if (((+b2.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 12",}, b0, false, false, ",Z,~10Qo~j;(+VL+I3q:", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 13",}, b0, false, false, "|Mqx([(26M%#ggW9)U0s", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 14",}, b0, false, true, "YvtiKF231lU8p5Qd97RP", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
yield;
|
||||
}
|
||||
if ((0 === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "yO!,nQodLC}uqIc?212+", null);
|
||||
}
|
||||
if ((1 === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "XzQt!.^A,SV?q0`Ui)wG", null);
|
||||
}
|
||||
if ((0 === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "rxZqw7cv8g;PDM4B%{`?", null);
|
||||
}
|
||||
if (compareEqual(" ", 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "3G|)eVw1mQm;O~cRy`}0", null);
|
||||
}
|
||||
if (compareEqual(0, " ")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "sd5xXX*tsW/~A_Q!0;^w", null);
|
||||
}
|
||||
if (compareEqual("", 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "7**baE=].WD9OoY1+IEu", null);
|
||||
}
|
||||
if (compareEqual(0, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "7!IB!=o/2H.Jqj-8Vwhz", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "df{tf!WhfRwXgQ?SN_dj", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,28 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2ae215411916e72c845c0f613d5b93f017b16af3010c6f4b0bbb3d1087eec301
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null);
|
||||
yield* thread.procedures["Wrun without screen refresh"]();
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "s", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wrun without screen refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["F?*}X,`9XBpN_[piGRrz"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_run_without_screen_r () {
|
||||
b0.value = (((daysSince2000() * 86400) || 0) + 3);
|
||||
runtime.ioDevices.clock.resetProjectTimer();
|
||||
while (!((runtime.ioDevices.clock.projectTimer() > 0.1) || compareGreaterThan((daysSince2000() * 86400), b0.value))) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
if (compareLessThan((daysSince2000() * 86400), b0.value)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b1, true, false, "u", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,19 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: ae6b920864ec07bc5a36b4af493b1646e54241abadabfa7bf962b43610ad926d
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Ny4npe`j3|CTeaIS.:6O", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "2T.vCF,K}vA=XNZ=kY+v", null);
|
||||
runtime.ext_scratch3_looks._setBackdrop(stage, stage.currentCostume + 1, true);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,19 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 503e54070a6a749f8ffbcfad08d64cff3c1abb9400a7519b623b3876bd97e54a
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Ny4npe`j3|CTeaIS.:6O", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "2T.vCF,K}vA=XNZ=kY+v", null);
|
||||
runtime.ext_scratch3_looks._setBackdrop(stage, "backdrop2");
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,32 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 6fe809479042e5ba09d66bffbd62d5a38d2265c98818e937d63137d2dcdc2fec
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["7qur6!bGgvC9I(Nd5.HP"];
|
||||
const b2 = stage.variables["sUOp@-6J4y0PqwiXit4!"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, ",a.euo_AgQTxR+D^x0M0", null);
|
||||
b1.value = 0;
|
||||
b2.value = "";
|
||||
while (!compareGreaterThan(b2.value, "")) {
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "step" });
|
||||
yield;
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "miAC8JZ$@akv[+}KR*@B", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "gXJU#lhy3A3XA_s[-Xs$", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["7qur6!bGgvC9I(Nd5.HP"];
|
||||
const b1 = stage.variables["sUOp@-6J4y0PqwiXit4!"];
|
||||
return function* genXYZ () {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 5)) {
|
||||
b1.value = "end";
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,84 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b677669506b60e3ba350be8ae545db93d7bcbb5f368ba21d86b0d4e966e7e09c
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["p]KODv+)+:l=%NT~j3/d-order"];
|
||||
const b1 = stage.variables["p]KODv+)+:l=%NT~j3/d-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (1)",}, b2, false, false, "]4hbk*5ix]V00h|!x1oy", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 1 != " + ("" + b0.value)),}, b2, false, false, "H=x@7SpNJeX|!}8x5y4,", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite3 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["p]KODv+)+:l=%NT~j3/d-wait"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "1Ba%a0GIK#hwJ46y=WVt", null);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a2 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a2) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "}-I/zE+.RSi`:h[RxMvQ", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["p]KODv+)+:l=%NT~j3/d-order"];
|
||||
const b1 = stage.variables["p]KODv+)+:l=%NT~j3/d-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (2)",}, b2, false, false, "0i[-T:vYTt=bi47@byUE", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 2 != " + ("" + b0.value)),}, b2, false, false, "Coc1aZ;L9M-RyEt`syps", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,84 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 7f0df1e9c4a6b87f8bbea53b22d5a1201ebe774e535661cef5da3bd75af45c11
|
||||
|
||||
// Sprite3 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["):/PVGTvoVRvq(ikGwRE-wait"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "s+@:|^WPr8]N1Y9Hk2f5", null);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
thread.timer = timer();
|
||||
var a2 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a2) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "7e7aA!PF-sxf1uka+sh2", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["):/PVGTvoVRvq(ikGwRE-order"];
|
||||
const b1 = stage.variables["):/PVGTvoVRvq(ikGwRE-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (1)",}, b2, false, false, "RSQ{nVCc)6E)(`KlnFCF", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 1 != " + ("" + b0.value)),}, b2, false, false, "8k^j~`c^|YO@hkFd?~2d", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["):/PVGTvoVRvq(ikGwRE-order"];
|
||||
const b1 = stage.variables["):/PVGTvoVRvq(ikGwRE-wait"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * (+b1.value || 0));
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass order is correct (2)",}, b2, false, false, "KP?op(=Vg2#;@]!,C#.~", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail order is incorrect 2 != " + ("" + b0.value)),}, b2, false, false, "=]|}L~4uQXTNtwJKw_;R", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,71 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2c124b6184d3cbeb3d692ba7a04266d8bf141c650a9cc43b28faf59ac394ee16
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 20",}, b0, false, false, "v", null);
|
||||
if ((("" + (0 * Infinity)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "6", null);
|
||||
}
|
||||
if (compareEqual((((0 * Infinity) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "#", null);
|
||||
}
|
||||
if ((("" + ((Math.acos(1.01) * 180) / Math.PI)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "9", null);
|
||||
}
|
||||
if (compareEqual(((((Math.acos(1.01) * 180) / Math.PI) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "(", null);
|
||||
}
|
||||
if ((("" + ((Math.asin(1.01) * 180) / Math.PI)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "*", null);
|
||||
}
|
||||
if (compareEqual(((((Math.asin(1.01) * 180) / Math.PI) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ",", null);
|
||||
}
|
||||
if ((("" + (0 / 0)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ".", null);
|
||||
}
|
||||
if (compareEqual((((0 / 0) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ":", null);
|
||||
}
|
||||
if ((("" + Math.sqrt(-1)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "?", null);
|
||||
}
|
||||
if (compareEqual(((Math.sqrt(-1) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "@", null);
|
||||
}
|
||||
if ((("" + mod(0, 0)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "]", null);
|
||||
}
|
||||
if (compareEqual(((mod(0, 0) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "_", null);
|
||||
}
|
||||
if ((("" + Math.log(-1)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "{", null);
|
||||
}
|
||||
if (compareEqual(((Math.log(-1) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "}", null);
|
||||
}
|
||||
if ((("" + (Math.log(-1) / Math.LN10)).toLowerCase() === "NaN".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "aa", null);
|
||||
}
|
||||
if (compareEqual((((Math.log(-1) / Math.LN10) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ac", null);
|
||||
}
|
||||
if (compareEqual((((Math.round(Math.sin((Math.PI * ((1 / 0) || 0)) / 180) * 1e10) / 1e10) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ae", null);
|
||||
}
|
||||
if (compareEqual((((Math.round(Math.cos((Math.PI * ((1 / 0) || 0)) / 180) * 1e10) / 1e10) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ag", null);
|
||||
}
|
||||
if (compareEqual(((tan(((1 / 0) || 0)) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ai", null);
|
||||
}
|
||||
if (compareEqual(((runtime.ext_scratch3_operators._random((-1 / 0), (1 / 0)) || 0) * 1), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "ak", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "7", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b435d9356099286cb062435cc2eb968544bcbcd9213e2b6da902eb3bb689f425
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "6_?4sPB-|g:DtjdOm5Q-", null);
|
||||
if (!((Infinity + -Infinity) <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ")-u2YbbMb;gXMPOidjPj", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "zqE}hdaes.b)@mO1{R;X", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 428175715a6d8670b809c69bdda12e5043eff9921ccdd908507636a625938702
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "1TRvh{mBarwY!BX8`o$R", null);
|
||||
if (true) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "K|r`QjC126S.93lMawiD", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "QaZ%(g:;bB~D+24z:U?l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,24 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 9ecff9e3c4b1dcdf3e23d0e49c0a2da3de446b6d626a2b5ee39d761be20344ca
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "f", null);
|
||||
yield* thread.procedures["ZBlock A %s"]("Hai!!!");
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 ZBlock A %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_Block_A_ (p0) {
|
||||
if ((("" + p0).toLowerCase() === "Hai!!!".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass did not cast",}, b0, false, false, "m", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail was casted",}, b0, false, false, "n", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,20 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: f2d984762d77ff375ba3e39b5d57190b71a131f0d8620d2becb2735b7da116c3
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "?@x?KlY[GHB#^le;O^;Z", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "*S!`s:/sOEm#Bd%7=h7E", null);
|
||||
yield* waitThreads(startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }));
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g#w*ISI)$Wi.45AszY|1", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,22 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: d1f532866d8de3d81185db7ecb94ecaa4e7549feb4e26ee4f849cd0aaf1bb154
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "()*H*UE)$Jc!c}qb{,O)", null);
|
||||
target.setSize(96);
|
||||
b1.value = 0;
|
||||
while (!(100 === Math.round(target.size))) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
target.setSize(target.size + ((((100 - Math.round(target.size)) || 0) / 10) || 0));
|
||||
yield;
|
||||
}
|
||||
if (((+b1.value || 0) === 20)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "FPDFR?Wwq)kLj0A$0D{@", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "1,vLoJ4OQBv+Q#$VoYf=", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,16 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 28a59bb79ba328f31ac0b79f49143a2513080e30a7383fda80579d08021c3c82
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "c", null);
|
||||
b1.value = "#22388a";
|
||||
if ((("" + b1.value).toLowerCase() === "#22388a".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "f", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "e", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,133 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 698b7a46d7ae7b0ea802888a6515a629f9a13721cae399629902031b0aa9c633
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "ae", null);
|
||||
yield* thread.procedures["Wrun test"]();
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "aZ", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wrun test
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["mfV;yS}9e:%h5UZ)QyiY"];
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = stage.variables["n^wm8jw#b24sggt.S^tD"];
|
||||
const b3 = stage.variables["_]6^lq+-%H0{ov`tKt7$"];
|
||||
const b4 = stage.variables["3lyKRepBc$tx)EWlpr!y"];
|
||||
const b5 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_run_test () {
|
||||
thread.procedures["Wsetup values"]();
|
||||
b0.value = 0;
|
||||
b1.value = 0;
|
||||
for (var a0 = b2.value.length; a0 >= 0.5; a0--) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
b3.value = 0;
|
||||
for (var a1 = b2.value.length; a1 >= 0.5; a1--) {
|
||||
b3.value = ((+b3.value || 0) + 1);
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (!compareEqual(compareGreaterThan(listGet(b2.value, b1.value), (b2.value[((b3.value || 0) | 0) - 1] ?? "")), (b4.value[((b0.value || 0) | 0) - 1] ?? ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail " + (("" + listGet(b2.value, b1.value)) + (" should be > " + ("" + listGet(b2.value, b3.value))))),}, b5, true, false, "]", null);
|
||||
}
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (!compareEqual(compareEqual(listGet(b2.value, b1.value), listGet(b2.value, b3.value)), (b4.value[((b0.value || 0) | 0) - 1] ?? ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail " + (("" + listGet(b2.value, b1.value)) + (" should be = " + ("" + listGet(b2.value, b3.value))))),}, b5, true, false, "|", null);
|
||||
}
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (!compareEqual(compareLessThan(listGet(b2.value, b1.value), listGet(b2.value, b3.value)), (b4.value[((b0.value || 0) | 0) - 1] ?? ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail " + (("" + listGet(b2.value, b1.value)) + (" should be < " + ("" + listGet(b2.value, b3.value))))),}, b5, true, true, "ab", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wsetup values
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["n^wm8jw#b24sggt.S^tD"];
|
||||
return function funXYZ_setup_values () {
|
||||
b0.value = [];
|
||||
b0.value.push(0);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(1);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(2);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(-1);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(-2);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("0.0");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-0.");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-0.0");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(".123");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-.123");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("1.");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((0 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((2 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-1 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-2 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((0.123 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-0.123 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("1e99");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1e+99 + 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(Infinity);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(-Infinity);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-infinitY");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((1 / 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((-1 / 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push((0 / 0));
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(NaN);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("nan");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("-NaN");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("true");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("false");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(!false);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(!!false);
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("Banana");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push(" ");
|
||||
b0._monitorUpToDate = false;
|
||||
b0.value.push("🎉");
|
||||
b0._monitorUpToDate = false;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,36 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b1e62179f7a495c46c7e9c64a03d405924f6011b66aa71f6ec0f1781b936d38c
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = runtime.getSpriteTargetByName("Sprite1");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "`f)8`e7_V%]cmRy7eZ?*", null);
|
||||
target.setXY(1e-9, target.y);
|
||||
if ((limitPrecision(target.x) === 1e-9)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass much above x does not round",}, b0, false, false, "wnAyae772?^VZ]bq?#*p", null);
|
||||
}
|
||||
if (((b1 ? b1.x : 0) === 1e-9)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass initial 'of' test",}, b0, false, false, "${qf}t3_Wf_/sqC#i0WN", null);
|
||||
}
|
||||
target.setXY(target.x + 0, target.y);
|
||||
runtime.ext_scratch3_motion._moveSteps(0, target);
|
||||
target.setXY(target.x + -9e-10, target.y);
|
||||
if (((b1 ? b1.x : 0) === 1.0000000000000007e-10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 'of' never rounds - positive x",}, b0, false, false, "zt/Fd,i768/rohNq-OU/", null);
|
||||
}
|
||||
if ((limitPrecision(target.x) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass x slightly above 0 rounds",}, b0, false, false, "p5a6(?e#B|B(d.fe;b6F", null);
|
||||
}
|
||||
target.setXY(target.x + -9e-10, target.y);
|
||||
target.setXY(target.x, target.y + 0);
|
||||
if (((b1 ? b1.x : 0) === -7.999999999999999e-10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 'of' never rounds and change x - negative x",}, b0, false, false, "![=|9E8]xp_9QR]fu}4M", null);
|
||||
}
|
||||
if ((limitPrecision(target.x) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass x slightly below 0 rounds",}, b0, false, false, "4o-vB]D}HJ1/*qW~k3Cd", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "8We]d__[]7X;@+e*x~^@", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,41 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 29dd30c632645f071bfd450530dab86dc85a2c1cf30564bee984394a790eca6a
|
||||
|
||||
// 2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if ((runtime.ext_scratch3_control._counter === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass global",}, b0, false, false, "C", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "B", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// 1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 5",}, b0, false, false, "g", null);
|
||||
if ((runtime.ext_scratch3_control._counter === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass initial value = 0",}, b0, false, false, "q", null);
|
||||
}
|
||||
runtime.ext_scratch3_control._counter++;
|
||||
if ((runtime.ext_scratch3_control._counter === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass incr 1",}, b0, false, false, "s", null);
|
||||
}
|
||||
runtime.ext_scratch3_control._counter++;
|
||||
if ((runtime.ext_scratch3_control._counter === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass incr 2",}, b0, false, false, "u", null);
|
||||
}
|
||||
runtime.ext_scratch3_control._counter = 0;
|
||||
if ((runtime.ext_scratch3_control._counter === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass clear = 0",}, b0, false, false, "w", null);
|
||||
}
|
||||
for (var a0 = 10; a0 >= 0.5; a0--) {
|
||||
runtime.ext_scratch3_control._counter++;
|
||||
yield;
|
||||
}
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "check globalness" });
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,27 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: d293b52c4330db5d33eddb66742496017b5c96baacc41654961cfa97d08668d8
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null);
|
||||
b1.value = 0;
|
||||
for (var a0 = (+thread.procedures["Zblock name"]() || 0); a0 >= 0.5; a0--) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
yield;
|
||||
}
|
||||
if (((+b1.value || 0) === 40)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "n", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zblock name
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_block_name () {
|
||||
return 40;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,23 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: fd48053df5e75de0ec56ac106699076335b2bd46266f8da4e4d81d52e29f5c29
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 4",}, b0, false, false, "i", null);
|
||||
if (compareGreaterThan(("something".toLowerCase() === "something".toLowerCase()), ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "k", null);
|
||||
}
|
||||
if (compareLessThan(("something".toLowerCase() === "else".toLowerCase()), ("1" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null);
|
||||
}
|
||||
if (compareGreaterThan(("something".toLowerCase() === "something".toLowerCase()), (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "n", null);
|
||||
}
|
||||
if (compareLessThan(("something".toLowerCase() === "else".toLowerCase()), (1 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "o", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,28 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 1fa5a314682ce218a097be41607e4eb456a2b046a47ca46d01a1033323afa544
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = runtime.getOpcodeFunction("motion_pointtowards");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 4",}, b0, false, false, "h", null);
|
||||
target.setDirection(95);
|
||||
if ((target.direction === 95)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "o", null);
|
||||
}
|
||||
target.setDirection(((1 / 0) || 0));
|
||||
if ((target.direction === 95)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 2",}, b0, false, false, "r", null);
|
||||
}
|
||||
target.setDirection(((0 / 0) || 0));
|
||||
if ((target.direction === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 3",}, b0, false, false, "u", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"TOWARDS":"Sprite2",}, b1, false, false, "g", null);
|
||||
if ((target.direction === 90)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 4",}, b0, false, false, "y", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "w", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,32 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 725e0683c8cd39c78a143727bf26f8827d1e9fd627eef68a772d8a3a06806c65
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "j", null);
|
||||
b1.value = runtime.ext_scratch3_operators._random(("an invalid number" + "."), 1);
|
||||
if (!(b1.value <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null);
|
||||
}
|
||||
if (compareLessThan(b1.value, 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "r", null);
|
||||
}
|
||||
if ((("" + b1.value).toLowerCase().indexOf(".".toLowerCase()) !== -1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "s", null);
|
||||
}
|
||||
b1.value = runtime.ext_scratch3_operators._random(1, ("an invalid number" + "."));
|
||||
if (!(b1.value <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "v", null);
|
||||
}
|
||||
if (compareLessThan(b1.value, 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "x", null);
|
||||
}
|
||||
if ((("" + b1.value).toLowerCase().indexOf(".".toLowerCase()) !== -1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "A", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "y", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,23 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 1d02d01ddcd53c67e093bda79912f19683829f86fd23e1f77cbfc0aef03dc0f3
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = target.variables["gTtSj;o_E;Snkn620KF."];
|
||||
const b2 = target.variables["zShM`!CD?d_|Z,]5X}N6"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "d", null);
|
||||
b1.value = 2;
|
||||
if (((+b1.value || 0) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass variable",}, b0, false, false, "k", null);
|
||||
}
|
||||
b2.value = [];
|
||||
b2.value.push(3);
|
||||
b2._monitorUpToDate = false;
|
||||
if (((+(b2.value[(1 | 0) - 1] ?? "") || 0) === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass list",}, b0, false, false, "m", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,82 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: a8576b7695ad77f7d5a7ac9fb76d31f026c0869f16f55d16fa40b85972b43e30
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("sound_setvolumeto");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"VOLUME":0,}, b0, false, false, "d", null);
|
||||
b1.value = 0;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b2, false, false, "g", null);
|
||||
yield* thread.procedures["Wno refresh"]();
|
||||
yield* thread.procedures["Wruns below with no refresh"]();
|
||||
if (compareEqual(b1.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b2, false, false, "v", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b2, false, false, "f", null);
|
||||
runtime.stopAll();
|
||||
retire(); return;
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wno refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("music_restForBeats");
|
||||
const b1 = runtime.getOpcodeFunction("music_playDrumForBeats");
|
||||
return function* genXYZ_no_refresh () {
|
||||
for (var a0 = 30; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"BEATS":0,}, b0, true, false, "m", null);
|
||||
yield* executeInCompatibilityLayer({"DRUM":1,"BEATS":0,}, b1, true, false, "b", null);
|
||||
runtime.ext_scratch3_motion._moveSteps(0, target);
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wruns below with no refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ_runs_below_with_no_r () {
|
||||
yield* thread.procedures["Whas refresh"]();
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Whas refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("music_restForBeats");
|
||||
const b1 = runtime.getOpcodeFunction("music_playDrumForBeats");
|
||||
return function* genXYZ_has_refresh () {
|
||||
for (var a0 = 30; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* executeInCompatibilityLayer({"BEATS":0,}, b0, true, false, "r", null);
|
||||
yield* executeInCompatibilityLayer({"DRUM":1,"BEATS":0,}, b1, true, false, "c", null);
|
||||
runtime.ext_scratch3_motion._moveSteps(0, target);
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,25 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: fd981742e0e4299bad5a89349635d3a7d0467d8163ae77ba4bafe43c97849bae
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "d", null);
|
||||
thread.procedures["Zfoo %s"]("");
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zfoo %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_foo_ (p0) {
|
||||
return "";
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zno op
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_no_op () {
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,38 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: a4ae71d2c1b70f29a667c2d582b24702068f1d128512b7aee53b2feddd274527
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["eFlmP1{XC+I1:h0Yln.K"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 7",}, b0, false, false, "h", null);
|
||||
b1.value = [];
|
||||
listInsert(b1, "any", "a");
|
||||
listInsert(b1, "any", "b");
|
||||
listInsert(b1, "any", "c");
|
||||
if ((b1.value.length === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "s", null);
|
||||
}
|
||||
if (listContains(b1, "a")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "v", null);
|
||||
}
|
||||
if (listContains(b1, "b")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "x", null);
|
||||
}
|
||||
if (listContains(b1, "c")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "z", null);
|
||||
}
|
||||
if (listContains(b1, listGet(b1.value, "any"))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "A", null);
|
||||
}
|
||||
listDelete(b1, "any");
|
||||
if ((b1.value.length === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "C", null);
|
||||
}
|
||||
if (compareEqual(listGet(b1.value, "*"), "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "F", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "E", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,27 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 360d8b29e0e690dda9e91faed6881057d1f38d98258ed8e11c75bdd30536b560
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, null, null);
|
||||
b1.value = 0;
|
||||
for (var a0 = (+thread.procedures["Zblock name"]() || 0); a0 >= 0.5; a0--) {
|
||||
b1.value = ((+b1.value || 0) + 1);
|
||||
yield;
|
||||
}
|
||||
if (((+b1.value || 0) === 4)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, null, null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, null, null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 block name
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_block_name () {
|
||||
return 4;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,33 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 58dd6f369897907ea46fffbb8210d8bc15db59f26ce117ff4211035afff17f23
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = runtime.getOpcodeFunction("sensing_userid");
|
||||
const b3 = runtime.getOpcodeFunction("motion_xscroll");
|
||||
const b4 = runtime.getOpcodeFunction("motion_yscroll");
|
||||
const b5 = runtime.getOpcodeFunction("motion_scroll_right");
|
||||
const b6 = runtime.getOpcodeFunction("motion_scroll_up");
|
||||
const b7 = runtime.getOpcodeFunction("motion_align_scene");
|
||||
const b8 = runtime.getOpcodeFunction("looks_setstretchto");
|
||||
const b9 = runtime.getOpcodeFunction("looks_changestretchby");
|
||||
const b10 = runtime.getOpcodeFunction("looks_hideallsprites");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "pW2KnJW$%KXFoppMJBAi", null);
|
||||
b1.value = (yield* executeInCompatibilityLayer({}, b2, false, false, "X[|X;C.(v[|^i|@0Eqy4", null));
|
||||
b1.value = (yield* executeInCompatibilityLayer({}, b3, false, false, "z;H$hVK7X;MZSyO9U/#1", null));
|
||||
b1.value = (yield* executeInCompatibilityLayer({}, b4, false, false, ";Q94_J}Jv36TqTll;ji*", null));
|
||||
yield* executeInCompatibilityLayer({"DISTANCE":10,}, b5, false, false, "_TLJeW5hG9gAtYO2c*D9", null);
|
||||
yield* executeInCompatibilityLayer({"DISTANCE":10,}, b6, false, false, "o=l#1WJR!L37RN`q:`8E", null);
|
||||
yield* executeInCompatibilityLayer({"ALIGNMENT":"bottom-left",}, b7, false, false, "idkZ9I+=Q:@xXm;N-2Oy", null);
|
||||
yield* executeInCompatibilityLayer({"STRETCH":100,}, b8, false, false, "AMs-%pRGK*v6a[.XifN1", null);
|
||||
yield* executeInCompatibilityLayer({"STRETCH":100,}, b8, false, false, "g+bBVCHp+A[-X2E7-7#|", null);
|
||||
yield* executeInCompatibilityLayer({"CHANGE":10,}, b9, false, false, "ZN24~,cX56Dc2k4vt}HB", null);
|
||||
yield* executeInCompatibilityLayer({"CHANGE":10,}, b9, false, false, "Zjds+5Is*:nb7wnX{rYN", null);
|
||||
yield* executeInCompatibilityLayer({}, b10, false, false, "8X_d`@6,B7%wzr7.xE}t", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "C/%^M/1/S`iX8*M~Q;!3", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "(C;YJ2L~?zR[Y)Wti?3m", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 169af11f112ebea3d6768317652a72a6374c407f432537990689d46080fe2b92
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "@|B*yJ0zKh!acN`7L-N5", null);
|
||||
if ((((1 / -0) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "=enYDFG11Nj/0BL:y56w", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, ",Cpv8W0RH0RgNky[1xb:", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,51 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 19e0b3f9dcac763041039a8ffe87b6732eb744f9ebb136e8d61a53ccf19118e3
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["PsY$$vp$IVH;dDAr[q2h"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
const b2 = stage.variables["l^q!%fq]Bv;72dlGf}^Z"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b1, false, false, "}fY]VN(X|v/[G`P0?@s2", null);
|
||||
for (var a0 = 30; a0 >= 0.5; a0--) {
|
||||
b2.value = runtime.ioDevices.clock.projectTimer();
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
b0.value = 1;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "mDG0BTTG/wwr;/Uz~u^c", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["l^q!%fq]Bv;72dlGf}^Z"];
|
||||
const b1 = runtime.getOpcodeFunction("event_whengreaterthan");
|
||||
const b2 = stage.variables["PsY$$vp$IVH;dDAr[q2h"];
|
||||
const b3 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
{
|
||||
const resolvedValue = toBoolean((yield* executeInCompatibilityLayer({"VALUE":b0.value,"WHENGREATERTHANMENU":"TIMER",}, b1, false, false, "iNmua~6veGey6O-_UB9.", null)));
|
||||
const id = "iNmua~6veGey6O-_UB9.";
|
||||
const hasOldEdgeValue = target.hasEdgeActivatedValue(id);
|
||||
const oldEdgeValue = target.updateEdgeActivatedValue(id, resolvedValue);
|
||||
const edgeWasActivated = hasOldEdgeValue ? (!oldEdgeValue && resolvedValue) : resolvedValue;
|
||||
if (!edgeWasActivated) {
|
||||
retire(); return;
|
||||
}
|
||||
yield;
|
||||
}
|
||||
if (compareEqual(b2.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b3, false, false, "JE9*Ms@I!EKJ-|Bcga#W", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,20 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 5b964fa791468016b188af74e50cadad73d482be066b104bb22faff7e4a156dc
|
||||
|
||||
// Player script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "#0F2+kcgu;or|hdwuT9{", null);
|
||||
yield* thread.procedures["ZSet Costume"]();
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Q^(MKge)QH2e:WH6b6g@", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Player ZSet Costume
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_Set_Costume () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "Z$W^@c(f)rHu:DL/SGuQ", null);
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,33 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: a340f37844807c66f3b85eb4e85c8092a779d33d50e5655e035420ae05cea26c
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "J#qm1yA(@Z6mj%Mgh;0X", null);
|
||||
yield* thread.procedures["Znumber or text %s %s"]("bad","ok");
|
||||
yield* thread.procedures["Zboolean %b %b"]("false",!false);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "$R-1lb(Mu?gdTIH^;kC_", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Znumber or text %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_number_or_text__ (p0,p1) {
|
||||
if ((("" + p1).toLowerCase() === "ok".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "HH`yRe9(x5%D:eV@EmkE", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zboolean %b %b
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_boolean__ (p0,p1) {
|
||||
if (toBoolean(p1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "M^!cgco]B(V)je$a6lF7", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,25 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2afbb43dad9e66e37997e13bf3ffb90bf39effd8974c2eb1a95bed61d437b6de
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "qf{MD}-f+l?U+)KA#Vnm", null);
|
||||
b1.value = "";
|
||||
thread.procedures["Zdo something"]();
|
||||
if (!compareEqual(b1.value, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "Sgf_#7|GOpx!R]?Q3]$s", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, ",vD-ZG7f{]FoJ`,))JWh", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zdo something
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function funXYZ_do_something () {
|
||||
b0.value = "help";
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,11 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 9805621c896afb4a8ed71236417a0311e5f4f38378214914625248b6157178b4
|
||||
|
||||
// Apple script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "a", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "f", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,54 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b9110339d39947f68168cbb129a20b23b7d4e607ffd5624bd67e096451f6a329
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * -1);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "o", null);
|
||||
b1.value = 0;
|
||||
if (compareEqual(thread.procedures["Zinvalid params - reporter"](), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass invalid params reporter",}, b0, false, false, "L", null);
|
||||
}
|
||||
if (compareEqual(thread.procedures["Zinvalid params - boolean"](), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass invalid params boolean",}, b0, false, false, "N", null);
|
||||
}
|
||||
runtime.stopForTarget(target, thread);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "P", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zinvalid params - reporter
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_invalid_params___rep () {
|
||||
return 0;
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zinvalid params - boolean
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_invalid_params___boo () {
|
||||
return 0;
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,17 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2d07ab31e7f1e6f263996fa42ff79f849fed048a047d68960bd324960bcc1452
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null);
|
||||
b1.value = "discard me";
|
||||
b1.value = "";
|
||||
if (compareEqual(b1.value, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non existent procedure returned empty string",}, b0, false, false, "h", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,146 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: b1802636bbbd479dcf8634a525798c5b4dd9b0201cf6af6f5b4879455368c328
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 18",}, b0, false, false, "G", null);
|
||||
b1.value = 0;
|
||||
b2.value = (yield* thread.procedures["Znon warp recursion should yield %s"](8));
|
||||
if (((+b1.value || 0) === 4)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp recursion yields",}, b0, false, false, "ao", null);
|
||||
}
|
||||
b1.value = 0;
|
||||
b2.value = thread.procedures["Wwarp recursion should not yield %s"](8);
|
||||
if (((+b1.value || 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass warp recursion does not yield",}, b0, false, false, "ar", null);
|
||||
}
|
||||
b1.value = 0;
|
||||
b2.value = (yield* thread.procedures["Zfib %s"](7));
|
||||
if (((+b1.value || 0) === 20)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp fib yielded",}, b0, false, false, "au", null);
|
||||
}
|
||||
yield* thread.procedures["Zrecursing yields between each %s"]("initial");
|
||||
yield* thread.procedures["Zrecursing arguments eval order %s %s %s %s"]("initial","","","");
|
||||
runtime.stopForTarget(target, thread);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "av", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Znon warp recursion should yield %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ_non_warp_recursion_s (p0) {
|
||||
if (compareGreaterThan(p0, 0)) {
|
||||
return (yield* yieldThenCallGenerator(thread.procedures["Znon warp recursion should yield %s"], ((+p0 || 0) - 1)));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wwarp recursion should not yield %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_warp_recursion_shoul (p0) {
|
||||
if (compareGreaterThan(p0, 0)) {
|
||||
return thread.procedures["Wwarp recursion should not yield %s"](((+p0 || 0) - 1));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zfib %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ_fib_ (p0) {
|
||||
if (compareLessThan(p0, 2)) {
|
||||
return p0;
|
||||
} else {
|
||||
return ((+(yield* yieldThenCallGenerator(thread.procedures["Zfib %s"], ((+p0 || 0) - 1))) || 0) + (+(yield* yieldThenCallGenerator(thread.procedures["Zfib %s"], ((+p0 || 0) - 2))) || 0));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zrecursing yields between each %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_recursing_yields_bet (p0) {
|
||||
if ((("" + p0).toLowerCase() === "initial".toLowerCase())) {
|
||||
b0.value = 0;
|
||||
b1.value = ((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 1)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 1)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 2)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 2)) || 0) + (((+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 3)) || 0) + (+(yield* yieldThenCallGenerator(thread.procedures["Zrecursing yields between each %s"], 3)) || 0)) || 0)) || 0)) || 0)) || 0));
|
||||
if (((+b0.value || 0) === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recursing between calls yields final",}, b2, false, false, "aK", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail recursing between calls yields final",}, b2, false, false, "aL", null);
|
||||
}
|
||||
} else {
|
||||
if (compareEqual(b0.value, p0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("pass recursing between calls yields " + ("" + p0)),}, b2, false, false, "#", null);
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":("fail recursing between calls yields " + ("" + p0)),}, b2, false, false, "%", null);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zrecursing arguments eval order %s %s %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["4HH82mPlVMOONdl(Ot*7"];
|
||||
const b1 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b3 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_recursing_arguments_ (p0,p1,p2,p3) {
|
||||
if ((("" + p0).toLowerCase() === "initial".toLowerCase())) {
|
||||
b0.value = [];
|
||||
b1.value = 0;
|
||||
b2.value = (yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 1",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 2",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 3",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 4","","","")),(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 5","","","")),(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 6","","","")))),"","")),"",(yield* yieldThenCallGenerator(thread.procedures["Zrecursing arguments eval order %s %s %s %s"], "child 7","","",""))));
|
||||
if ((("" + (b0.value[(1 | 0) - 1] ?? "")).toLowerCase() === "1/child 4".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 1",}, b3, false, false, "aZ", null);
|
||||
}
|
||||
if ((("" + (b0.value[(2 | 0) - 1] ?? "")).toLowerCase() === "1/child 5".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 2",}, b3, false, false, "a#", null);
|
||||
}
|
||||
if ((("" + (b0.value[(3 | 0) - 1] ?? "")).toLowerCase() === "2/child 6".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 3",}, b3, false, false, "a(", null);
|
||||
}
|
||||
if ((("" + (b0.value[(4 | 0) - 1] ?? "")).toLowerCase() === "2/child 3".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 4",}, b3, false, false, "a*", null);
|
||||
}
|
||||
if ((("" + (b0.value[(5 | 0) - 1] ?? "")).toLowerCase() === "3/child 2".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 5",}, b3, false, false, "a,", null);
|
||||
}
|
||||
if ((("" + (b0.value[(6 | 0) - 1] ?? "")).toLowerCase() === "3/child 7".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 6",}, b3, false, false, "a.", null);
|
||||
}
|
||||
if ((("" + (b0.value[(7 | 0) - 1] ?? "")).toLowerCase() === "4/child 1".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - 7",}, b3, false, false, "a:", null);
|
||||
}
|
||||
if ((b0.value.length === 7)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass recurse arg order - length is correct",}, b3, false, false, "a=", null);
|
||||
}
|
||||
} else {
|
||||
b0.value.push((("" + b1.value) + ("/" + ("" + p0))));
|
||||
b0._monitorUpToDate = false;
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * -1);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,111 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: cd516553f3cbf4a41ae9a8bc1f5d06a3392d365226bccdfa294578314f18facb
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 8",}, b0, false, false, "x", null);
|
||||
if ((("" + thread.procedures["Zsimplest"]()).toLowerCase() === "It works!".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass simplest",}, b0, false, false, ":", null);
|
||||
}
|
||||
if ((("" + thread.procedures["Znesting 1"]()).toLowerCase() === "42-54".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass nesting1",}, b0, false, false, "=", null);
|
||||
}
|
||||
if (((+thread.procedures["Wwarp fib %s"](12) || 0) === 144)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass fib 12",}, b0, false, false, "@", null);
|
||||
}
|
||||
if (((+thread.procedures["Wfactorial %s"](12) || 0) === 479001600)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass factorial 12",}, b0, false, false, "]", null);
|
||||
}
|
||||
b1.value = (yield* thread.procedures["Zno shadowing 1 %s %s"]("f","g"));
|
||||
if (compareEqual(b1.value, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass default return value",}, b0, false, false, "|", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "`", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zsimplest
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_simplest () {
|
||||
return "It works!";
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Znesting 1
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_nesting_1 () {
|
||||
thread.procedures["Znesting 2"]();
|
||||
return (("" + thread.procedures["Znesting 3 %s %s"](6,7)) + ("" + thread.procedures["Znesting 3 %s %s"](-1,54)));
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wwarp fib %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_warp_fib_ (p0) {
|
||||
return thread.procedures["Wfib %s"](p0);
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wfactorial %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_factorial_ (p0) {
|
||||
if (compareGreaterThan(p0, 1)) {
|
||||
return ((+p0 || 0) * (+thread.procedures["Wfactorial %s"](((+p0 || 0) - 1)) || 0));
|
||||
}
|
||||
return 1;
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zno shadowing 1 %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ_no_shadowing_1__ (p0,p1) {
|
||||
if (((("" + p0).toLowerCase() === "f".toLowerCase()) && (("" + p1).toLowerCase() === "g".toLowerCase()))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass shadow check 1",}, b0, false, false, "aq", null);
|
||||
}
|
||||
b1.value = thread.procedures["Zno shadowing 2 %s %s"](1,2);
|
||||
if (((("" + p0).toLowerCase() === "f".toLowerCase()) && (("" + p1).toLowerCase() === "g".toLowerCase()))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass shadow check 2",}, b0, false, false, "au", null);
|
||||
}
|
||||
b1.value = thread.procedures["Zno shadowing 2 %s %s"](3,4);
|
||||
if (((("" + p0).toLowerCase() === "f".toLowerCase()) && (("" + p1).toLowerCase() === "g".toLowerCase()))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass shadow check 3",}, b0, false, false, "ax", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Znesting 2
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_nesting_2 () {
|
||||
return "discard nesting 2";
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Znesting 3 %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_nesting_3__ (p0,p1) {
|
||||
return ((+p0 || 0) * (+p1 || 0));
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wfib %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_fib_ (p0) {
|
||||
if (compareLessThan(p0, 2)) {
|
||||
return p0;
|
||||
} else {
|
||||
return ((+thread.procedures["Wfib %s"](((+p0 || 0) - 1)) || 0) + (+thread.procedures["Wfib %s"](((+p0 || 0) - 2)) || 0));
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zno shadowing 2 %s %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_no_shadowing_2__ (p0,p1) {
|
||||
return "discard shadow 2";
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,52 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 27368530b97e0ab5053bf4faf8fd116aa30cea34adcbd95fc6ddcf0a9d6d4976
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["PsAI*C{QHI3*4?O8p#TM"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "f", null);
|
||||
yield* thread.procedures["Wreturn stops the script immediately"]();
|
||||
if (((+b1.value || 0) === 25)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass return stopped the script immediately",}, b0, false, false, "u", null);
|
||||
}
|
||||
yield* waitThreads(startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "Test return outside of custom block" }));
|
||||
if (((+b1.value || 0) === 18)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass return worked to stop outside of custom block",}, b0, false, false, "x", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "v", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wreturn stops the script immediately
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["PsAI*C{QHI3*4?O8p#TM"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_return_stops_the_scr () {
|
||||
b0.value = 0;
|
||||
for (var a0 = 100; a0 >= 0.5; a0--) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 25)) {
|
||||
return "stopped!";
|
||||
}
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail return did not stop the script immediately",}, b1, true, false, "z", null);
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["PsAI*C{QHI3*4?O8p#TM"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 18)) {
|
||||
retire(); return;
|
||||
}
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,121 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: e652f448fbf09a37afacb03afa9f3448cce43aef06439b58b44aeec73edb0438
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
while (true) {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * -1);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 3",}, b0, false, false, "k", null);
|
||||
yield* thread.procedures["Znon warp"]();
|
||||
runtime.stopForTarget(target, thread);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "N", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Znon warp
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_non_warp () {
|
||||
b0.value = 0;
|
||||
for (var a0 = 5; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
if (((+b0.value || 0) === 5)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp 1",}, b1, false, false, "R", null);
|
||||
}
|
||||
if ((("" + (yield* thread.procedures["Wverify runs warp %s"]((yield* thread.procedures["Zverify runs non warp %s"]((yield* thread.procedures["Wverify runs warp %s"]("abc"))))))).toLowerCase() === "warp: non warp: warp: abc".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp and warp mix",}, b1, false, false, "S", null);
|
||||
}
|
||||
b0.value = 0;
|
||||
for (var a2 = 5; a2 >= 0.5; a2--) {
|
||||
thread.timer = timer();
|
||||
var a3 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a3) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
if (((+b0.value || 0) === 5)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non warp 2",}, b1, false, false, "W", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Wverify runs warp %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_verify_runs_warp_ (p0) {
|
||||
b0.value = 0;
|
||||
for (var a0 = 5; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
if (!compareEqual(b0.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail did not run warp",}, b1, true, false, "Z", null);
|
||||
}
|
||||
return ("warp: " + ("" + p0));
|
||||
return "";
|
||||
}; })
|
||||
|
||||
// Sprite1 Zverify runs non warp %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Go=PJS7BFXYo_qi2S:kQ"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_verify_runs_non_warp (p0) {
|
||||
b0.value = 0;
|
||||
for (var a0 = 5; a0 >= 0.5; a0--) {
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
if (compareEqual(b0.value, 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail ran warp",}, b1, false, false, "L", null);
|
||||
}
|
||||
return ("non warp: " + ("" + p0));
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,52 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: f8c5c7c3ba1afbd140646e67d9987964cdcdf0cb30b53a0f6276b11f460e7d25
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["JbF5exWEi*m?-UEmkASS"];
|
||||
const b1 = stage.variables["[G/@.KGc-4y[(GZ(bt7o"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
const b3 = runtime.getOpcodeFunction("sound_seteffectto");
|
||||
return function* genXYZ () {
|
||||
while (true) {
|
||||
if (compareEqual(b0.value, b1.value)) {
|
||||
} else {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b2, false, false, "89/dl$1dp$~nj81:jj@H", null);
|
||||
b1.value = b0.value;
|
||||
yield* executeInCompatibilityLayer({"VALUE":b0.value,"EFFECT":"pitch",}, b3, false, true, "*=8r,g4Pzvxo?aSMcpfX", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
yield;
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["[G/@.KGc-4y[(GZ(bt7o"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
const b2 = stage.variables["JbF5exWEi*m?-UEmkASS"];
|
||||
return function* genXYZ () {
|
||||
b0.value = 0;
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 15",}, b1, false, false, "0/2-)Gp^^=haQ1OMD.xb", null);
|
||||
for (var a0 = 15; a0 >= 0.5; a0--) {
|
||||
if (((+b2.value || 0) === 200)) {
|
||||
b2.value = 50;
|
||||
} else {
|
||||
b2.value = 200;
|
||||
}
|
||||
thread.timer = timer();
|
||||
var a1 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a1) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield;
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "--nBRXyJfqS0MM9`#S3}", null);
|
||||
runtime.stopAll();
|
||||
retire(); return;
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,34 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 128cc735fefc374c5935e2c3d9c28b7d07c03d58cd0d6abec4e879c41f4afb1c
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aQ(Y!Bs3;[rV^Q%AQ,NX", null);
|
||||
b1.value = 0;
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
if (((+b1.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "`SX*FG*Lwo*0_T=box-@", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "|#`zzPA_x%{`FyIAQhb4", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,26 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 89920bf89edf85596d13e7781c1ea5de2fea61c0adf78ecdd41e4a7ab824aebe
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 2",}, b0, false, false, "J#qm1yA(@Z6mj%Mgh;0X", null);
|
||||
thread.procedures["Zswitch %s"]("1");
|
||||
if ((((target.currentCostume + 1) === 2) && ((+target.getCostumes()[target.currentCostume].name || 0) === 1))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ";DM$.QW6o-O+T/oBdqt!", null);
|
||||
}
|
||||
thread.procedures["Zswitch %s"]("2");
|
||||
if ((((target.currentCostume + 1) === 1) && ((+target.getCostumes()[target.currentCostume].name || 0) === 2))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "71a9Slk0w=^~x;5T@nw,", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "$R-1lb(Mu?gdTIH^;kC_", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Zswitch %s
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function funXYZ_switch_ (p0) {
|
||||
runtime.ext_scratch3_looks._setCostume(target, p0);
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,38 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: dc029abbf128cea0830f4578e89619949837ec26dfa76f110ca599a9ee12e66e
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["G{NQ*NXG*qzywe1Q3?FM"];
|
||||
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "c", null);
|
||||
b1.value = 0;
|
||||
b2.value = 0;
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b1 = stage.variables["G{NQ*NXG*qzywe1Q3?FM"];
|
||||
const b2 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if (compareEqual(b0.value, 0)) {
|
||||
b0.value = 1;
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
b1.value = 1;
|
||||
for (var a0 = 1; a0 >= 0.5; a0--) {
|
||||
yield;
|
||||
}
|
||||
b1.value = 2;
|
||||
} else {
|
||||
if (((+b1.value || 0) === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b2, false, false, "p", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b2, false, false, "n", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,114 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2086fa5dfdd5f98dcafc01064231a018edb5698b3b4cc403a9cfaeabb5125c06
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage && stage.lookupVariableByNameAndType("Stage variable", "", true);
|
||||
const b2 = runtime.getSpriteTargetByName("Test sprite");
|
||||
const b3 = b2 && b2.lookupVariableByNameAndType("Private variable", "", true);
|
||||
const b4 = stage && stage.lookupVariableByNameAndType("This variable used to exist", "", true);
|
||||
const b5 = stage.variables["GTmK+*w8mNQP,z`4WG8#"];
|
||||
const b6 = runtime.getSpriteTargetByName("Sprite that doesn't exist");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 32",}, b0, false, false, "oX(r}qUQo7fd[u~D_4@T", null);
|
||||
if (((stage.currentCostume + 1) === 2)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass backdrop #",}, b0, false, false, "T9..K[5LEO1f~{%eoPU;", null);
|
||||
}
|
||||
if ((stage.getCostumes()[stage.currentCostume].name.toLowerCase() === "Backdrop name test".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass backdrop name",}, b0, false, false, "q63|^NKAu?OMK%W-s}+~", null);
|
||||
}
|
||||
if (((stage ? stage.volume : 0) === 45)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass stage volume",}, b0, false, false, "9Coi(uM:DG!WPZ($,SnY", null);
|
||||
}
|
||||
if ((("" + (b1 ? b1.value : 0)).toLowerCase() === "Variable in stage".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass stage variable",}, b0, false, false, "D_EA]xN%|[NsTKqc4up9", null);
|
||||
}
|
||||
if (((b2 ? b2.x : 0) === 19)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass x",}, b0, false, false, "ek^n,6zjHyX;YOW;H@]?", null);
|
||||
}
|
||||
if (((b2 ? b2.y : 0) === 20)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass y",}, b0, false, false, "-DZ%ny~~x.m12l9I64~W", null);
|
||||
}
|
||||
if (((b2 ? b2.direction : 0) === 89)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass direction",}, b0, false, false, "$Y=E2o@3oa-^OHt5v:-b", null);
|
||||
}
|
||||
if (((b2 ? b2.currentCostume + 1 : 0) === 3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass costume #",}, b0, false, false, "+zO[+f?c7F`ZGTbD.oqI", null);
|
||||
}
|
||||
if ((("" + (b2 ? b2.getCostumes()[b2.currentCostume].name : 0)).toLowerCase() === "Costume name test".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass costume name",}, b0, false, false, "Y6L|T0Pvwsct2gq+HGvv", null);
|
||||
}
|
||||
if (((b2 ? b2.size : 0) === 76.01)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass size",}, b0, false, false, "IBZv@o)qX~r6)!;hqaWa", null);
|
||||
}
|
||||
if (((b2 ? b2.volume : 0) === 14.3)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass volume",}, b0, false, false, "JBHJ,)N)@]~;;yFTY`RG", null);
|
||||
}
|
||||
if ((("" + (b3 ? b3.value : 0)).toLowerCase() === "Private variable value".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass private variable",}, b0, false, false, "#jYbx])r8^`95~ZgPtZD", null);
|
||||
}
|
||||
if (compareEqual((b4 ? b4.value : 0), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass non existent variable",}, b0, false, false, ")nnN?*l+E)dC(fT5(_@q", null);
|
||||
}
|
||||
b5.value = (("" + randomInt(1, 9)) + ("" + randomInt(1, 9)));
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: b5.value, PROPERTY: "backdrop #" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop #",}, b0, false, false, "UFr{fbR3@a.u_paq:r]F", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "backdrop name" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop name",}, b0, false, false, "wzVsIitt0^t(wDS-V3?Z", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "volume" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE volume",}, b0, false, false, ":SZx%]xR5t`;;@M~:jT:", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "Stage variable" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE stage variable",}, b0, false, false, "!eEjdEJj!yYb{buag^M[", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "x position" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE x",}, b0, false, false, "!6!o,FiLV=w2bS~{R|AK", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "y position" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE y",}, b0, false, false, "5K7_7*adzRDbfFjxanQF", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "direction" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE direction",}, b0, false, false, "D{z)e;(*H|.gAykbuSkE", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "costume #" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE costume #",}, b0, false, false, "WgCH3j9ObHA,;P3T=now", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "costume name" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE costume name",}, b0, false, false, "qhxQy$^wiOTOEu.=2^i)", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "size" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE size",}, b0, false, false, "+6V.t=]xZ=Gl?%-OWbFy", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "volume" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE volume",}, b0, false, false, "*E:B}?C@H2ce2uRr9.9=", null);
|
||||
}
|
||||
if (compareEqual(runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ("" + b5.value), PROPERTY: "Private variable" }), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE private variable",}, b0, false, false, "B6r;3{7R7g4Z.pzeGiCM", null);
|
||||
}
|
||||
if (((b6 ? b6.x : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop #",}, b0, false, false, "q[X%xv.u6==Riu20?y{I", null);
|
||||
}
|
||||
if (((b6 ? b6.y : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE backdrop name",}, b0, false, false, "?M4CH@e3~]30+$4[brH[", null);
|
||||
}
|
||||
if (((b6 ? b6.direction : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE volume",}, b0, false, false, "H:D~v_)nZ?oJ8X|qHag#", null);
|
||||
}
|
||||
if (((b6 ? b6.currentCostume + 1 : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE stage variable",}, b0, false, false, "lqwZ[26e,$PwYz,OlO0X", null);
|
||||
}
|
||||
if (compareEqual((b6 ? b6.getCostumes()[b6.currentCostume].name : 0), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE x",}, b0, false, false, "I@zdHi0kl|{:ze_J.}S_", null);
|
||||
}
|
||||
if (((b6 ? b6.size : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE y",}, b0, false, false, "qD{Ni|{SL:`04:Gj/A7B", null);
|
||||
}
|
||||
if (((b6 ? b6.volume : 0) === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass NE direction",}, b0, false, false, "vvB(iq@jjvj{=_{:6DXZ", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "dJRK.)mKX6,r26Jy]5qr", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,47 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 5592b1a64924003352fa3d2d9157c797689a702f55ba39c73a5e0bc862f57e59
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "5,snC%48IW(1ZVM(k0l2", null);
|
||||
b1.value = "Initial";
|
||||
thread.timer = timer();
|
||||
var a0 = Math.max(0, 1000 * 0);
|
||||
runtime.requestRedraw();
|
||||
yield;
|
||||
while (thread.timer.timeElapsed() < a0) {
|
||||
yield;
|
||||
}
|
||||
thread.timer = null;
|
||||
yield* waitThreads(startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "Test 1" }));
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "5.$W?rkoLYkKo1qX@%@?", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if ((("" + b0.value).toLowerCase() === "Initial".toLowerCase())) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b1, false, false, "eR%8T)3MQjkbQkAh~L0%", null);
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Stage script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
return function* genXYZ () {
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Stage script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = target.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
|
||||
return function* genXYZ () {
|
||||
b0.value = "Stage callback";
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,14 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: f54b97baf31500c1b6bd5b9865ce96b8aeef1001169bbe4550bbcbff84f2dae6
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "6_?4sPB-|g:DtjdOm5Q-", null);
|
||||
if (!((Infinity - Infinity) <= 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, ")-u2YbbMb;gXMPOidjPj", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "zqE}hdaes.b)@mO1{R;X", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,40 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 86c1734c101ee85e6f737f891d6ca338d72b17026ab60d289ea7861351c65124
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["Kl,Own0m6{^v3$E{Wsc="];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "i", null);
|
||||
b1.value = "\t";
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["Kl,Own0m6{^v3$E{Wsc="];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
if (compareEqual(b0.value, ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t in a variable = string 0",}, b1, false, false, "q", null);
|
||||
}
|
||||
if (compareEqual("\t", ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass literal \\t = string 0",}, b1, false, false, "u", null);
|
||||
}
|
||||
if (compareEqual((" " + ("" + b0.value)), ("0" + ""))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t and other spaces = string 0",}, b1, false, false, "w", null);
|
||||
}
|
||||
if (compareEqual(b0.value, (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t in a variable = number 0",}, b1, false, false, "z", null);
|
||||
}
|
||||
if (compareEqual("\t", (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass literal \\t = number 0",}, b1, false, false, "B", null);
|
||||
}
|
||||
if (compareEqual((" " + ("" + b0.value)), (0 + 0))) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass \\t and other spaces = number 0",}, b1, false, false, "E", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "D", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,56 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 1446684578b41ff41cf29fbe14696ef717cca636e8d46babd7d9dec6df723a33
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 15",}, b0, false, false, "p", null);
|
||||
if (compareEqual(tan(0), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 0",}, b0, false, false, "O", null);
|
||||
}
|
||||
if (((tan(90) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 90",}, b0, false, false, "G", null);
|
||||
}
|
||||
if (compareEqual(tan(180), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 180",}, b0, false, false, "I", null);
|
||||
}
|
||||
if (((tan(270) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 270",}, b0, false, false, "K", null);
|
||||
}
|
||||
if (compareEqual(tan(360), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 360",}, b0, false, false, "M", null);
|
||||
}
|
||||
if (((tan(450) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 450",}, b0, false, false, "Q", null);
|
||||
}
|
||||
if (compareEqual(tan(540), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 540",}, b0, false, false, "S", null);
|
||||
}
|
||||
if (((tan(630) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 630",}, b0, false, false, "U", null);
|
||||
}
|
||||
if (compareEqual(tan(720), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 720",}, b0, false, false, "W", null);
|
||||
}
|
||||
if (((tan(810) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 810",}, b0, false, false, "Y", null);
|
||||
}
|
||||
if (((tan(-90) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -90",}, b0, false, false, "0", null);
|
||||
}
|
||||
if (compareEqual(tan(-180), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -180",}, b0, false, false, "2", null);
|
||||
}
|
||||
if (((tan(-270) || 0) === Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -270",}, b0, false, false, "4", null);
|
||||
}
|
||||
if (compareEqual(tan(-360), 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -360",}, b0, false, false, "6", null);
|
||||
}
|
||||
if (((tan(-450) || 0) === -Infinity)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass -450",}, b0, false, false, "9", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "8", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,86 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: badd564b5bce22a82223511c91ba701da5314e5ad83e46a08ea5f401a4338b20
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables[",OktMIwz{~bdgWnPEa8u"];
|
||||
const b2 = stage.variables["yfy(G`K5K^fJcXAfiN4i"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 14",}, b0, false, false, "S8W[CSRh5A:[y8s/Ridj", null);
|
||||
if ((10 === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "1ove2a-$DQw7qy5PGdgq", null);
|
||||
}
|
||||
if ((10 === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 2",}, b0, false, false, "@A5}x{mm-Gk?CVz3o0Yn", null);
|
||||
}
|
||||
b1.value = 10;
|
||||
if (((+b1.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 3",}, b0, false, false, "Ul:BCck-}Fvdux~x#$${", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 4",}, b0, false, false, "8]2$7P)o#+#Lo]mFSBbx", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 5",}, b0, false, false, "ZU^{OfKTg|+Au$$q0[]u", null);
|
||||
}
|
||||
for (var a0 = 1; a0 >= 0.5; a0--) {
|
||||
if (((+b1.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 6",}, b0, false, false, "HB+_IN}6=K[*ksxKXH0`", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 7",}, b0, false, false, ";73ODiwcp8IthYURTX;S", null);
|
||||
}
|
||||
if (compareEqual(b1.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 8",}, b0, false, true, "${[MFmBL-D*1rbas9Q89", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
yield;
|
||||
}
|
||||
b2.value = "010";
|
||||
if (((+b2.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 9",}, b0, false, false, "#.`@SBj!g-c0:_q/tMZo", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 10",}, b0, false, false, "B`o?V6/q6g),/2w};a#y", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 11",}, b0, false, false, "TJ:#TkYBys*!RYiKLXb)", null);
|
||||
}
|
||||
for (var a1 = 1; a1 >= 0.5; a1--) {
|
||||
if (((+b2.value || 0) === 10)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 12",}, b0, false, false, ",Z,~10Qo~j;(+VL+I3q:", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 13",}, b0, false, false, "|Mqx([(26M%#ggW9)U0s", null);
|
||||
}
|
||||
if (compareEqual(b2.value, "0000000010")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass 14",}, b0, false, true, "YvtiKF231lU8p5Qd97RP", null);
|
||||
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
|
||||
}
|
||||
yield;
|
||||
}
|
||||
if ((0 === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "yO!,nQodLC}uqIc?212+", null);
|
||||
}
|
||||
if ((1 === 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "XzQt!.^A,SV?q0`Ui)wG", null);
|
||||
}
|
||||
if ((0 === 1)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "rxZqw7cv8g;PDM4B%{`?", null);
|
||||
}
|
||||
if (compareEqual(" ", 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "3G|)eVw1mQm;O~cRy`}0", null);
|
||||
}
|
||||
if (compareEqual(0, " ")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "sd5xXX*tsW/~A_Q!0;^w", null);
|
||||
}
|
||||
if (compareEqual("", 0)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "7**baE=].WD9OoY1+IEu", null);
|
||||
}
|
||||
if (compareEqual(0, "")) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "7!IB!=o/2H.Jqj-8Vwhz", null);
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "df{tf!WhfRwXgQ?SN_dj", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,28 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 2ae215411916e72c845c0f613d5b93f017b16af3010c6f4b0bbb3d1087eec301
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null);
|
||||
yield* thread.procedures["Wrun without screen refresh"]();
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "s", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 Wrun without screen refresh
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["F?*}X,`9XBpN_[piGRrz"];
|
||||
const b1 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ_run_without_screen_r () {
|
||||
b0.value = (((daysSince2000() * 86400) || 0) + 3);
|
||||
runtime.ioDevices.clock.resetProjectTimer();
|
||||
while (!((runtime.ioDevices.clock.projectTimer() > 0.1) || compareGreaterThan((daysSince2000() * 86400), b0.value))) {
|
||||
if (isStuck()) yield;
|
||||
}
|
||||
if (compareLessThan((daysSince2000() * 86400), b0.value)) {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b1, true, false, "u", null);
|
||||
}
|
||||
return "";
|
||||
}; })
|
||||
@@ -0,0 +1,19 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: ae6b920864ec07bc5a36b4af493b1646e54241abadabfa7bf962b43610ad926d
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Ny4npe`j3|CTeaIS.:6O", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "2T.vCF,K}vA=XNZ=kY+v", null);
|
||||
runtime.ext_scratch3_looks._setBackdrop(stage, stage.currentCostume + 1, true);
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,19 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 503e54070a6a749f8ffbcfad08d64cff3c1abb9400a7519b623b3876bd97e54a
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Ny4npe`j3|CTeaIS.:6O", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite1 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "2T.vCF,K}vA=XNZ=kY+v", null);
|
||||
runtime.ext_scratch3_looks._setBackdrop(stage, "backdrop2");
|
||||
retire(); return;
|
||||
}; })
|
||||
@@ -0,0 +1,32 @@
|
||||
// TW Snapshot
|
||||
// Input SHA-256: 6fe809479042e5ba09d66bffbd62d5a38d2265c98818e937d63137d2dcdc2fec
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = runtime.getOpcodeFunction("looks_say");
|
||||
const b1 = stage.variables["7qur6!bGgvC9I(Nd5.HP"];
|
||||
const b2 = stage.variables["sUOp@-6J4y0PqwiXit4!"];
|
||||
return function* genXYZ () {
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, ",a.euo_AgQTxR+D^x0M0", null);
|
||||
b1.value = 0;
|
||||
b2.value = "";
|
||||
while (!compareGreaterThan(b2.value, "")) {
|
||||
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "step" });
|
||||
yield;
|
||||
}
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "miAC8JZ$@akv[+}KR*@B", null);
|
||||
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "gXJU#lhy3A3XA_s[-Xs$", null);
|
||||
retire(); return;
|
||||
}; })
|
||||
|
||||
// Sprite2 script
|
||||
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
|
||||
const b0 = stage.variables["7qur6!bGgvC9I(Nd5.HP"];
|
||||
const b1 = stage.variables["sUOp@-6J4y0PqwiXit4!"];
|
||||
return function* genXYZ () {
|
||||
b0.value = ((+b0.value || 0) + 1);
|
||||
if (((b0.value || 0) === 5)) {
|
||||
b1.value = "end";
|
||||
}
|
||||
retire(); return;
|
||||
}; })
|
||||
131
scratch-vm/test/snapshot/index.js
Normal file
131
scratch-vm/test/snapshot/index.js
Normal file
@@ -0,0 +1,131 @@
|
||||
const Snapshot = require('./lib.js');
|
||||
|
||||
/**
|
||||
* @fileoverview
|
||||
* CLI for testing and generating snapshot tests.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const RESET = `\u001b[0m`;
|
||||
const BOLD = '\u001b[1m';
|
||||
const RED = '\u001b[31m';
|
||||
const YELLOW = `\u001b[33m`;
|
||||
const BLUE = `\u001b[34m`;
|
||||
const GREEN = '\u001b[32m';
|
||||
|
||||
const isUpdatingSnapshots = process.argv.includes('--update');
|
||||
|
||||
const runSnapshotTest = async testCase => {
|
||||
const prefix = `### ${testCase.id}: `;
|
||||
|
||||
try {
|
||||
const actualSnapshot = await Snapshot.generateActualSnapshot(testCase);
|
||||
const expectedSnapshot = Snapshot.getExpectedSnapshot(testCase);
|
||||
const result = Snapshot.compareSnapshots(expectedSnapshot, actualSnapshot);
|
||||
|
||||
if (isUpdatingSnapshots) {
|
||||
if (result === 'VALID') {
|
||||
console.log(`${BOLD}${GREEN}${prefix}already matches${RESET}`);
|
||||
return 'VALID';
|
||||
}
|
||||
console.log(`${BOLD}${BLUE}${prefix}updating${RESET}`);
|
||||
Snapshot.saveSnapshot(testCase, actualSnapshot);
|
||||
return 'UPDATED';
|
||||
}
|
||||
|
||||
if (result === 'VALID') {
|
||||
console.log(`${BOLD}${GREEN}${prefix}matches${RESET}`);
|
||||
return 'VALID';
|
||||
}
|
||||
|
||||
if (result === 'MISSING_SNAPSHOT') {
|
||||
console.log(`${BOLD}${YELLOW}${prefix}missing snapshot${RESET}`);
|
||||
return 'MISSING_SNAPSHOT';
|
||||
}
|
||||
|
||||
if (result === 'INPUT_MODIFIED') {
|
||||
console.log(`${BOLD}${YELLOW}${prefix}INPUT WAS MODIFIED${RESET}`);
|
||||
return 'INPUT_MODIFIED';
|
||||
}
|
||||
|
||||
console.log(`${BOLD}${RED}${prefix}DOES NOT MATCH${RESET}`);
|
||||
console.log(`${RED}EXPECTED:\n${expectedSnapshot}${RESET}`);
|
||||
console.log(`${BLUE}GOT:\n${actualSnapshot}${RESET}`);
|
||||
} catch (e) {
|
||||
console.log(`${BOLD}${RED}${prefix}ERROR${RESET}`);
|
||||
console.log(`${RED}${e}${RESET}`);
|
||||
}
|
||||
|
||||
console.log('');
|
||||
return 'INVALID';
|
||||
};
|
||||
|
||||
const run = async () => {
|
||||
console.log(`Running ${Snapshot.tests.length} snapshot tests.`);
|
||||
|
||||
const fileToResult = {};
|
||||
for (const testCase of Snapshot.tests) {
|
||||
fileToResult[testCase.id] = await runSnapshotTest(testCase);
|
||||
}
|
||||
|
||||
const getTestsByResult = r => Object.entries(fileToResult)
|
||||
.filter(i => i[1] === r)
|
||||
.map(i => i[0]);
|
||||
|
||||
const passed = getTestsByResult('VALID');
|
||||
const failed = getTestsByResult('INVALID');
|
||||
const missing = getTestsByResult('MISSING_SNAPSHOT');
|
||||
const updated = getTestsByResult('UPDATED');
|
||||
const modified = getTestsByResult('INPUT_MODIFIED');
|
||||
|
||||
console.log('');
|
||||
console.log(`${BOLD}=== SUMMARY ===${RESET}`);
|
||||
if (passed.length) {
|
||||
// Listing which ones were passed is unnecessary noise
|
||||
console.log(`${BOLD}${GREEN}PASSED ${passed.length}${RESET}`);
|
||||
}
|
||||
if (failed.length) {
|
||||
console.log(`${BOLD}${RED}FAILED ${failed.length} ${RESET}${failed.join(', ')}`);
|
||||
}
|
||||
if (missing.length) {
|
||||
console.log(`${BOLD}${YELLOW}MISSING ${missing.length} ${RESET}${missing.join(', ')}`);
|
||||
}
|
||||
if (modified.length) {
|
||||
console.log(`${BOLD}${YELLOW}MODIFIED ${modified.length} ${RESET}${modified.join(', ')}`);
|
||||
}
|
||||
if (updated.length) {
|
||||
console.log(`${BOLD}${BLUE}UPDATED ${updated.length} ${RESET}${updated.join(', ')}`);
|
||||
}
|
||||
|
||||
if (failed.length || missing.length || modified.length) {
|
||||
console.log('');
|
||||
if (modified.length) {
|
||||
console.log(`${missing.length} of the test projects have been modified, so this error is expected.`);
|
||||
}
|
||||
if (missing.length) {
|
||||
console.log(`${missing.length} of the test projects are missing snapshot, so this error is expected.`);
|
||||
}
|
||||
if (failed.length) {
|
||||
console.log(`If the compiler's behavior has changed, this failure is expected.`);
|
||||
}
|
||||
console.log(`Update snapshots with: ${BOLD}node test/snapshot --update${RESET}`);
|
||||
console.log(`Review the diff in version control, then commit the updated snapshot files.`);
|
||||
}
|
||||
|
||||
if (updated.length) {
|
||||
console.log('');
|
||||
console.log('Some snapshots have been updated. Please review the diff before committing.');
|
||||
}
|
||||
|
||||
return passed.length + updated.length === Snapshot.tests.length;
|
||||
};
|
||||
|
||||
run()
|
||||
.then(success => {
|
||||
process.exit(success ? 0 : 1);
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user