quantum-space-buddies/QSB/Tools/ProbeLauncherTool/Messages/PlayerRetrieveProbeMessage.cs
2022-01-26 20:35:43 -08:00

20 lines
478 B
C#

using QSB.Messaging;
using QSB.Player;
using QSB.WorldSync;
namespace QSB.Tools.ProbeLauncherTool.Messages
{
internal class PlayerRetrieveProbeMessage : QSBMessage<bool>
{
public PlayerRetrieveProbeMessage(bool playEffects) => Value = playEffects;
public override bool ShouldReceive => QSBWorldSync.AllObjectsReady;
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);
player.ProbeLauncher.RetrieveProbe(Value);
}
}
}