Area editor: load Armory + Treasury and apply edits back to the game #69
Loading…
Reference in a new issue
No description provided.
Delete branch "task/68-real-areas"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #68
Extraction
extract_area.pyturns a shipped.tscninto a descriptor, copying item and stand node names exactly (saves are keyed by item node name) and merging the item types into the catalog, which now has all 14.tscn_textlibhelpers:parse_tscn,compare_scenes(matched by node path/resource id), andload_steps_problem.One-time rewrite of
armory.tscn/treasury.tscn0.700to0.7,1.0to1: 30 lines in Armory, 1 in Treasury), plus Armory'sload_stepsheader 46 to 45. It had been one too high since the pedestal-color commit; there are 45 resources.Apply to game (editor +
POST /api/apply)scene_sha256must match the scene. A hand edit or a pull that changed the scene blocks applying (409) with a banner; Re-extract (POST /api/reextract, confirm required) recovers.generate_area.py --mode fulldoes the same from the CLI, with the drift check.scene_path/scene_sha256are server-owned; a browser save can't change them._sample_roomhas no scene, so it stays preview-only.Verified (headless Chromium against a scratch clone)
_sample_roomshows as preview-only.git diff armory.tscnwas a singletransformline; the area stays in sync; a second apply says "Nothing to apply".treasury.tscn: warning shown, Apply disabled, API returns 409, and the hand edit is untouched. Re-extract picked it up (CrownItem y=1.4) and the area is back in sync.scene_sha256unchanged.scene_sha256/scene_pathwas ignored.🤖 Generated with Claude Code