mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
19 lines
723 B
C#
19 lines
723 B
C#
using HarmonyLib;
|
|
|
|
namespace NewHorizons.Patches.MapPatches;
|
|
|
|
[HarmonyPatch(typeof(PlaneOffsetMarker))]
|
|
internal class PlaneOffsetMarkerPatches
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(nameof(PlaneOffsetMarker.Update))]
|
|
public static bool PlaneOffsetMarker_Update(PlaneOffsetMarker __instance)
|
|
{
|
|
// It tracks the sun originally
|
|
// Too lazy to perfectly time it getting the right static ref transform so we'll just do this
|
|
// It disables itself if the ref frame is ever null so don't let it do that bc the ref frame is null when it starts
|
|
__instance._sunTransform = Locator._centerOfTheUniverse._staticReferenceFrame.transform;
|
|
return __instance._sunTransform != null;
|
|
}
|
|
}
|