Added all recipes

This commit is contained in:
Pasha Bibko
2026-04-28 11:05:02 +01:00
parent ba386f4c88
commit 5e7507058b
4 changed files with 128 additions and 26 deletions

View File

@@ -13,15 +13,45 @@ namespace Fruitomation.Game
{
Trigger.SetAction(other =>
{
bool isItem = other.transform.parent.TryGetComponent(out ItemBehaviour item);
bool isItem = other.transform.parent.TryGetComponent(out ItemBehaviour item1);
if (!isItem)
{
return;
}
ItemBehaviour item2 = null;
switch (item1.CurrentType)
{
case ItemType.Banana:
if (UpgradeManager.Is(BasicUpgrade.BananaPeeler))
{
item2 = FruitSpawner.SpawnItem(ItemType.BananaSkin);
item1.CurrentType = ItemType.MushedBanana;
}
break;
case ItemType.Pitaya:
if (UpgradeManager.Is(BasicUpgrade.PitayaPeeler))
{
item2 = FruitSpawner.SpawnItem(ItemType.PitayaSkin);
item1.CurrentType = ItemType.MushedPitaya;
}
break;
case var _:
item1.CurrentType = item1.CurrentType;
break;
}
item1.transform.position = OutputLocation.position;
item1.SendToTheGhostRealm();
item.transform.position = OutputLocation.position;
item.SendToTheGhostRealm();
if (item2 is not null)
{
item2.transform.position = OutputLocation.position;
item2.SendToTheGhostRealm();
}
}, TriggerType.Enter);
}
}