Skip to content

Commit 2b6bbf4

Browse files
committed
New release v1.11.1:
- Fixed when `Inf/No Stamina (others)` and `Inf Stamina (me)` were both activated the former were not working - Removed `Far interaction` feature as it was not very compatible with other mods (see #45) - The entity list for the `Spawn entity` have now only real entities - Fixed Player::UseStamina patch for the new game big update
1 parent 0c2adea commit 2b6bbf4

File tree

13 files changed

+66
-57
lines changed

13 files changed

+66
-57
lines changed

ValheimTooler/Core/EntitiesItemsHacks.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
using System.Linq;
44
using RapidGUI;
55
using UnityEngine;
6-
using ValheimTooler.Core.Extensions;
7-
using ValheimTooler.Patches;
86
using ValheimTooler.Utils;
97

108
namespace ValheimTooler.Core
@@ -48,6 +46,10 @@ public static void Update()
4846
{
4947
foreach (GameObject prefab in ZNetScene.instance.m_prefabs)
5048
{
49+
if (prefab.name.Contains("_"))
50+
{
51+
continue;
52+
}
5153
s_entityPrefabs.Add(prefab.name);
5254
}
5355

ValheimTooler/Core/PlayerHacks.cs

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -252,25 +252,26 @@ public static void DisplayGUI()
252252
}
253253
}
254254
}
255-
GUILayout.BeginHorizontal();
256-
{
257-
var maxInteract = Player.m_localPlayer != null ? Player.m_localPlayer.m_maxInteractDistance : 5f;
258-
GUILayout.Label(VTLocalization.instance.Localize("$vt_player_farinteract_label (") + maxInteract.ToString("F1") + ")", GUILayout.ExpandWidth(false));
259-
maxInteract = GUILayout.HorizontalSlider(maxInteract, 1f, 50f, GUILayout.ExpandWidth(true));
260-
if (Player.m_localPlayer != null)
261-
{
262-
Player.m_localPlayer.m_maxInteractDistance = maxInteract;
263-
Player.m_localPlayer.m_maxPlaceDistance = maxInteract;
264-
}
265-
}
266-
GUILayout.EndHorizontal();
267-
if (GUILayout.Button(VTLocalization.instance.Localize("$vt_player_farinteract_reset")))
268-
{
269-
if (Player.m_localPlayer != null)
270-
{
271-
Player.m_localPlayer.m_maxInteractDistance = 5f;
272-
}
273-
}
255+
// Deactivated because of mod conflict. See https://github.com/Astropilot/ValheimTooler/issues/45
256+
//GUILayout.BeginHorizontal();
257+
//{
258+
// var maxInteract = Player.m_localPlayer != null ? Player.m_localPlayer.m_maxInteractDistance : 5f;
259+
// GUILayout.Label(VTLocalization.instance.Localize("$vt_player_farinteract_label (") + maxInteract.ToString("F1") + ")", GUILayout.ExpandWidth(false));
260+
// maxInteract = GUILayout.HorizontalSlider(maxInteract, 1f, 50f, GUILayout.ExpandWidth(true));
261+
// if (Player.m_localPlayer != null)
262+
// {
263+
// Player.m_localPlayer.m_maxInteractDistance = maxInteract;
264+
// Player.m_localPlayer.m_maxPlaceDistance = maxInteract;
265+
// }
266+
//}
267+
//GUILayout.EndHorizontal();
268+
//if (GUILayout.Button(VTLocalization.instance.Localize("$vt_player_farinteract_reset")))
269+
//{
270+
// if (Player.m_localPlayer != null)
271+
// {
272+
// Player.m_localPlayer.m_maxInteractDistance = 5f;
273+
// }
274+
//}
274275
}
275276
GUILayout.EndVertical();
276277

