From ba386f4c884289bb4e26929462b4be3de51f12db Mon Sep 17 00:00:00 2001 From: Pasha Bibko <156938226+PashaBibko@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:18:15 +0100 Subject: [PATCH] Stopped items getting stuck in mixers --- .../Buildings/Automation/MixerBuilding.cs | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Game/Buildings/Automation/MixerBuilding.cs b/Assets/Scripts/Game/Buildings/Automation/MixerBuilding.cs index 075decb..023ec9f 100644 --- a/Assets/Scripts/Game/Buildings/Automation/MixerBuilding.cs +++ b/Assets/Scripts/Game/Buildings/Automation/MixerBuilding.cs @@ -54,10 +54,26 @@ namespace Fruitomation.Game ItemType type = item.CurrentType; int typeCount = StoredItems.GetValueOrDefault(type); - item.TriggerDestruction(false); - StoredItems[type] = typeCount + 1; - StoredItemCount++; + if (typeCount < 5) + { + item.TriggerDestruction(false); + StoredItems[type] = typeCount + 1; + StoredItemCount++; + } + + else + { + item.transform.position = OutputLocation.position; + item.SendToTheGhostRealm(); + } } + + else + { + item.transform.position = OutputLocation.position; + item.SendToTheGhostRealm(); + } + }, TriggerType.Enter); }