mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 03:32:47 +00:00
20 lines
718 B
C#
20 lines
718 B
C#
using QSB.Messaging;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.Tools.SignalscopeTool.FrequencySync.Messages;
|
|
|
|
public class IdentifySignalMessage : QSBMessage<SignalName>
|
|
{
|
|
public IdentifySignalMessage(SignalName name) : base(name) { }
|
|
|
|
public override bool ShouldReceive => QSBWorldSync.AllObjectsReady;
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
PlayerData.LearnSignal(Data);
|
|
GlobalMessenger.FireEvent("IdentifySignal");
|
|
var displayMsg = $"{UITextLibrary.GetString(UITextType.NotificationSignalIdentified)} <color=orange>{AudioSignal.SignalNameToString(Data)}</color>";
|
|
var data = new NotificationData(NotificationTarget.All, displayMsg, 10f);
|
|
NotificationManager.SharedInstance.PostNotification(data);
|
|
}
|
|
} |