Skip to content

Commit 74b54ba

Browse files
authored
operator_power switch
1 parent e70c9cc commit 74b54ba

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

src/addons/addons-l10n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
"block-switching/operator_subtract": "-",
217217
"block-switching/operator_trueBoolean": "true",
218218
"block-switching/operator_falseBoolean": "false",
219+
"block-switching/operator_power": "^",
219220
"block-switching/pen_changePenColorParamBy": "change parameter",
220221
"block-switching/pen_changePenHueBy": "change hue",
221222
"block-switching/pen_changePenShadeBy": "change shade",

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ export default async function ({ addon, console, msg }) {
544544
{
545545
opcode: "operator_divide",
546546
},
547+
{
548+
opcode: "operator_power",
549+
},
547550
{
548551
opcode: "operator_mod",
549552
},
@@ -559,6 +562,9 @@ export default async function ({ addon, console, msg }) {
559562
{
560563
opcode: "operator_divide",
561564
},
565+
{
566+
opcode: "operator_power",
567+
},
562568
{
563569
opcode: "operator_mod",
564570
},
@@ -574,6 +580,9 @@ export default async function ({ addon, console, msg }) {
574580
{
575581
opcode: "operator_divide",
576582
},
583+
{
584+
opcode: "operator_power",
585+
},
577586
{
578587
opcode: "operator_mod",
579588
},
@@ -589,6 +598,27 @@ export default async function ({ addon, console, msg }) {
589598
opcode: "operator_multiply",
590599
},
591600
noopSwitch,
601+
{
602+
opcode: "operator_power",
603+
},
604+
{
605+
opcode: "operator_mod",
606+
},
607+
];
608+
blockSwitches["operator_power"] = [
609+
{
610+
opcode: "operator_add",
611+
},
612+
{
613+
opcode: "operator_subtract",
614+
},
615+
{
616+
opcode: "operator_multiply",
617+
},
618+
{
619+
opcode: "operator_divide",
620+
},
621+
noopSwitch,
592622
{
593623
opcode: "operator_mod",
594624
},
@@ -606,6 +636,9 @@ export default async function ({ addon, console, msg }) {
606636
{
607637
opcode: "operator_divide",
608638
},
639+
{
640+
opcode: "operator_power",
641+
},
609642
noopSwitch,
610643
];
611644
blockSwitches["operator_and"] = [

0 commit comments

Comments
 (0)