Stopped items getting stuck in mixers
This commit is contained in:
@@ -54,10 +54,26 @@ namespace Fruitomation.Game
|
|||||||
ItemType type = item.CurrentType;
|
ItemType type = item.CurrentType;
|
||||||
int typeCount = StoredItems.GetValueOrDefault(type);
|
int typeCount = StoredItems.GetValueOrDefault(type);
|
||||||
|
|
||||||
|
if (typeCount < 5)
|
||||||
|
{
|
||||||
item.TriggerDestruction(false);
|
item.TriggerDestruction(false);
|
||||||
StoredItems[type] = typeCount + 1;
|
StoredItems[type] = typeCount + 1;
|
||||||
StoredItemCount++;
|
StoredItemCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.transform.position = OutputLocation.position;
|
||||||
|
item.SendToTheGhostRealm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.transform.position = OutputLocation.position;
|
||||||
|
item.SendToTheGhostRealm();
|
||||||
|
}
|
||||||
|
|
||||||
}, TriggerType.Enter);
|
}, TriggerType.Enter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user