Fixed farming (the way it was before)

This commit is contained in:
2025-07-17 20:44:28 +02:00
parent 5affc48dc5
commit d2c7302ab2
9 changed files with 86 additions and 53 deletions
+18 -11
View File
@@ -1,6 +1,5 @@
[gd_scene load_steps=10 format=3 uid="uid://b1d2e7ely6hyw"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="1_jrdc4"]
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="2_vl3uw"]
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="3_uqkef"]
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="4_di17a"]
@@ -9,17 +8,16 @@
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="7_f504p"]
[ext_resource type="PackedScene" uid="uid://gishbn0a8eke" path="res://prefabs/farm/tomato_plant.tscn" id="8_jrdc4"]
[sub_resource type="CircleShape2D" id="CircleShape2D_vl3uw"]
[sub_resource type="CircleShape2D" id="CircleShape2D_jrdc4"]
resource_local_to_scene = true
radius = 300.0
[sub_resource type="CircleShape2D" id="CircleShape2D_l0vvv"]
resource_local_to_scene = true
radius = 300.0
[node name="BaseField" type="Node2D"]
[node name="InteractionArea2" parent="." instance=ExtResource("1_jrdc4")]
visible = false
z_index = 1
scale = Vector2(2.225, 2.225)
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "_growingCollider")]
z_index = -1
scale = Vector2(0.9, 1)
@@ -29,13 +27,21 @@ _maskSprite = NodePath("MaskedField")
_maskTexture = Array[Texture2D]([ExtResource("3_uqkef"), ExtResource("4_di17a"), ExtResource("5_4a8nv")])
Tilled = ExtResource("6_l7j4c")
Watered = ExtResource("7_f504p")
_growingCollider = NodePath("BasePlant2/InteractionArea")
_growingCollider = NodePath("BasePlant2/GrowingInteractionArea")
[node name="BasePlant2" parent="FieldBehaviour" node_paths=PackedStringArray("_field") groups=["PlantGrowing"] instance=ExtResource("8_jrdc4")]
_field = NodePath("..")
_magicWordNeeded = false
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/InteractionArea2/Area2D" index="0"]
shape = SubResource("CircleShape2D_vl3uw")
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant2/GrowingInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_jrdc4")
[node name="Label" parent="FieldBehaviour/BasePlant2/GrowingInteractionArea" index="1"]
text = "[E] Grow
"
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_l0vvv")
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
clip_children = 1
@@ -46,5 +52,6 @@ texture = ExtResource("4_di17a")
texture = ExtResource("6_l7j4c")
[editable path="FieldBehaviour/BasePlant2"]
[editable path="FieldBehaviour/BasePlant2/GrowingInteractionArea"]
[editable path="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem"]
[editable path="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/InteractionArea2"]
[editable path="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/PickupInteractionArea"]