Skip to content

Commit a91d31d

Browse files
authored
Merge pull request #231 from endlessm/T35563-natural-language
Switch block labels to natural language
2 parents c7b6517 + 7a9b3e6 commit a91d31d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+193
-176
lines changed

addons/block_code/blocks/communication/add_node_to_group.tres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
[resource]
66
script = ExtResource("1_5qal7")
77
name = &"add_node_to_group"
8+
target_node_class = ""
89
description = "Add the node into the group"
910
category = "Communication | Groups"
1011
type = 2
1112
variant_type = 0
12-
display_template = "Add {node: OBJECT} to group {group: STRING}"
13+
display_template = "add {node: OBJECT} to group {group: STRING}"
1314
code_template = "{node}.add_to_group({group})"
1415
defaults = {}
1516
signal_name = ""

addons/block_code/blocks/communication/add_to_group.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Add this node into the group"
1010
category = "Communication | Groups"
1111
type = 2
1212
variant_type = 0
13-
display_template = "Add to group {group: STRING}"
13+
display_template = "add to group {group: STRING}"
1414
code_template = "add_to_group({group})"
1515
defaults = {}
1616
signal_name = ""

addons/block_code/blocks/communication/area2d_on_entered.tres

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ description = ""
1010
category = "Communication | Methods"
1111
type = 1
1212
variant_type = 0
13-
display_template = "On [body: OBJECT] entered"
14-
code_template = "func _on_body_entered(body: Node2D):
13+
display_template = "when this node collides with [something: OBJECT]"
14+
code_template = "func _on_body_entered(something: Node2D):
1515
"
1616
defaults = {}
1717
signal_name = "body_entered"

addons/block_code/blocks/communication/area2d_on_exited.tres

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ description = ""
1010
category = "Communication | Methods"
1111
type = 1
1212
variant_type = 0
13-
display_template = "On [body: OBJECT] exited"
14-
code_template = "func _on_body_exited(body: Node2D):
13+
display_template = "when this node stops colliding with [something: OBJECT]"
14+
code_template = "func _on_body_exited(something: Node2D):
1515
"
1616
defaults = {}
1717
signal_name = "body_exited"

addons/block_code/blocks/communication/call_method_group.tres

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
[resource]
66
script = ExtResource("1_mlm68")
77
name = &"call_method_group"
8+
target_node_class = ""
9+
description = "Calls the method/function on each member of the given group"
10+
category = "Communication | Methods"
811
type = 2
912
variant_type = 0
10-
display_template = "Call method {method_name: STRING} in group {group: STRING}"
13+
display_template = "call method {method_name: STRING} in group {group: STRING}"
1114
code_template = "get_tree().call_group({group}, {method_name})"
12-
description = "Calls the method/function on each member of the given group"
13-
category = "Communication | Methods"
1415
defaults = {}
1516
signal_name = ""
17+
scope = ""

addons/block_code/blocks/communication/call_method_node.tres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
[resource]
66
script = ExtResource("1_pg363")
77
name = &"call_method_node"
8+
target_node_class = ""
89
description = "Calls the method/function of the given node"
910
category = "Communication | Methods"
1011
type = 2
1112
variant_type = 0
12-
display_template = "Call method {method_name: STRING} in node {node: OBJECT}"
13+
display_template = "call method {method_name: STRING} in node {node: OBJECT}"
1314
code_template = "{node}.call({method_name})"
1415
defaults = {}
1516
signal_name = ""

addons/block_code/blocks/communication/define_method.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Define a method/function with following statements"
1010
category = "Communication | Methods"
1111
type = 1
1212
variant_type = 0
13-
display_template = "Define method {method_name: STRING_NAME}"
13+
display_template = "define method {method_name: STRING_NAME}"
1414
code_template = "func {method_name}():"
1515
defaults = {}
1616
signal_name = ""

