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

@@ -9,7 +9,7 @@ namespace Content.Shared.Light
[NetworkedComponent]
[RegisterComponent]
[Access(typeof(SharedHandheldLightSystem))]
public sealed class HandheldLightComponent : Robust.Shared.GameObjects.Component
public sealed partial class HandheldLightComponent : Robust.Shared.GameObjects.Component
{
public byte? Level;
public bool Activated;

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Light.Component;
/// </summary>
[RegisterComponent]
[NetworkedComponent]
public sealed class LightBulbComponent : Robust.Shared.GameObjects.Component
public sealed partial class LightBulbComponent : Robust.Shared.GameObjects.Component
{
/// <summary>
/// The color of the lightbulb and the light it produces.

View File

@@ -13,7 +13,7 @@ namespace Content.Shared.Light.Component;
[NetworkedComponent]
[RegisterComponent]
[Access(typeof(SharedRgbLightControllerSystem))]
public sealed class RgbLightControllerComponent : Robust.Shared.GameObjects.Component
public sealed partial class RgbLightControllerComponent : Robust.Shared.GameObjects.Component
{
[DataField("cycleRate")]
public float CycleRate { get; set; } = 0.1f;

View File

@@ -4,7 +4,7 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Light.Component
{
[NetworkedComponent]
public abstract class SharedEmergencyLightComponent : Robust.Shared.GameObjects.Component
public abstract partial class SharedEmergencyLightComponent : Robust.Shared.GameObjects.Component
{
public bool Enabled { get; set; } = false;
}

View File

@@ -21,7 +21,7 @@ namespace Content.Shared.Light.Component
}
[NetworkedComponent]
public abstract class SharedExpendableLightComponent: Robust.Shared.GameObjects.Component
public abstract partial class SharedExpendableLightComponent: Robust.Shared.GameObjects.Component
{
public static readonly AudioParams LoopedSoundParams = new(0, 1, "Master", 62.5f, 1, 1, true, 0.3f);

View File

@@ -3,7 +3,7 @@
/// <summary>
/// A component which applies a specific behaviour to a PointLightComponent on its owner.
/// </summary>
public abstract class SharedLightBehaviourComponent : Robust.Shared.GameObjects.Component
public abstract partial class SharedLightBehaviourComponent : Robust.Shared.GameObjects.Component
{
}
}

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Light.Component;
/// It doesn't consume any power and can be toggle only by verb.
/// </summary>
[RegisterComponent]
public sealed class UnpoweredFlashlightComponent : Robust.Shared.GameObjects.Component
public sealed partial class UnpoweredFlashlightComponent : Robust.Shared.GameObjects.Component
{
[DataField("toggleFlashlightSound")]
public SoundSpecifier ToggleSound = new SoundPathSpecifier("/Audio/Items/flashlight_pda.ogg");

View File

@@ -4,6 +4,6 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Light;
[Serializable, NetSerializable]
public sealed class PoweredLightDoAfterEvent : SimpleDoAfterEvent
public sealed partial class PoweredLightDoAfterEvent : SimpleDoAfterEvent
{
}
}