ValheimTooler/Patches/InfiniteStamina.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ namespace ValheimTooler.Patches
66
{
77
[HarmonyPatch(typeof(Player), nameof(Player.UseStamina), new Type[]
88
{
9-
typeof(float), typeof(bool)
9+
typeof(float)
1010
})]
1111
class InfiniteStamina
1212
{
13-
private static void Prefix(ref float v)
13+
private static void Prefix(ref Player __instance, ref float v)
1414
{
15-
if (PlayerHacks.s_isInfiniteStaminaMe)
15+
if (PlayerHacks.s_isInfiniteStaminaMe && Player.m_localPlayer != null && __instance.GetPlayerID() == Player.m_localPlayer.GetPlayerID())
1616
{
1717
v = 0f;
1818
}

ValheimTooler/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Astropilot")]
1212
[assembly: AssemblyProduct("ValheimTooler")]
13-
[assembly: AssemblyCopyright("Copyright © Astropilot 2023")]
13+
[assembly: AssemblyCopyright("Copyright © Astropilot 2024")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,5 +32,5 @@
3232
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
3333
// en utilisant '*', comme indiqué ci-dessous :
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.10.0")]
36-
[assembly: AssemblyFileVersion("1.10.0")]
35+
[assembly: AssemblyVersion("1.11.0")]
36+
[assembly: AssemblyFileVersion("1.11.0")]

ValheimTooler/Utils/ConfigManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Diagnostics;
22
using System.IO;
3-
using System.Reflection;
43
using UnityEngine;
54
using ValheimTooler.Configuration;
65

ValheimTooler/ValheimTooler.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
</DocumentationFile>
5252
</PropertyGroup>
5353
<ItemGroup>
54-
<Reference Include="0Harmony, Version=2.10.2.0, Culture=neutral, processorArchitecture=MSIL">
55-
<HintPath>..\packages\HarmonyX.2.10.2\lib\net45\0Harmony.dll</HintPath>
54+
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL">
55+
<HintPath>..\packages\HarmonyX.2.9.0\lib\net45\0Harmony.dll</HintPath>
5656
</Reference>
5757
<Reference Include="assembly_guiutils">
5858
<HintPath>F:\SteamLibrary\steamapps\common\Valheim\valheim_Data\Managed\assembly_guiutils.dll</HintPath>
@@ -78,11 +78,11 @@
7878
<Reference Include="Mono.Cecil.Rocks, Version=0.11.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
7979
<HintPath>..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
8080
</Reference>
81-
<Reference Include="MonoMod.RuntimeDetour, Version=22.3.23.4, Culture=neutral, processorArchitecture=MSIL">
82-
<HintPath>..\packages\MonoMod.RuntimeDetour.22.3.23.4\lib\net452\MonoMod.RuntimeDetour.dll</HintPath>
81+
<Reference Include="MonoMod.RuntimeDetour, Version=22.1.29.1, Culture=neutral, processorArchitecture=MSIL">
82+
<HintPath>..\packages\MonoMod.RuntimeDetour.22.1.29.1\lib\net452\MonoMod.RuntimeDetour.dll</HintPath>
8383
</Reference>
84-
<Reference Include="MonoMod.Utils, Version=22.3.23.4, Culture=neutral, processorArchitecture=MSIL">
85-
<HintPath>..\packages\MonoMod.Utils.22.3.23.4\lib\net452\MonoMod.Utils.dll</HintPath>
84+
<Reference Include="MonoMod.Utils, Version=22.1.29.1, Culture=neutral, processorArchitecture=MSIL">
85+
<HintPath>..\packages\MonoMod.Utils.22.1.29.1\lib\net452\MonoMod.Utils.dll</HintPath>
8686
</Reference>
8787
<Reference Include="SharpConfig, Version=3.2.9.1, Culture=neutral, processorArchitecture=MSIL">
8888
<HintPath>..\packages\SharpConfig.3.2.9.1\lib\net461\SharpConfig.dll</HintPath>

ValheimTooler/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="HarmonyX" version="2.10.2" targetFramework="net472" />
3+
<package id="HarmonyX" version="2.9.0" targetFramework="net472" />
44
<package id="Mono.Cecil" version="0.11.4" targetFramework="net472" />
5-
<package id="MonoMod.RuntimeDetour" version="22.3.23.4" targetFramework="net472" />
6-
<package id="MonoMod.Utils" version="22.3.23.4" targetFramework="net472" />
5+
<package id="MonoMod.RuntimeDetour" version="22.1.29.1" targetFramework="net472" />
6+
<package id="MonoMod.Utils" version="22.1.29.1" targetFramework="net472" />
77
<package id="SharpConfig" version="3.2.9.1" targetFramework="net472" />
88
</packages>

ValheimToolerLauncher/App.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
<assemblyIdentity name="Microsoft.WindowsAPICodePack" publicKeyToken="8985beaab7ea3f04" culture="neutral" />
2828
<bindingRedirect oldVersion="0.0.0.0-1.1.5.0" newVersion="1.1.5.0" />
2929
</dependentAssembly>
30+
<dependentAssembly>
31+
<assemblyIdentity name="Microsoft.Web.WebView2.WinForms" publicKeyToken="2a8ab48044d2601e" culture="neutral" />
32+
<bindingRedirect oldVersion="0.0.0.0-1.0.2849.39" newVersion="1.0.2849.39" />
33+
</dependentAssembly>
34+
<dependentAssembly>
35+
<assemblyIdentity name="Microsoft.Web.WebView2.Core" publicKeyToken="2a8ab48044d2601e" culture="neutral" />
36+
<bindingRedirect oldVersion="0.0.0.0-1.0.2849.39" newVersion="1.0.2849.39" />
37+
</dependentAssembly>
3038
</assemblyBinding>
3139
</runtime>
3240
</configuration>

ValheimToolerLauncher/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[assembly: AssemblyConfiguration("")]
1313
[assembly: AssemblyCompany("")]
1414
[assembly: AssemblyProduct("ValheimToolerLauncher")]
15-
[assembly: AssemblyCopyright("Copyright © Astropilot 2023")]
15+
[assembly: AssemblyCopyright("Copyright © Astropilot 2024")]
1616
[assembly: AssemblyTrademark("")]
1717
[assembly: AssemblyCulture("")]
1818

@@ -51,5 +51,5 @@
5151
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
5252
// en utilisant '*', comme indiqué ci-dessous :
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.10.0")]
55-
[assembly: AssemblyFileVersion("1.10.0")]
54+
[assembly: AssemblyVersion("1.11.0")]
55+
[assembly: AssemblyFileVersion("1.11.0")]

ValheimToolerLauncher/ValheimToolerLauncher.csproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@
6363
<ApplicationManifest>app.manifest</ApplicationManifest>
6464
</PropertyGroup>
6565
<ItemGroup>
66-
<Reference Include="AutoUpdater.NET, Version=1.8.6.0, Culture=neutral, PublicKeyToken=501435c91b35f4bc, processorArchitecture=MSIL">
67-
<HintPath>..\packages\Autoupdater.NET.Official.1.8.6\lib\net45\AutoUpdater.NET.dll</HintPath>
66+
<Reference Include="AutoUpdater.NET, Version=1.9.2.0, Culture=neutral, PublicKeyToken=501435c91b35f4bc, processorArchitecture=MSIL">
67+
<HintPath>..\packages\Autoupdater.NET.Official.1.9.2\lib\net462\AutoUpdater.NET.dll</HintPath>
6868
</Reference>
6969
<Reference Include="CustomMarshalers" />
7070
<Reference Include="HandyControl, Version=3.5.2.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
7171
<HintPath>..\packages\HandyControls.3.5.3\lib\net472\HandyControl.dll</HintPath>
7272
</Reference>
73-
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.2478.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
74-
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2478.35\lib\net45\Microsoft.Web.WebView2.Core.dll</HintPath>
73+
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.2849.39, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
74+
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2849.39\lib\net462\Microsoft.Web.WebView2.Core.dll</HintPath>
7575
</Reference>
76-
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.2478.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
77-
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2478.35\lib\net45\Microsoft.Web.WebView2.WinForms.dll</HintPath>
76+
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.2849.39, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
77+
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2849.39\lib\net462\Microsoft.Web.WebView2.WinForms.dll</HintPath>
7878
</Reference>
79-
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.2478.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
80-
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2478.35\lib\net45\Microsoft.Web.WebView2.Wpf.dll</HintPath>
79+
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.2849.39, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
80+
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2849.39\lib\net462\Microsoft.Web.WebView2.Wpf.dll</HintPath>
8181
</Reference>
8282
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.5.0, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
8383
<HintPath>..\packages\Microsoft-WindowsAPICodePack-Core.1.1.5\lib\net472\Microsoft.WindowsAPICodePack.dll</HintPath>
@@ -188,11 +188,11 @@
188188
PowerShell -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File "$(SolutionDir)scripts\postbuild_cleanup.ps1" -TargetDir $(TargetDir)
189189
)</PostBuildEvent>
190190
</PropertyGroup>
191-
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets')" />
191+
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.2849.39\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.2849.39\build\Microsoft.Web.WebView2.targets')" />
192192
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
193193
<PropertyGroup>
194194
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
195195
</PropertyGroup>
196-
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets'))" />
196+
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.2849.39\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.2849.39\build\Microsoft.Web.WebView2.targets'))" />
197197
</Target>
198198
</Project>

ValheimToolerLauncher/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Autoupdater.NET.Official" version="1.8.6" targetFramework="net472" />
3+
<package id="Autoupdater.NET.Official" version="1.9.2" targetFramework="net472" />
44
<package id="HandyControls" version="3.5.3" targetFramework="net472" />
5-
<package id="Microsoft.Web.WebView2" version="1.0.2478.35" targetFramework="net472" />
5+
<package id="Microsoft.Web.WebView2" version="1.0.2849.39" targetFramework="net472" />
66
<package id="Microsoft-WindowsAPICodePack-Core" version="1.1.5" targetFramework="net472" />
77
<package id="Microsoft-WindowsAPICodePack-Shell" version="1.1.5" targetFramework="net472" />
88
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />

ValheimToolerMod/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
1212
[assembly: AssemblyProduct("ValheimToolerMod")]
13-
[assembly: AssemblyCopyright("Copyright © Astropilot 2023")]
13+
[assembly: AssemblyCopyright("Copyright © Astropilot 2024")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,5 +32,5 @@
3232
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
3333
// en utilisant '*', comme indiqué ci-dessous :
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.10.0.0")]
36-
[assembly: AssemblyFileVersion("1.10.0.0")]
35+
[assembly: AssemblyVersion("1.11.0.0")]
36+
[assembly: AssemblyFileVersion("1.11.0.0")]

ValheimToolerMod/ValheimToolerMod.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Diagnostics;
33
using System.IO;
4-
using System.Linq;
54
using System.Reflection;
65
using BepInEx;
76
using HarmonyLib;
@@ -15,7 +14,7 @@ public class ValheimToolerMod : BaseUnityPlugin
1514
{
1615
const string PluginGUID = "com.github.Astropilot.ValheimTooler";
1716
const string PluginName = "ValheimTooler";
18-
const string PluginVersion = "1.10.0";
17+
const string PluginVersion = "1.11.0";
1918

2019
private Harmony _harmony;
2120

0 commit comments

Comments
 (0)