@page "/admin/dungeonbuilder/rooms" @model DungeonBuilder.RoomsModel @using DataServer.Data.Entities @{ ViewData["Title"] = "Room Templates"; var roomTypes = Enum.GetValues(); }
← Back to Dungeon Builder

Room Templates

Pre-built rooms with tiles, objects, and spawns

+ New Room
@if (!string.IsNullOrEmpty(Model.Message)) {
@Model.Message
}
Clear
@foreach (var room in Model.Rooms) {

@room.Name

@room.Type @(room.Width)×@(room.Height) @if (!string.IsNullOrEmpty(room.Biome)) { @room.Biome }
@(room.MinConnections)-@(room.MaxConnections) doors @if (room.PlayerSpawnX.HasValue) { Spawn } @if (room.ExitPortalX.HasValue) { Exit }
@GetRoomIcon(room.Type)
ID: @room.Id
Edit
} @if (!Model.Rooms.Any()) {
No room templates found. Create one!
}
@functions { string GetTypeColor(RoomType type) { return type switch { RoomType.Entrance => "text-yellow-400", RoomType.Exit => "text-blue-400", RoomType.Boss => "text-red-400", RoomType.Treasure => "text-amber-400", RoomType.Secret => "text-purple-400", RoomType.Shop => "text-emerald-400", _ => "text-gray-400" }; } string GetRoomIcon(RoomType type) { return type switch { RoomType.Entrance => "🚪", RoomType.Exit => "🌀", RoomType.Boss => "💀", RoomType.Treasure => "💎", RoomType.Secret => "❓", RoomType.Shop => "🛒", _ => "🏠" }; } }