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

@@ -1,7 +1,7 @@
namespace Content.Server.Light.Components;
[RegisterComponent]
public sealed class ActiveEmergencyLightComponent : Component
public sealed partial class ActiveEmergencyLightComponent : Component
{
}

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Light.Components
/// Component that represents an emergency light, it has an internal battery that charges when the power is on.
/// </summary>
[RegisterComponent, Access(typeof(EmergencyLightSystem))]
public sealed class EmergencyLightComponent : SharedEmergencyLightComponent
public sealed partial class EmergencyLightComponent : SharedEmergencyLightComponent
{
[ViewVariables]
public EmergencyLightState State;

View File

@@ -6,7 +6,7 @@ namespace Content.Server.Light.Components
/// Component that represents a handheld expendable light which can be activated and eventually dies over time.
/// </summary>
[RegisterComponent]
public sealed class ExpendableLightComponent : SharedExpendableLightComponent
public sealed partial class ExpendableLightComponent : SharedExpendableLightComponent
{
/// <summary>
/// Status of light, whether or not it is emitting light.

View File

@@ -6,7 +6,7 @@ namespace Content.Server.Light.Components
/// A component which applies a specific behaviour to a PointLightComponent on its owner.
/// </summary>
[RegisterComponent]
public sealed class LightBehaviourComponent : SharedLightBehaviourComponent
public sealed partial class LightBehaviourComponent : SharedLightBehaviourComponent
{
}

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Light.Components;
/// Can be reloaded by new light tubes or light bulbs
/// </summary>
[RegisterComponent, Access(typeof(LightReplacerSystem))]
public sealed class LightReplacerComponent : Component
public sealed partial class LightReplacerComponent : Component
{
[DataField("sound")]
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Weapons/click.ogg")

View File

@@ -9,7 +9,7 @@ namespace Content.Server.Light.Components
/// state of an entity.
/// </summary>
[RegisterComponent, Access(typeof(PoweredLightSystem))]
public sealed class LitOnPoweredComponent : Component
public sealed partial class LitOnPoweredComponent : Component
{
}
}

View File

@@ -3,7 +3,7 @@
// TODO make changes in icons when different threshold reached
// e.g. different icons for 10% 50% 100%
[RegisterComponent]
public sealed class MatchboxComponent : Component
public sealed partial class MatchboxComponent : Component
{
}
}

View File

@@ -6,7 +6,7 @@ namespace Content.Server.Light.Components
{
[RegisterComponent]
[Access(typeof(MatchstickSystem))]
public sealed class MatchstickComponent : Component
public sealed partial class MatchstickComponent : Component
{
/// <summary>
/// Current state to matchstick. Can be <code>Unlit</code>, <code>Lit</code> or <code>Burnt</code>.

View File

@@ -13,7 +13,7 @@ namespace Content.Server.Light.Components
/// Component that represents a wall light. It has a light bulb that can be replaced when broken.
/// </summary>
[RegisterComponent, Access(typeof(PoweredLightSystem))]
public sealed class PoweredLightComponent : Component
public sealed partial class PoweredLightComponent : Component
{
[DataField("burnHandSound")]
public SoundSpecifier BurnHandSound = new SoundPathSpecifier("/Audio/Effects/lightburn.ogg");