Portals & hand teleporter (#13266)
* basic system with portals & linked ents * hand tele sprites, no impl * hand tele and teleportation works * fancy it up * oog * special case projectiles * predict portal-to-portal teleportation * this stuff * check nullspace * sloth * give to rd instead * i guess this can probably happen * docs
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Content.Shared.Teleportation.Systems;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Teleportation.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an entity which is linked to other entities (perhaps portals), and which can be walked through/
|
||||
/// thrown into to teleport an entity.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(LinkedEntitySystem)), NetworkedComponent]
|
||||
public sealed class LinkedEntityComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The entities that this entity is linked to.
|
||||
/// </summary>
|
||||
[DataField("linkedEntities")]
|
||||
public HashSet<EntityUid> LinkedEntities = new();
|
||||
|
||||
/// <summary>
|
||||
/// Should this entity be deleted if all of its links are removed?
|
||||
/// </summary>
|
||||
[DataField("deleteOnEmptyLinks")]
|
||||
public bool DeleteOnEmptyLinks = false;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class LinkedEntityComponentState : ComponentState
|
||||
{
|
||||
public HashSet<EntityUid> LinkedEntities;
|
||||
|
||||
public LinkedEntityComponentState(HashSet<EntityUid> linkedEntities)
|
||||
{
|
||||
LinkedEntities = linkedEntities;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum LinkedEntityVisuals : byte
|
||||
{
|
||||
HasAnyLinks
|
||||
}
|
||||
Reference in New Issue
Block a user