using Content.Shared.Procedural.Distance;
using Robust.Shared.Noise;
namespace Content.Shared.Procedural.DungeonGenerators;
///
/// Generates dungeon flooring based on the specified noise.
///
public sealed partial class NoiseDunGen : IDunGenLayer
{
/*
* Floodfills out from 0 until it finds a valid tile.
* From here it then floodfills until it can no longer fill in an area and generates a dungeon from that.
*/
// At some point we may want layers masking each other like a simpler version of biome code but for now
// we'll just make it circular.
///
/// How many areas of noise to fill out. Useful if we just want 1 blob area to fill out.
///
[DataField]
public int Iterations = int.MaxValue;
///
/// Cap on how many tiles to include.
///
[DataField]
public int TileCap = 128;
///
/// Standard deviation of tilecap.
///
[DataField]
public float CapStd = 8f;
[DataField(required: true)]
public List Layers = new();
}
[DataRecord]
public record struct NoiseDunGenLayer
{
///
/// If the noise value is above this then it gets output.
///
[DataField]
public float Threshold;
[DataField(required: true)]
public string Tile;
[DataField(required: true)]
public FastNoiseLite Noise;
}