Skip to content

Commit f4c82ed

Browse files
committed
WIP (Will split commit soon)
1 parent a5d1373 commit f4c82ed

File tree

72 files changed

+2321
-2279
lines changed

Some content is hidden

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

72 files changed

+2321
-2279
lines changed

addons/block_code/block_code_plugin.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const DISABLED_CLASSES := [
3333

3434
func _enter_tree():
3535
Types.init_cast_graph()
36+
CategoryFactory.init_block_definition_dictionary()
3637

3738
editor_inspector = EditorInterface.get_inspector()
3839
editor_selection = EditorInterface.get_selection()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://bpvefei72nh3a"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_5qal7"]
4+
5+
[resource]
6+
script = ExtResource("1_5qal7")
7+
name = &"add_node_to_group"
8+
description = "Add the node into the group"
9+
category = "Communication | Groups"
10+
type = 2
11+
variant_type = 0
12+
display_template = "Add {node: OBJECT} to group {group: STRING}"
13+
code_template = "{node}.add_to_group({group})"
14+
defaults = {}
15+
signal_name = ""
16+
scope = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://bvrmau8atjx1x"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_bcm71"]
4+
5+
[resource]
6+
script = ExtResource("1_bcm71")
7+
name = &"add_to_group"
8+
type = 2
9+
variant_type = 0
10+
display_template = "Add to group {group: STRING}"
11+
code_template = "add_to_group({group})"
12+
description = "Add this node into the group"
13+
category = "Communication | Groups"
14+
defaults = {}
15+
signal_name = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://c15vtdfihdxb8"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_mlm68"]
4+
5+
[resource]
6+
script = ExtResource("1_mlm68")
7+
name = &"call_method_group"
8+
type = 2
9+
variant_type = 0
10+
display_template = "Call method {method_name: STRING} in group {group: STRING}"
11+
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"
14+
defaults = {}
15+
signal_name = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://c04j5flmimjvf"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_pg363"]
4+
5+
[resource]
6+
script = ExtResource("1_pg363")
7+
name = &"call_method_node"
8+
type = 2
9+
variant_type = 0
10+
display_template = "Call method {method_name: STRING} on node {node: OBJECT}"
11+
code_template = "{node}.call({method_name})"
12+
description = "Calls the method/function of the given node"
13+
category = "Communication | Methods"
14+
defaults = {}
15+
signal_name = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://7r2b2griss3i"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_6e473"]
4+
5+
[resource]
6+
script = ExtResource("1_6e473")
7+
name = &"define_method"
8+
type = 1
9+
variant_type = 0
10+
display_template = "Define method {method_name: NIL}"
11+
code_template = "func {method_name}():"
12+
description = "Define a method/function with following code_templates"
13+
category = "Communication | Methods"
14+
defaults = {}
15+
signal_name = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://q4cnstftvsiu"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_tjyq5"]
4+
5+
[resource]
6+
script = ExtResource("1_tjyq5")
7+
name = &"is_in_group"
8+
description = "Is this node in the group"
9+
category = "Communication | Groups"
10+
type = 3
11+
variant_type = 1
12+
display_template = "Is in group {group: STRING}"
13+
code_template = "is_in_group({group})"
14+
defaults = {}
15+
signal_name = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://bbtdxeey74x67"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_5krrs"]
4+
5+
[resource]
6+
script = ExtResource("1_5krrs")
7+
name = &"is_node_in_group"
8+
description = "Is the node in the group"
9+
category = "Communication | Groups"
10+
type = 3
11+
variant_type = 1
12+
display_template = "Is {node: OBJECT} in group {group: STRING}"
13+
code_template = "{node}.is_in_group({group})"
14+
defaults = {}
15+
signal_name = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://dgenw5wyqorvq"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_cdwef"]
4+
5+
[resource]
6+
script = ExtResource("1_cdwef")
7+
name = &"remove_from_group"
8+
type = 2
9+
variant_type = 0
10+
display_template = "Remove from group {group: STRING}"
11+
code_template = "remove_from_group({group})"
12+
description = "Remove this node from the group"
13+
category = "Communication | Groups"
14+
defaults = {}
15+
signal_name = ""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://b2dwk77hnri8y"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_pec24"]
4+
5+
[resource]
6+
script = ExtResource("1_pec24")
7+
name = &"remove_node_from_group"
8+
type = 2
9+
variant_type = 0
10+
display_template = "Remove {node: OBJECT} from group {group: STRING}"
11+
code_template = "{node}.remove_from_group({group})"
12+
description = "Remove the node from the group"
13+
category = "Communication | Groups"
14+
defaults = {}
15+
signal_name = ""

0 commit comments

Comments
 (0)