Fixed tomato farming again

This commit is contained in:
2025-08-17 21:57:57 +02:00
parent ce2d7eb773
commit 7fd26ffed3
11 changed files with 40 additions and 51 deletions
@@ -1,4 +1,5 @@
using System;
using Babushka.scripts.CSharp.Common.Animation;
using Babushka.scripts.CSharp.Common.Inventory;
using Godot;
@@ -24,6 +25,15 @@ public partial class PlantBehaviour2D : Node2D
private string _magicWordDialogicEventName = "MagicWord";
private Sprite2D _currentPlantSprite = null;
private bool _magicWordSaid = false;
/// <summary>
/// public accessor for the field reference
/// </summary>
public FieldBehaviour2D Field
{
get => _field;
set => _field = value;
}
/// <summary>
@@ -34,7 +44,7 @@ public partial class PlantBehaviour2D : Node2D
if (_field.FieldState != FieldState.Watered || _magicWordSaid != _magicWordNeeded)
return;
//GetTree().CallGroup("PlantGrowing", PlayerMovement.MethodName.PlayFarmingAnimation);
GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation);
// todo:
// find out why the last plant stage is being skipped the second time around
switch (_state)