2023-03-10 16:41:22 +11:00
|
|
|
namespace Content.Shared.Procedural;
|
|
|
|
|
|
|
|
|
|
public sealed class Dungeon
|
|
|
|
|
{
|
2024-01-04 14:25:32 +11:00
|
|
|
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();
|
2024-01-04 14:25:32 +11:00
|
|
|
|
2024-03-23 21:37:18 -06:00
|
|
|
public readonly HashSet<Vector2i> Entrances = new();
|
|
|
|
|
|
2024-01-04 14:25:32 +11:00
|
|
|
public Dungeon()
|
|
|
|
|
{
|
|
|
|
|
Rooms = new List<DungeonRoom>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Dungeon(List<DungeonRoom> rooms)
|
|
|
|
|
{
|
|
|
|
|
Rooms = rooms;
|
2024-03-23 21:37:18 -06:00
|
|
|
|
|
|
|
|
foreach (var room in Rooms)
|
|
|
|
|
{
|
|
|
|
|
Entrances.UnionWith(room.Entrances);
|
|
|
|
|
}
|
2024-01-04 14:25:32 +11:00
|
|
|
}
|
2023-03-10 16:41:22 +11:00
|
|
|
}
|