public void SendDockInformation(VesselDockStructure dock, int subspaceId) { var vesselBytes = VesselSerializer.SerializeVessel(dock.DominantVessel.BackupVessel()); if (vesselBytes.Length > 0) { CreateAndSendDockMessage(dock, subspaceId, vesselBytes); } }
public void SendDockInformation(Guid weakVesselId, Vessel dominantVessel, int subspaceId) { var vesselBytes = VesselSerializer.SerializeVessel(dominantVessel.BackupVessel()); if (vesselBytes.Length > 0) { CreateAndSendDockMessage(weakVesselId, dominantVessel.id, subspaceId, vesselBytes); } }
/// <summary> /// Adds a vessel manually to the dictionary. Use this to add your own spawned vessels. /// </summary> public static void AddOrUpdateVesselToDictionary(Vessel vessel) { var ownVesselData = VesselSerializer.SerializeVessel(vessel.protoVessel); if (ownVesselData.Length > 0) { var newProtoUpdate = new VesselProtoUpdate(ownVesselData, ownVesselData.Length, vessel.id); AllPlayerVessels.AddOrUpdate(vessel.id, newProtoUpdate, (key, existingVal) => newProtoUpdate); } }
public void SendDockInformation(VesselDockStructure dock) { var vesselBytes = VesselSerializer.SerializeVessel(dock.DominantVessel.protoVessel); if (vesselBytes.Length > 0) { SendMessage(new VesselDockMsgData { WeakVesselId = dock.WeakVesselId, DominantVesselId = dock.DominantVesselId, FinalVesselData = vesselBytes }); } }
public void SendDockInformation(VesselDockStructure dock, int subspaceId, ProtoVessel finalDominantVesselProto) { if (finalDominantVesselProto != null) { var vesselBytes = VesselSerializer.SerializeVessel(finalDominantVesselProto); if (vesselBytes.Length > 0) { CreateAndSendDockMessage(dock, subspaceId, vesselBytes); } } else { SendDockInformation(dock, subspaceId); } }
public void SendDockInformation(Guid weakVesselId, Vessel dominantVessel, int subspaceId, ProtoVessel finalDominantVesselProto) { if (finalDominantVesselProto != null) { var vesselBytes = VesselSerializer.SerializeVessel(finalDominantVesselProto); if (vesselBytes.Length > 0) { CreateAndSendDockMessage(weakVesselId, dominantVessel.id, subspaceId, vesselBytes); } } else { SendDockInformation(weakVesselId, dominantVessel, subspaceId); } }