feat(bindings)!: SaveGame without dungeon.dat and graphics.dat #458
No reviewers
Labels
No labels
area/ci-release
area/cli
area/docs
area/dungeon
area/ftl
area/graphics
area/gui
area/music
area/saves
area/tooling
port/amiga
port/dos
port/fm-towns
port/mac
port/pc98
port/sega-cd
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jqueuniet/dm2-tools!458
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/453-save-game-limited"
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 #453. Stacked on #457.
SaveGame.limited(bytes)andSaveGame.limitedFromJson(json)open a save without its files.toJson,toBytes,gameplay,setGameplayandfieldLimitswork; item calls refuse withNoContext.attach(dungeon, graphics)decodes the save, as edited so far, against its files. It is refused, leaving the save unchanged, on a mismatch or a second attach.hasContext()tells which state a save is in.fromJsonwith files also decodes a limited save's dump.SaveGame(data)); C hasdm2_save_game_open_limited,dm2_save_game_from_json_limited,dm2_save_game_attachanddm2_save_game_has_context.save_to_json,save_from_jsonandsave_field_limits_json. The fixture limits test now runs through limited handles, so it still covers every committed save in CI.wasm-bindgen 0.2.129 cannot take
Option<&DungeonFile>, hence the separate wasm constructors rather than optional arguments.save_info_json, the lossy gameplay-only view, stays free; it could become aSaveGamemethod in a follow-up.A node smoke test over a dev wasm build covers all four issues.
https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7