Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -9,11 +9,11 @@ namespace Content.Shared.Alert
|
||||
/// </summary>
|
||||
[Prototype("alertOrder")]
|
||||
[DataDefinition]
|
||||
public sealed class AlertOrderPrototype : IPrototype, IComparer<AlertPrototype>
|
||||
public sealed partial class AlertOrderPrototype : IPrototype, IComparer<AlertPrototype>
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
[DataField("order")]
|
||||
private (string type, string alert)[] Order
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Content.Shared.Alert
|
||||
/// minimum and incrementing upwards. If severities are not supported, the first entry is used.
|
||||
/// </summary>
|
||||
[DataField("icons", required: true)]
|
||||
public readonly List<SpriteSpecifier> Icons = new();
|
||||
public List<SpriteSpecifier> Icons = new();
|
||||
|
||||
/// <summary>
|
||||
/// Name to show in tooltip window. Accepts formatting.
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Content.Shared.Alert;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent]
|
||||
public sealed class AlertsComponent : Component
|
||||
public sealed partial class AlertsComponent : Component
|
||||
{
|
||||
[ViewVariables] public Dictionary<AlertKey, AlertState> Alerts = new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user