quantum-space-buddies/QSB/Tools/ProbeLauncherTool/Messages/PlayerRetrieveProbeMessage.cs
2021-12-26 18:55:54 -08:00

20 lines
482 B
C#

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