Added basic recipes

This commit is contained in:
2026-04-27 20:40:20 +01:00
parent 6814aa6c0c
commit 0c22708642
5 changed files with 133 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
using UnityEngine;
using Fruitomation.Game.Items;
using UnityEngine;
namespace Fruitomation.Game
{
@@ -6,5 +7,42 @@ namespace Fruitomation.Game
{
[Header("Heat Exchanger Specific")]
[SerializeField] private TriggerDetector Trigger;
private void Start()
{
Trigger.SetAction(other =>
{
bool isItem = other.transform.parent.TryGetComponent(out ItemBehaviour item);
if (!isItem)
{
return;
}
item.CurrentType = item.CurrentType switch
{
ItemType.AppleSlices => UpgradeManager.Is(BasicUpgrade.DriedAppleSlices)
? ItemType.DriedAppleSlices
: ItemType.AppleSlices,
ItemType.Grape => UpgradeManager.Is(BasicUpgrade.Raisins)
? ItemType.Raisins
: ItemType.Grape,
ItemType.BananaSlices => UpgradeManager.Is(BasicUpgrade.DriedBananaSlices)
? ItemType.DriedBananaSlices
: ItemType.BananaSlices,
ItemType.MushedBanana => UpgradeManager.Is(BasicUpgrade.BananaIceCream)
? ItemType.BananaIceCream
: ItemType.MushedBanana,
ItemType.MushedPitaya => UpgradeManager.Is(BasicUpgrade.PitayaIceCream)
? ItemType.PitayaIceCream
: ItemType.MushedPitaya,
var _ => item.CurrentType // Default
};
}, TriggerType.Enter);
}
}
}