Skip to content

Commit c00ec59

Browse files
authored
Merge pull request #243 from endlessm/fix-group-code-generation
blocks: Use string type for group names
2 parents 3d86f47 + cdf61f7 commit c00ec59

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

addons/block_code/blocks/communication/add_node_to_group.tres

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ description = "Add the node into the group"
1717
category = "Communication | Groups"
1818
type = 2
1919
variant_type = 0
20-
display_template = "add {node: OBJECT} to group {group: NIL}"
21-
code_template = "{node}.add_to_group(\\\"{group}\\\")"
20+
display_template = "add {node: OBJECT} to group {group: STRING}"
21+
code_template = "{node}.add_to_group({group})"
2222
defaults = {
2323
"group": SubResource("Resource_sus0f")
2424
}

addons/block_code/blocks/communication/add_to_group.tres

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ description = "Add this node into the group"
1717
category = "Communication | Groups"
1818
type = 2
1919
variant_type = 0
20-
display_template = "add to group {group: NIL}"
21-
code_template = "add_to_group(\\\"{group}\\\")"
20+
display_template = "add to group {group: STRING}"
21+
code_template = "add_to_group({group})"
2222
defaults = {
2323
"group": SubResource("Resource_fk0wa")
2424
}

addons/block_code/blocks/communication/call_method_group.tres

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ description = "Calls the method/function on each member of the given group"
1717
category = "Communication | Methods"
1818
type = 2
1919
variant_type = 0
20-
display_template = "call method {method_name: STRING} in group {group: NIL}"
21-
code_template = "get_tree().call_group(\\\"{group\\\"}, {method_name})"
20+
display_template = "call method {method_name: STRING} in group {group: STRING}"
21+
code_template = "get_tree().call_group({group}, {method_name})"
2222
defaults = {
2323
"group": SubResource("Resource_f4ctg")
2424
}

addons/block_code/blocks/communication/is_in_group.tres

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ description = "Is this node in the group"
1717
category = "Communication | Groups"
1818
type = 3
1919
variant_type = 1
20-
display_template = "is in group {group: NIL}"
21-
code_template = "is_in_group(\\\"{group}\\\")"
20+
display_template = "is in group {group: STRING}"
21+
code_template = "is_in_group({group})"
2222
defaults = {
2323
"group": SubResource("Resource_d0v0d")
2424
}

addons/block_code/blocks/communication/is_node_in_group.tres

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ description = "Is the node in the group"
1717
category = "Communication | Groups"
1818
type = 3
1919
variant_type = 1
20-
display_template = "{node: OBJECT} is in group {group: NIL}"
21-
code_template = "{node}.is_in_group(\\\"{group}\\\")"
20+
display_template = "{node: OBJECT} is in group {group: STRING}"
21+
code_template = "{node}.is_in_group({group})"
2222
defaults = {
2323
"group": SubResource("Resource_o38ym")
2424
}

addons/block_code/blocks/communication/remove_from_group.tres

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ description = "Remove this node from the group"
1717
category = "Communication | Groups"
1818
type = 2
1919
variant_type = 0
20-
display_template = "remove from group {group: NIL}"
21-
code_template = "remove_from_group(\\\"{group}\\\")"
20+
display_template = "remove from group {group: STRING}"
21+
code_template = "remove_from_group({group})"
2222
defaults = {
2323
"group": SubResource("Resource_45b71")
2424
}

0 commit comments

Comments
 (0)