From f2a24e58f6b8091e82d2581905c89bf490e67c40 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 3 Jul 2024 15:35:32 +0100 Subject: [PATCH] Remove unused BasicBlock scene & code This has been unused for some time; I believe since commit 06f89c75cea70cc4352b1ef160fa425a73110fa1. --- addons/block_code/block_code_plugin.gd | 1 - .../ui/blocks/basic_block/basic_block.gd | 25 -------- .../ui/blocks/basic_block/basic_block.tscn | 64 ------------------- .../ui/picker/categories/category_factory.gd | 1 - 4 files changed, 91 deletions(-) delete mode 100644 addons/block_code/ui/blocks/basic_block/basic_block.gd delete mode 100644 addons/block_code/ui/blocks/basic_block/basic_block.tscn diff --git a/addons/block_code/block_code_plugin.gd b/addons/block_code/block_code_plugin.gd index 950ae75c..7173e096 100644 --- a/addons/block_code/block_code_plugin.gd +++ b/addons/block_code/block_code_plugin.gd @@ -14,7 +14,6 @@ const DISABLED_CLASSES := [ "DragManager", "InstructionTree", "Types", - "BasicBlock", "Block", "ControlBlock", "ParameterBlock", diff --git a/addons/block_code/ui/blocks/basic_block/basic_block.gd b/addons/block_code/ui/blocks/basic_block/basic_block.gd deleted file mode 100644 index 8b7f2bf1..00000000 --- a/addons/block_code/ui/blocks/basic_block/basic_block.gd +++ /dev/null @@ -1,25 +0,0 @@ -@tool -class_name BasicBlock -extends Block - -@onready var _top_bar := %TopBar -@onready var _label := %Label - - -func _ready(): - super() - - _top_bar.color = color - _label.text = label - - -func _on_drag_drop_area_mouse_down(): - _drag_started() - - -static func get_block_class(): - return "BasicBlock" - - -static func get_scene_path(): - return "res://addons/block_code/ui/blocks/basic_block/basic_block.tscn" diff --git a/addons/block_code/ui/blocks/basic_block/basic_block.tscn b/addons/block_code/ui/blocks/basic_block/basic_block.tscn deleted file mode 100644 index a99b7af8..00000000 --- a/addons/block_code/ui/blocks/basic_block/basic_block.tscn +++ /dev/null @@ -1,64 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://c4cjt0oi4me43"] - -[ext_resource type="Script" path="res://addons/block_code/ui/blocks/basic_block/basic_block.gd" id="1_ph7wu"] -[ext_resource type="Script" path="res://addons/block_code/ui/blocks/utilities/background/background.gd" id="2_iwx12"] -[ext_resource type="PackedScene" uid="uid://c7puyxpqcq6xo" path="res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.tscn" id="2_r14pb"] -[ext_resource type="PackedScene" uid="uid://b1oge52xhjqnu" path="res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.tscn" id="3_15ikp"] - -[node name="BasicBlock" type="MarginContainer"] -size_flags_horizontal = 0 -script = ExtResource("1_ph7wu") -block_name = "basic_block" -label = "Basic Block" -color = Color(0.530082, 0.933559, 0.726557, 1) -bottom_snap_path = NodePath("VBoxContainer/SnapPoint") - -[node name="VBoxContainer" type="VBoxContainer" parent="."] -layout_mode = 2 -theme_override_constants/separation = 0 - -[node name="TopMarginContainer" type="MarginContainer" parent="VBoxContainer"] -custom_minimum_size = Vector2(0, 30) -layout_mode = 2 -size_flags_horizontal = 0 -theme_override_constants/margin_left = 0 -theme_override_constants/margin_top = 0 -theme_override_constants/margin_right = 0 -theme_override_constants/margin_bottom = 0 - -[node name="TopBar" type="Control" parent="VBoxContainer/TopMarginContainer"] -unique_name_in_owner = true -layout_mode = 2 -mouse_filter = 1 -script = ExtResource("2_iwx12") -color = Color(0.530082, 0.933559, 0.726557, 1) -outline_color = Color(0.424066, 0.746847, 0.581246, 1) -show_top = false - -[node name="DragDropArea" parent="VBoxContainer/TopMarginContainer" instance=ExtResource("2_r14pb")] -layout_mode = 2 - -[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/TopMarginContainer"] -layout_mode = 2 -mouse_filter = 2 -theme_override_constants/margin_left = 10 -theme_override_constants/margin_top = 6 -theme_override_constants/margin_right = 12 -theme_override_constants/margin_bottom = 6 - -[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TopMarginContainer/MarginContainer"] -custom_minimum_size = Vector2(200, 0) -layout_mode = 2 -mouse_filter = 2 - -[node name="Label" type="Label" parent="VBoxContainer/TopMarginContainer/MarginContainer/HBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 -theme_override_colors/font_color = Color(1, 1, 1, 1) -text = "Basic Block" - -[node name="SnapPoint" parent="VBoxContainer" instance=ExtResource("3_15ikp")] -layout_mode = 2 -block_path = NodePath("../..") - -[connection signal="mouse_down" from="VBoxContainer/TopMarginContainer/DragDropArea" to="." method="_on_drag_drop_area_mouse_down"] diff --git a/addons/block_code/ui/picker/categories/category_factory.gd b/addons/block_code/ui/picker/categories/category_factory.gd index 56f81c18..fb001816 100644 --- a/addons/block_code/ui/picker/categories/category_factory.gd +++ b/addons/block_code/ui/picker/categories/category_factory.gd @@ -2,7 +2,6 @@ class_name CategoryFactory extends Object const BLOCKS: Dictionary = { - "basic_block": preload("res://addons/block_code/ui/blocks/basic_block/basic_block.tscn"), "control_block": preload("res://addons/block_code/ui/blocks/control_block/control_block.tscn"), "parameter_block": preload("res://addons/block_code/ui/blocks/parameter_block/parameter_block.tscn"), "statement_block": preload("res://addons/block_code/ui/blocks/statement_block/statement_block.tscn"),