Skip to content

Commit

Permalink
Merge pull request #348 from DoomTas3r/condense-vector-xyz-blocks
Browse files Browse the repository at this point in the history
Condenses as vector2_xy and vector3_xyz blocks
  • Loading branch information
manuq authored Dec 23, 2024
2 parents ba034b6 + 354dde1 commit 29e6dac
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 95 deletions.
19 changes: 0 additions & 19 deletions addons/block_code/blocks/math/vector2_x.tres

This file was deleted.

26 changes: 26 additions & 0 deletions addons/block_code/blocks/math/vector2_xy.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[gd_resource type="Resource" load_steps=4 format=3 uid="uid://bpdjqy6oidfo4"]

[ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_p8v57"]
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="2_207xo"]

[sub_resource type="Resource" id="Resource_ie4sg"]
script = ExtResource("1_p8v57")
selected = 0
items = ["x", "y"]

[resource]
script = ExtResource("2_207xo")
name = &"vector2_xy"
target_node_class = ""
description = "Gives the x or y of a [b]Vector2[/b]"
category = "Math"
type = 3
variant_type = 3
display_template = "{xy: NIL} of {vector2: VECTOR2}"
code_template = "{vector2}.{{xy}}"
defaults = {
"xy": SubResource("Resource_ie4sg")
}
signal_name = ""
scope = ""
is_advanced = false
19 changes: 0 additions & 19 deletions addons/block_code/blocks/math/vector2_y.tres

This file was deleted.

19 changes: 0 additions & 19 deletions addons/block_code/blocks/math/vector3_x.tres

This file was deleted.

26 changes: 26 additions & 0 deletions addons/block_code/blocks/math/vector3_xyz.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[gd_resource type="Resource" load_steps=4 format=3 uid="uid://s72tgtbci1ui"]

[ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_0wc0o"]
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="2_e6ohf"]

[sub_resource type="Resource" id="Resource_ie4sg"]
script = ExtResource("1_0wc0o")
selected = 0
items = ["x", "y", "z"]

[resource]
script = ExtResource("2_e6ohf")
name = &"vector3_xyz"
target_node_class = ""
description = "Gives the x, y, or z of a [b]Vector3[/b]"
category = "Math"
type = 3
variant_type = 3
display_template = "{xyz: NIL} of {vector3: VECTOR3}"
code_template = "{vector3}.{{xyz}}"
defaults = {
"xyz": SubResource("Resource_ie4sg")
}
signal_name = ""
scope = ""
is_advanced = false
19 changes: 0 additions & 19 deletions addons/block_code/blocks/math/vector3_y.tres

This file was deleted.

19 changes: 0 additions & 19 deletions addons/block_code/blocks/math/vector3_z.tres

This file was deleted.

0 comments on commit 29e6dac

Please sign in to comment.