Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Content.Shared.Radio.Components;
|
||||
/// It should be used for intercoms and other radios in future.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class EncryptionKeyComponent : Component
|
||||
public sealed partial class EncryptionKeyComponent : Component
|
||||
{
|
||||
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
||||
public HashSet<string> Channels = new();
|
||||
@@ -18,5 +18,5 @@ public sealed class EncryptionKeyComponent : Component
|
||||
/// This is the channel that will be used when using the default/department prefix (<see cref="SharedChatSystem.DefaultChannelKey"/>).
|
||||
/// </summary>
|
||||
[DataField("defaultChannel", customTypeSerializer: typeof(PrototypeIdSerializer<RadioChannelPrototype>))]
|
||||
public readonly string? DefaultChannel;
|
||||
public string? DefaultChannel;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Shared.Radio.Components;
|
||||
/// This component is by entities that can contain encryption keys
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class EncryptionKeyHolderComponent : Component
|
||||
public sealed partial class EncryptionKeyHolderComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not encryption keys can be removed from the headset.
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Radio.Components;
|
||||
/// This component relays radio messages to the parent entity's chat when equipped.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class HeadsetComponent : Component
|
||||
public sealed partial class HeadsetComponent : Component
|
||||
{
|
||||
[DataField("enabled")]
|
||||
public bool Enabled = true;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Shared.Radio.Components;
|
||||
/// Handles intercom ui and is authoritative on the channels an intercom can access.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class IntercomComponent : Component
|
||||
public sealed partial class IntercomComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Does this intercom require popwer to function
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
namespace Content.Shared.Radio.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Entities with <see cref="TelecomServerComponent"/> are needed to transmit messages using headsets.
|
||||
/// Entities with <see cref="TelecomServerComponent"/> are needed to transmit messages using headsets.
|
||||
/// They also need to be powered by <see cref="ApcPowerReceiverComponent"/>
|
||||
/// have <see cref="EncryptionKeyHolderComponent"/> and filled with encryption keys
|
||||
/// of channels in order for them to work on the same map as server.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class TelecomServerComponent : Component
|
||||
public sealed partial class TelecomServerComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user