Prolly not fixed

This commit is contained in:
dingo
2026-01-09 15:10:52 -05:00
parent 05c0990625
commit 9c0c4d0d70
+16 -2
View File
@@ -1436,6 +1436,10 @@ public class DungeonGeneratorV3
{ {
Log($"--- Placing Wall Tiles ---"); Log($"--- Placing Wall Tiles ---");
Log($"Wall templates available: {_wallTemplates.Count}"); Log($"Wall templates available: {_wallTemplates.Count}");
Log($"Socket matching: {(UseSocketMatching ? "ENABLED" : "DISABLED")}");
// Clear placement tracking for socket matching (separate from floor tiles)
_placedTemplates.Clear();
// Log detailed template info for debugging // Log detailed template info for debugging
foreach (var t in _wallTemplates) foreach (var t in _wallTemplates)
@@ -1754,12 +1758,22 @@ public class DungeonGeneratorV3
var ourSocket = config.West.FirstOrDefault(); var ourSocket = config.West.FirstOrDefault();
var theirSocket = westConfig.East.FirstOrDefault(); var theirSocket = westConfig.East.FirstOrDefault();
if (ourSocket != null && theirSocket != null && !SocketConfiguration.CanConnect(ourSocket, theirSocket)) if (ourSocket != null && theirSocket != null)
{ {
return false; var canConnect = SocketConfiguration.CanConnect(ourSocket, theirSocket);
if (!canConnect && VerboseLogging)
{
LogVerbose($" Socket mismatch at ({x},{y}): Template {template.Id} West={ourSocket.Type}:{ourSocket.CustomName ?? "null"} vs Neighbor({x-1},{y}) Template {westTemplateId} East={theirSocket.Type}:{theirSocket.CustomName ?? "null"}");
}
if (!canConnect) return false;
} }
} }
} }
else if (x > 0 && VerboseLogging)
{
// No placed template at west neighbor - this shouldn't happen in row-by-row filling
LogVerbose($" No placed template found at West neighbor ({x-1},{y}) when checking ({x},{y})");
}
return true; return true;
} }