quantum-space-buddies/QSB/Tools/ProbePatches.cs
Aleksander Waage c22b0ab069 moved patches
2020-08-23 15:51:45 +02:00

28 lines
760 B
C#

using QSB.Events;
namespace QSB.Tools
{
public static class ProbePatches
{
private static void ProbeAnchor()
{
GlobalMessenger.FireEvent(EventNames.QSBOnProbeAnchor);
}
private static bool ProbeWarp(ref bool ____isRetrieving)
{
if (!____isRetrieving)
{
GlobalMessenger.FireEvent(EventNames.QSBOnProbeWarp);
}
return true;
}
public static void Patch()
{
QSB.Helper.HarmonyHelper.AddPostfix<SurveyorProbe>("OnAnchor", typeof(ProbePatches), nameof(ProbeAnchor));
QSB.Helper.HarmonyHelper.AddPrefix<SurveyorProbe>("Retrieve", typeof(ProbePatches), nameof(ProbeWarp));
}
}
}