From a6b9dd730fe4dbaa2ae169f93b3661d988fcd144 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 24 Sep 2024 10:37:18 -0600 Subject: [PATCH 1/2] ParameterOutput: Disconnect signal to non-existent function I imagine _on_parameter_output_child_exiting_tree existed at some point when ParameterOutput was being developed, but not anymore. --- .../ui/blocks/utilities/parameter_output/parameter_output.tscn | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.tscn b/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.tscn index 6fab285c..119064f2 100644 --- a/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.tscn +++ b/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.tscn @@ -33,6 +33,5 @@ layout_mode = 2 block_type = 0 variant_type = 4 -[connection signal="child_exiting_tree" from="." to="SnapPoint" method="_on_parameter_output_child_exiting_tree"] [connection signal="snapped_block_changed" from="SnapPoint" to="." method="_on_snap_point_snapped_block_changed"] [connection signal="snapped_block_removed" from="SnapPoint" to="." method="_on_snap_point_snapped_block_removed"] From b36f3a10f8256947334cc1132aa29e7ccd76c7e6 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 24 Sep 2024 11:42:01 -0600 Subject: [PATCH 2/2] Removed unused preloads These were either erroneously added by or became unneeded when TemplateEditor was added in 81b6456. The StatementBlock preload of ParameterOutput was causing a circular dependency. --- addons/block_code/ui/blocks/control_block/control_block.gd | 3 --- .../block_code/ui/blocks/statement_block/statement_block.gd | 4 ---- .../ui/blocks/utilities/parameter_output/parameter_output.gd | 1 - 3 files changed, 8 deletions(-) diff --git a/addons/block_code/ui/blocks/control_block/control_block.gd b/addons/block_code/ui/blocks/control_block/control_block.gd index 4d1a8dbb..91819b00 100644 --- a/addons/block_code/ui/blocks/control_block/control_block.gd +++ b/addons/block_code/ui/blocks/control_block/control_block.gd @@ -3,9 +3,6 @@ class_name ControlBlock extends Block const Constants = preload("res://addons/block_code/ui/constants.gd") -const DragDropArea = preload("res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.gd") -const DragDropAreaScene = preload("res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.tscn") -const Gutter = preload("res://addons/block_code/ui/blocks/utilities/background/gutter.gd") func _ready(): diff --git a/addons/block_code/ui/blocks/statement_block/statement_block.gd b/addons/block_code/ui/blocks/statement_block/statement_block.gd index 3cea5484..6f0a91c2 100644 --- a/addons/block_code/ui/blocks/statement_block/statement_block.gd +++ b/addons/block_code/ui/blocks/statement_block/statement_block.gd @@ -2,10 +2,6 @@ class_name StatementBlock extends Block -const ParameterInput = preload("res://addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.gd") -const ParameterInputScene = preload("res://addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.tscn") -const ParameterOutput = preload("res://addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.gd") -const ParameterOutputScene = preload("res://addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.tscn") const Types = preload("res://addons/block_code/types/types.gd") @onready var _background := %Background diff --git a/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.gd b/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.gd index 0808597e..e6fede16 100644 --- a/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.gd +++ b/addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.gd @@ -3,7 +3,6 @@ extends MarginContainer const Types = preload("res://addons/block_code/types/types.gd") const ParameterBlock = preload("res://addons/block_code/ui/blocks/parameter_block/parameter_block.gd") -const ParameterBlockScene = preload("res://addons/block_code/ui/blocks/parameter_block/parameter_block.tscn") var block: Block var parameter_name: String