[PR #3352] [MERGED] Native mods: the Native mods instance gets the mods' settings from the default home #4920

Closed
opened 2026-11-03 05:08:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3352
Author: @ludovic111
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: feat/native-mods-carry-settings


📝 Commits (1)

  • 41266ae Native mods: the Native mods instance gets the mods' settings from the default home

📊 Changes

2 files changed (+86 additions, -2 deletions)

View changed files

📝 docs/native-mods.md (+4 -1)
📝 launcher/src/native_mods.rs (+82 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Stacked on #3323.

Mods installed in the launcher's default home build into the Native mods instance, which starts empty. A player moving from the WebAssembly Zoom, Minimap, FPS Counter or Keystrokes to its native version (horizon-rust/horizon-mod-*) lost their settings there: the zoom level, the corner, the keys.

The build now copies, for each mod it builds, the mod's storage folder (horizon-mods/.horizon-mod-data/<id>/) and its key.<id>. lines of horizon-mods.txt from the default home into the instance. It does this once: nothing the instance already has is overwritten. The native official mods read exactly those files, so the player finds their settings as they left them. docs/native-mods.md says so.

Test the_native_mods_instance_gets_the_mods_settings_once: copies one mod's folder and keys, never another mod's, and keeps what the instance changed since.

The one failing launcher test, account::tests::the_whole_chain, is unrelated and comes from this Mac's environment. Its mock server gets an extra GET / right after /ms/devicecode, which is what a desktop browser opening the device-code page does. It passed in the earlier runs of #3321 and #3323, and this PR touches no account code. CI runs it without a desktop.

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at d0b6e4892, 9 min 11 s)

Check Result
Scope ⚠️ 3 files, +311 −15; mixes game, launcher
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 401 passed (1 min 20 s)
rustfmt ✅ (6 s)
clippy ✅ (3 min 42 s)
tests: horizon-mods ✅ 76 passed (1 min 18 s)
doc tests ✅ 0 passed (9 s)
content root tests ✅ 5 passed (2 min 2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅
launcher tests ❌ 222 passed, 1 failed (4 s)
Parity ➖ 35 affected, to run in CI (no vanilla data here): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, ghost_recipe, hardcore_respawn, hud and 23 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3352 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/native-mods-carry-settings` --- ### 📝 Commits (1) - [`41266ae`](https://github.com/horizon-rust/horizon/commit/41266ae70be863ff1a77e3324f6887613788804a) Native mods: the Native mods instance gets the mods' settings from the default home ### 📊 Changes **2 files changed** (+86 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/native-mods.md` (+4 -1) 📝 `launcher/src/native_mods.rs` (+82 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Stacked on #3323. Mods installed in the launcher's default home build into the **Native mods** instance, which starts empty. A player moving from the WebAssembly Zoom, Minimap, FPS Counter or Keystrokes to its native version (horizon-rust/horizon-mod-*) lost their settings there: the zoom level, the corner, the keys. The build now copies, for each mod it builds, the mod's storage folder (`horizon-mods/.horizon-mod-data/<id>/`) and its `key.<id>.` lines of `horizon-mods.txt` from the default home into the instance. It does this once: nothing the instance already has is overwritten. The native official mods read exactly those files, so the player finds their settings as they left them. `docs/native-mods.md` says so. Test `the_native_mods_instance_gets_the_mods_settings_once`: copies one mod's folder and keys, never another mod's, and keeps what the instance changed since. The one failing launcher test, `account::tests::the_whole_chain`, is unrelated and comes from this Mac's environment. Its mock server gets an extra `GET /` right after `/ms/devicecode`, which is what a desktop browser opening the device-code page does. It passed in the earlier runs of #3321 and #3323, and this PR touches no account code. CI runs it without a desktop. **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at d0b6e4892, 9 min 11 s) | Check | Result | | --- | --- | | Scope | ⚠️ 3 files, +311 −15; mixes game, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 401 passed (1 min 20 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (3 min 42 s) | | tests: horizon-mods | ✅ 76 passed (1 min 18 s) | | doc tests | ✅ 0 passed (9 s) | | content root tests | ✅ 5 passed (2 min 2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ | | launcher tests | ❌ 222 passed, 1 failed (4 s) | | Parity | ➖ 35 affected, to run in CI (no vanilla data here): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, ghost_recipe, hardcore_respawn, hud and 23 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:56 +07: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
horizon-rust/horizon#4920
No description provided.