feature/bugfixes_And_Polish #39

Merged
Jonathan merged 6 commits from feature/bugfixes_And_Polish into develop 2025-12-09 15:20:36 +01:00
3 changed files with 12 additions and 0 deletions
Showing only changes of commit 7bb523f9e7 - Show all commits
+1
View File
@@ -215,6 +215,7 @@ Payload = 3
[connection signal="Interacted" from="GrowingInteractionArea" to="." method="Grow"]
[connection signal="SuccessfulPickUp" from="ReadyPlantInventoryItem" to="." method="queue_free"]
[connection signal="Interacted" from="ReadyPlantInventoryItem/PickupInteractionArea" to="." method="Harvest"]
[editable path="GrowingInteractionArea"]
[editable path="ReadyPlantInventoryItem"]
@@ -204,6 +204,12 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
_currentPlant.Field = this;
}
}
public void HarvestPlant()
{
_currentPlant = null;
UpdateFieldState(FieldState.Empty, true);
}
#region SAVE AND LOAD
@@ -200,4 +200,9 @@ public partial class PlantBehaviour2D : Node2D
_magicWordSaid = true;
Grow();
}
public void Harvest()
{
Field.HarvestPlant();
}
}