Update trivial components to use auto comp states (#20539)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Teleportation.Components;
|
||||
|
||||
@@ -7,23 +6,12 @@ namespace Content.Shared.Teleportation.Components;
|
||||
/// Attached to an entity after portal transit to mark that they should not immediately be portaled back
|
||||
/// at the end destination.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
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;
|
||||
}
|
||||
[ViewVariables, DataField, AutoNetworkedField]
|
||||
public EntityUid? EnteredPortal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user