Skip to content

Commit c59e48e

Browse files
committed
Revert "Block: Handle bottom_snap property directly"
This reverts commit 6a11ebe.
1 parent 824a0f9 commit c59e48e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

addons/block_code/ui/blocks/block/block.gd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@ signal modified
2121
@export var category: String
2222

2323
## The next block in the line of execution (can be null if end)
24-
@export var bottom_snap: SnapPoint
24+
@export var bottom_snap_path: NodePath
2525

2626
## The scope of the block (statement of matching entry block)
2727
@export var scope: String = ""
2828

2929
## The resource containing the block properties and the snapped blocks
3030
@export var resource: SerializedBlockTreeNode
3131

32+
var bottom_snap: SnapPoint
33+
3234

3335
func _ready():
36+
bottom_snap = get_node_or_null(bottom_snap_path)
3437
mouse_filter = Control.MOUSE_FILTER_IGNORE
3538

3639

addons/block_code/ui/blocks/control_block/control_block.tscn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
[ext_resource type="Script" path="res://addons/block_code/ui/blocks/control_block/control_block.gd" id="1_2hbir"]
44
[ext_resource type="PackedScene" uid="uid://b1oge52xhjqnu" path="res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.tscn" id="3_nhryi"]
55

6-
[node name="ControlBlock" type="MarginContainer" node_paths=PackedStringArray("bottom_snap")]
6+
[node name="ControlBlock" type="MarginContainer"]
77
size_flags_horizontal = 0
88
mouse_filter = 2
99
script = ExtResource("1_2hbir")
1010
block_name = "control_block"
1111
label = "Control Block"
1212
color = Color(0.59979, 0.536348, 0.876215, 1)
13-
bottom_snap = NodePath("VBoxContainer/SnapPoint")
13+
bottom_snap_path = NodePath("VBoxContainer/SnapPoint")
1414

1515
[node name="VBoxContainer" type="VBoxContainer" parent="."]
1616
layout_mode = 2

addons/block_code/ui/blocks/statement_block/statement_block.tscn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
[ext_resource type="PackedScene" uid="uid://c7puyxpqcq6xo" path="res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.tscn" id="2_owgdx"]
66
[ext_resource type="PackedScene" uid="uid://b1oge52xhjqnu" path="res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.tscn" id="3_5vaov"]
77

8-
[node name="StatementBlock" type="MarginContainer" node_paths=PackedStringArray("bottom_snap")]
8+
[node name="StatementBlock" type="MarginContainer"]
99
size_flags_horizontal = 0
1010
mouse_filter = 2
1111
script = ExtResource("1_6wvlf")
1212
block_name = "statement_block"
1313
label = "StatementBlock"
14-
bottom_snap = NodePath("VBoxContainer/SnapPoint")
14+
bottom_snap_path = NodePath("VBoxContainer/SnapPoint")
1515

1616
[node name="VBoxContainer" type="VBoxContainer" parent="."]
1717
layout_mode = 2

0 commit comments

Comments
 (0)