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

18 lines
468 B
C#
Raw Normal View History

2021-12-26 07:45:40 +00:00
using QSB.Messaging;
using QSB.Player;
using QSB.WorldSync;
2022-03-03 03:46:33 +00:00
namespace QSB.Tools.ProbeLauncherTool.Messages;
internal class PlayerRetrieveProbeMessage : QSBMessage<bool>
2021-12-26 07:45:40 +00:00
{
2022-03-11 01:57:50 +00:00
public PlayerRetrieveProbeMessage(bool playEffects) : base(playEffects) { }
2021-12-26 07:45:40 +00:00
2022-03-03 03:46:33 +00:00
public override bool ShouldReceive => QSBWorldSync.AllObjectsReady;
2021-12-26 07:45:40 +00:00
2022-03-03 03:46:33 +00:00
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);
2022-04-16 09:08:59 +00:00
player.ProbeLauncherTool.RetrieveProbe(Data);
2021-12-26 07:45:40 +00:00
}
}