Button to return to body

This commit is contained in:
zumorica
2020-03-03 19:10:07 +01:00
parent 6905394e8a
commit 055f09d501
5 changed files with 114 additions and 3 deletions

View File

@@ -1,9 +1,32 @@
using System;
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.Observer
{
public class SharedGhostComponent : Component
{
public override string Name => "Ghost";
public override uint? NetID => ContentNetIDs.GHOST;
public virtual bool CanReturnToBody { get; set; } = true;
}
[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;
}
}