mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 12:32:55 +00:00
19 lines
697 B
C#
19 lines
697 B
C#
using QSB.Messaging;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.Tools.SignalscopeTool.FrequencySync.Messages;
|
|
|
|
public class IdentifyFrequencyMessage : QSBMessage<SignalFrequency>
|
|
{
|
|
public IdentifyFrequencyMessage(SignalFrequency frequency) : base(frequency) { }
|
|
|
|
public override bool ShouldReceive => QSBWorldSync.AllObjectsReady;
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
PlayerData.LearnFrequency(Data);
|
|
var displayMsg = $"{UITextLibrary.GetString(UITextType.NotificationNewFreq)} <color=orange>{AudioSignal.FrequencyToString(Data, false)}</color>";
|
|
var data = new NotificationData(NotificationTarget.All, displayMsg, 10f);
|
|
NotificationManager.SharedInstance.PostNotification(data);
|
|
}
|
|
} |