Files

35 lines
774 B
C#
Raw Permalink Normal View History

2023-03-10 16:41:22 +11:00
namespace Content.Shared.Procedural;
public sealed class Dungeon
{
public readonly List<DungeonRoom> Rooms;
2023-06-27 19:17:42 +10:00
2023-04-20 10:43:13 +10:00
/// <summary>
2023-06-27 19:17:42 +10:00
/// Hashset of the tiles across all rooms.
2023-04-20 10:43:13 +10:00
/// </summary>
2023-06-27 19:17:42 +10:00
public readonly HashSet<Vector2i> RoomTiles = new();
2023-04-20 10:43:13 +10:00
2023-06-27 19:17:42 +10:00
public readonly HashSet<Vector2i> RoomExteriorTiles = new();
2023-04-20 10:43:13 +10:00
2023-06-27 19:17:42 +10:00
public readonly HashSet<Vector2i> CorridorTiles = new();
2023-03-10 16:41:22 +11:00
2023-06-27 19:17:42 +10:00
public readonly HashSet<Vector2i> CorridorExteriorTiles = new();
public readonly HashSet<Vector2i> Entrances = new();
public Dungeon()
{
Rooms = new List<DungeonRoom>();
}
public Dungeon(List<DungeonRoom> rooms)
{
Rooms = rooms;
foreach (var room in Rooms)
{
Entrances.UnionWith(room.Entrances);
}
}
2023-03-10 16:41:22 +11:00
}