mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 03:40:46 +00:00
29 lines
757 B
C#
29 lines
757 B
C#
using OWML.Common;
|
|
using QSB.Events;
|
|
|
|
namespace QSB.Utility
|
|
{
|
|
public static class Patches
|
|
{
|
|
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 DoPatches(IHarmonyHelper helper)
|
|
{
|
|
helper.AddPostfix<SurveyorProbe>("OnAnchor", typeof(Patches), nameof(ProbeAnchor));
|
|
helper.AddPrefix<SurveyorProbe>("Retrieve", typeof(Patches), nameof(ProbeWarp));
|
|
}
|
|
}
|
|
}
|