Local Storage inventory backed by .resonitepackage files #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
MonkeyLoader mod that adds a Local Storage inventory, modelled on art0007i/LocalStorage, but every saved item is written as a self-contained
.resonitepackage. A package carries the object graph, all its assets and the thumbnail, so it can be dragged into Resonite and spawned without the mod installed.Design
<LocalDB permanent path>/LocalStorage). One item = one<name>.resonitepackage. Folder links are stored as<name>.link.json. Storage URIs use theresolocalstorage:///scheme and owner idL-ResoLocalStorage, so the mod can sit next to art0007i's LocalStorage without clashing.RecordDirectory.AddItemfor the local owner builds the package with the engine's own asset collection (PackageCreatorlogic) in the background and embeds the thumbnail as an extra package asset referenced by the main record'sThumbnailURI(packdb:///<sig>). Vanilla import ignores the extra asset.RecordDirectory.LoadFromlists folders, packages and links from disk; each package's main record supplies name/tags; its embedded thumbnail is imported into LocalDB once (deduped by signature) for display.Slot.LoadObjectTaskrecognisesresolocalstorage:///package URIs and runs the vanillaPackageImporter, so spawning from the inventory behaves exactly like dropping the file into the world.<root>/.trash/instead of being erased.Plan
CanWrite, cache bypass, load/add/delete for items, folders and linksPackageImporterModsfolderKnown limits (v1)
resrec:///URL that only this machine can resolve.v0.1.0 builds and all 26 unit tests pass (storage layout + package read/write). Hot-loaded into the running game (Resonite 2026.9.18.82, MonkeyLoader 0.29 / Resonite gamepack 0.33): the mod loaded, OnEngineReady ran with no errors, and the storage folder is
/home/kyuubi/Resonite_Data/data/LocalStorage. The in-game check of save, browse, spawn, delete and spawning without the mod is still open. Code is not committed yet.