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