mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 03:40:46 +00:00
4300d777fe
* cleanup * fixed dc bug
28 lines
764 B
C#
28 lines
764 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 DoPatches()
|
|
{
|
|
QSB.Helper.HarmonyHelper.AddPostfix<SurveyorProbe>("OnAnchor", typeof(ProbePatches), nameof(ProbeAnchor));
|
|
QSB.Helper.HarmonyHelper.AddPrefix<SurveyorProbe>("Retrieve", typeof(ProbePatches), nameof(ProbeWarp));
|
|
}
|
|
}
|
|
}
|