Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Content.Shared.Damage.Prototypes
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// List of damage groups that are supported by this container.
|
||||
|
||||
@@ -18,6 +18,6 @@ namespace Content.Shared.Damage.Prototypes
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("damageTypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<DamageTypePrototype>))]
|
||||
public List<string> DamageTypes { get; } = default!;
|
||||
public List<string> DamageTypes { get; private set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,6 @@ namespace Content.Shared.Damage.Prototypes
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Damage.Prototypes
|
||||
public sealed class DamageTypePrototype : IPrototype
|
||||
{
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The price for each 1% damage reduction in armors
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Damage.Prototypes;
|
||||
public sealed class ExaminableDamagePrototype : IPrototype
|
||||
{
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// List of damage messages IDs sorted by severity.
|
||||
|
||||
Reference in New Issue
Block a user