🐛 fixed dayplanted confusion on plants

This commit is contained in:
2025-12-02 15:45:44 +01:00
parent c7a4aea70b
commit e65330786e
4 changed files with 47 additions and 10 deletions
@@ -44,7 +44,11 @@ public partial class PlantBehaviour2D : Node2D
/// <summary>
/// The day count at the day this plant was planted.
/// </summary>
public int DayPlanted { get; set; }
public int DayPlanted
{
get => _dayPlanted;
set => _dayPlanted = value;
}
public int CurrentDayInCalendar
{
@@ -65,6 +69,7 @@ public partial class PlantBehaviour2D : Node2D
private void DaysGrowingChanged()
{
int _daysGrowing = _currentDay - _dayPlanted;
GD.Print($"Plant {Name} is growing for {_daysGrowing}. Day Planted was {_dayPlanted} and the current day is {_currentDay}.");
int lifecycle = _lifecycle.Payload.AsInt32();
Debug.Assert(lifecycle > 0);