Files
crystall-punk-14/Content.Shared/Procedural/PostGeneration/CorridorPostGen.cs

38 lines
953 B
C#
Raw Normal View History

using Content.Shared.Maps;
using Robust.Shared.Prototypes;
2023-06-27 19:17:42 +10:00
namespace Content.Shared.Procedural.PostGeneration;
/// <summary>
/// Connects room entrances via corridor segments.
/// </summary>
public sealed partial class CorridorPostGen : IPostDunGen
2023-06-27 19:17:42 +10:00
{
/// <summary>
/// How far we're allowed to generate a corridor before calling it.
/// </summary>
/// <remarks>
/// Given the heavy weightings this needs to be fairly large for larger dungeons.
/// </remarks>
[DataField("pathLimit")]
public int PathLimit = 2048;
[DataField("method")]
public CorridorPostGenMethod Method = CorridorPostGenMethod.MinimumSpanningTree;
[DataField]
public ProtoId<ContentTileDefinition> Tile = "FloorSteel";
2023-06-27 19:17:42 +10:00
/// <summary>
/// How wide to make the corridor.
/// </summary>
[DataField("width")]
public int Width = 3;
}
public enum CorridorPostGenMethod : byte
{
Invalid,
MinimumSpanningTree,
}