Copy cloud inventory folders into Local Storage #7

Open
opened 2026-09-25 13:17:58 +02:00 by kyuubi · 1 comment
Owner

A Copy to Local Storage button in the inventory's button bar. It is enabled when a cloud folder, or a folder link, is selected.

Behaviour

  • Copies the selected folder with all subfolders into the Local Storage root, as a new folder with a unique name.
  • Items (objects, and worlds should any turn up) become packages in the current format (ShareAssets decides between .resonitepackage and .rlsitem), with name, description, tags, owner and thumbnail. Assets are downloaded as needed.
  • Folder links inside stay links (.link.json), so copies never follow cycles. A selected link is followed, because the user chose it.
  • Other record types are skipped and logged.
  • Runs in the background. Progress shows in the dash sync pill as items left, and a notification at the end reports what was copied and what failed. One failed item doesn't stop the rest.

Plan

  • Pure copy plan: folder tree to unique target paths, fixed before anything is written, so items can be copied in parallel
  • Engine side: load the folder tree, then create folders, write links, and copy items 4 at a time through the existing package writer
  • Package writer takes cloud thumbnails and runs without per-item progress
  • Dash: a save can count as several items (pending items)
  • Button: added to the tool panel, enabled for cloud folders and folder links
  • Tests, README, version 0.5.0, deploy (6b0afe0)
  • In game: copy a folder with subfolders, a link and a few items; spawn a copied item

Evidence

  • 63 tests: 62 pass, including 5 copy-plan tests and the pending-items count; the opt-in real-data round trip skips.
  • 0.5.0 hot-loaded with no errors. MonkeyLoader lists the OnItemSelected postfix next to SpecialItemsLib, BetterInventoryBrowser and Resdb Tools.

Reopened: the Closes #7 in 6b0afe0 came before the in-game check.

A **Copy to Local Storage** button in the inventory's button bar. It is enabled when a cloud folder, or a folder link, is selected. ## Behaviour - Copies the selected folder with all subfolders into the Local Storage root, as a new folder with a unique name. - Items (objects, and worlds should any turn up) become packages in the current format (`ShareAssets` decides between `.resonitepackage` and `.rlsitem`), with name, description, tags, owner and thumbnail. Assets are downloaded as needed. - Folder links inside stay links (`.link.json`), so copies never follow cycles. A selected link is followed, because the user chose it. - Other record types are skipped and logged. - Runs in the background. Progress shows in the dash sync pill as items left, and a notification at the end reports what was copied and what failed. One failed item doesn't stop the rest. ## Plan - [x] Pure copy plan: folder tree to unique target paths, fixed before anything is written, so items can be copied in parallel - [x] Engine side: load the folder tree, then create folders, write links, and copy items 4 at a time through the existing package writer - [x] Package writer takes cloud thumbnails and runs without per-item progress - [x] Dash: a save can count as several items (pending items) - [x] Button: added to the tool panel, enabled for cloud folders and folder links - [x] Tests, README, version 0.5.0, deploy (6b0afe0) - [ ] In game: copy a folder with subfolders, a link and a few items; spawn a copied item ## Evidence - 63 tests: 62 pass, including 5 copy-plan tests and the pending-items count; the opt-in real-data round trip skips. - 0.5.0 hot-loaded with no errors. MonkeyLoader lists the `OnItemSelected` postfix next to SpecialItemsLib, BetterInventoryBrowser and Resdb Tools. Reopened: the `Closes #7` in 6b0afe0 came before the in-game check.
Author
Owner

In game, from the MonkeyLoader log:

  • The whole cloud inventory copied: "Copied Inventory to …/LocalStorage/Inventory: 3016 items, 347 links, 224 subfolders", with no failed items. It took about 20 minutes and ended at 11:52 UTC. With ShareAssets on, that's 655 MB of item files plus 27 GB in .assets/.
  • The self-linking test folder copied as "0 items, 2 links", so links inside a copy aren't followed.
  • "Weapons" (9 items) and "Test" (1 item) copied too.
  • 0.5.1: the button copies the folder being shown when nothing is selected.

Still to confirm: spawning a copied item.

**In game, from the MonkeyLoader log:** - The whole cloud inventory copied: "Copied Inventory to …/LocalStorage/Inventory: 3016 items, 347 links, 224 subfolders", with no failed items. It took about 20 minutes and ended at 11:52 UTC. With `ShareAssets` on, that's 655 MB of item files plus 27 GB in `.assets/`. - The self-linking `test` folder copied as "0 items, 2 links", so links inside a copy aren't followed. - "Weapons" (9 items) and "Test" (1 item) copied too. - 0.5.1: the button copies the folder being shown when nothing is selected. Still to confirm: spawning a copied item.
Sign in to join this conversation.
No labels
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
kyuubi/ResoLocalStorage#7
No description provided.