NoiseRangeCarverComponent.cs 1.1 KB

12345678910111213141516171819202122232425262728
  1. using System.Numerics;
  2. using Content.Server.Worldgen.Prototypes;
  3. using Content.Server.Worldgen.Systems.Carvers;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  5. namespace Content.Server.Worldgen.Components.Carvers;
  6. /// <summary>
  7. /// This is used for carving out empty space in the game world, providing byways through the debris field.
  8. /// </summary>
  9. [RegisterComponent]
  10. [Access(typeof(NoiseRangeCarverSystem))]
  11. public sealed partial class NoiseRangeCarverComponent : Component
  12. {
  13. /// <summary>
  14. /// The noise channel to use as a density controller.
  15. /// </summary>
  16. /// <remarks>This noise channel should be mapped to exactly the range [0, 1] unless you want a lot of warnings in the log.</remarks>
  17. [DataField("noiseChannel", customTypeSerializer: typeof(PrototypeIdSerializer<NoiseChannelPrototype>))]
  18. public string NoiseChannel { get; private set; } = default!;
  19. /// <summary>
  20. /// The index of ranges in which to cut debris generation.
  21. /// </summary>
  22. [DataField("ranges", required: true)]
  23. public List<Vector2> Ranges { get; private set; } = default!;
  24. }