Spaces:
No application file
No application file
ALL_SCRATCH_BLOCKS_CATALOG = { | |
"motion_movesteps": { | |
"opcode": "motion_movesteps", | |
"next": null, | |
"parent": null, | |
"inputs": { | |
"STEPS": [ | |
1, | |
[ | |
4, | |
"10" | |
] | |
] | |
}, | |
"fields": {}, | |
"shadow": False, | |
"topLevel": True, | |
"x": 464, | |
"y": -416 | |
}, | |
"motion_turnright": { | |
"opcode": "motion_turnright", | |
"inputs": {"DEGREES": [1, [4, "15"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_turnleft": { | |
"opcode": "motion_turnleft", | |
"inputs": {"DEGREES": [1, [4, "15"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_goto": { | |
"opcode": "motion_goto", | |
"inputs": {"TO": [1, None]}, # TO input will be filled by a menu block ID | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_goto_menu": { # Shadow block for motion_goto | |
"opcode": "motion_goto_menu", | |
"inputs": {}, | |
"fields": {"TO": ["_random_", None]}, | |
"shadow": True | |
}, | |
"motion_gotoxy": { | |
"opcode": "motion_gotoxy", | |
"inputs": {"X": [1, [4, "0"]], "Y": [1, [4, "0"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_glideto": { | |
"opcode": "motion_glideto", | |
"inputs": {"SECS": [1, [4, "1"]], "TO": [1, None]}, # TO input will be filled by a menu block ID | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_glideto_menu": { # Shadow block for motion_glideto | |
"opcode": "motion_glideto_menu", | |
"inputs": {}, | |
"fields": {"TO": ["_random_", None]}, | |
"shadow": True | |
}, | |
"motion_glidesecstoxy": { | |
"opcode": "motion_glidesecstoxy", | |
"inputs": {"SECS": [1, [4, "1"]], "X": [1, [4, "0"]], "Y": [1, [4, "0"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_pointindirection": { | |
"opcode": "motion_pointindirection", | |
"inputs": {"DIRECTION": [1, [8, "90"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_pointtowards": { | |
"opcode": "motion_pointtowards", | |
"inputs": {"TOWARDS": [1, None]}, # TOWARDS input will be filled by a menu block ID | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_pointtowards_menu": { # Shadow block for motion_pointtowards | |
"opcode": "motion_pointtowards_menu", | |
"inputs": {}, | |
"fields": {"TOWARDS": ["_mouse_", None]}, | |
"shadow": True | |
}, | |
"motion_changexby": { | |
"opcode": "motion_changexby", | |
"inputs": {"DX": [1, [4, "10"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_setx": { | |
"opcode": "motion_setx", | |
"inputs": {"X": [1, [4, "0"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_changeyby": { | |
"opcode": "motion_changeyby", | |
"inputs": {"DY": [1, [4, "10"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_sety": { | |
"opcode": "motion_sety", | |
"inputs": {"Y": [1, [4, "0"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"motion_ifonedgebounce": { | |
"opcode": "motion_ifonedgebounce", | |
"next": None, "parent": None, "inputs": {}, "fields": {}, "shadow": False | |
}, | |
"motion_setrotationstyle": { | |
"opcode": "motion_setrotationstyle", | |
"inputs": {}, | |
"fields": {"STYLE": ["left-right", None]}, | |
"shadow": False | |
}, | |
"motion_xposition": { | |
"opcode": "motion_xposition", | |
"inputs": {}, "fields": {}, "shadow": False | |
}, | |
"motion_yposition": { | |
"opcode": "motion_yposition", | |
"inputs": {}, "fields": {}, "shadow": False | |
}, | |
"motion_direction": { | |
"opcode": "motion_direction", | |
"inputs": {}, "fields": {}, "shadow": False | |
}, | |
# Control Blocks | |
"control_wait": { | |
"opcode": "control_wait", | |
"inputs": {"DURATION": [1, [5, "1"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_repeat": { | |
"opcode": "control_repeat", | |
"inputs": {"TIMES": [1, [6, "10"]], "SUBSTACK": [2, None]}, # SUBSTACK to be filled | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_forever": { | |
"opcode": "control_forever", | |
"inputs": {"SUBSTACK": [2, None]}, # SUBSTACK to be filled | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_if": { | |
"opcode": "control_if", | |
"inputs": {"CONDITION": [2, None], "SUBSTACK": [2, None]}, # CONDITION and SUBSTACK to be filled | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_if_else": { | |
"opcode": "control_if_else", | |
"inputs": {"CONDITION": [2, None], "SUBSTACK": [2, None], "SUBSTACK2": [2, None]}, # All to be filled | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_wait_until": { | |
"opcode": "control_wait_until", | |
"inputs": {"CONDITION": [2, None]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_repeat_until": { | |
"opcode": "control_repeat_until", | |
"inputs": {"CONDITION": [2, None], "SUBSTACK": [2, None]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_stop": { | |
"opcode": "control_stop", | |
"inputs": {}, | |
"fields": {"STOP_OPTION": ["all", None]}, | |
"shadow": False, | |
"mutation": {"tagName": "mutation", "children": [], "hasnext": "false"} | |
}, | |
"control_start_as_clone": { | |
"opcode": "control_start_as_clone", | |
"inputs": {}, "fields": {}, "shadow": False | |
}, | |
"control_create_clone_of": { | |
"opcode": "control_create_clone_of", | |
"inputs": {"CLONE_OPTION": [1, None]}, # CLONE_OPTION to be filled by menu block ID | |
"fields": {}, | |
"shadow": False | |
}, | |
"control_create_clone_of_menu": { # Shadow block for control_create_clone_of | |
"opcode": "control_create_clone_of_menu", | |
"inputs": {}, | |
"fields": {"CLONE_OPTION": ["_myself_", None]}, | |
"shadow": True | |
}, | |
"control_delete_this_clone": { | |
"opcode": "control_delete_this_clone", | |
"inputs": {}, "fields": {}, "shadow": False | |
}, | |
# Event Blocks | |
"event_whenflagclicked": { | |
"opcode": "event_whenflagclicked", | |
"inputs": {}, "fields": {}, "shadow": False | |
}, | |
"event_whenkeypressed": { | |
"opcode": "event_whenkeypressed", | |
"inputs": {}, | |
"fields": {"KEY_OPTION": ["space", None]}, | |
"shadow": False | |
}, | |
"event_whenthisspriteclicked": { | |
"opcode": "event_whenthisspriteclicked", | |
"inputs": {}, "fields": {}, "shadow": False | |
}, | |
"event_whenbackdropswitchesto": { | |
"opcode": "event_whenbackdropswitchesto", | |
"inputs": {}, | |
"fields": {"BACKDROP": ["backdrop1", None]}, | |
"shadow": False | |
}, | |
"event_whengreaterthan": { | |
"opcode": "event_whengreaterthan", | |
"inputs": {"VALUE": [1, [4, "10"]]}, | |
"fields": {"WHENGREATERTHANMENU": ["LOUDNESS", None]}, | |
"shadow": False | |
}, | |
"event_whenbroadcastreceived": { | |
"opcode": "event_whenbroadcastreceived", | |
"inputs": {}, | |
"fields": {"BROADCAST_OPTION": ["message1", None]}, | |
"shadow": False | |
}, | |
"event_broadcast": { | |
"opcode": "event_broadcast", | |
"inputs": {"BROADCAST_INPUT": [1, None]}, # BROADCAST_INPUT to be filled by menu or text block | |
"fields": {}, | |
"shadow": False | |
}, | |
"event_broadcastandwait": { | |
"opcode": "event_broadcastandwait", | |
"inputs": {"BROADCAST_INPUT": [1, None]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
# Sensing Blocks (example, can be expanded) | |
"sensing_touchingobject": { | |
"opcode": "sensing_touchingobject", | |
"inputs": {"TOUCHINGOBJECTMENU": [1, None]}, # Input for menu block ID | |
"fields": {}, | |
"shadow": False | |
}, | |
"sensing_touchingobjectmenu": { # Shadow block for sensing_touchingobject | |
"opcode": "sensing_touchingobjectmenu", | |
"inputs": {}, | |
"fields": {"TOUCHINGOBJECTMENU": ["_mouse_", None]}, | |
"shadow": True | |
}, | |
# Operators (example, can be expanded) | |
"operator_add": { | |
"opcode": "operator_add", | |
"inputs": {"NUM1": [1, [4, "0"]], "NUM2": [1, [4, "0"]]}, | |
"fields": {}, | |
"shadow": False | |
}, | |
"operator_equals": { | |
"opcode": "operator_equals", | |
"inputs": {"OPERAND1": [1, [10, ""]], "OPERAND2": [1, [10, ""]]}, | |
"fields": {}, | |
"shadow": False | |
} | |
} |