mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix NRE in ProxyBody.IsObjectInSupernova
This commit is contained in:
parent
2012c911b7
commit
215643607c
@ -1,4 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using HarmonyLib;
|
||||
namespace NewHorizons.Patches
|
||||
{
|
||||
[HarmonyPatch]
|
||||
@ -13,6 +13,13 @@ namespace NewHorizons.Patches
|
||||
GlobalMessenger.AddListener("ExitMapView", __instance.OnExitMapView);
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(ProxyBody), nameof(ProxyBody.IsObjectInSupernova))]
|
||||
public static bool ProxyBody_IsObjectInSupernova(ProxyBody __instance)
|
||||
{
|
||||
return Locator.GetSunController() != null;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(ProxyBody), nameof(ProxyBody.OnDestroy))]
|
||||
public static void ProxyBody_OnDestroy(ProxyBody __instance)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user