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

@@ -8,7 +8,7 @@ namespace Content.Server.Weapons.Melee.Balloon;
/// This is used for weapons that pop balloons on attack.
/// </summary>
[RegisterComponent]
public sealed class BalloonPopperComponent : Component
public sealed partial class BalloonPopperComponent : Component
{
/// <summary>
/// The tag that marks something as a balloon.

View File

@@ -4,7 +4,7 @@ using Robust.Shared.Audio;
namespace Content.Server.Weapons.Melee.EnergySword;
[RegisterComponent]
internal sealed class EnergySwordComponent : Component
internal sealed partial class EnergySwordComponent : Component
{
public Color BladeColor = Color.DodgerBlue;

View File

@@ -4,7 +4,7 @@ using Robust.Shared.Audio;
namespace Content.Server.Weapons.Melee.WeaponRandom;
[RegisterComponent]
internal sealed class WeaponRandomComponent : Component
internal sealed partial class WeaponRandomComponent : Component
{
/// <summary>

View File

@@ -3,4 +3,4 @@ using Content.Shared.Weapons.Ranged.Components;
namespace Content.Server.Weapons.Ranged.Components;
[RegisterComponent]
public sealed class AmmoCounterComponent : SharedAmmoCounterComponent {}
public sealed partial class AmmoCounterComponent : SharedAmmoCounterComponent {}

View File

@@ -28,10 +28,10 @@ public sealed partial class BatteryWeaponFireModesComponent : Component
}
[DataDefinition]
public sealed class BatteryWeaponFireMode
public sealed partial class BatteryWeaponFireMode
{
/// <summary>
/// The projectile prototype associated with this firing mode
/// The projectile prototype associated with this firing mode
/// </summary>
[DataField("proto", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string Prototype = default!;

View File

@@ -1,7 +1,7 @@
namespace Content.Server.Weapons.Ranged.Components
{
[RegisterComponent]
public sealed class ChemicalAmmoComponent : Component
public sealed partial class ChemicalAmmoComponent : Component
{
public const string DefaultSolutionName = "ammo";

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Weapons.Ranged.Components;
/// Plays the specified sound upon receiving damage of that type.
/// </summary>
[RegisterComponent]
public sealed class RangedDamageSoundComponent : Component
public sealed partial class RangedDamageSoundComponent : Component
{
// TODO: Limb damage changing sound type.