Update trivial components to use auto comp states (#20539)
This commit is contained in:
@@ -1,31 +1,18 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Shared.Materials;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class InsertingMaterialStorageComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The time when insertion ends.
|
||||
/// </summary>
|
||||
[DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public TimeSpan EndTime;
|
||||
|
||||
[ViewVariables]
|
||||
[ViewVariables, AutoNetworkedField]
|
||||
public Color? MaterialColor;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class InsertingMaterialStorageComponentState : ComponentState
|
||||
{
|
||||
public TimeSpan EndTime;
|
||||
public Color? MaterialColor;
|
||||
|
||||
public InsertingMaterialStorageComponentState(TimeSpan endTime, Color? materialColor)
|
||||
{
|
||||
EndTime = endTime;
|
||||
MaterialColor = materialColor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user