mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Switch to default if at eye going to solar system
This commit is contained in:
parent
094fc397e4
commit
e3d4fd015c
@ -13,6 +13,19 @@ namespace NewHorizons.Patches
|
||||
return (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse");
|
||||
}
|
||||
|
||||
private static void SwitchToDefaultIfAtEyeGoingToSS(OWScene scene)
|
||||
{
|
||||
if (Main.Instance.CurrentStarSystem == "EyeOfTheUniverse" && scene == OWScene.SolarSystem) Main.Instance._currentStarSystem = Main.Instance.DefaultStarSystem;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(LoadManager), nameof(LoadManager.LoadSceneImmediate))]
|
||||
public static void LoadManager_LoadSceneImmediate(OWScene scene) => SwitchToDefaultIfAtEyeGoingToSS(scene);
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(LoadManager), nameof(LoadManager.StartAsyncSceneLoad))]
|
||||
public static void LoadManager_StartAsyncSceneLoad(OWScene scene) => SwitchToDefaultIfAtEyeGoingToSS(scene);
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(SubmitActionLoadScene), nameof(SubmitActionLoadScene.ConfirmSubmit))]
|
||||
public static void SubmitActionLoadScene_ConfirmSubmit(SubmitActionLoadScene __instance)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user