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

@@ -6,7 +6,8 @@ namespace Content.Shared.Shuttles.Components;
/// <summary>
/// Handles what a grid should look like on radar.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedShuttleSystem))]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedShuttleSystem))]
public sealed partial class IFFComponent : Component
{
/// <summary>
@@ -19,13 +20,13 @@ public sealed partial class IFFComponent : Component
/// </summary>
public static readonly Color IFFColor = Color.Aquamarine;
[ViewVariables(VVAccess.ReadWrite), DataField("flags")]
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public IFFFlags Flags = IFFFlags.None;
/// <summary>
/// Color for this to show up on IFF.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("color")]
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public Color Color = IFFColor;
}

View File

@@ -3,7 +3,8 @@ using Robust.Shared.GameStates;
namespace Content.Shared.Shuttles.Components;
[RegisterComponent, NetworkedComponent, Access(typeof(SharedRadarConsoleSystem))]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedRadarConsoleSystem))]
public sealed partial class RadarConsoleComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
@@ -16,6 +17,6 @@ public sealed partial class RadarConsoleComponent : Component
.SetRange(Owner, value, this);
}
[DataField("maxRange")]
[DataField, AutoNetworkedField]
public float MaxRange = 256f;
}