Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -7,11 +7,11 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Shared.Parallax.Biomes.Layers;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class BiomeDecalLayer : IBiomeWorldLayer
|
||||
public sealed partial class BiomeDecalLayer : IBiomeWorldLayer
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
[DataField("allowedTiles", customTypeSerializer:typeof(PrototypeIdListSerializer<ContentTileDefinition>))]
|
||||
public List<string> AllowedTiles { get; } = new();
|
||||
public List<string> AllowedTiles { get; private set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Divide each tile up by this amount.
|
||||
@@ -20,14 +20,14 @@ public sealed class BiomeDecalLayer : IBiomeWorldLayer
|
||||
public float Divisions = 1f;
|
||||
|
||||
[DataField("noise")]
|
||||
public FastNoiseLite Noise { get; } = new(0);
|
||||
public FastNoiseLite Noise { get; private set; } = new(0);
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("threshold")]
|
||||
public float Threshold { get; } = 0.8f;
|
||||
public float Threshold { get; private set; } = 0.8f;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("invert")] public bool Invert { get; } = false;
|
||||
[DataField("invert")] public bool Invert { get; private set; } = false;
|
||||
|
||||
[DataField("decals", required: true, customTypeSerializer:typeof(PrototypeIdListSerializer<DecalPrototype>))]
|
||||
public List<string> Decals = new();
|
||||
|
||||
Reference in New Issue
Block a user