Update trivial components to use auto comp states (#20539)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user