Skip to content

Commit 943a72b

Browse files
authored
more gt notequal stuff for switches
1 parent ce38b8a commit 943a72b

2 files changed

Lines changed: 86 additions & 6 deletions

File tree

src/addons/addons-l10n/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,11 @@
205205
"block-switching/operator_and": "and",
206206
"block-switching/operator_divide": "/",
207207
"block-switching/operator_equals": "=",
208+
"block-switching/operator_notequal": "",
208209
"block-switching/operator_gt": ">",
209210
"block-switching/operator_lt": "<",
211+
"block-switching/operator_gtorequal": "",
212+
"block-switching/operator_ltorequal": "",
210213
"block-switching/operator_mod": "mod",
211214
"block-switching/operator_multiply": "*",
212215
"block-switching/operator_or": "or",

src/addons/addons/block-switching/userscript.js

Lines changed: 83 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,6 @@ export default async function ({ addon, console, msg }) {
417417
opcode: "control_repeat_until",
418418
},
419419
noopSwitch,
420-
{
421-
opcode: "control_wait_until",
422-
splitInputs: ["SUBSTACK"],
423-
},
424420
{
425421
opcode: "control_forever",
426422
splitInputs: ["CONDITION"],
@@ -433,28 +429,109 @@ export default async function ({ addon, console, msg }) {
433429
{
434430
opcode: "operator_gt",
435431
},
436-
noopSwitch,
432+
{
433+
opcode: "operator_gtorequal",
434+
},
437435
{
438436
opcode: "operator_lt",
439437
},
438+
{
439+
opcode: "operator_ltorequal",
440+
},
441+
noopSwitch,
442+
{
443+
opcode: "operator_notequal",
444+
},
440445
];
441446
blockSwitches["operator_gt"] = [
442447
noopSwitch,
443448
{
444-
opcode: "operator_equals",
449+
opcode: "operator_gtorequal",
445450
},
446451
{
447452
opcode: "operator_lt",
448453
},
454+
{
455+
opcode: "operator_ltorequal",
456+
},
457+
{
458+
opcode: "operator_equals",
459+
},
460+
{
461+
opcode: "operator_notequal",
462+
},
449463
];
450464
blockSwitches["operator_lt"] = [
451465
{
452466
opcode: "operator_gt",
453467
},
468+
{
469+
opcode: "operator_gtorequal",
470+
},
471+
noopSwitch,
472+
{
473+
opcode: "operator_ltorequal",
474+
},
454475
{
455476
opcode: "operator_equals",
456477
},
478+
{
479+
opcode: "operator_notequal",
480+
},
481+
];
482+
blockSwitches["operator_notequal"] = [
483+
{
484+
opcode: "operator_gt",
485+
},
486+
{
487+
opcode: "operator_gtorequal",
488+
},
489+
{
490+
opcode: "operator_lt",
491+
},
492+
{
493+
opcode: "operator_ltorequal",
494+
},
495+
{
496+
opcode: "operator_equals",
497+
},
498+
noopSwitch,
499+
];
500+
blockSwitches["operator_gtorequal"] = [
501+
{
502+
opcode: "operator_gt",
503+
},
457504
noopSwitch,
505+
{
506+
opcode: "operator_lt",
507+
},
508+
{
509+
opcode: "operator_ltorequal",
510+
},
511+
{
512+
opcode: "operator_equals",
513+
},
514+
{
515+
opcode: "operator_notequal",
516+
},
517+
];
518+
blockSwitches["operator_ltorequal"] = [
519+
{
520+
opcode: "operator_gt",
521+
},
522+
{
523+
opcode: "operator_gtorequal",
524+
},
525+
{
526+
opcode: "operator_lt",
527+
},
528+
noopSwitch,
529+
{
530+
opcode: "operator_equals",
531+
},
532+
{
533+
opcode: "operator_notequal",
534+
},
458535
];
459536
blockSwitches["operator_add"] = [
460537
noopSwitch,

0 commit comments

Comments
 (0)