mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 15:35:22 +00:00
23 lines
804 B
C#
23 lines
804 B
C#
|
using QSB.Events;
|
|||
|
using QSB.Patches;
|
|||
|
|
|||
|
namespace QSB.FrequencySync
|
|||
|
{
|
|||
|
public class FrequencyPatches : QSBPatch
|
|||
|
{
|
|||
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|||
|
|
|||
|
public override void DoPatches()
|
|||
|
{
|
|||
|
QSBCore.Helper.HarmonyHelper.AddPostfix<AudioSignal>("IdentifyFrequency", typeof(FrequencyPatches), nameof(IdentifyFrequency));
|
|||
|
QSBCore.Helper.HarmonyHelper.AddPostfix<AudioSignal>("IdentifySignal", typeof(FrequencyPatches), nameof(IdentifySignal));
|
|||
|
}
|
|||
|
|
|||
|
public static void IdentifyFrequency(SignalFrequency ____frequency)
|
|||
|
=> GlobalMessenger<SignalFrequency>.FireEvent(EventNames.QSBIdentifyFrequency, ____frequency);
|
|||
|
|
|||
|
public static void IdentifySignal(SignalName ____name)
|
|||
|
=> GlobalMessenger<SignalName>.FireEvent(EventNames.QSBIdentifySignal, ____name);
|
|||
|
}
|
|||
|
}
|