Files
tbd-station-14/Content.Shared/Teleportation/Components/PortalTimeoutComponent.cs
2023-09-11 09:42:41 +10:00

30 lines
870 B
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Teleportation.Components;
/// <summary>
/// Attached to an entity after portal transit to mark that they should not immediately be portaled back
/// at the end destination.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class PortalTimeoutComponent : Component
{
/// <summary>
/// The portal that was entered. Null if coming from a hand teleporter, etc.
/// </summary>
[ViewVariables, DataField("enteredPortal")]
public EntityUid? EnteredPortal = null;
}
[Serializable, NetSerializable]
public sealed class PortalTimeoutComponentState : ComponentState
{
public NetEntity? EnteredPortal;
public PortalTimeoutComponentState(NetEntity? enteredPortal)
{
EnteredPortal = enteredPortal;
}
}