Add empty-tile support to board template builder

- SnapshotTile: add IsAbsent flag (JSON: "absent")
- BoardShapeGenerator.FromTemplate(): absent tiles are removed from
  the tiles dict instead of being filled with Void+Void, producing
  sparse board layouts with genuine missing cells
- Builder: Empty swatch in paint palette marks cells as absent
  (striped crosshatch visual); absent cells are excluded from zone
  assignment; PureVoid paint clears absent state back to valid void;
  ApplyModal() also clears IsAbsent; SerializeTiles() includes absent
  entries so they round-trip correctly through save/load

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-27 22:15:31 -04:00
co-authored by Claude Happy
parent c4177257ef
commit 4138ba39e7
3 changed files with 72 additions and 21 deletions
@@ -311,7 +311,14 @@ public static class BoardShapeGenerator
if (td.X < 0 || td.X >= snapshot.Width || td.Y < 0 || td.Y >= snapshot.Height)
continue;
var c = new Coord(td.X, td.Y);
var c = new Coord(td.X, td.Y);
// Absent tiles are completely removed from the board (sparse layout).
if (td.IsAbsent)
{
tiles.Remove(c.ToKey());
continue;
}
var tile = new Tile { Coord = c };
if (td.AffinityOverrideable && pct > 0 && Random.Shared.Next(100) < pct)