Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Content.Shared.Atmos.Prototypes
|
||||
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Specific heat for gas.
|
||||
@@ -39,7 +39,7 @@ namespace Content.Shared.Atmos.Prototypes
|
||||
/// Minimum amount of moles for this gas to be visible.
|
||||
/// </summary>
|
||||
[DataField("gasMolesVisible")]
|
||||
public float GasMolesVisible { get; } = 0.25f;
|
||||
public float GasMolesVisible { get; private set; } = 0.25f;
|
||||
|
||||
/// <summary>
|
||||
/// Visibility for this gas will be max after this value.
|
||||
@@ -53,7 +53,7 @@ namespace Content.Shared.Atmos.Prototypes
|
||||
/// If this reagent is in gas form, this is the path to the overlay that will be used to make the gas visible.
|
||||
/// </summary>
|
||||
[DataField("gasOverlayTexture")]
|
||||
public string GasOverlayTexture { get; } = string.Empty;
|
||||
public string GasOverlayTexture { get; private set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// If this reagent is in gas form, this will be the path to the RSI sprite that will be used to make the gas visible.
|
||||
@@ -71,15 +71,15 @@ namespace Content.Shared.Atmos.Prototypes
|
||||
/// Path to the tile overlay used when this gas appears visible.
|
||||
/// </summary>
|
||||
[DataField("overlayPath")]
|
||||
public string OverlayPath { get; } = string.Empty;
|
||||
public string OverlayPath { get; private set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The reagent that this gas will turn into when inhaled.
|
||||
/// </summary>
|
||||
[DataField("reagent", customTypeSerializer:typeof(PrototypeIdSerializer<ReagentPrototype>))]
|
||||
public string? Reagent { get; } = default!;
|
||||
public string? Reagent { get; private set; } = default!;
|
||||
|
||||
[DataField("color")] public string Color { get; } = string.Empty;
|
||||
[DataField("color")] public string Color { get; private set; } = string.Empty;
|
||||
|
||||
[DataField("pricePerMole")]
|
||||
public float PricePerMole { get; set; } = 0;
|
||||
|
||||
Reference in New Issue
Block a user