Files
tbd-station-14/Content.Shared/Network/NetMessages/MsgEuiCtl.cs
Acruid ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08:00

55 lines
1.3 KiB
C#

using Lidgren.Network;
using Robust.Shared.Network;
namespace Content.Shared.Network.NetMessages
{
/// <summary>
/// Sent server -> client to signal that the client should open an EUI.
/// </summary>
public sealed class MsgEuiCtl : NetMessage
{
#region REQUIRED
public const MsgGroups GROUP = MsgGroups.Command;
public const string NAME = nameof(MsgEuiCtl);
public MsgEuiCtl(INetChannel channel) : base(NAME, GROUP) { }
#endregion
public CtlType Type;
public string OpenType;
public uint Id;
public override void ReadFromBuffer(NetIncomingMessage buffer)
{
Id = buffer.ReadUInt32();
Type = (CtlType) buffer.ReadByte();
switch (Type)
{
case CtlType.Open:
OpenType = buffer.ReadString();
break;
}
}
public override void WriteToBuffer(NetOutgoingMessage buffer)
{
buffer.Write(Id);
buffer.Write((byte) Type);
switch (Type)
{
case CtlType.Open:
buffer.Write(OpenType);
break;
}
}
public enum CtlType : byte
{
Open,
Close
}
}
}