mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-10 15:53:19 +00:00
26 lines
555 B
C#
26 lines
555 B
C#
|
using QSB.Messaging;
|
|||
|
using QSB.Player;
|
|||
|
using QSB.WorldSync;
|
|||
|
|
|||
|
namespace QSB.Tools.ProbeTool.Messages
|
|||
|
{
|
|||
|
internal class ProbeStartRetrieveMessage : QSBFloatMessage
|
|||
|
{
|
|||
|
public override bool ShouldReceive => WorldObjectManager.AllObjectsReady;
|
|||
|
|
|||
|
public ProbeStartRetrieveMessage(float duration) => Value = duration;
|
|||
|
|
|||
|
public override void OnReceiveRemote()
|
|||
|
{
|
|||
|
var player = QSBPlayerManager.GetPlayer(From);
|
|||
|
if (!player.IsReady || player.Probe == null)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
var probe = player.Probe;
|
|||
|
probe.OnStartRetrieve(Value);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|