using Robust.Shared.Prototypes;
namespace Content.Shared.Procedural.Components;
///
/// A layer inside of
///
[DataRecord]
public sealed record BiomeMetaLayer
{
///
/// Chunk dimensions for this meta layer. Will try to infer it from the first layer of the dungeon if null.
///
[DataField]
public int? Size;
///
/// Meta layers that this one requires to be loaded first.
/// Will ensure all of the chunks for our corresponding area are loaded.
///
public List? DependsOn;
///
/// Can this layer be unloaded if no one is in range.
///
public bool CanUnload = true;
///
/// Dungeon config to load inside the specified area.
///
[DataField(required: true)]
public ProtoId Dungeon = new();
}
[RegisterComponent]
public sealed partial class BiomeComponent : Component
{
///
/// Can we load / unload chunks.
///
[DataField]
public bool Enabled = true;
///
/// Areas queued for preloading. Will add these during and then flag as modified so they retain.
///
[DataField]
public List PreloadAreas = new();
///
/// Is there currently a job that's loading.
///
public bool Loading = false;
[DataField]
public int Seed;
///
/// Layer key and associated data.
///
[DataField(required: true)]
public Dictionary Layers = new();
///
/// Layer removals that are pending.
///
[DataField]
public List PendingRemovals = new();
///
/// Data that is currently loaded.
///
[DataField]
public Dictionary> LoadedData = new();
///
/// Flag modified tiles so we don't try and unload / reload them.
///
[DataField]
public HashSet ModifiedTiles = new();
///
/// Bounds loaded by players for this tick.
///
public List LoadedBounds = new();
}