Files
crystall-punk-14/Content.Shared/GameObjects/Components/Observer/SharedGhostComponent.cs

87 lines
2.2 KiB
C#
Raw Normal View History

2020-03-03 19:10:07 +01:00
using System;
using System.Collections.Generic;
2020-12-20 04:26:21 +01:00
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
using Robust.Shared.GameObjects;
2020-03-03 19:10:07 +01:00
using Robust.Shared.Serialization;
2020-04-05 02:29:04 +02:00
namespace Content.Shared.GameObjects.Components.Observer
{
2020-06-24 02:21:20 +02:00
public class SharedGhostComponent : Component, IActionBlocker
{
public override string Name => "Ghost";
2020-03-03 19:10:07 +01:00
public override uint? NetID => ContentNetIDs.GHOST;
2020-06-24 02:21:20 +02:00
public bool CanInteract() => false;
public bool CanUse() => false;
public bool CanThrow() => false;
public bool CanDrop() => false;
public bool CanPickup() => false;
public bool CanEmote() => false;
public bool CanAttack() => false;
2020-03-03 19:10:07 +01:00
}
[Serializable, NetSerializable]
public class GhostComponentState : ComponentState
{
public bool CanReturnToBody { get; }
public GhostComponentState(bool canReturnToBody) : base(ContentNetIDs.GHOST)
2020-03-03 19:10:07 +01:00
{
CanReturnToBody = canReturnToBody;
}
}
[Serializable, NetSerializable]
public class ReturnToBodyComponentMessage : ComponentMessage
{
public ReturnToBodyComponentMessage()
{
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostRequestWarpPointData : ComponentMessage
{
public GhostRequestWarpPointData()
{
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostRequestPlayerNameData : ComponentMessage
{
public GhostRequestPlayerNameData()
{
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostReplyWarpPointData : ComponentMessage
{
public List<string> WarpName;
public GhostReplyWarpPointData(List<string> warpName)
{
WarpName = warpName;
Directed = true;
}
}
[Serializable, NetSerializable]
public class GhostReplyPlayerNameData : ComponentMessage
{
public Dictionary<EntityUid,string> PlayerNames;
public GhostReplyPlayerNameData(Dictionary<EntityUid, string> playerNameDict)
{
PlayerNames = playerNameDict;
Directed = true;
}
}
}