mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Backwards compat for certain mods broken by keepLoaded = false
This commit is contained in:
parent
b5f5a4cabc
commit
6f55b8da3f
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user