refactor(bindings)!: save editing only through SaveGame #450

Merged
jqueuniet merged 1 commit from refactor/446-save-game-only into main 2026-10-31 08:59:38 +01:00
Owner

Closes #446 (PR 3 of 3).

Removes the dump-in, dump-out save editor functions from convert, wasm, FFI and Python (breaking):

  • save_to_json_full, save_from_json_full;
  • save_inventory_json, save_inventory_move / swap / copy / clear;
  • save_container_json, save_container_put, save_container_take;
  • save_item_create, save_item_preview;
  • item_catalog_json, skill_title_json (now GraphicsArchive.item_catalog / skill_title).

Stay free: save_to_json, save_from_json, save_info_json, skill_level, skill_experience_for_level, and save_field_limits_json.

Deviation from #446: save_field_limits_json is kept. It needs only a variant string, and its test covers every committed save fixture in CI, where no dungeon.dat or graphics.dat exists to open a SaveGame.

Tests:

  • full_roundtrip.rs keeps its checks through local dump-in, dump-out helpers over SaveGame. JSON-only edits load the dump variant's fixture dungeon, used only for the map info.
  • The FFI, Python and CLI tests go through the handles.
  • The READMEs move the functions' descriptions into the handle tables.

https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7

Closes #446 (PR 3 of 3). Removes the dump-in, dump-out save editor functions from convert, wasm, FFI and Python (breaking): - `save_to_json_full`, `save_from_json_full`; - `save_inventory_json`, `save_inventory_move` / `swap` / `copy` / `clear`; - `save_container_json`, `save_container_put`, `save_container_take`; - `save_item_create`, `save_item_preview`; - `item_catalog_json`, `skill_title_json` (now `GraphicsArchive.item_catalog` / `skill_title`). Stay free: `save_to_json`, `save_from_json`, `save_info_json`, `skill_level`, `skill_experience_for_level`, and `save_field_limits_json`. Deviation from #446: `save_field_limits_json` is kept. It needs only a variant string, and its test covers every committed save fixture in CI, where no `dungeon.dat` or `graphics.dat` exists to open a `SaveGame`. Tests: - `full_roundtrip.rs` keeps its checks through local dump-in, dump-out helpers over `SaveGame`. JSON-only edits load the dump variant's fixture dungeon, used only for the map info. - The FFI, Python and CLI tests go through the handles. - The READMEs move the functions' descriptions into the handle tables. https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
refactor(bindings)!: save editing only through SaveGame
All checks were successful
CI / msrv (1.90) (pull_request) Successful in 28s
CI / audit (pull_request) Successful in 19s
CI / stable (pull_request) Successful in 57s
CI / python bindings (3.11) (pull_request) Successful in 27s
CI / msrv (1.90) (push) Successful in 29s
CI / audit (push) Successful in 19s
CI / stable (push) Successful in 57s
CI / python bindings (3.11) (push) Successful in 26s
41d46f49df
Remove save_to_json_full, save_from_json_full, save_inventory_json,
the save_inventory_* edits, save_container_json / _put_json /
_take_json, save_item_create_json and save_item_preview_json from
convert, wasm, FFI and Python; SaveGame's methods replace them.
item_catalog_json and skill_title_json give way to GraphicsArchive's
item_catalog and skill_title.

save_field_limits_json stays: it needs only a variant, and its
fixture test runs on committed saves without dungeon or graphics.

Closes #446

Claude-Session: https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
jqueuniet deleted branch refactor/446-save-game-only 2026-10-31 08:59:38 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools!450
No description provided.