Prioritize corner buckets over broad cardinal wall matches

- Defer cardinal-pass placement when an 8-direction corner/diagonal bucket match exists in the active palette

- Prevent corner cells from being flattened into top/side walls during first pass

- Keep two-pass flow intact: cardinal fallback first, unresolved cells resolved by 8-direction masks
This commit is contained in:
dingo
2026-02-09 15:52:23 -05:00
parent 41ae9e011a
commit b99d5fce7f
+12
View File
@@ -541,6 +541,18 @@ public class DungeonGeneratorVNext
continue;
}
// If this cell has a specific 8-direction corner/diagonal match that exists in the
// current palette, defer to pass 2 so corners do not get flattened by broad cardinal buckets.
int mask8 = ComputeEightDirectionMask(layout, cell.X, cell.Y);
string? specific8Bucket = ResolveEightDirectionBucketName(mask8);
if (!string.IsNullOrEmpty(specific8Bucket) &&
tileContext.WallDefinitionsByCanonicalBucket.TryGetValue(specific8Bucket, out var defs8) &&
defs8.Count > 0)
{
unresolved.Add(cell);
continue;
}
var wallDef = SelectWallDefinitionForBucket(tileContext, bucketName);
if (wallDef == null)
{