Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user