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