Refactor serialization copying to use source generators (#19412)

This commit is contained in:
DrSmugleaf
2023-08-22 18:14:33 -07:00
committed by GitHub
parent 08b43990ab
commit a88e747a0b
1737 changed files with 2532 additions and 2521 deletions

View File

@@ -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.

View File

@@ -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!;

View File

@@ -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!;

View File

@@ -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";

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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;

View File

@@ -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.

View File

@@ -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;