new-horizons/NewHorizons/Patches/MapPatches/ReferenceFrameTrackerPatches.cs
2023-03-18 13:30:22 -04:00

16 lines
567 B
C#

using HarmonyLib;
namespace NewHorizons.Patches.MapPatches
{
[HarmonyPatch(typeof(ReferenceFrameTracker))]
public static class ReferenceFrameTrackerPatches
{
[HarmonyPrefix]
[HarmonyPatch(nameof(ReferenceFrameTracker.UntargetReferenceFrame), new System.Type[] { typeof(bool) })]
public static bool ReferenceFrameTracker_UntargetReferenceFrame(ReferenceFrameTracker __instance, bool playAudio)
{
return __instance != null && __instance._hasTarget && __instance._currentReferenceFrame != null;
}
}
}