30 lines
860 B
C#
Raw Normal View History

2020-08-20 14:10:37 +01:00
using QSB.Events;
using UnityEngine.Networking;
namespace QSB.Utility
{
public static class Patches
{
private static void ProbeAnchor()
{
2020-08-10 19:24:28 +02:00
GlobalMessenger.FireEvent(EventNames.QSBOnProbeAnchor);
}
private static bool ProbeWarp(ref bool ____isRetrieving)
{
if (!____isRetrieving)
{
2020-08-10 19:24:28 +02:00
GlobalMessenger.FireEvent(EventNames.QSBOnProbeWarp);
2020-08-20 19:31:10 +01:00
}
return true;
}
2020-08-19 21:28:04 +01:00
public static void DoPatches()
{
2020-08-19 21:28:04 +01:00
QSB.Helper.HarmonyHelper.AddPostfix<SurveyorProbe>("OnAnchor", typeof(Patches), nameof(ProbeAnchor));
QSB.Helper.HarmonyHelper.AddPrefix<SurveyorProbe>("Retrieve", typeof(Patches), nameof(ProbeWarp));
2020-08-20 14:10:37 +01:00
QSB.Helper.HarmonyHelper.EmptyMethod<NetworkManagerHUD>("Update");
}
}
}