Mask matching ranks the best and runner-up overlaps, so a single cell has no second score. Reject grids with fewer than two cells using the same error as content matching.
A fixed <json>.tmp blocked every later run while a stale file or folder
kept that name (review on #4353). write_json() now stages through
tempfile.mkstemp in the output folder, gives it the replaced file's mode
(file_mode.published_mode), and removes it on failure, as the other
publishing tools do. Three standard-library tests cover a stale .tmp
folder, a failed replace and the kept file mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- --json is refused anywhere under <work>/assets or the carve (links
resolved), not only over a manifest.
- Order fill keeps the longest run of anchors consistent with archive
order instead of dropping greedily after one wrong anchor.
- Duplicate tile records, tiles in other archives and dictionaries that
hold only part of a shared group are counted and printed.
- Shoreline reports anchors moved by the alignment and unplaced tiles
with features; the summary prints tile and fallback sizes and formats.
- A carve without heightmaps says so instead of reporting 0 of 0.
- Non-square or too small tiles, one-cell grids and fractional grid sizes
are rejected with one stderr line; the JSON write is atomic.
- docs: quoted numbers now name their field; -300 m is at the PAMH floor,
not below it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The four GridAtlasInfo grids are water data: water height (R16), shoreline
(BGRA) and two water fog textures (BC6H). Their tiles are named only by the
grid's suffix. The tool places them by matching each tile with the grid's
fallback mosaic and checks archive order: the tile dictionaries are stored
in text order of the decimal cell index.
zInflation is checked against the world's height data: all heightmap Z
ranges and the water heights lie inside origin z +- 1,000. The water-height
scale (about 41 units per metre) and the north-up row order come from a fit
against the MHIU terrain.
Tests: stdlib logic tests plus a synthetic forward check (numpy/Pillow).
docs/gamedata.md "Grid atlases" is updated from the tool's output.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>