🚧 watering fields kinda works now

This commit is contained in:
2025-11-11 15:51:15 +01:00
parent d51cc461f7
commit b00b466045
11 changed files with 69 additions and 97 deletions
+10 -32
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=487 format=3 uid="uid://c25udixd5m6l0"]
[gd_scene load_steps=485 format=3 uid="uid://c25udixd5m6l0"]
[ext_resource type="Script" uid="uid://b05uyj001ehwi" path="res://scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs" id="1_yd5ep"]
[ext_resource type="Script" uid="uid://cjbclkxesh3hc" path="res://scripts/CSharp/Common/CharacterControls/PlayerMovement.cs" id="2_1vqmv"]
@@ -285,8 +285,6 @@
[ext_resource type="AudioStream" uid="uid://cvvjd2i6x047n" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_03_R.wav" id="472_g32y8"]
[ext_resource type="Texture2D" uid="uid://blh0t2ofqj2uq" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0016.png" id="472_wdxsr"]
[ext_resource type="AudioStream" uid="uid://dymoalptxmge" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_04_R.wav" id="473_8hbu5"]
[ext_resource type="Texture2D" uid="uid://l5ym7gi82l1b" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-6.png" id="473_g32y8"]
[ext_resource type="Resource" uid="uid://fnb0n0w2ktuc" path="res://resources/low code/farming/var_cursorOnField.tres" id="474_ogmln"]
[ext_resource type="AudioStream" uid="uid://4555a4w30tda" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_05_R.wav" id="474_t1d6r"]
[ext_resource type="Texture2D" uid="uid://3t1m2xi4ks75" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0018.png" id="474_tu801"]
[ext_resource type="AudioStream" uid="uid://dpqvnogggvgea" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_06_R.wav" id="475_83c4i"]
@@ -295,6 +293,7 @@
[ext_resource type="Texture2D" uid="uid://d3rdsclnqbx7" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0001.png" id="477_qko58"]
[ext_resource type="Texture2D" uid="uid://dqubvx1a08kn4" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0002.png" id="478_5myrm"]
[ext_resource type="Texture2D" uid="uid://dystt4hyqad74" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0004.png" id="480_wnay3"]
[ext_resource type="Resource" uid="uid://cmqapbvv0hev2" path="res://resources/low code/farming/event_watering.tres" id="481_t1d6r"]
[ext_resource type="Texture2D" uid="uid://bopxv06co1osl" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0006.png" id="482_wfdif"]
[ext_resource type="Texture2D" uid="uid://coyggdfwgkeru" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0008.png" id="484_32thn"]
[ext_resource type="Texture2D" uid="uid://du6x1h42smp6m" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0010.png" id="486_kobao"]
@@ -481,7 +480,6 @@
[ext_resource type="Texture2D" uid="uid://b0v61all3tsny" path="res://art/animation/Vesna2D/Vesna Anims Tools/S02-Walk-Gießkanne/0018.png" id="812_sf8kv"]
[ext_resource type="Texture2D" uid="uid://cao7vqax8cblo" path="res://art/animation/Vesna2D/Vesna Anims Tools/S02-Walk-Gießkanne/0020.png" id="814_3uq4g"]
[ext_resource type="Script" uid="uid://bcskt5ckh3rqa" path="res://scripts/CSharp/Common/Farming/FarmingControls2D.cs" id="817_6nrw3"]
[ext_resource type="PackedScene" uid="uid://b1d2e7ely6hyw" path="res://prefabs/farm/base_field.tscn" id="818_16w6h"]
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="819_4na52"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ssqtd"]
@@ -2087,7 +2085,6 @@ stream_6/stream = ExtResource("476_deeju")
[node name="Vesna" type="Node2D" node_paths=PackedStringArray("_farmingControls", "_player2d", "_vesnaAnimations")]
y_sort_enabled = true
position = Vector2(0, 2)
script = ExtResource("1_yd5ep")
_farmingControls = NodePath("FarmingControls")
_player2d = NodePath("CharacterBody2D")
@@ -2109,11 +2106,10 @@ position = Vector2(-24, -13)
shape = SubResource("CircleShape2D_ssqtd")
debug_color = Color(0.923708, 0.202722, 0.475262, 0.42)
[node name="visuals" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_sprite", "_wateringParticles")]
[node name="visuals" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_sprite")]
position = Vector2(0, -374)
script = ExtResource("3_f6xmn")
_sprite = NodePath("Animated Sprites")
_wateringParticles = NodePath("../../pouring water vfx")
[node name="Animated Sprites" type="AnimatedSprite2D" parent="CharacterBody2D/visuals"]
position = Vector2(0, 450)
@@ -2156,34 +2152,12 @@ _eventResources = Array[Object]([ExtResource("468_t1d6r")])
script = ExtResource("467_8hbu5")
_eventResources = Array[Object]([ExtResource("469_t1d6r")])
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_wateringParticles")]
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer")]
script = ExtResource("817_6nrw3")
_sceneKeyProvider = ExtResource("471_83c4i")
_fieldPrefab = ExtResource("818_16w6h")
_movingPlayer = NodePath("../CharacterBody2D")
_wateringParticles = NodePath("../pouring water vfx")
_wateringCanParticlesVerticalOffset = -100.0
_fieldOffsetVector = Vector2i(735, 600)
_cursorOnField = ExtResource("474_ogmln")
[node name="pouring water vfx" type="CPUParticles2D" parent="."]
position = Vector2(-652, -599)
rotation = -0.333807
emitting = false
amount = 20
texture = ExtResource("473_g32y8")
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.4
scale_amount_max = 0.8
color = Color(0.400601, 0.62444, 0.791217, 1)
hue_variation_max = 0.4
[node name="DialogicToggle" type="Node2D" parent="." node_paths=PackedStringArray("itemToToggle")]
scale = Vector2(0.7, 0.7)
@@ -2200,6 +2174,10 @@ script = ExtResource("471_2f15g")
[node name="Timer" type="Timer" parent="SFX/FootstepsAudio"]
wait_time = 0.5
[node name="WateringEventListener" type="Node" parent="."]
script = ExtResource("467_8hbu5")
_eventResources = Array[Object]([ExtResource("481_t1d6r")])
[connection signal="FilledWateringCan" from="." to="CharacterBody2D/WateringCanUI" method="Refill"]
[connection signal="InventorySelectionChanged" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
[connection signal="PickedUpTool" from="." to="CharacterBody2D/visuals" method="ActivateTool"]
@@ -2207,7 +2185,7 @@ wait_time = 0.5
[connection signal="LookDirection" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="SetDirection"]
[connection signal="EventRaised" from="CharacterBody2D/PlantCreatedEventListener" to="CharacterBody2D/visuals" method="PlayFarmingAnimation"]
[connection signal="EventRaised" from="CharacterBody2D/PickedUpInteractableListener" to="CharacterBody2D/visuals" method="PlayPickUpAnimation"]
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/visuals" method="PlayWateringAnimation"]
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/WateringCanUI" method="Water"]
[connection signal="timelineStarted" from="DialogicToggle" to="SFX/FootstepsAudio/Timer" method="stop"]
[connection signal="timeout" from="SFX/FootstepsAudio/Timer" to="SFX/FootstepsAudio" method="PlayOneShot"]
[connection signal="EventRaised" from="WateringEventListener" to="CharacterBody2D/visuals" method="PlayWateringAnimation"]
[connection signal="EventRaised" from="WateringEventListener" to="CharacterBody2D/WateringCanUI" method="Water"]