using Content.Shared.Teleportation.Systems; using Robust.Shared.GameStates; using Robust.Shared.Serialization; namespace Content.Shared.Teleportation.Components; /// /// Represents an entity which is linked to other entities (perhaps portals), and which can be walked through/ /// thrown into to teleport an entity. /// [RegisterComponent, Access(typeof(LinkedEntitySystem)), NetworkedComponent] public sealed class LinkedEntityComponent : Component { /// /// The entities that this entity is linked to. /// [DataField("linkedEntities")] public HashSet LinkedEntities = new(); /// /// Should this entity be deleted if all of its links are removed? /// [DataField("deleteOnEmptyLinks")] public bool DeleteOnEmptyLinks = false; } [Serializable, NetSerializable] public sealed class LinkedEntityComponentState : ComponentState { public HashSet LinkedEntities; public LinkedEntityComponentState(HashSet linkedEntities) { LinkedEntities = linkedEntities; } } [Serializable, NetSerializable] public enum LinkedEntityVisuals : byte { HasAnyLinks }