From 52ab1c025fcd321fef34fe3de89d040bcc80106e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Schm=C3=B6cker?= Date: Sat, 28 Dec 2024 21:27:25 +0100 Subject: [PATCH] fix: compatibility with shudnal's ConfigurationManager --- CHANGELOG.md | 3 +++ JotunnLib/Utils/ConfigManagerUtils.cs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b6280c9c..db7d37295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +# Version 2.22.1 +* Fixed compatibility with shudnal's ConfigurationManager + ## Version 2.22.0 * Added `SynchronizationMode` attribute to allow mod authors to change how AdminOnly configs are handled. See https://valheim-modding.github.io/Jotunn/tutorials/config.html#admin-only-strictness (thx Searica) * Fixed mod detection for connection compatibility now use guid instead of name (thx Searica) diff --git a/JotunnLib/Utils/ConfigManagerUtils.cs b/JotunnLib/Utils/ConfigManagerUtils.cs index f6b5d10bd..654a7c2bc 100644 --- a/JotunnLib/Utils/ConfigManagerUtils.cs +++ b/JotunnLib/Utils/ConfigManagerUtils.cs @@ -27,6 +27,12 @@ static ConfigManagerUtils() displayingWindowInfo = AccessTools.Property(Plugin.GetType(), "DisplayingWindow"); buildSettingListMethodInfo = AccessTools.Method(Plugin.GetType(), "BuildSettingList"); } + else if (Chainloader.PluginInfos.TryGetValue("_shudnal.ConfigurationManager", out configManagerInfo) && configManagerInfo.Instance) + { + Plugin = configManagerInfo.Instance; + displayingWindowInfo = AccessTools.Property(Plugin.GetType(), "DisplayingWindow"); + buildSettingListMethodInfo = AccessTools.Method(Plugin.GetType(), "BuildSettingList"); + } } ///