Added all recipes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user