Update trivial components to use auto comp states (#20539)

This commit is contained in:
DrSmugleaf
2023-09-28 16:20:29 -07:00
committed by GitHub
parent 14cfe44ece
commit a44fa86b68
158 changed files with 806 additions and 2866 deletions

View File

@@ -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;
}
}