Upload block_relation_builder.py
Browse files
utils/block_relation_builder.py
CHANGED
|
@@ -3786,6 +3786,7 @@ def _find_all_opcodes(code_block: str) -> list[str]:
|
|
| 3786 |
(r"if on edge, bounce", "motion_ifonedgebounce"),
|
| 3787 |
# (r"set rotation style \[.+? v\]", "motion_setrotationstyle"),
|
| 3788 |
(r"set rotation style\s*\[(?:left-right|all around|don't rotate)(?:\s*v)?\]", "motion_setrotationstyle"),
|
|
|
|
| 3789 |
(r"\(?x position\)?", "motion_xposition"), #(to x positon may detect where var is used)
|
| 3790 |
(r"\(?y position\)?", "motion_yposition"), #(to y position may detect where var is used)
|
| 3791 |
(r"\(?direction\)?", "motion_direction"), #(to direction may detect where var is used)
|
|
|
|
| 3786 |
(r"if on edge, bounce", "motion_ifonedgebounce"),
|
| 3787 |
# (r"set rotation style \[.+? v\]", "motion_setrotationstyle"),
|
| 3788 |
(r"set rotation style\s*\[(?:left-right|all around|don't rotate)(?:\s*v)?\]", "motion_setrotationstyle"),
|
| 3789 |
+
(r"set rotation style to\s*(?:[\[\(]\s*)?(left-right|all around|don't rotate)\s*(?:v)?(?:[\]\)])?", "motion_setrotationstyle"),
|
| 3790 |
(r"\(?x position\)?", "motion_xposition"), #(to x positon may detect where var is used)
|
| 3791 |
(r"\(?y position\)?", "motion_yposition"), #(to y position may detect where var is used)
|
| 3792 |
(r"\(?direction\)?", "motion_direction"), #(to direction may detect where var is used)
|