quantum-space-buddies/QSB/Tools/ProbeLauncherTool/Messages/PlayerRetrieveProbeMessage.cs

19 lines
475 B
C#
Raw Normal View History

2021-12-26 07:45:40 +00:00
using QSB.Messaging;
using QSB.Player;
using QSB.WorldSync;
namespace QSB.Tools.ProbeLauncherTool.Messages
2021-12-26 07:45:40 +00:00
{
internal class PlayerRetrieveProbeMessage : QSBMessage<bool>
{
public PlayerRetrieveProbeMessage(bool playEffects) => Data = playEffects;
2021-12-26 07:45:40 +00:00
public override bool ShouldReceive => QSBWorldSync.AllObjectsReady;
2021-12-26 07:45:40 +00:00
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);
player.ProbeLauncher.RetrieveProbe(Data);
}
2021-12-26 07:45:40 +00:00
}
}