From 1853c6269913825d10da928b4cac727909202c84 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Thu, 13 Feb 2025 05:58:33 +0300 Subject: [PATCH] remove item_component thing --- src/ingame/sprout.tscn | 7 +------ src/ingame/water_bomb.tscn | 7 +------ src/lib/item_component.gd | 17 ----------------- 3 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 src/lib/item_component.gd diff --git a/src/ingame/sprout.tscn b/src/ingame/sprout.tscn index 48548ce..bae1f70 100644 --- a/src/ingame/sprout.tscn +++ b/src/ingame/sprout.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=10 format=3 uid="uid://bysgtksvovyur"] +[gd_scene load_steps=9 format=3 uid="uid://bysgtksvovyur"] [ext_resource type="Script" path="res://src/ingame/sprout.gd" id="1_snma1"] [ext_resource type="Texture2D" uid="uid://d35y5ckne72qe" path="res://assets/sprout1.png" id="2_ipgad"] [ext_resource type="Shader" path="res://scenes/interactivity_outline2.gdshader" id="2_oa2it"] [ext_resource type="Texture2D" uid="uid://cwbl0r1e26eja" path="res://assets/drop.png" id="3_kghdv"] -[ext_resource type="Script" path="res://src/lib/item_component.gd" id="4_w5b5s"] [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_rs2qp"] properties/0/path = NodePath(".:needs_water") @@ -65,8 +64,4 @@ shape = SubResource("CapsuleShape3D_cwbye") wait_time = 5.0 one_shot = true -[node name="Harvest" type="Node" parent="."] -script = ExtResource("4_w5b5s") -id = "sprout" - [connection signal="timeout" from="ProductionTimer" to="." method="_on_production_timer_timeout"] diff --git a/src/ingame/water_bomb.tscn b/src/ingame/water_bomb.tscn index dba4e75..130ea8c 100644 --- a/src/ingame/water_bomb.tscn +++ b/src/ingame/water_bomb.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=12 format=3 uid="uid://tdsbo3e5ic86"] +[gd_scene load_steps=11 format=3 uid="uid://tdsbo3e5ic86"] [ext_resource type="Script" path="res://src/ingame/water_bomb.gd" id="1_lk5fq"] [ext_resource type="AudioStream" uid="uid://dtjpv2b74g24m" path="res://assets/sfx/splash-small.wav" id="2_0wk8g"] [ext_resource type="PackedScene" uid="uid://ba2mut58elwrh" path="res://assets/water-bomb.glb" id="2_v2imr"] [ext_resource type="AudioStream" uid="uid://blgrl2wl05feq" path="res://assets/sfx/splash-small-quiet.wav" id="3_hgy7l"] -[ext_resource type="Script" path="res://src/lib/item_component.gd" id="5_rpnf2"] [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_0ebrr"] properties/0/path = NodePath(".:position") @@ -112,10 +111,6 @@ monitoring = false [node name="CollisionShape3D" type="CollisionShape3D" parent="PickingArea"] shape = SubResource("SphereShape3D_6c830") -[node name="ItemComponent" type="Node" parent="."] -script = ExtResource("5_rpnf2") -id = "water" - [connection signal="body_entered" from="RigidBody3D" to="." method="_on_body_entered"] [connection signal="area_entered" from="RigidBody3D/SplashArea" to="." method="_on_splash_area_entered"] [connection signal="area_exited" from="RigidBody3D/SplashArea" to="." method="_on_splash_area_exited"] diff --git a/src/lib/item_component.gd b/src/lib/item_component.gd deleted file mode 100644 index b577e7f..0000000 --- a/src/lib/item_component.gd +++ /dev/null @@ -1,17 +0,0 @@ -class_name ItemComponent -extends Node - -## Base identity, properties are defined in item db. -@export var id: String - - -func mark_interactive() -> void: - var parent := get_parent() - if parent.has_method("mark_interactive"): - parent.mark_interactive() - - -func mark_non_interactive(delta: float) -> void: - var parent := get_parent() - if parent.has_method("mark_non_interactive"): - parent.mark_non_interactive()