Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -6,7 +6,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts;
|
||||
|
||||
[RegisterComponent, Access(typeof(ArtifactSystem))]
|
||||
public sealed class ArtifactComponent : Component
|
||||
public sealed partial class ArtifactComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Every node contained in the tree
|
||||
@@ -97,7 +97,7 @@ public sealed class ArtifactComponent : Component
|
||||
/// A single "node" of an artifact that contains various data about it.
|
||||
/// </summary>
|
||||
[DataDefinition]
|
||||
public sealed class ArtifactNode : ICloneable
|
||||
public sealed partial class ArtifactNode : ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// A numeric id corresponding to each node.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
/// and such.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class PhasingArtifactComponent : Component
|
||||
public sealed partial class PhasingArtifactComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class RandomInstrumentArtifactComponent : Component
|
||||
public sealed partial class RandomInstrumentArtifactComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/// Not every trigger can be a winner
|
||||
/// </remarks>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactAnchorTriggerComponent : Component
|
||||
public sealed partial class ArtifactAnchorTriggerComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
/// Triggers when a certain threshold of damage of certain types is reached
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactDamageTriggerComponent : Component
|
||||
public sealed partial class ArtifactDamageTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// What damage types are accumulated for the trigger?
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// Triggers when a nearby entity dies
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactDeathTriggerComponent : Component
|
||||
public sealed partial class ArtifactDeathTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// How close to the death the artifact has to be for it to trigger.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/// It could be connected MV cables, stun baton or multi tool.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactElectricityTriggerComponent : Component
|
||||
public sealed partial class ArtifactElectricityTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// How much power should artifact receive to operate.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// Triggers when the artifact is examined.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactExamineTriggerComponent : Component
|
||||
public sealed partial class ArtifactExamineTriggerComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
/// Activates artifact when it surrounded by certain gas.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactGasTriggerComponent : Component
|
||||
public sealed partial class ArtifactGasTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// List of possible activation gases to pick on startup.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/// has contacted with a hot object (lit welder, lighter, etc).
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactHeatTriggerComponent : Component
|
||||
public sealed partial class ArtifactHeatTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Minimal surrounding gas temperature to trigger artifact.
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
/// Activate artifact by touching, attacking or pulling it.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactInteractionTriggerComponent : Component
|
||||
public sealed partial class ArtifactInteractionTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Should artifact be activated just by touching with empty hand?
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
/// Triggers when the artifact lands after being thrown.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactLandTriggerComponent : Component
|
||||
public sealed partial class ArtifactLandTriggerComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// Triggers when the salvage magnet is activated
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactMagnetTriggerComponent : Component
|
||||
public sealed partial class ArtifactMagnetTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// how close to the magnet do you have to be?
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
/// Triggers when an item artifact is microwaved.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactMicrowaveTriggerComponent : Component
|
||||
public sealed partial class ArtifactMicrowaveTriggerComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// Triggers when an instrument is played nearby
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactMusicTriggerComponent : Component
|
||||
public sealed partial class ArtifactMusicTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// how close does the artifact have to be to the instrument to activate
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// Triggers when a certain pressure threshold is hit
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactPressureTriggerComponent : Component
|
||||
public sealed partial class ArtifactPressureTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The lower-end pressure threshold
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/// Doesn't used for random artifacts, can be spawned by admins.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactTimerTriggerComponent : Component
|
||||
public sealed partial class ArtifactTimerTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Time between artifact activation attempts.
|
||||
|
||||
Reference in New Issue
Block a user