Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Content.Shared.DeviceLinking;
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent] // for interactions. Actual state isn't currently synced.
|
||||
[Access(typeof(SharedDeviceLinkSystem))]
|
||||
public sealed class DeviceLinkSinkComponent : Component
|
||||
public sealed partial class DeviceLinkSinkComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The ports this sink has
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared.DeviceLinking;
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent] // for interactions. Actual state isn't currently synced.
|
||||
[Access(typeof(SharedDeviceLinkSystem))]
|
||||
public sealed class DeviceLinkSourceComponent : Component
|
||||
public sealed partial class DeviceLinkSourceComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The ports the device link source sends signals from
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Shared.DeviceLinking;
|
||||
public abstract class DevicePortPrototype
|
||||
{
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Localization string for the port name. Displayed in the linking UI.
|
||||
@@ -42,5 +42,5 @@ public sealed class SourcePortPrototype : DevicePortPrototype, IPrototype
|
||||
/// default-link functionality.
|
||||
/// </summary>
|
||||
[DataField("defaultLinks", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<SinkPortPrototype>))]
|
||||
public readonly HashSet<string>? DefaultLinks;
|
||||
public HashSet<string>? DefaultLinks;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user