diff --git a/EpicLoot-UnityLib/EnchantingTable.cs b/EpicLoot-UnityLib/EnchantingTable.cs index 472e1b012..72a948ef0 100644 --- a/EpicLoot-UnityLib/EnchantingTable.cs +++ b/EpicLoot-UnityLib/EnchantingTable.cs @@ -11,7 +11,7 @@ public class EnchantingTable : MonoBehaviour, Hoverable, Interactable public const string DisplayNameLocID = "mod_epicloot_assets_enchantingtable"; public const int FeatureUnavailableSentinel = -2; public const int FeatureLockedSentinel = -1; - public const int FeatureLevelOne = 1; + public const int FeatureLevelOne = 0; public GameObject EnchantingUIPrefab; diff --git a/EpicLoot-UnityLib/FeatureStatus3D.cs b/EpicLoot-UnityLib/FeatureStatus3D.cs index 07ca5d4a1..07ebab749 100644 --- a/EpicLoot-UnityLib/FeatureStatus3D.cs +++ b/EpicLoot-UnityLib/FeatureStatus3D.cs @@ -27,6 +27,12 @@ public void Refresh() UnlockedObject.SetActive(featureIsUnlocked); var currentLevel = SourceTable.GetFeatureLevel(Feature); + if(!EnchantingTable.UpgradesActive(Feature, out bool featureActive)) + { + // To improve table appearance when no upgrades are available ever + currentLevel = 1; + } + for (var index = 0; index < LevelObjects.Length; index++) { var levelObject = LevelObjects[index]; diff --git a/EpicLoot/CraftingV2/EnchantingTable_Patch.cs b/EpicLoot/CraftingV2/EnchantingTable_Patch.cs index 3eefb6282..a27808efa 100644 --- a/EpicLoot/CraftingV2/EnchantingTable_Patch.cs +++ b/EpicLoot/CraftingV2/EnchantingTable_Patch.cs @@ -15,6 +15,11 @@ public static void Postfix(Piece __instance) if (table == null) return; + if(!EpicLoot.EnchantingTableUpgradesActive.Value) + { + return; + } + foreach (EnchantingFeature feature in Enum.GetValues(typeof(EnchantingFeature))) { if (!table.IsFeatureAvailable(feature) || table.IsFeatureLocked(feature))