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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user