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

@@ -4,7 +4,7 @@
/// This is used for recharging all nearby batteries when activated
/// </summary>
[RegisterComponent]
public sealed class ChargeBatteryArtifactComponent : Component
public sealed partial class ChargeBatteryArtifactComponent : Component
{
/// <summary>
/// The radius of entities that will be affected

View File

@@ -12,7 +12,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// random chemicals upon being triggered.
/// </summary>
[RegisterComponent, Access(typeof(ChemicalPuddleArtifactSystem))]
public sealed class ChemicalPuddleArtifactComponent : Component
public sealed partial class ChemicalPuddleArtifactComponent : Component
{
/// <summary>
/// The solution where all the chemicals are stored

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// When activated, damages nearby entities.
/// </summary>
[RegisterComponent]
public sealed class DamageNearbyArtifactComponent : Component
public sealed partial class DamageNearbyArtifactComponent : Component
{
/// <summary>
/// The radius of entities that will be affected

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// </summary>
[RegisterComponent]
[Access(typeof(EmpArtifactSystem))]
public sealed class EmpArtifactComponent : Component
public sealed partial class EmpArtifactComponent : Component
{
[DataField("range"), ViewVariables(VVAccess.ReadWrite)]
public float Range = 4f;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// Generates foam from the artifact when activated
/// </summary>
[RegisterComponent, Access(typeof(FoamArtifactSystem))]
public sealed class FoamArtifactComponent : Component
public sealed partial class FoamArtifactComponent : Component
{
/// <summary>
/// The list of reagents that will randomly be picked from

View File

@@ -6,7 +6,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// Spawn a random gas with random temperature when artifact activated.
/// </summary>
[RegisterComponent]
public sealed class GasArtifactComponent : Component
public sealed partial class GasArtifactComponent : Component
{
/// <summary>
/// Gas that will be spawned when artifact activated.

View File

@@ -4,7 +4,7 @@
/// Artifact that ignites surrounding entities when triggered.
/// </summary>
[RegisterComponent]
public sealed class IgniteArtifactComponent : Component
public sealed partial class IgniteArtifactComponent : Component
{
[DataField("range")]
public float Range = 2f;

View File

@@ -4,7 +4,7 @@
/// This is used for using the "knock" spell when the artifact is activated
/// </summary>
[RegisterComponent]
public sealed class KnockArtifactComponent : Component
public sealed partial class KnockArtifactComponent : Component
{
/// <summary>
/// The range of the spell

View File

@@ -4,7 +4,7 @@
/// Flickers all the lights within a certain radius.
/// </summary>
[RegisterComponent]
public sealed class LightFlickerArtifactComponent : Component
public sealed partial class LightFlickerArtifactComponent : Component
{
/// <summary>
/// Lights within this radius will be flickered on activation

View File

@@ -5,6 +5,6 @@
/// and such.
/// </summary>
[RegisterComponent]
public sealed class PhasingArtifactComponent : Component
public sealed partial class PhasingArtifactComponent : Component
{
}

View File

@@ -1,7 +1,7 @@
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
[RegisterComponent]
public sealed class RandomInstrumentArtifactComponent : Component
public sealed partial class RandomInstrumentArtifactComponent : Component
{
}

View File

@@ -5,7 +5,7 @@
/// to a random position within a certain radius
/// </summary>
[RegisterComponent]
public sealed class RandomTeleportArtifactComponent : Component
public sealed partial class RandomTeleportArtifactComponent : Component
{
/// <summary>
/// The max distance that the artifact will teleport.

View File

@@ -5,7 +5,7 @@
/// within a certain radius.
/// </summary>
[RegisterComponent]
public sealed class ShuffleArtifactComponent : Component
public sealed partial class ShuffleArtifactComponent : Component
{
[DataField("radius")]
public float Radius = 7.5f;

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// It could be an angry mob or some random item.
/// </summary>
[RegisterComponent]
public sealed class SpawnArtifactComponent : Component
public sealed partial class SpawnArtifactComponent : Component
{
[DataField("spawns")]
public List<EntitySpawnEntry>? Spawns;

View File

@@ -5,7 +5,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// Thoughts are shown as popups and unique for each player.
/// </summary>
[RegisterComponent]
public sealed class TelepathicArtifactComponent : Component
public sealed partial class TelepathicArtifactComponent : Component
{
/// <summary>
/// Loc string ids of telepathic messages.

View File

@@ -6,7 +6,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
/// Change atmospherics temperature until it reach target.
/// </summary>
[RegisterComponent]
public sealed class TemperatureArtifactComponent : Component
public sealed partial class TemperatureArtifactComponent : Component
{
[DataField("targetTemp"), ViewVariables(VVAccess.ReadWrite)]
public float TargetTemperature = Atmospherics.T0C;

View File

@@ -5,7 +5,7 @@
/// Also pries nearby tiles.
/// </summary>
[RegisterComponent]
public sealed class ThrowArtifactComponent : Component
public sealed partial class ThrowArtifactComponent : Component
{
/// <summary>
/// How close do you have to be to get yeeted?

View File

@@ -4,7 +4,7 @@
/// This is used for an artifact that triggers when activated.
/// </summary>
[RegisterComponent]
public sealed class TriggerArtifactComponent : Component
public sealed partial class TriggerArtifactComponent : Component
{
}