Added basic recipes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Fruitomation.Game.Items;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Fruitomation.Game
|
||||
{
|
||||
@@ -7,5 +8,33 @@ namespace Fruitomation.Game
|
||||
[Header("Fermenter Specific")]
|
||||
[SerializeField] private RectTransform OutputLocation;
|
||||
[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.GrapeJuice => UpgradeManager.Is(BasicUpgrade.Wine)
|
||||
? ItemType.Wine
|
||||
: ItemType.GrapeJuice,
|
||||
|
||||
ItemType.KiwiJuice => UpgradeManager.Is(BasicUpgrade.KiwiVinegar)
|
||||
? ItemType.KiwiVinegar
|
||||
: ItemType.KiwiJuice,
|
||||
|
||||
var _ => item.CurrentType // Default
|
||||
};
|
||||
|
||||
item.transform.position = OutputLocation.position;
|
||||
|
||||
}, TriggerType.Enter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Fruitomation.Game.Items;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Fruitomation.Game
|
||||
{
|
||||
@@ -7,5 +8,33 @@ namespace Fruitomation.Game
|
||||
[Header("Grinder Specific")]
|
||||
[SerializeField] private RectTransform OutputLocation;
|
||||
[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.KiwiSeeds => UpgradeManager.Is(BasicUpgrade.KiwiSeedOil)
|
||||
? ItemType.KiwiSeedOil
|
||||
: ItemType.KiwiSeeds,
|
||||
|
||||
ItemType.Durian => UpgradeManager.Is(BasicUpgrade.DurianPowder)
|
||||
? ItemType.DurainPowder
|
||||
: ItemType.Durian,
|
||||
|
||||
var _ => item.CurrentType
|
||||
};
|
||||
|
||||
item.transform.position = OutputLocation.position;
|
||||
|
||||
}, TriggerType.Enter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Fruitomation.Game.Items;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Fruitomation.Game
|
||||
{
|
||||
@@ -7,5 +8,20 @@ namespace Fruitomation.Game
|
||||
[Header("Mixer Specific")]
|
||||
[SerializeField] private RectTransform OutputLocation;
|
||||
[SerializeField] private TriggerDetector Trigger;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Trigger.SetAction(other =>
|
||||
{
|
||||
bool isItem = other.transform.parent.TryGetComponent(out ItemBehaviour item);
|
||||
if (!isItem)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
item.transform.position = OutputLocation.position;
|
||||
|
||||
}, TriggerType.Enter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Fruitomation.Game.Items;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Fruitomation.Game
|
||||
{
|
||||
@@ -7,5 +8,20 @@ namespace Fruitomation.Game
|
||||
[Header("Grinder Specific")]
|
||||
[SerializeField] private RectTransform OutputLocation;
|
||||
[SerializeField] private TriggerDetector Trigger;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Trigger.SetAction(other =>
|
||||
{
|
||||
bool isItem = other.transform.parent.TryGetComponent(out ItemBehaviour item);
|
||||
if (!isItem)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
item.transform.position = OutputLocation.position;
|
||||
|
||||
}, TriggerType.Enter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user