Add lock-file load and stable ID assignment

Lock-file determinism guarantees re-bakes do not renumber existing
tiles. Atlas_id mismatch is a hard-fail to prevent silent corruption.
Deleted tile IDs move to deleted[] and are not recycled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Axel Meyer
2026-05-21 22:40:50 +02:00
parent b64e3e87a9
commit 83499850fb
3 changed files with 153 additions and 0 deletions

9
tests/fixtures/lock-existing.json vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"atlas_id": "small_demo",
"bindings": {
"grass": 1,
"stone": 2
},
"deleted": [],
"next_id": 3
}