using JetBrains.Annotations;
using Lidgren.Network;
using Robust.Shared.Serialization;
namespace Robust.Shared.Network.Messages
{
///
/// The client part of the string-exchange handshake, sent after the
/// client receives the mapping hash and after the client receives a
/// strings package. Tells the server if the client needs an updated
/// copy of the mapping.
///
///
/// Also sent by the client after a new copy of the string mapping
/// has been received. If successfully loaded, the value of
/// is false, otherwise it will be
/// true.
///
///
[UsedImplicitly]
internal sealed class MsgMapStrClientHandshake : NetMessage
{
public override MsgGroups MsgGroup => MsgGroups.String;
///
/// true if the client needs a new copy of the mapping,
/// false otherwise.
///
public bool NeedsStrings { get; set; }
public override void ReadFromBuffer(NetIncomingMessage buffer, IRobustSerializer serializer)
=> NeedsStrings = buffer.ReadBoolean();
public override void WriteToBuffer(NetOutgoingMessage buffer, IRobustSerializer serializer)
=> buffer.Write(NeedsStrings);
}
}