addons/block_code/blocks/communication/is_in_group.tres

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
[resource]
66
script = ExtResource("1_tjyq5")
77
name = &"is_in_group"
8+
target_node_class = ""
89
description = "Is this node in the group"
910
category = "Communication | Groups"
1011
type = 3
1112
variant_type = 1
12-
display_template = "Is in group {group: STRING}"
13+
display_template = "is in group {group: STRING}"
1314
code_template = "is_in_group({group})"
1415
defaults = {}
1516
signal_name = ""
17+
scope = ""

addons/block_code/blocks/communication/is_node_in_group.tres

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
[resource]
66
script = ExtResource("1_5krrs")
77
name = &"is_node_in_group"
8+
target_node_class = ""
89
description = "Is the node in the group"
910
category = "Communication | Groups"
1011
type = 3
1112
variant_type = 1
12-
display_template = "Is {node: OBJECT} in group {group: STRING}"
13+
display_template = "{node: OBJECT} is in group {group: STRING}"
1314
code_template = "{node}.is_in_group({group})"
1415
defaults = {}
1516
signal_name = ""
17+
scope = ""

addons/block_code/blocks/communication/remove_from_group.tres

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
[resource]
66
script = ExtResource("1_cdwef")
77
name = &"remove_from_group"
8+
target_node_class = ""
9+
description = "Remove this node from the group"
10+
category = "Communication | Groups"
811
type = 2
912
variant_type = 0
10-
display_template = "Remove from group {group: STRING}"
13+
display_template = "remove from group {group: STRING}"
1114
code_template = "remove_from_group({group})"
12-
description = "Remove this node from the group"
13-
category = "Communication | Groups"
1415
defaults = {}
1516
signal_name = ""
17+
scope = ""

addons/block_code/blocks/communication/remove_node_from_group.tres

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
[resource]
66
script = ExtResource("1_pec24")
77
name = &"remove_node_from_group"
8+
target_node_class = ""
9+
description = "Remove the node from the group"
10+
category = "Communication | Groups"
811
type = 2
912
variant_type = 0
10-
display_template = "Remove {node: OBJECT} from group {group: STRING}"
13+
display_template = "remove {node: OBJECT} from group {group: STRING}"
1114
code_template = "{node}.remove_from_group({group})"
12-
description = "Remove the node from the group"
13-
category = "Communication | Groups"
1415
defaults = {}
1516
signal_name = ""
17+
scope = ""

addons/block_code/blocks/communication/rigidbody2d_on_entered.tres

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ description = ""
1010
category = "Communication | Methods"
1111
type = 1
1212
variant_type = 0
13-
display_template = "On [body: OBJECT] entered"
14-
code_template = "func _on_body_entered(body: Node2D):
13+
display_template = "when this node collides with [something: OBJECT]"
14+
code_template = "func _on_body_entered(something: Node2D):
1515
"
1616
defaults = {}
1717
signal_name = "body_entered"

addons/block_code/blocks/communication/rigidbody2d_on_exited.tres

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ description = ""
1010
category = "Communication | Methods"
1111
type = 1
1212
variant_type = 0
13-
display_template = "On [body: OBJECT] exited"
14-
code_template = "func _on_body_exited(body: Node2D):
13+
display_template = "when this node stops colliding with [something: OBJECT]"
14+
code_template = "func _on_body_exited(something: Node2D):
1515
"
1616
defaults = {}
1717
signal_name = "body_exited"

addons/block_code/blocks/graphics/animationplayer_is_playing.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Check if an animation is currently playing."
1010
category = "Graphics | Animation"
1111
type = 3
1212
variant_type = 1
13-
display_template = "Is playing"
13+
display_template = "is playing"
1414
code_template = "is_playing()"
1515
defaults = {}
1616
signal_name = ""

addons/block_code/blocks/graphics/animationplayer_pause.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Pause the currently playing animation."
1010
category = "Graphics | Animation"
1111
type = 2
1212
variant_type = 0
13-
display_template = "Pause"
13+
display_template = "pause"
1414
code_template = "pause()"
1515
defaults = {}
1616
signal_name = ""

