2 Commits
1.5.6 ... 1.5.7

Author SHA1 Message Date
mikx
cb93f20b18 (1.5.7) AutoDoor Ignore List 2026-02-12 03:15:36 -05:00
mikx
2291d1c162 (1.5.6) readme update again 2026-02-11 22:50:43 -05:00
3 changed files with 16 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ public class MxValheimMod : BaseUnityPlugin
private const string ModGUID = "ovh.mxdev.mxvalheim";
private const string ModName = "MxValheim";
public const string ModVersion = "1.5.6";
public const string ModVersion = "1.5.7";
public static ConfigEntry<bool> Config_Locked;
public static ConfigEntry<int> Config_OreMultiplier;
@@ -38,7 +38,8 @@ public class MxValheimMod : BaseUnityPlugin
public static string modPath = Path.Combine(Paths.PluginPath, "MxValheim");
public static string internalConfigsPath = Path.Combine(modPath, "Configs");
private static string WeightConfigPath => Path.Combine(internalConfigsPath, "items_weight.json");
public static string WeightConfigPath => Path.Combine(internalConfigsPath, "items_weight.json");
public static string AutoDoorConfigPath => Path.Combine(internalConfigsPath, "auto_doors.json");
public static Dictionary<string, float> WeightSettings = new Dictionary<string, float>();
// Data structures

View File

@@ -1,6 +1,9 @@
using BepInEx;
using HarmonyLib;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.Diagnostics;
using static MxValheimMod;
@@ -9,6 +12,11 @@ namespace MxValheim.Patch
{
public class Doors_Patch
{
public class DoorRoot
{
public List<string> ignoreList { get; set; }
}
[HarmonyPatch(typeof(Door), nameof(Door.Interact))]
public static class DoorTracker
{
@@ -21,7 +29,8 @@ namespace MxValheim.Patch
int prefabHash = nview.GetZDO().GetPrefab();
string prefabName = ZNetScene.instance.GetPrefab(prefabHash).name;
if (prefabName == "piece_crypt_door") return;
DoorRoot iL = JsonConvert.DeserializeObject<DoorRoot>(File.ReadAllText(MxValheimMod.AutoDoorConfigPath));
if (iL.ignoreList.Contains(prefabName)) return;
if (hold || alt || ___m_nview == null || !___m_nview.IsValid()) return;

View File

@@ -16,8 +16,8 @@ Official **MxValheim Server** Mod.
- Auto close doors after a specified amount of time. (Enable/Disable and configure desired time in the generated config.)
## How-To Install
1. Download the latest dll.
2. Copy it to your (Client/Server) "BepInEx­\plugins\MxValheim\".
1. Download the latest zip.
2. Copy the zip content to your (Client/Server) "BepInEx­\plugins\MxValheim\".
3. Run your (Client/Server) at least one time.
4. Tweaks the config in "BepInEx­\config\ovh.mxdev.mxvalheim.cfg" to your liking.
5. Enjoy!