mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
19 lines
572 B
C#
19 lines
572 B
C#
using HarmonyLib;
|
|
using System;
|
|
|
|
namespace NewHorizons.Patches.ToolPatches
|
|
{
|
|
[HarmonyPatch(typeof(SurveyorProbe))]
|
|
public static class SurveyorProbePatches
|
|
{
|
|
// This is to stop the game throwing too many errors if the probe is destroyed by a blackhole
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(nameof(SurveyorProbe.IsLaunched))]
|
|
public static bool SurveyorProbe_IsLaunched(SurveyorProbe __instance, ref bool __result)
|
|
{
|
|
__result = __instance?.gameObject?.activeSelf ?? false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|