Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
namespace Content.Server.NPC.Queries.Curves;
|
||||
|
||||
public sealed class BoolCurve : IUtilityCurve
|
||||
public sealed partial class BoolCurve : IUtilityCurve
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Content.Server.NPC.Queries.Curves;
|
||||
|
||||
[ImplicitDataDefinitionForInheritors]
|
||||
public interface IUtilityCurve
|
||||
public partial interface IUtilityCurve
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Content.Server.NPC.Queries.Curves;
|
||||
|
||||
public sealed class InverseBoolCurve : IUtilityCurve
|
||||
public sealed partial class InverseBoolCurve : IUtilityCurve
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
|
||||
namespace Content.Server.NPC.Queries.Curves;
|
||||
|
||||
public sealed class PresetCurve : IUtilityCurve
|
||||
public sealed partial class PresetCurve : IUtilityCurve
|
||||
{
|
||||
[DataField("preset", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<UtilityCurvePresetPrototype>))] public readonly string Preset = default!;
|
||||
[DataField("preset", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<UtilityCurvePresetPrototype>))] public string Preset = default!;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
namespace Content.Server.NPC.Queries.Curves;
|
||||
|
||||
public sealed class QuadraticCurve : IUtilityCurve
|
||||
public sealed partial class QuadraticCurve : IUtilityCurve
|
||||
{
|
||||
[DataField("slope")] public readonly float Slope = 1f;
|
||||
[DataField("slope")] public float Slope = 1f;
|
||||
|
||||
[DataField("exponent")] public readonly float Exponent = 1f;
|
||||
[DataField("exponent")] public float Exponent = 1f;
|
||||
|
||||
[DataField("yOffset")] public readonly float YOffset;
|
||||
[DataField("yOffset")] public float YOffset;
|
||||
|
||||
[DataField("xOffset")] public readonly float XOffset;
|
||||
[DataField("xOffset")] public float XOffset;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user