Skip to content

Commit

Permalink
Possible fix for ore drop quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
diogo.garrett93 committed Sep 21, 2021
1 parent 0399112 commit c1e5e57
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
![enter image description here](https://i.imgur.com/OAfRGXK.jpg)
Tired of mining for ages?
With VeinMine you're able to mine the whole ore/rock vein at once!
With Veinmine you're able to mine the whole ore/rock vein at once!
You can do this by holding down the assigned key (Left Alt by default) while mining!
This mod does essentially the same thing as [SeleniumMineBoom](https://valheim.thunderstore.io/package/SeleniumCoreTeam/SeleniumMineBoom/) but lets you configure a key, so you don't always mine a whole vein at once if you don't want to.

## **Version 1.0.0 - Progressive mode added!**

Expand All @@ -20,7 +19,9 @@ What does 2 mean, you ask?

It's simple! A standard 2x2 floor piece has a length of 2, exactly like its name suggests.
# Changelog
## 1.2.1
## 1.2.2
- Possible fix for ore drop quantities (Not sure why they weren't correct, as I don't change drop rates)
### 1.2.1
- Compatibility for Hearth and Home;
- Tentative fix for ores spawning at 0,0 (unable to test without other players)
### 1.2.0
Expand Down
7 changes: 4 additions & 3 deletions VeinMine/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static void MineRock5_Damage_Patch(MineRock5 __instance, ZNetView ___m_nv
{
foreach (var index in __state)
{
hit.m_point = index.Value;
//hit.m_point = index.Value;
if (Player.m_localPlayer.GetCurrentWeapon().m_durability > 0 || !Player.m_localPlayer.GetCurrentWeapon().m_shared.m_useDurability)
{
try
Expand Down Expand Up @@ -152,9 +152,10 @@ public static bool MineRock5_DamageArea_Prefix(MineRock5 __instance, HitData hit
{
if (isVeinmined)
{
Vector3 position = closestPlayer.GetTransform().localPosition + new Vector3 { x = 0, y = 2, z = 0 } + UnityEngine.Random.insideUnitSphere * 0.3f;
Vector3 position = hit.m_point + UnityEngine.Random.insideUnitSphere * 0.3f;
//Vector3 position = closestPlayer.GetTransform().localPosition + new Vector3 { x = 0, y = 2, z = 0 } + UnityEngine.Random.insideUnitSphere * 0.3f;
UnityEngine.Object.Instantiate<GameObject>(gameObject, position, Quaternion.identity);
hit.m_point = closestPlayer.GetTransform().localPosition + new Vector3 { x = 0, y = 2, z = 0 };
//hit.m_point = closestPlayer.GetTransform().localPosition + new Vector3 { x = 0, y = 2, z = 0 };
}
else if (!isVeinmined)
{
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.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
[assembly: AssemblyVersion("1.2.2.0")]
[assembly: AssemblyFileVersion("1.2.2.0")]
2 changes: 1 addition & 1 deletion 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.1";
private const string VERSION = "1.2.2";

public static ManualLogSource logger = BepInEx.Logging.Logger.CreateLogSource("Veinmine");

Expand Down

0 comments on commit c1e5e57

Please sign in to comment.