BlobFloorPlanBuilderComponent.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Content.Server.Worldgen.Systems.Debris;
  2. using Content.Shared.Maps;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
  4. namespace Content.Server.Worldgen.Components.Debris;
  5. /// <summary>
  6. /// This is used for constructing asteroid debris.
  7. /// </summary>
  8. [RegisterComponent]
  9. [Access(typeof(BlobFloorPlanBuilderSystem))]
  10. public sealed partial class BlobFloorPlanBuilderComponent : Component
  11. {
  12. /// <summary>
  13. /// The probability that placing a floor tile will add up to three-four neighboring tiles as well.
  14. /// </summary>
  15. [DataField("blobDrawProb")] public float BlobDrawProb;
  16. /// <summary>
  17. /// The maximum radius for the structure.
  18. /// </summary>
  19. [DataField("radius", required: true)] public float Radius;
  20. /// <summary>
  21. /// The tiles to be used for the floor plan.
  22. /// </summary>
  23. [DataField("floorTileset", required: true,
  24. customTypeSerializer: typeof(PrototypeIdListSerializer<ContentTileDefinition>))]
  25. public List<string> FloorTileset { get; private set; } = default!;
  26. /// <summary>
  27. /// The number of floor tiles to place when drawing the asteroid layout.
  28. /// </summary>
  29. [DataField("floorPlacements", required: true)]
  30. public int FloorPlacements { get; private set; }
  31. }