Skip to content

Commit c9ebfb9

Browse files
authored
Merge pull request #157 from endlessm/T35573-snappoint-tests
Block: Add setter to manage bottom_snap
2 parents 3957b5f + 9aae2bb commit c9ebfb9

File tree

1 file changed

+7
-2
lines changed
  • addons/block_code/ui/blocks/block

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ signal modified
2424
@export var category: String
2525

2626
## The next block in the line of execution (can be null if end)
27-
@export var bottom_snap_path: NodePath
27+
@export var bottom_snap_path: NodePath:
28+
set = _set_bottom_snap_path
2829

2930
## The scope of the block (statement of matching entry block)
3031
@export var scope: String = ""
@@ -38,8 +39,12 @@ signal modified
3839
var bottom_snap: SnapPoint
3940

4041

41-
func _ready():
42+
func _set_bottom_snap_path(value: NodePath):
43+
bottom_snap_path = value
4244
bottom_snap = get_node_or_null(bottom_snap_path)
45+
46+
47+
func _ready():
4348
mouse_filter = Control.MOUSE_FILTER_IGNORE
4449

4550

0 commit comments

Comments
 (0)