quantum-space-buddies/QSB/Tools/ProbeLauncherTool/Messages/PlayerEquipLauncherMessage.cs
2022-04-16 10:08:59 +01:00

22 lines
532 B
C#

using QSB.Messaging;
using QSB.Player;
namespace QSB.Tools.ProbeLauncherTool.Messages;
internal class PlayerEquipLauncherMessage : QSBMessage<bool>
{
public PlayerEquipLauncherMessage(bool equipped) : base(equipped) { }
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);
player.LocalProbeLauncherEquipped = Data;
player.ProbeLauncherTool?.ChangeEquipState(Data);
}
public override void OnReceiveLocal()
{
QSBPlayerManager.LocalPlayer.LocalProbeLauncherEquipped = Data;
}
}