Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
namespace Content.Server.DeviceLinking.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class ActiveSignalTimerComponent : Component
|
||||
public sealed partial class ActiveSignalTimerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The time the timer triggers.
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Content.Server.DeviceLinking.Components;
|
||||
/// This is used for automatic linkage with buttons and other transmitters.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class AutoLinkReceiverComponent : Component
|
||||
public sealed partial class AutoLinkReceiverComponent : Component
|
||||
{
|
||||
[DataField("channel", required: true)]
|
||||
public string AutoLinkChannel = default!;
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Content.Server.DeviceLinking.Components;
|
||||
/// This is used for automatic linkage with various receivers, like shutters.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class AutoLinkTransmitterComponent : Component
|
||||
public sealed partial class AutoLinkTransmitterComponent : Component
|
||||
{
|
||||
[DataField("channel", required: true)]
|
||||
public string AutoLinkChannel = default!;
|
||||
|
||||
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Server.DeviceLinking.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class DoorSignalControlComponent : Component
|
||||
public sealed partial class DoorSignalControlComponent : Component
|
||||
{
|
||||
[DataField("openPort", customTypeSerializer: typeof(PrototypeIdSerializer<SinkPortPrototype>))]
|
||||
public string OpenPort = "Open";
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.DeviceLinking.Components;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(EdgeDetectorSystem))]
|
||||
public sealed class EdgeDetectorComponent : Component
|
||||
public sealed partial class EdgeDetectorComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the input port.
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.DeviceLinking.Components;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(LogicGateSystem))]
|
||||
public sealed class LogicGateComponent : Component
|
||||
public sealed partial class LogicGateComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The logic gate operation to use.
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.DeviceLinking.Components.Overload;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(DeviceLinkOverloadSystem))]
|
||||
public sealed class SoundOnOverloadComponent : Component
|
||||
public sealed partial class SoundOnOverloadComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Sound to play when the device overloads
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.DeviceLinking.Components.Overload;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(DeviceLinkOverloadSystem))]
|
||||
public sealed class SpawnOnOverloadComponent : Component
|
||||
public sealed partial class SpawnOnOverloadComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity prototype to spawn when the device overloads
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.DeviceLinking.Components;
|
||||
/// same port regardless of its state.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SignalSwitchSystem))]
|
||||
public sealed class SignalSwitchComponent : Component
|
||||
public sealed partial class SignalSwitchComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The port that gets signaled when the switch turns on.
|
||||
|
||||
@@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Server.DeviceLinking.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class SignalTimerComponent : Component
|
||||
public sealed partial class SignalTimerComponent : Component
|
||||
{
|
||||
[DataField("delay"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public double Delay = 5;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.DeviceLinking.Components
|
||||
/// Sends out a signal to machine linked objects.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SignallerComponent : Component
|
||||
public sealed partial class SignallerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The port that gets signaled when the switch turns on.
|
||||
|
||||
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Server.DeviceLinking.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class TwoWayLeverComponent : Component
|
||||
public sealed partial class TwoWayLeverComponent : Component
|
||||
{
|
||||
[DataField("state")]
|
||||
public TwoWayLeverState State;
|
||||
|
||||
Reference in New Issue
Block a user