wasm: inventory move, copy and clear #335

Open
opened 2026-10-24 09:45:53 +02:00 by jqueuniet · 0 comments
Owner

Expose inventory move / copy / clear (already in the library and CLI) through WASM, on a full-decode dump.

Scope

  • Operations: move, copy, clear, between any two slots (including cursor) of the same or different champions.
  • Same validation as dm2 save inventory: refuse moves that drop non-persistent fields, or warn as the CLI does.
  • Returns the updated dump (or an opaque handle); the rebuild goes through the full-decode saveFromJsonFull.

Out of scope: containers, creating items.

Acceptance

  • Each operation, rebuilt and re-read, matches the CLI's result on the same fixture.
  • Moving between champions keeps the object ID and its fields.

Blocked by the inventory-read issue.

Expose inventory move / copy / clear (already in the library and CLI) through WASM, on a full-decode dump. ## Scope - Operations: move, copy, clear, between any two slots (including `cursor`) of the same or different champions. - Same validation as `dm2 save inventory`: refuse moves that drop non-persistent fields, or warn as the CLI does. - Returns the updated dump (or an opaque handle); the rebuild goes through the full-decode `saveFromJsonFull`. Out of scope: containers, creating items. ## Acceptance - Each operation, rebuilt and re-read, matches the CLI's result on the same fixture. - Moving between champions keeps the object ID and its fields. Blocked by the inventory-read issue.
jqueuniet added this to the dm2-tools project 2026-10-24 09:49:02 +02:00
Sign in to join this conversation.
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#335
No description provided.