mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make scatter work too and dont set warpedToEye since its unneeded
This commit is contained in:
parent
804665b3a9
commit
aaa21aa3ba
@ -19,27 +19,44 @@ public static class EyeDetailCacher
|
||||
foreach (var body in Main.BodyDict["EyeOfTheUniverse"])
|
||||
{
|
||||
NHLogger.LogVerbose($"{nameof(EyeDetailCacher)}: {body.Config.name}");
|
||||
if (body.Config?.Props?.details == null) continue;
|
||||
|
||||
if (body.Config?.Props?.details != null)
|
||||
{
|
||||
foreach (var detail in body.Config.Props.details)
|
||||
{
|
||||
NHLogger.LogVerbose($"{nameof(EyeDetailCacher)}: {detail.path}");
|
||||
|
||||
if (!string.IsNullOrEmpty(detail.assetBundle)) continue;
|
||||
if (string.IsNullOrEmpty(detail.path)) continue;
|
||||
|
||||
var planet = detail.path.Contains('/') ? detail.path.Split('/').First() : string.Empty;
|
||||
AddPathToCache(detail.path);
|
||||
}
|
||||
}
|
||||
|
||||
if (body.Config?.Props?.scatter != null)
|
||||
{
|
||||
foreach (var scatter in body.Config.Props.scatter)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(scatter.assetBundle)) continue;
|
||||
|
||||
AddPathToCache(scatter.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddPathToCache(string path)
|
||||
{
|
||||
NHLogger.LogVerbose($"{nameof(EyeDetailCacher)}: {path}");
|
||||
|
||||
if (string.IsNullOrEmpty(path)) return;
|
||||
|
||||
var planet = path.Contains('/') ? path.Split('/').First() : string.Empty;
|
||||
|
||||
if (planet != "EyeOfTheUniverse_Body" && planet != "Vessel_Body")
|
||||
{
|
||||
NHLogger.LogVerbose($"{nameof(EyeDetailCacher)}: Looking for {detail.path}");
|
||||
var obj = SearchUtilities.Find(detail.path);
|
||||
NHLogger.LogVerbose($"{nameof(EyeDetailCacher)}: Looking for {path}");
|
||||
var obj = SearchUtilities.Find(path);
|
||||
if (obj != null)
|
||||
{
|
||||
NHLogger.LogVerbose($"{nameof(EyeDetailCacher)}: Added solar system asset to dont destroy on load cache for eye: {detail.path}");
|
||||
SearchUtilities.AddToDontDestroyOnLoadCache(detail.path, obj);
|
||||
}
|
||||
}
|
||||
NHLogger.LogVerbose($"{nameof(EyeDetailCacher)}: Added solar system asset to dont destroy on load cache for eye: {path}");
|
||||
SearchUtilities.AddToDontDestroyOnLoadCache(path, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,6 @@ namespace NewHorizons.Utility.DebugTools
|
||||
|
||||
if (Main.Instance.CurrentStarSystem == "EyeOfTheUniverse")
|
||||
{
|
||||
PlayerData._currentGameSave.warpedToTheEye = true;
|
||||
Main.Instance.IsWarpingBackToEye = true;
|
||||
EyeDetailCacher.IsInitialized = false;
|
||||
Main.Instance.ChangeCurrentStarSystem("SolarSystem");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user