Procgen biomes (#13487)
* Planetmap tiles Biomes etc etc * a * oop * Chunk-based rendering * funny * Less allocations * Fix overdraw * Content tile edge support Also updated grass to use it as a POC. * Kindly revert * Update for variant edges * fixes * Use fastnoise * Remove redundant group * a * refactor a fair bit * Prototype data instead * tweaks * a * fix maths * working * a * Slightly better empty support * a * flowers * sounds * lewd * Networking * more fixes * better * colours * Some chunk loading * Proper loading and unloading * Better loading * Fix parallax and movement sounds * Anchoring support + decal setup * Most of the way to load and unload * Decal loading kinda werkin * large trees * started diffing * a * Variant support and deserts * a * snow * agony, even * working again * todo * a * laba tiles * aeiou * a # Conflicts: # Resources/Prototypes/Entities/Tiles/planet.yml # Resources/Prototypes/Tiles/planet.yml # Resources/Textures/Tiles/Planet/Lava/lava.rsi/meta.json * laba * Add lava * Initial ignition * triggers * a * a * y * Add basalt tiles Did some unconventional things for the animation + rocks. * fixies * mergies * promotion * lava biome * Lava planet start * cleanup and more lava * laba * maccas * biome stuf * weh * bongflicts * aeaeae * More fixes * a * these too
This commit is contained in:
39
Content.Shared/Parallax/Biomes/BiomeComponent.cs
Normal file
39
Content.Shared/Parallax/Biomes/BiomeComponent.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Parallax.Biomes;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class BiomeComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("seed")]
|
||||
public int Seed;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite),
|
||||
DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<BiomePrototype>))]
|
||||
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.
|
||||
|
||||
/// <summary>
|
||||
/// 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]
|
||||
/// </summary>
|
||||
[DataField("modifiedTiles")]
|
||||
public Dictionary<Vector2i, HashSet<Vector2i>> ModifiedTiles = new();
|
||||
|
||||
/// <summary>
|
||||
/// Decals that have been loaded as a part of this biome.
|
||||
/// </summary>
|
||||
[DataField("decals")]
|
||||
public Dictionary<Vector2i, Dictionary<uint, Vector2i>> LoadedDecals = new();
|
||||
|
||||
[DataField("entities")]
|
||||
public Dictionary<Vector2i, List<EntityUid>> LoadedEntities = new();
|
||||
|
||||
/// <summary>
|
||||
/// Currently active chunks
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public readonly HashSet<Vector2i> LoadedChunks = new();
|
||||
}
|
||||
Reference in New Issue
Block a user