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

@@ -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

View File

@@ -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.

View File

@@ -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();