BiomeTileLayer.cs 890 B

1234567891011121314151617181920212223242526272829
  1. using Content.Shared.Maps;
  2. using Robust.Shared.Noise;
  3. using Robust.Shared.Prototypes;
  4. using Robust.Shared.Serialization;
  5. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  6. namespace Content.Shared.Parallax.Biomes.Layers;
  7. [Serializable, NetSerializable]
  8. public sealed partial class BiomeTileLayer : IBiomeLayer
  9. {
  10. [DataField] public FastNoiseLite Noise { get; private set; } = new(0);
  11. /// <inheritdoc/>
  12. [DataField]
  13. public float Threshold { get; private set; } = 0.5f;
  14. /// <inheritdoc/>
  15. [DataField] public bool Invert { get; private set; } = false;
  16. /// <summary>
  17. /// Which tile variants to use for this layer. Uses all of the tile's variants if none specified
  18. /// </summary>
  19. [DataField]
  20. public List<byte>? Variants = null;
  21. [DataField(required: true)]
  22. public ProtoId<ContentTileDefinition> Tile = string.Empty;
  23. }