diff --git a/NewHorizons/Utility/NewHorizonBody.cs b/NewHorizons/Utility/NewHorizonBody.cs index fbbc7de6..7b5a7dc3 100644 --- a/NewHorizons/Utility/NewHorizonBody.cs +++ b/NewHorizons/Utility/NewHorizonBody.cs @@ -1,5 +1,6 @@ -using NewHorizons.External.Configs; +using NewHorizons.External.Configs; using OWML.Common; +using System.Linq; using UnityEngine; namespace NewHorizons.Utility { @@ -17,5 +18,31 @@ namespace NewHorizons.Utility public string RelativePath; public GameObject Object; + + #region Migration + private static readonly string[] _keepLoadedModsList = new string[] + { + "CreativeNameTxt.theirhomeworld", + "Roggsy.enterthewarioverse", + "Jammer.jammerlore", + "ErroneousCreationist.solarneighbourhood", + "ErroneousCreationist.incursionfinaldawn" + }; + + private void Migrate() + { + // Some old mods get really broken by this change in 1.6.1 + if (_keepLoadedModsList.Contains(Mod.ModHelper.Manifest.UniqueName)) + { + if (Config?.Props?.details != null) + { + foreach (var detail in Config.Props.details) + { + detail.keepLoaded = true; + } + } + } + } + #region Migration } }