BiomeMetaLayer.cs 871 B

123456789101112131415161718192021222324252627
  1. using Robust.Shared.Noise;
  2. using Robust.Shared.Serialization;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Shared.Parallax.Biomes.Layers;
  5. /// <summary>
  6. /// Contains more biome layers recursively via a biome template.
  7. /// Can be used for sub-biomes.
  8. /// </summary>
  9. [Serializable, NetSerializable]
  10. public sealed partial class BiomeMetaLayer : IBiomeLayer
  11. {
  12. [DataField("noise")]
  13. public FastNoiseLite Noise { get; private set; } = new(0);
  14. /// <inheritdoc/>
  15. [DataField("threshold")]
  16. public float Threshold { get; private set; } = -1f;
  17. /// <inheritdoc/>
  18. [DataField("invert")]
  19. public bool Invert { get; private set; }
  20. [DataField("template", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<BiomeTemplatePrototype>))]
  21. public string Template = string.Empty;
  22. }