Spaces:
Paused
Paused
Update src/lib/make-toolbox-xml.js
Browse files- src/lib/make-toolbox-xml.js +56 -18
src/lib/make-toolbox-xml.js
CHANGED
|
@@ -30,13 +30,6 @@ const motion = function (isInitialSetup, isStage, targetId) {
|
|
| 30 |
</shadow>
|
| 31 |
</value>
|
| 32 |
</block>
|
| 33 |
-
<block type="motion_moveupdownsteps">
|
| 34 |
-
<value name="STEPS">
|
| 35 |
-
<shadow type="math_number">
|
| 36 |
-
<field name="NUM">10</field>
|
| 37 |
-
</shadow>
|
| 38 |
-
</value>
|
| 39 |
-
</block>
|
| 40 |
<block type="motion_turnright">
|
| 41 |
<value name="DEGREES">
|
| 42 |
<shadow type="math_number">
|
|
@@ -575,7 +568,9 @@ const events = function (isInitialSetup, isStage) {
|
|
| 575 |
${blockSeparator}
|
| 576 |
<block type="event_always"></block>
|
| 577 |
<block type="event_whenanything">
|
| 578 |
-
<value name="ANYTHING"
|
|
|
|
|
|
|
| 579 |
</block>
|
| 580 |
${blockSeparator}
|
| 581 |
<block type="event_whenkeypressed"></block>
|
|
@@ -630,6 +625,9 @@ const control = function (isInitialSetup, isStage) {
|
|
| 630 |
<field name="NUM">1</field>
|
| 631 |
</shadow>
|
| 632 |
</value>
|
|
|
|
|
|
|
|
|
|
| 633 |
</block>
|
| 634 |
${blockSeparator}
|
| 635 |
<block type="control_repeat">
|
|
@@ -668,13 +666,35 @@ const control = function (isInitialSetup, isStage) {
|
|
| 668 |
</value>
|
| 669 |
</block>
|
| 670 |
${blockSeparator}
|
| 671 |
-
<block type="control_if"
|
| 672 |
-
|
| 673 |
-
|
| 674 |
-
|
| 675 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 676 |
<block type="control_if_return_else_return">
|
| 677 |
-
<value name="boolean"
|
|
|
|
|
|
|
| 678 |
<value name="TEXT1">
|
| 679 |
<shadow type="text">
|
| 680 |
<field name="TEXT">foo</field>
|
|
@@ -1166,9 +1186,27 @@ const operators = function (isInitialSetup) {
|
|
| 1166 |
<block type="operator_trueBoolean"></block>
|
| 1167 |
<block type="operator_falseBoolean"></block>
|
| 1168 |
${blockSeparator}
|
| 1169 |
-
<block type="operator_and"
|
| 1170 |
-
|
| 1171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1172 |
${blockSeparator}
|
| 1173 |
${isInitialSetup ? '' : `
|
| 1174 |
<block type="operator_newLine"></block>
|
|
@@ -1550,4 +1588,4 @@ const makeToolboxXML = function (isInitialSetup, isStage = true, targetId, categ
|
|
| 1550 |
return everything.join(`\n${gap}\n`);
|
| 1551 |
};
|
| 1552 |
|
| 1553 |
-
export default makeToolboxXML;
|
|
|
|
| 30 |
</shadow>
|
| 31 |
</value>
|
| 32 |
</block>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
<block type="motion_turnright">
|
| 34 |
<value name="DEGREES">
|
| 35 |
<shadow type="math_number">
|
|
|
|
| 568 |
${blockSeparator}
|
| 569 |
<block type="event_always"></block>
|
| 570 |
<block type="event_whenanything">
|
| 571 |
+
<value name="ANYTHING">
|
| 572 |
+
<shadow type="checkbox" />
|
| 573 |
+
</value>
|
| 574 |
</block>
|
| 575 |
${blockSeparator}
|
| 576 |
<block type="event_whenkeypressed"></block>
|
|
|
|
| 625 |
<field name="NUM">1</field>
|
| 626 |
</shadow>
|
| 627 |
</value>
|
| 628 |
+
<value name="CONDITION">
|
| 629 |
+
<shadow type="checkbox" />
|
| 630 |
+
</value>
|
| 631 |
</block>
|
| 632 |
${blockSeparator}
|
| 633 |
<block type="control_repeat">
|
|
|
|
| 666 |
</value>
|
| 667 |
</block>
|
| 668 |
${blockSeparator}
|
| 669 |
+
<block type="control_if">
|
| 670 |
+
<value name="CONDITION">
|
| 671 |
+
<shadow type="checkbox" />
|
| 672 |
+
</value>
|
| 673 |
+
</block>
|
| 674 |
+
<block type="control_if_else">
|
| 675 |
+
<value name="CONDITION">
|
| 676 |
+
<shadow type="checkbox" />
|
| 677 |
+
</value>
|
| 678 |
+
</block>
|
| 679 |
+
<block id="wait_until" type="control_wait_until">
|
| 680 |
+
<value name="CONDITION">
|
| 681 |
+
<shadow type="checkbox" />
|
| 682 |
+
</value>
|
| 683 |
+
</block>
|
| 684 |
+
<block id="repeat_until" type="control_repeat_until">
|
| 685 |
+
<value name="CONDITION">
|
| 686 |
+
<shadow type="checkbox" />
|
| 687 |
+
</value>
|
| 688 |
+
</block>
|
| 689 |
+
<block id="while" type="control_while">
|
| 690 |
+
<value name="CONDITION">
|
| 691 |
+
<shadow type="checkbox" />
|
| 692 |
+
</value>
|
| 693 |
+
</block>
|
| 694 |
<block type="control_if_return_else_return">
|
| 695 |
+
<value name="boolean">
|
| 696 |
+
<shadow type="checkbox" />
|
| 697 |
+
</value>
|
| 698 |
<value name="TEXT1">
|
| 699 |
<shadow type="text">
|
| 700 |
<field name="TEXT">foo</field>
|
|
|
|
| 1186 |
<block type="operator_trueBoolean"></block>
|
| 1187 |
<block type="operator_falseBoolean"></block>
|
| 1188 |
${blockSeparator}
|
| 1189 |
+
<block type="operator_and">
|
| 1190 |
+
<value name="OPERAND1">
|
| 1191 |
+
<shadow type="checkbox" />
|
| 1192 |
+
</value>
|
| 1193 |
+
<value name="OPERAND2">
|
| 1194 |
+
<shadow type="checkbox" />
|
| 1195 |
+
</value>
|
| 1196 |
+
</block>
|
| 1197 |
+
<block type="operator_or">
|
| 1198 |
+
<value name="OPERAND1">
|
| 1199 |
+
<shadow type="checkbox" />
|
| 1200 |
+
</value>
|
| 1201 |
+
<value name="OPERAND2">
|
| 1202 |
+
<shadow type="checkbox" />
|
| 1203 |
+
</value>
|
| 1204 |
+
</block>
|
| 1205 |
+
<block type="operator_not">
|
| 1206 |
+
<value name="OPERAND">
|
| 1207 |
+
<shadow type="checkbox" />
|
| 1208 |
+
</value>
|
| 1209 |
+
</block>
|
| 1210 |
${blockSeparator}
|
| 1211 |
${isInitialSetup ? '' : `
|
| 1212 |
<block type="operator_newLine"></block>
|
|
|
|
| 1588 |
return everything.join(`\n${gap}\n`);
|
| 1589 |
};
|
| 1590 |
|
| 1591 |
+
export default makeToolboxXML;
|