Repository navigation
Wardrobe: Load mod (.zip) can import several zips at once - #8
Merged
Merged
Conversation
The file input now accepts multiple files. They are imported one at a time, because importZip rewrites the shared mod list and state and re-applies the textures each time. A zip that fails is skipped and the rest still load; the message shows how many loaded and which files failed and why. With a single file the messages are the same as before. Bumps ?v= to 32 for the wardrobe modules that import each other (mods/section.js, wardrobe/panel.js, tiles.js, looks.js, color-picker.js), and to 40 for wardrobe.js in wardrobe.html.
runnevia-ryn
force-pushed
the
mod-multi-import
branch
from
November 7, 2026 12:04
cff59bf to
afa01d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The wardrobe's Load mod (.zip) button can now pick several zips at once (Shift/Ctrl in the file dialog). They are imported one after another, and a zip that fails is skipped so the rest still load. With more than one file, the status line shows progress (
Loading 2/5…) and then a summary of what loaded and which files failed and why. Picking a single file behaves and reads exactly as before.importZipupdates the shared mod list and state, writes to IndexedDB and callsapplyAll(), so the files are imported sequentially rather than in parallel.input.filesis copied beforeinput.value = '', because clearing the value also empties the liveFileList.engine.jsand the stored format are unchanged. Mods still stay in the browser.?v=to 32 for the wardrobe modules that import each other (mods/section.js,wardrobe/panel.js,tiles.js,looks.js,color-picker.js) and to 40 forwardrobe.jsinwardrobe.html. They form one import cycle, so bumping only some of them would leave a module referenced at two versions.Why
Loading a set of mods meant opening the file dialog once per zip. In the game's Mods folder you can select a whole range at once, so this brings the wardrobe closer to that.
Validation
sh .github/scripts/check-cache-busters.sh: ok, no version skew.node --checkon the seven changed JS files (copied to.mjs): passed. Node isn't installed on my Windows machine, so this ran in a separate Linux environment (Node 22) on a copy of the tree with the same changes applied.Manual test on Windows 10, bare-metal JunOS v1.3.1, Chrome 156.0.8078.80. I copied the four changed files into the install's
webapp/and hard-refreshed (Ctrl+Shift+R):mod.json: the mods loaded, the summary named the bad zip and its error;Network tab showed
section.js?v=32andwardrobe.js?v=40after the refresh.After the version bump: re-tested a multi-zip import; the Network tab showed a single
panel.js?v=32and none of the wardrobe modules atv=31.Console: no new errors. The only entries were the expected
console.errorfor the bad zip and theassets/items/manifest.json404, which also appears without this change.Not run: Docker /
sync-webapp.sh, Colab and Android (no setup for them here). The change is client-side JS only.I ran targeted syntax or automated checks for the files I changed.
I exercised the affected behavior directly where practical.
I checked the relevant service or browser logs.
Platforms affected
Web frontend only, so the same on Docker, Windows and Colab; tested on Windows. On Android the app's file picker uses
ActivityResultContracts.OpenDocument(one file), so it stays single-select there and behaves as before. Supporting several files on Android would need a change toMainActivity.kt, which I left out of this PR.Checklist
.env.examplewhen behavior or configuration changed. (No configuration change, and the docs don't describe this button.)?v=cache-busters.webapp/, I ran./sync-webapp.sh(-sonly for static files) and hard-refreshed, or explained above why I could not. (Windows bare-metal install: files copied in directly, then a hard refresh.)Screenshots or recordings
None. The only visible change is the status line text, and the mod list next to it shows mod art.