WIP fixing farming mechanic again

This commit is contained in:
2025-07-11 03:55:36 +02:00
parent 7a3e96d679
commit a4f9511892
9 changed files with 52 additions and 44 deletions
+23 -2
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://gishbn0a8eke"]
[gd_scene load_steps=12 format=3 uid="uid://gishbn0a8eke"]
[ext_resource type="Script" uid="uid://cms357f23fmfy" path="res://scripts/CSharp/Common/Farming/PlantBehaviour2D.cs" id="1_66p1c"]
[ext_resource type="Texture2D" uid="uid://dtr4uga5uspg" path="res://art/farm/farming/farmobjekte/tomaten/tomaten baby.png" id="2_vjw4j"]
@@ -8,6 +8,7 @@
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="6_gdrin"]
[ext_resource type="Resource" uid="uid://blr8tine5m0ma" path="res://resources/items/tomato.tres" id="7_di4m0"]
[ext_resource type="Texture2D" uid="uid://cnwd3mb3jnuxm" path="res://art/farm/farming/farmobjekte/tomaten/teen adulte tomaten.png" id="8_evgr8"]
[ext_resource type="Texture2D" uid="uid://bleimj6jr1jka" path="res://art/general/rectangle.png" id="9_vjw4j"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_u4cty"]
shader = ExtResource("3_7hdur")
@@ -25,7 +26,7 @@ shader_parameter/offset = 0.0
resource_local_to_scene = true
radius = 300.0
[node name="BasePlant" type="Node2D" node_paths=PackedStringArray("_seeds", "_smallPlants", "_bigPlants", "_readyPlants", "_harvestablePlant")]
[node name="BasePlant" type="Node2D" node_paths=PackedStringArray("_seeds", "_smallPlants", "_bigPlants", "_readyPlants", "_harvestablePlant", "_magicEffect")]
z_index = 1
y_sort_enabled = true
script = ExtResource("1_66p1c")
@@ -34,6 +35,7 @@ _smallPlants = [NodePath("SmallPlant/01"), NodePath("SmallPlant/02"), NodePath("
_bigPlants = [NodePath("BigPlant/01"), NodePath("BigPlant/02"), NodePath("BigPlant/03"), NodePath("BigPlant/04")]
_readyPlants = [NodePath("ReadyPlantInventoryItem/ReadyPlant/01"), NodePath("ReadyPlantInventoryItem/ReadyPlant/02"), NodePath("ReadyPlantInventoryItem/ReadyPlant/03"), NodePath("ReadyPlantInventoryItem/ReadyPlant/04")]
_harvestablePlant = NodePath("ReadyPlantInventoryItem")
_magicEffect = NodePath("magic vfx")
[node name="Seeds" type="Node2D" parent="."]
position = Vector2(0, 0.5)
@@ -188,6 +190,25 @@ texture = ExtResource("8_evgr8")
region_enabled = true
region_rect = Rect2(1167, 863, 528, 785)
[node name="magic vfx" type="CPUParticles2D" parent="."]
position = Vector2(-133, -347)
rotation = -0.333807
emitting = false
amount = 20
texture = ExtResource("9_vjw4j")
lifetime = 0.5
randomness = 1.0
local_coords = true
draw_order = 1
emission_shape = 2
emission_sphere_radius = 128.0
linear_accel_min = 44.07
linear_accel_max = 78.81
scale_amount_min = 0.01
scale_amount_max = 0.1
color = Color(0.400601, 0.62444, 0.791217, 1)
hue_variation_max = 0.4
[connection signal="Interacted" from="InteractionArea" to="." method="Grow"]
[editable path="ReadyPlantInventoryItem"]