перенос общих файлов из папки White в _White
This commit is contained in:
36
Content.Shared/_White/JoinQueue/MsgQueueUpdate.cs
Normal file
36
Content.Shared/_White/JoinQueue/MsgQueueUpdate.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Lidgren.Network;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.JoinQueue;
|
||||
|
||||
/// <summary>
|
||||
/// Sent from server to client with queue state for player
|
||||
/// Also initiates queue state on client
|
||||
/// </summary>
|
||||
public sealed class MsgQueueUpdate : NetMessage
|
||||
{
|
||||
public override MsgGroups MsgGroup => MsgGroups.Command;
|
||||
|
||||
/// <summary>
|
||||
/// Total players in queue
|
||||
/// </summary>
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Player current position in queue (starts from 1)
|
||||
/// </summary>
|
||||
public int Position { get; set; }
|
||||
|
||||
public override void ReadFromBuffer(NetIncomingMessage buffer, IRobustSerializer serializer)
|
||||
{
|
||||
Total = buffer.ReadInt32();
|
||||
Position = buffer.ReadInt32();
|
||||
}
|
||||
|
||||
public override void WriteToBuffer(NetOutgoingMessage buffer, IRobustSerializer serializer)
|
||||
{
|
||||
buffer.Write(Total);
|
||||
buffer.Write(Position);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user