Skip to content

Commit

Permalink
- Infinite durability can now be enabled for progressive mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
WiseHorror committed Jul 10, 2023
1 parent 32caf87 commit 1e827c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VeinMine/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions VeinMine/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
4 changes: 2 additions & 2 deletions VeinMine/VeinMine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion VeinMine/VeinMine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Veinmine</RootNamespace>
<AssemblyName>Veinmine</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
Expand Down

0 comments on commit 1e827c7

Please sign in to comment.