* Fix? Nuked everything and put my code back in, hope everything works * Nullable fix? * nullable fix electric boogaloo * Haha nullable error go brrr send help * Cleanup and fix not clearing the button list * Remove unnecessary brackets and parentheses Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
107 lines
2.8 KiB
C#
107 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Content.Shared.GameObjects.EntitySystems;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.GameObjects.Components.Observer
|
|
{
|
|
public class SharedGhostComponent : Component, IActionBlocker
|
|
{
|
|
public override string Name => "Ghost";
|
|
public override uint? NetID => ContentNetIDs.GHOST;
|
|
|
|
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;
|
|
}
|
|
|
|
[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;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public class GhostWarpRequestMessage : ComponentMessage
|
|
{
|
|
public EntityUid PlayerTarget;
|
|
public string WarpName;
|
|
public GhostWarpRequestMessage(EntityUid playerTarget = default, string warpTarget = default)
|
|
{
|
|
WarpName = warpTarget;
|
|
PlayerTarget = playerTarget;
|
|
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;
|
|
}
|
|
}
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
public class ReturnToCloneComponentMessage : ComponentMessage
|
|
{
|
|
public ReturnToCloneComponentMessage() => Directed = true;
|
|
}
|
|
}
|
|
|
|
|