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,24 +1,10 @@
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes;
namespace Content.Shared.BarSign
namespace Content.Shared.BarSign;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class BarSignComponent : Component
{
[RegisterComponent, NetworkedComponent]
public sealed partial class BarSignComponent : Component
{
[DataField("current", customTypeSerializer:typeof(PrototypeIdSerializer<BarSignPrototype>))]
public string? CurrentSign;
}
[Serializable, NetSerializable]
public sealed class BarSignComponentState : ComponentState
{
public string? CurrentSign;
public BarSignComponentState(string? current)
{
CurrentSign = current;
}
}
[DataField, AutoNetworkedField] public ProtoId<BarSignPrototype>? Current;
}