addons/block_code/blocks/graphics/animationplayer_play.tres

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ items = []
1212
[sub_resource type="Resource" id="Resource_vnp2w"]
1313
script = ExtResource("1_xu43h")
1414
selected = 0
15-
items = ["ahead", "backwards"]
15+
items = ["forward", "backwards"]
1616

1717
[resource]
1818
script = ExtResource("1_emeuv")
@@ -22,8 +22,8 @@ description = "Play the animation."
2222
category = "Graphics | Animation"
2323
type = 2
2424
variant_type = 0
25-
display_template = "Play {animation: STRING} {direction: NIL}"
26-
code_template = "if {direction} == \"ahead\":
25+
display_template = "play {animation: STRING} {direction: NIL}"
26+
code_template = "if {direction} == \"forward\":
2727
play({animation})
2828
else:
2929
play_backwards({animation})

addons/block_code/blocks/graphics/animationplayer_stop.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Stop the currently playing animation."
1010
category = "Graphics | Animation"
1111
type = 2
1212
variant_type = 0
13-
display_template = "Stop"
13+
display_template = "stop"
1414
code_template = "stop()"
1515
defaults = {}
1616
signal_name = ""

addons/block_code/blocks/graphics/viewport_center.tres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
[resource]
66
script = ExtResource("1_rc1so")
77
name = &"viewport_center"
8+
target_node_class = ""
89
description = "Coordinates of the middle of the viewable screen when playing."
910
category = "Graphics | Viewport"
1011
type = 3
1112
variant_type = 5
12-
display_template = "Viewport Center"
13+
display_template = "viewport center"
1314
code_template = "(func (): var transform: Transform2D = get_viewport_transform(); var scale: Vector2 = transform.get_scale(); return -transform.origin / scale + get_viewport_rect().size / scale / 2).call()"
1415
defaults = {}
1516
signal_name = ""

addons/block_code/blocks/graphics/viewport_height.tres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
[resource]
66
script = ExtResource("1_1debb")
77
name = &"viewport_height"
8+
target_node_class = ""
89
description = "How tall the viewable screen is when playing."
910
category = "Graphics | Viewport"
1011
type = 3
1112
variant_type = 3
12-
display_template = "Viewport Height"
13+
display_template = "viewport height"
1314
code_template = "(func (): var transform: Transform2D = get_viewport_transform(); var scale: Vector2 = transform.get_scale(); return -transform.origin.y / scale.y + get_viewport_rect().size.y / scale.y).call()"
1415
defaults = {}
1516
signal_name = ""

addons/block_code/blocks/graphics/viewport_width.tres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
[resource]
66
script = ExtResource("1_ll4rh")
77
name = &"viewport_width"
8+
target_node_class = ""
89
description = "How wide the viewable screen is when playing."
910
category = "Graphics | Viewport"
1011
type = 3
1112
variant_type = 3
12-
display_template = "Viewport Width"
13+
display_template = "viewport width"
1314
code_template = "(func (): var transform: Transform2D = get_viewport_transform(); var scale: Vector2 = transform.get_scale(); return -transform.origin.x / scale.x + get_viewport_rect().size.x / scale.x).call()"
1415
defaults = {}
1516
signal_name = ""

addons/block_code/blocks/input/characterbody2d_is_on_floor.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "True if the character is on the floor."
1010
category = "Physics | Velocity"
1111
type = 3
1212
variant_type = 1
13-
display_template = "Is on floor"
13+
display_template = "is on floor"
1414
code_template = "is_on_floor()"
1515
defaults = {}
1616
signal_name = ""

