From 1e827c7265811eda0912e4a76741918f4b0ece91 Mon Sep 17 00:00:00 2001 From: WiseHorror Date: Mon, 10 Jul 2023 20:39:17 +0100 Subject: [PATCH] - Infinite durability can now be enabled for progressive mode. --- VeinMine/Patches.cs | 2 +- VeinMine/Properties/AssemblyInfo.cs | 4 ++-- VeinMine/VeinMine.cs | 4 ++-- VeinMine/VeinMine.csproj | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VeinMine/Patches.cs b/VeinMine/Patches.cs index f51580a..328c9f0 100644 --- a/VeinMine/Patches.cs +++ b/VeinMine/Patches.cs @@ -286,7 +286,7 @@ static void Postfix(MineRock5 __instance, HitData hit, float __state, bool __res { Player.GetClosestPlayer(hit.m_point, 5f).RaiseSkill(Skills.SkillType.Pickaxes, Functions.GetSkillIncreaseStep(Player.GetClosestPlayer(hit.m_point, 5f).GetSkills(), Skills.SkillType.Pickaxes) * VeinMine.xpMult.Value); - if (Player.GetClosestPlayer(hit.m_point, 5f).GetCurrentWeapon().m_shared.m_useDurability) + if (VeinMine.veinMineDurability.Value && Player.GetClosestPlayer(hit.m_point, 5f).GetCurrentWeapon().m_shared.m_useDurability) { float durabilityLoss = Player.GetClosestPlayer(hit.m_point, 5f).GetCurrentWeapon().m_shared.m_useDurabilityDrain * ((120 - Functions.GetSkillLevel(Player.GetClosestPlayer(hit.m_point, 5f).GetSkills(), Skills.SkillType.Pickaxes)) / (20 * VeinMine.durabilityMult.Value)); Player.GetClosestPlayer(hit.m_point, 5f).GetCurrentWeapon().m_durability -= durabilityLoss; diff --git a/VeinMine/Properties/AssemblyInfo.cs b/VeinMine/Properties/AssemblyInfo.cs index 57618e3..db253c5 100644 --- a/VeinMine/Properties/AssemblyInfo.cs +++ b/VeinMine/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.6.0")] -[assembly: AssemblyFileVersion("1.2.6.0")] +[assembly: AssemblyVersion("1.2.7.0")] +[assembly: AssemblyFileVersion("1.2.7.0")] diff --git a/VeinMine/VeinMine.cs b/VeinMine/VeinMine.cs index 8bcf7da..78e8c43 100644 --- a/VeinMine/VeinMine.cs +++ b/VeinMine/VeinMine.cs @@ -14,7 +14,7 @@ public class VeinMine : BaseUnityPlugin { private const string MOD_ID = "com.wisehorror.Veinmine"; private const string MOD_NAME = "Veinmine"; - private const string VERSION = "1.2.6"; + private const string VERSION = "1.2.7"; public static ManualLogSource logger = BepInEx.Logging.Logger.CreateLogSource("Veinmine"); @@ -34,7 +34,7 @@ void Awake() veinMineDurability = Config.Bind("General", "Durability", true, - "Veinmining takes durability as if you mined every section manually.\nDoesn't do anything in Progressive mode, as durability is always removed there."); + "Veinmining takes durability as if you mined every section manually."); removeEffects = Config.Bind("Visual", "Remove Effects", diff --git a/VeinMine/VeinMine.csproj b/VeinMine/VeinMine.csproj index 0dd154e..8777342 100644 --- a/VeinMine/VeinMine.csproj +++ b/VeinMine/VeinMine.csproj @@ -9,7 +9,7 @@ Properties Veinmine Veinmine - v4.6.1 + v4.6.2 512 true