From 5992c390ee026ac14b478e3e5be623cfb752c909 Mon Sep 17 00:00:00 2001 From: kziolkowski Date: Sun, 17 Aug 2025 23:07:22 +0200 Subject: [PATCH] Reinstated plantgrowing animation --- prefabs/characters/Player2D.tscn | 4 ++-- scripts/CSharp/Common/Farming/PlantBehaviour2D.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/prefabs/characters/Player2D.tscn b/prefabs/characters/Player2D.tscn index 9bf133c..ff9b003 100644 --- a/prefabs/characters/Player2D.tscn +++ b/prefabs/characters/Player2D.tscn @@ -2077,7 +2077,7 @@ _vesnaAnimations = NodePath("CharacterBody2D/visuals") _hoe = ExtResource("2_dnm27") _wateringCan = ExtResource("3_e04c3") -[node name="CharacterBody2D" type="CharacterBody2D" parent="." groups=["PlantGrowing"]] +[node name="CharacterBody2D" type="CharacterBody2D" parent="."] position = Vector2(0, 374) collision_layer = 4 collision_mask = 3 @@ -2091,7 +2091,7 @@ 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", "_wateringParticles") groups=["PlantGrowing"]] position = Vector2(0, -374) script = ExtResource("3_f6xmn") _sprite = NodePath("Animated Sprites") diff --git a/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs b/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs index 1fb0cc2..6f7ed23 100644 --- a/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs +++ b/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs @@ -37,6 +37,7 @@ public partial class PlantBehaviour2D : Node2D public override void _Ready() { + GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation); _state = PlantState.Planted; _currentPlantSprite = GetRandomSprite(_seeds); _currentPlantSprite.Visible = true;