addons/block_code/blocks/input/characterbody2d_move.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Move the character up, down, left, and right with the keyboard us
1010
category = "Input"
1111
type = 2
1212
variant_type = 0
13-
display_template = "Move with keys {up: STRING} {down: STRING} {left: STRING} {right: STRING} with speed {speed: VECTOR2}"
13+
display_template = "move with keys {up: STRING} {down: STRING} {left: STRING} {right: STRING} at speed {speed: VECTOR2}"
1414
code_template = "var dir = Vector2()
1515
dir.x += float(Input.is_key_pressed(OS.find_keycode_from_string({right})))
1616
dir.x -= float(Input.is_key_pressed(OS.find_keycode_from_string({left})))

addons/block_code/blocks/input/is_input_actioned.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ description = "True if the specified input action has been pressed or released."
1717
category = "Input"
1818
type = 3
1919
variant_type = 1
20-
display_template = "Is action {action_name: STRING_NAME} {action: NIL}"
20+
display_template = "action {action_name: STRING_NAME} is {action: NIL}"
2121
code_template = "Input.is_action_{{action}}('{{action_name}}')"
2222
defaults = {
2323
"action": SubResource("Resource_ai5in")

addons/block_code/blocks/lifecycle/physics_process.tres

Lines changed: 0 additions & 16 deletions
This file was deleted.

addons/block_code/blocks/lifecycle/process.tres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
[resource]
66
script = ExtResource("1_pmina")
77
name = &"process"
8+
target_node_class = ""
89
description = "Attached blocks will be executed during the processing step of the main loop"
910
category = "Lifecycle"
1011
type = 1
1112
variant_type = 0
12-
display_template = "On Process"
13+
display_template = "every frame"
1314
code_template = "func _process(delta):"
1415
defaults = {}
1516
signal_name = ""

addons/block_code/blocks/lifecycle/queue_free.tres

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
[resource]
66
script = ExtResource("1_75fle")
77
name = &"queue_free"
8+
target_node_class = ""
9+
description = "Queues this node to be deleted at the end of the current frame"
10+
category = "Lifecycle"
811
type = 2
912
variant_type = 0
10-
display_template = "Queue Free"
13+
display_template = "remove"
1114
code_template = "queue_free()"
12-
description = "Queues this node to be deleted at the end of the current frame"
13-
category = "Lifecycle"
1415
defaults = {}
1516
signal_name = ""
17+
scope = ""

addons/block_code/blocks/lifecycle/ready.tres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
[resource]
66
script = ExtResource("1_vk0xk")
77
name = &"ready"
8+
target_node_class = ""
89
description = "Attached blocks will be executed once when the node is \"ready\""
910
category = "Lifecycle"
1011
type = 1
1112
variant_type = 0
12-
display_template = "On Ready"
13+
display_template = "when starting"
1314
code_template = "func _ready():"
1415
defaults = {}
1516
signal_name = ""

addons/block_code/blocks/log/breakpoint.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Pause execution and show the current line of code in the debugger
1010
category = "Log"
1111
type = 2
1212
variant_type = 0
13-
display_template = "Breakpoint"
13+
display_template = "breakpoint"
1414
code_template = "breakpoint"
1515
defaults = {}
1616
signal_name = ""

addons/block_code/blocks/log/print.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Print the text to output"
1010
category = "Log"
1111
type = 2
1212
variant_type = 0
13-
display_template = "Print {text: STRING}"
13+
display_template = "log text {text: STRING}"
1414
code_template = "print({text})"
1515
defaults = {
1616
"text": "Hello"

addons/block_code/blocks/logic/else.tres

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
[resource]
66
script = ExtResource("1_x816c")
77
name = &"else"
8+
target_node_class = ""
9+
description = ""
10+
category = "Logic | Conditionals"
811
type = 4
912
variant_type = 0
10-
display_template = "Else"
13+
display_template = "else"
1114
code_template = "else:"
12-
description = ""
13-
category = "Logic | Conditionals"
1415
defaults = {}
1516
signal_name = ""
17+
scope = ""

0 commit comments

Comments
 (0)