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

@@ -8,26 +8,26 @@ namespace Content.Shared.Atmos.Monitor;
public sealed class AtmosAlarmThresholdPrototype : IPrototype
{
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
[DataField("ignore")]
public readonly bool Ignore;
public bool Ignore;
[DataField("upperBound")]
public readonly AlarmThresholdSetting UpperBound = AlarmThresholdSetting.Disabled;
public AlarmThresholdSetting UpperBound = AlarmThresholdSetting.Disabled;
[DataField("lowerBound")]
public readonly AlarmThresholdSetting LowerBound = AlarmThresholdSetting.Disabled;
public AlarmThresholdSetting LowerBound = AlarmThresholdSetting.Disabled;
[DataField("upperWarnAround")]
public readonly AlarmThresholdSetting UpperWarningPercentage = AlarmThresholdSetting.Disabled;
public AlarmThresholdSetting UpperWarningPercentage = AlarmThresholdSetting.Disabled;
[DataField("lowerWarnAround")]
public readonly AlarmThresholdSetting LowerWarningPercentage = AlarmThresholdSetting.Disabled;
public AlarmThresholdSetting LowerWarningPercentage = AlarmThresholdSetting.Disabled;
}
[Serializable, NetSerializable, DataDefinition]
public sealed class AtmosAlarmThreshold
public sealed partial class AtmosAlarmThreshold
{
[DataField("ignore")]
public bool Ignore;
@@ -256,7 +256,7 @@ public sealed class AtmosAlarmThreshold
}
[DataDefinition, Serializable]
public readonly struct AlarmThresholdSetting
public readonly partial struct AlarmThresholdSetting
{
[DataField("enabled")]
public bool Enabled { get; init; } = true;