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

@@ -7,7 +7,7 @@ namespace Content.Shared.Silicons.Borgs.Components;
/// that can be inserted into a borg to transfer a mind.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
public sealed class BorgBrainComponent : Component
public sealed partial class BorgBrainComponent : Component
{
}

View File

@@ -7,7 +7,7 @@ namespace Content.Shared.Silicons.Borgs.Components;
/// to give them unique abilities and attributes.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
public sealed class BorgModuleComponent : Component
public sealed partial class BorgModuleComponent : Component
{
/// <summary>
/// The entity this module is installed into

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Silicons.Borgs.Components;
/// This is used for a <see cref="BorgModuleComponent"/> that provides items to the entity it's installed into.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
public sealed class ItemBorgModuleComponent : Component
public sealed partial class ItemBorgModuleComponent : Component
{
/// <summary>
/// The items that are provided.

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Silicons.Borgs.Components;
/// Used for borg stuff.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
public sealed class MMIComponent : Component
public sealed partial class MMIComponent : Component
{
/// <summary>
/// The ID of the itemslot that holds the brain.

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Silicons.Borgs.Components;
/// This is used for <see cref="BorgModuleComponent"/>s that can be "swapped" to, as opposed to having passive effects.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
public sealed class SelectableBorgModuleComponent : Component
public sealed partial class SelectableBorgModuleComponent : Component
{
/// <summary>
/// The sidebar action for swapping to this module.
@@ -24,7 +24,7 @@ public sealed class SelectableBorgModuleComponent : Component
};
}
public sealed class BorgModuleActionSelectedEvent : InstantActionEvent
public sealed partial class BorgModuleActionSelectedEvent : InstantActionEvent
{
}

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Silicons.Bots;
/// </summary>
[RegisterComponent]
[Access(typeof(MedibotSystem))]
public sealed class MedibotComponent : Component
public sealed partial class MedibotComponent : Component
{
/// <summary>
/// Med the bot will inject when UNDER the standard med damage threshold.

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Silicons.Laws.Components;
/// This is used for an entity that grants a special "obey" law when emagge.d
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedSiliconLawSystem))]
public sealed class EmagSiliconLawComponent : Component
public sealed partial class EmagSiliconLawComponent : Component
{
/// <summary>
/// The name of the person who emagged this law provider.

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Silicons.Laws.Components;
/// This is used for entities which are bound to silicon laws and can view them.
/// </summary>
[RegisterComponent, Access(typeof(SharedSiliconLawSystem))]
public sealed class SiliconLawBoundComponent : Component
public sealed partial class SiliconLawBoundComponent : Component
{
/// <summary>
/// The sidebar action that toggles the laws screen.
@@ -48,7 +48,7 @@ public record struct GetSiliconLawsEvent(EntityUid Entity)
public bool Handled = false;
}
public sealed class ToggleLawsScreenEvent : InstantActionEvent
public sealed partial class ToggleLawsScreenEvent : InstantActionEvent
{
}

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Silicons.Laws.Components;
/// This is used for an entity which grants laws to a <see cref="SiliconLawBoundComponent"/>
/// </summary>
[RegisterComponent, Access(typeof(SharedSiliconLawSystem))]
public sealed class SiliconLawProviderComponent : Component
public sealed partial class SiliconLawProviderComponent : Component
{
/// <summary>
/// The laws that are provided.

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Silicons.Laws;
[Virtual, DataDefinition]
[Serializable, NetSerializable]
public class SiliconLaw : IComparable<SiliconLaw>
public partial class SiliconLaw : IComparable<SiliconLaw>
{
/// <summary>
/// A locale string which is the actual text of the law.
@@ -49,7 +49,7 @@ public sealed class SiliconLawPrototype : SiliconLaw, IPrototype
{
/// <inheritdoc/>
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
}