using QSB.Events; using QSB.Patches; namespace QSB.FrequencySync.Patches { public class FrequencyPatches : QSBPatch { public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect; public override void DoPatches() { QSBCore.Helper.HarmonyHelper.AddPostfix("IdentifyFrequency", typeof(FrequencyPatches), nameof(IdentifyFrequency)); QSBCore.Helper.HarmonyHelper.AddPostfix("IdentifySignal", typeof(FrequencyPatches), nameof(IdentifySignal)); } public override void DoUnpatches() { QSBCore.Helper.HarmonyHelper.Unpatch("IdentifyFrequency"); QSBCore.Helper.HarmonyHelper.Unpatch("IdentifySignal"); } public static void IdentifyFrequency(SignalFrequency ____frequency) => QSBEventManager.FireEvent(EventNames.QSBIdentifyFrequency, ____frequency); public static void IdentifySignal(SignalName ____name) => QSBEventManager.FireEvent(EventNames.QSBIdentifySignal, ____name); } }