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.Interaction.Components;
|
||||
|
||||
@@ -10,27 +9,13 @@ namespace Content.Shared.Interaction.Components;
|
||||
///
|
||||
/// Note that extreme caution should be taken when using this, as this will probably bypass many normal can-interact checks.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
[Access(typeof(SharedInteractionSystem))]
|
||||
public sealed partial class InteractionRelayComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity the interactions are being relayed to.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[ViewVariables, AutoNetworkedField]
|
||||
public EntityUid? RelayEntity;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Contains network state for <see cref="InteractionRelayComponent"/>
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class InteractionRelayComponentState : ComponentState
|
||||
{
|
||||
public NetEntity? RelayEntity;
|
||||
|
||||
public InteractionRelayComponentState(NetEntity? relayEntity)
|
||||
{
|
||||
RelayEntity = relayEntity;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user