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

@@ -10,11 +10,11 @@ namespace Content.Shared.Xenoarchaeology.XenoArtifacts;
/// </summary>
[Prototype("artifactEffect")]
[DataDefinition]
public sealed class ArtifactEffectPrototype : IPrototype
public sealed partial class ArtifactEffectPrototype : IPrototype
{
/// <inheritdoc/>
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
/// <summary>
/// Components that are added to the artifact when the specfic effect is active.

View File

@@ -10,11 +10,11 @@ namespace Content.Shared.Xenoarchaeology.XenoArtifacts;
/// </summary>
[Prototype("artifactTrigger")]
[DataDefinition]
public sealed class ArtifactTriggerPrototype : IPrototype
public sealed partial class ArtifactTriggerPrototype : IPrototype
{
/// <inheritdoc/>
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
[DataField("components", serverOnly: true)]
public ComponentRegistry Components = new();

View File

@@ -1,7 +1,7 @@
namespace Content.Shared.Xenoarchaeology.XenoArtifacts;
[RegisterComponent]
public sealed class RandomArtifactSpriteComponent : Component
public sealed partial class RandomArtifactSpriteComponent : Component
{
[DataField("minSprite")]
public int MinSprite = 1;

View File

@@ -13,6 +13,6 @@ public enum SharedArtifactsVisuals : byte
/// <summary>
/// Raised as an instant action event when a sentient artifact activates itself using an action.
/// </summary>
public sealed class ArtifactSelfActivateEvent : InstantActionEvent
public sealed partial class ArtifactSelfActivateEvent : InstantActionEvent
{
}