Added requirements to mixer recipes

This commit is contained in:
Pasha Bibko
2026-04-28 11:43:13 +01:00
parent 3f12e49b0f
commit c116028016
3 changed files with 49 additions and 34 deletions

View File

@@ -1,9 +1,10 @@
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
using UnityEngine.Scripting;
using UnityEngine;
using System.IO;
using System.Linq;
using System.IO;
using System;
using System.Runtime.CompilerServices;
#if UNITY_EDITOR
using UnityEditor;
@@ -13,7 +14,6 @@ namespace Fruitomation.Game
{
[Serializable] public enum BasicUpgrade
{
//Apple, - Unlocked by default
Grapes,
Bananas,
Kiwi,
@@ -50,6 +50,8 @@ namespace Fruitomation.Game
PitayaFoodDye,
PitayaIceCream,
SpicedPitayaIceCream,
Apple
}
[Serializable] public enum BuildingUnlock
@@ -57,20 +59,20 @@ namespace Fruitomation.Game
None,
//Wall, - Unlocked by default
//Slope,
Floor,
//Slope, - Unlocked by default
[Preserve] Floor,
//Spring, - Unlocked by default
Fan,
Alternator,
[Preserve] Fan,
[Preserve] Alternator,
//Slicer, - Unlocked by default
//Presser, - Unlocked by default
HeatExchanger,
Grinder,
Mixer,
Fermenter,
Peeler,
[Preserve] HeatExchanger,
[Preserve] Grinder,
[Preserve] Mixer,
[Preserve] Fermenter,
[Preserve] Peeler,
}
public class UnlockedUpgrades
@@ -149,6 +151,8 @@ namespace Fruitomation.Game
{
CurrentUpgrades = JsonUtility.FromJson<UnlockedUpgrades.Serialized>(json).Unserialize();
}
CurrentUpgrades.Unlock(BasicUpgrade.Apple); // Unlocked by default
}
CurrentUpgrades ??= new UnlockedUpgrades();
@@ -189,6 +193,7 @@ namespace Fruitomation.Game
public static void ResetUpgrades()
{
CurrentUpgrades = new UnlockedUpgrades();
CurrentUpgrades.Unlock(BasicUpgrade.Apple); // Always unlocked
}
[MenuItem("Fruitomation/Unlock All Upgrades")]