Fix directional bucket helper mapping and fill diagonal-only wall cells

- Update tile edit Neighbor Mask Helper to suggest new directional bucket names and masks

- Include 8-neighbor adjacency when collecting wall candidate cells so single-diagonal corner masks are placed

- Keep strict exact mask bucket matching in VNext wall resolver
This commit is contained in:
dingo
2026-02-10 12:41:32 -05:00
parent ec7f432f09
commit 046d665c57
2 changed files with 22 additions and 19 deletions
+10 -6
View File
@@ -523,7 +523,7 @@ public class DungeonGeneratorVNext
for (int x = 0; x < layout.Width; x++)
{
if (layout.Walkable![x, y]) continue;
if (!HasAdjacentCardinalWalkable(layout, x, y)) continue;
if (!HasAdjacentWalkable(layout, x, y)) continue;
wallCells.Add((x, y));
}
}
@@ -778,12 +778,16 @@ public class DungeonGeneratorVNext
PlaceWallTile(layout, x, y, def);
}
private static bool HasAdjacentCardinalWalkable(DungeonLayoutV2 layout, int x, int y)
private static bool HasAdjacentWalkable(DungeonLayoutV2 layout, int x, int y)
{
return IsWalkable(layout, x, y - 1) ||
IsWalkable(layout, x + 1, y) ||
IsWalkable(layout, x, y + 1) ||
IsWalkable(layout, x - 1, y);
return IsWalkable(layout, x, y - 1) || // N
IsWalkable(layout, x + 1, y - 1) || // NE
IsWalkable(layout, x + 1, y) || // E
IsWalkable(layout, x + 1, y + 1) || // SE
IsWalkable(layout, x, y + 1) || // S
IsWalkable(layout, x - 1, y + 1) || // SW
IsWalkable(layout, x - 1, y) || // W
IsWalkable(layout, x - 1, y - 1); // NW
}
private static int ComputeEightDirectionMask(DungeonLayoutV2 layout, int x, int y)