using Robust.Shared.GameStates; using Robust.Shared.Noise; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Parallax.Biomes; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] public sealed partial class BiomeComponent : Component { public FastNoiseLite Noise = new(); [ViewVariables(VVAccess.ReadWrite), DataField("seed")] [AutoNetworkedField] public int Seed; [ViewVariables(VVAccess.ReadWrite), DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer))] [AutoNetworkedField] public string BiomePrototype = "Grasslands"; // TODO: Need to flag tiles as not requiring custom data anymore, e.g. if we spawn an ent and don't unspawn it. /// /// If we've already generated a tile and couldn't deload it then we won't ever reload it in future. /// Stored by [Chunkorigin, Tiles] /// [DataField("modifiedTiles")] public Dictionary> ModifiedTiles = new(); /// /// Decals that have been loaded as a part of this biome. /// [DataField("decals")] public Dictionary> LoadedDecals = new(); [DataField("entities")] public Dictionary> LoadedEntities = new(); /// /// Currently active chunks /// [DataField("loadedChunks")] public readonly HashSet LoadedChunks = new(); /// /// Are we currently in the process of generating? /// Used to flag modified tiles without callers having to deal with it. /// public bool Generating = false; }