Admin chat (#1287)

* Admin chat

* Change it to show username, not character name

* moves the thing

* Removes SenderEntity
This commit is contained in:
ike709
2020-07-08 05:18:16 -05:00
committed by GitHub
parent df395b9435
commit 2d2385032a
13 changed files with 124 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ namespace Content.Shared.Chat
public override void ReadFromBuffer(NetIncomingMessage buffer)
{
Channel = (ChatChannel) buffer.ReadByte();
Channel = (ChatChannel) buffer.ReadInt16();
Message = buffer.ReadString();
MessageWrap = buffer.ReadString();
@@ -49,6 +49,7 @@ namespace Content.Shared.Chat
{
case ChatChannel.Local:
case ChatChannel.Dead:
case ChatChannel.AdminChat:
case ChatChannel.Emotes:
SenderEntity = buffer.ReadEntityUid();
break;
@@ -57,7 +58,7 @@ namespace Content.Shared.Chat
public override void WriteToBuffer(NetOutgoingMessage buffer)
{
buffer.Write((byte)Channel);
buffer.Write((short)Channel);
buffer.Write(Message);
buffer.Write(MessageWrap);
@@ -65,6 +66,7 @@ namespace Content.Shared.Chat
{
case ChatChannel.Local:
case ChatChannel.Dead:
case ChatChannel.AdminChat:
case ChatChannel.Emotes:
buffer.Write(SenderEntity);
break;