2022-03-11 07:11:23 -08:00

15 lines
501 B
C#

using QSB.EchoesOfTheEye.RaftSync.WorldObjects;
using QSB.Messaging;
using QSB.WorldSync;
namespace QSB.EchoesOfTheEye.RaftSync.Messages;
public class RaftSetDockMessage : QSBWorldObjectMessage<QSBRaft, int>
{
public RaftSetDockMessage(RaftCarrier raftCarrier) :
base(raftCarrier != null ? raftCarrier.GetWorldObject<IQSBRaftCarrier>().ObjectId : -1) { }
public override void OnReceiveRemote() =>
WorldObject.SetDock(Data != -1 ? Data.GetWorldObject<IQSBRaftCarrier>() : null).Forget();
}