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

@@ -21,13 +21,60 @@ namespace Fruitomation.Game
}
}
private static Recipe[] Recipes = new Recipe[1]
private static Recipe[] Recipes =
{
new
(
new[] { ItemType.Apple, ItemType.Grape },
ItemType.Banana
new[]
{
ItemType.DriedAppleSlices,
ItemType.Raisins,
ItemType.DriedBananaSlices
},
ItemType.DriedFruitSelection
),
new
(
new[]
{
ItemType.AppleJuice,
ItemType.MangoJuice
},
ItemType.AppleAndMangoJuice
),
new
(
new[]
{
ItemType.BananaIceCream,
ItemType.DurainPowder
},
ItemType.SpicedBananaIceCream
),
new
(
new[]
{
ItemType.SlicedKiwi,
ItemType.MangoSlices,
ItemType.DurianSlices,
ItemType.BuddhasHandSlices
},
ItemType.ExoticFruitSelection
),
new
(
new[]
{
ItemType.PitayaIceCream,
ItemType.DurainPowder
},
ItemType.SpicedPitayaIceCream
)
};
[Header("Mixer Specific")]

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;
}
item.transform.position = OutputLocation.position;
item.SendToTheGhostRealm();
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();
if (item2 is not null)
{
item2.transform.position = OutputLocation.position;
item2.SendToTheGhostRealm();
}
}, TriggerType.Enter);
}
}

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Fruitomation.Game.Items;
using JetBrains.Annotations;
using UnityEngine.Scripting;
@@ -74,26 +75,49 @@ namespace Fruitomation.Game
return;
}
item.CurrentType = item.CurrentType switch
switch (item.CurrentType)
{
ItemType.Apple => UpgradeManager.Is(BasicUpgrade.AppleSlices)
? ItemType.AppleSlices
: ItemType.Apple,
case ItemType.Apple:
item.CurrentType = UpgradeManager.Is(BasicUpgrade.AppleJuice)
? ItemType.AppleJuice
: ItemType.Apple;
break;
ItemType.Grape => UpgradeManager.Is(BasicUpgrade.GrapeJuice)
case ItemType.Grape:
item.CurrentType = UpgradeManager.Is(BasicUpgrade.GrapeJuice)
? ItemType.GrapeJuice
: ItemType.Grape,
: ItemType.Grape;
break;
ItemType.Kiwi => UpgradeManager.Is(BasicUpgrade.KiwiPresser)
case ItemType.BananaSkin:
item.CurrentType = UpgradeManager.Is(BasicUpgrade.BananaBacon)
? ItemType.BananaBacon
: ItemType.BananaSkin;
break;
case ItemType.Kiwi:
item.CurrentType = UpgradeManager.Is(BasicUpgrade.KiwiPresser) // BYPRODUCT NEEDED
? ItemType.KiwiJuice
: ItemType.Kiwi,
: ItemType.Kiwi;
FruitSpawner.SpawnItem(ItemType.KiwiSeeds, transform.position);
break;
ItemType.PitayaSkin => UpgradeManager.Is(BasicUpgrade.PitayaFoodDye)
case ItemType.Mango:
item.CurrentType = UpgradeManager.Is(BasicUpgrade.MangoJuice)
? ItemType.MangoJuice
: ItemType.Mango;
break;
case ItemType.PitayaSkin:
item.CurrentType = UpgradeManager.Is(BasicUpgrade.PitayaFoodDye)
? ItemType.PitayaFoodDye
: ItemType.PitayaSkin,
: ItemType.PitayaSkin;
break;
var _ => item.CurrentType // Default
};
default:
item.CurrentType = item.CurrentType;
break;
}
}
}
}

View File

@@ -59,6 +59,7 @@ namespace Fruitomation.Game.Items
AppleAndMangoJuice,
DriedFruitSelection,
ExoticFruitSelection,
SpicedBananaIceCream,
SpicedPitayaIceCream,
}