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"); + } } ///