Dynamic space world generation and debris. (#15120)
* World generation (squash) * Test fixes. * command * o * Access cleanup. * Documentation touchups. * Use a prototype serializer for BiomeSelectionComponent * Struct enumerator in SimpleFloorPlanPopulatorSystem * Safety margins around PoissonDiskSampler, cookie acquisition methodologies * Struct enumerating PoissonDiskSampler; internal side * Struct enumerating PoissonDiskSampler: Finish it * Update WorldgenConfigSystem.cs awa --------- Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com> Co-authored-by: 20kdc <asdd2808@gmail.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Content.Server.Worldgen.Prototypes;
|
||||
using Content.Server.Worldgen.Systems.Debris;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Worldgen.Components.Debris;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for controlling the debris feature placer.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(DebrisFeaturePlacerSystem))]
|
||||
public sealed class DebrisFeaturePlacerControllerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not to clip debris that would spawn at a location that has a density of zero.
|
||||
/// </summary>
|
||||
[DataField("densityClip")] public bool DensityClip = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not entities are already spawned.
|
||||
/// </summary>
|
||||
public bool DoSpawns = true;
|
||||
|
||||
[DataField("ownedDebris")] public Dictionary<Vector2, EntityUid?> OwnedDebris = new();
|
||||
|
||||
/// <summary>
|
||||
/// The chance spawning a piece of debris will just be cancelled randomly.
|
||||
/// </summary>
|
||||
[DataField("randomCancelChance")] public float RandomCancellationChance = 0.1f;
|
||||
|
||||
/// <summary>
|
||||
/// Radius in which there should be no objects for debris to spawn.
|
||||
/// </summary>
|
||||
[DataField("safetyZoneRadius")] public float SafetyZoneRadius = 16.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The noise channel to use as a density controller.
|
||||
/// </summary>
|
||||
[DataField("densityNoiseChannel", customTypeSerializer: typeof(PrototypeIdSerializer<NoiseChannelPrototype>))]
|
||||
public string DensityNoiseChannel { get; } = default!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user