Merge branch 'master' into DecimalReagents

This commit is contained in:
PrPleGoo
2020-04-09 17:24:22 +02:00
23 changed files with 415 additions and 24 deletions

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Chat
/// Represents chat channels that the player can filter chat tabs by.
/// </summary>
[Flags]
public enum ChatChannel : byte
public enum ChatChannel : short
{
None = 0,
@@ -46,9 +46,14 @@ namespace Content.Shared.Chat
/// </summary>
Emotes = 64,
/// <summary>
/// Deadchat
/// </summary>
Dead = 128,
/// <summary>
/// Unspecified.
/// </summary>
Unspecified = 128,
Unspecified = 256,
}
}

View File

@@ -35,7 +35,7 @@ namespace Content.Shared.Chat
/// <summary>
/// The sending entity.
/// Only applies to <see cref="ChatChannel.Local"/> and <see cref="ChatChannel.Emotes"/>.
/// Only applies to <see cref="ChatChannel.Local"/>, <see cref="ChatChannel.Dead"/> and <see cref="ChatChannel.Emotes"/>.
/// </summary>
public EntityUid SenderEntity { get; set; }
@@ -48,6 +48,7 @@ namespace Content.Shared.Chat
switch (Channel)
{
case ChatChannel.Local:
case ChatChannel.Dead:
case ChatChannel.Emotes:
SenderEntity = buffer.ReadEntityUid();
break;
@@ -63,6 +64,7 @@ namespace Content.Shared.Chat
switch (Channel)
{
case ChatChannel.Local:
case ChatChannel.Dead:
case ChatChannel.Emotes:
buffer.Write(SenderEntity);
break;

View File

@@ -0,0 +1,29 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Observer
{
public class SharedGhostComponent : Component
{
public override string Name => "Ghost";
public override uint? NetID => ContentNetIDs.GHOST;
}
[Serializable, NetSerializable]
public class GhostComponentState : ComponentState
{
public bool CanReturnToBody { get; }
public GhostComponentState(bool canReturnToBody) : base(ContentNetIDs.GHOST)
{
CanReturnToBody = canReturnToBody;
}
}
[Serializable, NetSerializable]
public class ReturnToBodyComponentMessage : ComponentMessage
{
public ReturnToBodyComponentMessage() => Directed = true;
}
}

View File

@@ -41,5 +41,6 @@
public const uint HANDHELD_LIGHT = 1036;
public const uint PAPER = 1037;
public const uint REAGENT_INJECTOR = 1038;
public const uint GHOST = 1039;
}
}