Add sub-biomes (#17855)
This commit is contained in:
27
Content.Shared/Parallax/Biomes/Layers/BiomeMetaLayer.cs
Normal file
27
Content.Shared/Parallax/Biomes/Layers/BiomeMetaLayer.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Robust.Shared.Noise;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Parallax.Biomes.Layers;
|
||||
|
||||
/// <summary>
|
||||
/// Contains more biome layers recursively via a biome template.
|
||||
/// Can be used for sub-biomes.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class BiomeMetaLayer : IBiomeLayer
|
||||
{
|
||||
[DataField("noise")]
|
||||
public FastNoiseLite Noise { get; } = new(0);
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("threshold")]
|
||||
public float Threshold { get; } = -1f;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("invert")]
|
||||
public bool Invert { get; }
|
||||
|
||||
[DataField("template", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<BiomeTemplatePrototype>))]
|
||||
public string Template = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user