Refresh fix, Dungeon Builder v6

This commit is contained in:
dingo
2026-01-05 11:23:16 -05:00
parent e1fe2c1d19
commit 3f9f8fdb3d
+4 -7
View File
@@ -434,18 +434,15 @@ public class DungeonGeneratorV3
var templates = type switch var templates = type switch
{ {
RoomType.Entrance => _entranceRooms, RoomType.Entrance => _entranceRooms,
RoomType.Exit => _exitRooms.Count > 0 ? _exitRooms : _bossRooms, RoomType.Exit => _exitRooms,
RoomType.Boss => _bossRooms, RoomType.Boss => _bossRooms,
RoomType.Treasure => _treasureRooms, RoomType.Treasure => _treasureRooms,
_ => _normalRooms _ => _normalRooms
}; };
// Fallback: if no templates for this type, try to use any available room template // NOTE: We intentionally do NOT fallback to other templates here.
if (templates.Count == 0 && _roomTemplates.Count > 0) // If no templates exist for this room type, we generate a procedural room.
{ // This prevents tiny entrance rooms being used everywhere.
Console.WriteLine($"[DungeonGenV3] No {type} templates, using fallback from {_roomTemplates.Count} available templates");
templates = _roomTemplates;
}
BuilderRoomTemplate? template = null; BuilderRoomTemplate? template = null;
int roomWidth, roomHeight; int roomWidth, roomHeight;