quantum-space-buddies/QSB/Tools/ProbeTool/Messages/ProbeStartRetrieveMessage.cs
2022-03-10 17:57:50 -08:00

24 lines
532 B
C#

using QSB.Messaging;
using QSB.Player;
using QSB.WorldSync;
namespace QSB.Tools.ProbeTool.Messages;
internal class ProbeStartRetrieveMessage : QSBMessage<float>
{
public ProbeStartRetrieveMessage(float duration) : base(duration) { }
public override bool ShouldReceive => QSBWorldSync.AllObjectsReady;
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);
if (!player.IsReady || player.Probe == null)
{
return;
}
var probe = player.Probe;
probe.OnStartRetrieve(Data);
}
}