mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
do fixBackslashes: false on Storage.Load
This commit is contained in:
parent
ac423de88b
commit
2e759523e7
2
NewHorizons/External/NewHorizonsData.cs
vendored
2
NewHorizons/External/NewHorizonsData.cs
vendored
@ -25,7 +25,7 @@ namespace NewHorizons.External
|
||||
|
||||
try
|
||||
{
|
||||
_saveFile = Main.Instance.ModHelper.Storage.Load<NewHorizonsSaveFile>(FileName);
|
||||
_saveFile = Main.Instance.ModHelper.Storage.Load<NewHorizonsSaveFile>(FileName, false);
|
||||
if (!_saveFile.Profiles.ContainsKey(_activeProfileName))
|
||||
_saveFile.Profiles.Add(_activeProfileName, new NewHorizonsProfile());
|
||||
_activeProfile = _saveFile.Profiles[_activeProfileName];
|
||||
|
||||
@ -582,7 +582,7 @@ namespace NewHorizons
|
||||
Logger.LogVerbose($"Loading system {name}");
|
||||
|
||||
var relativePath = file.Replace(folder, "");
|
||||
var starSystemConfig = mod.ModHelper.Storage.Load<StarSystemConfig>(relativePath);
|
||||
var starSystemConfig = mod.ModHelper.Storage.Load<StarSystemConfig>(relativePath, false);
|
||||
starSystemConfig.Migrate();
|
||||
starSystemConfig.FixCoordinates();
|
||||
|
||||
@ -656,7 +656,7 @@ namespace NewHorizons
|
||||
{
|
||||
Logger.LogVerbose($"Loading addon manifest for {mod.ModHelper.Manifest.Name}");
|
||||
|
||||
var addonConfig = mod.ModHelper.Storage.Load<AddonConfig>(file);
|
||||
var addonConfig = mod.ModHelper.Storage.Load<AddonConfig>(file, false);
|
||||
|
||||
if (addonConfig.achievements != null)
|
||||
{
|
||||
@ -706,7 +706,7 @@ namespace NewHorizons
|
||||
NewHorizonsBody body = null;
|
||||
try
|
||||
{
|
||||
var config = mod.ModHelper.Storage.Load<PlanetConfig>(relativePath);
|
||||
var config = mod.ModHelper.Storage.Load<PlanetConfig>(relativePath, false);
|
||||
if (config == null)
|
||||
{
|
||||
Logger.LogError($"Couldn't load {relativePath}. Is your Json formatted correctly?");
|
||||
@ -719,7 +719,7 @@ namespace NewHorizons
|
||||
if (!SystemDict.ContainsKey(config.starSystem))
|
||||
{
|
||||
// Since we didn't load it earlier there shouldn't be a star system config
|
||||
var starSystemConfig = mod.ModHelper.Storage.Load<StarSystemConfig>($"systems/{config.starSystem}.json");
|
||||
var starSystemConfig = mod.ModHelper.Storage.Load<StarSystemConfig>(Path.Combine("systems", config.starSystem + ".json"), false);
|
||||
if (starSystemConfig == null) starSystemConfig = new StarSystemConfig();
|
||||
else Logger.LogWarning($"Loaded system config for {config.starSystem}. Why wasn't this loaded earlier?");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user