mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-10 15:53:19 +00:00
30 lines
843 B
C#
30 lines
843 B
C#
using QSB.Events;
|
|
|
|
namespace QSB.Tools
|
|
{
|
|
public class ProbePatches : QSBPatch
|
|
{
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnModStart;
|
|
|
|
private static void ProbeAnchor()
|
|
{
|
|
GlobalMessenger.FireEvent(EventNames.QSBOnProbeAnchor);
|
|
}
|
|
|
|
private static bool ProbeWarp(ref bool ____isRetrieving)
|
|
{
|
|
if (!____isRetrieving)
|
|
{
|
|
GlobalMessenger.FireEvent(EventNames.QSBOnProbeWarp);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public override void DoPatches()
|
|
{
|
|
QSB.Helper.HarmonyHelper.AddPostfix<SurveyorProbe>("OnAnchor", typeof(ProbePatches), nameof(ProbeAnchor));
|
|
QSB.Helper.HarmonyHelper.AddPrefix<SurveyorProbe>("Retrieve", typeof(ProbePatches), nameof(ProbeWarp));
|
|
}
|
|
}
|
|
}
|