Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Content.Server.Radio.Components;
|
||||
/// This component is required to receive radio message events.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ActiveRadioComponent : Component
|
||||
public sealed partial class ActiveRadioComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The channels that this radio is listening on.
|
||||
|
||||
@@ -7,6 +7,6 @@ namespace Content.Server.Radio.Components;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(JammerSystem))]
|
||||
public sealed class ActiveRadioJammerComponent : Component
|
||||
public sealed partial class ActiveRadioJammerComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Server.Radio.Components;
|
||||
/// channels.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class IntrinsicRadioReceiverComponent : Component
|
||||
public sealed partial class IntrinsicRadioReceiverComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace Content.Server.Radio.Components;
|
||||
/// radio headset).
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class IntrinsicRadioTransmitterComponent : Component
|
||||
public sealed partial class IntrinsicRadioTransmitterComponent : Component
|
||||
{
|
||||
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
||||
public readonly HashSet<string> Channels = new() { SharedChatSystem.CommonChannel };
|
||||
public HashSet<string> Channels = new() { SharedChatSystem.CommonChannel };
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Radio.Components;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(JammerSystem))]
|
||||
public sealed class RadioJammerComponent : Component
|
||||
public sealed partial class RadioJammerComponent : Component
|
||||
{
|
||||
[DataField("range"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float Range = 8f;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.Radio.Components;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(RadioDeviceSystem))]
|
||||
public sealed class RadioMicrophoneComponent : Component
|
||||
public sealed partial class RadioMicrophoneComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("broadcastChannel", customTypeSerializer: typeof(PrototypeIdSerializer<RadioChannelPrototype>))]
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Radio.Components;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(RadioDeviceSystem))]
|
||||
public sealed class RadioSpeakerComponent : Component
|
||||
public sealed partial class RadioSpeakerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not interacting with this entity
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Server.Radio.Components;
|
||||
/// This component is used to tag players that are currently wearing an ACTIVE headset.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class WearingHeadsetComponent : Component
|
||||
public sealed partial class WearingHeadsetComponent : Component
|
||||
{
|
||||
[DataField("headset")]
|
||||
public EntityUid Headset;
|
||||
|
||||
Reference in New Issue
Block a user