* Add CP14RoomsDunGen for procedural room placement Introduces the CP14RoomsDunGen layer for generating rooms across the grid based on tags and tile masks. Updates DungeonJob and DungeonSystem to support the new layer, and modifies relevant YAML prototypes to use CP14RoomsDunGen instead of OreDunGen for room spawning in demiplane modifiers. * some fixes * its done done done * exit room * additional entry points * fix * Update migration.yml
28 lines
674 B
C#
28 lines
674 B
C#
using Content.Shared.Maps;
|
|
using Content.Shared.Tag;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Procedural.DungeonLayers;
|
|
|
|
/// <summary>
|
|
/// Generates random placed rooms across the grid
|
|
/// </summary>
|
|
[Virtual]
|
|
public partial class CP14RoomsDunGen : IDunGenLayer
|
|
{
|
|
/// <summary>
|
|
/// This rooms can only be generated on the specified tiles
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<ProtoId<ContentTileDefinition>>? TileMask;
|
|
|
|
/// <summary>
|
|
/// Maximum amount of rooms spawns
|
|
/// </summary>
|
|
[DataField]
|
|
public int Count = 10;
|
|
|
|
[DataField(required: true)]
|
|
public HashSet<ProtoId<TagPrototype>> Tags = default!;
|
|
}
|