[PR #3596] [MERGED] Launcher: installing a native mod turns native mods on #5084

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

📋 Pull Request Information

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

Base: main ← Head: fix/launcher-native-mods-auto-on


📝 Commits (2)

  • f220157 Launcher: installing a native mod turns native mods on
  • 8ea9a2c Merge remote-tracking branch 'origin/main' into fix/launcher-native-mods-auto-on

📊 Changes

10 files changed (+170 additions, -9 deletions)

View changed files

📝 docs/native-mods.md (+3 -2)
📝 launcher/lang/de.json (+4 -2)
📝 launcher/lang/fr.json (+3 -1)
📝 launcher/lang/ru.json (+3 -1)
📝 launcher/src/backend.rs (+6 -2)
📝 launcher/src/browser/horizon.rs (+8 -0)
📝 launcher/src/cli.rs (+12 -0)
📝 launcher/src/main.rs (+1 -1)
📝 launcher/src/mods_page.rs (+74 -0)
📝 launcher/src/native_mods.rs (+56 -0)

📄 Description

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

Ludovic's decision (2026-10-29): native mods turn on automatically when a player installs a native mod.

Before: installing a native mod from the Mods page put its .hnmod in horizon-native-mods/, and nothing else happened until the player found Settings → Game → Native mods (experimental) and turned it on.

Now:

  • Installing a native mod turns Native mods on (native_mods::turns_on, read from the instance's installed list after every install or update, from the browse list or a project page), so Settings offers Build at once. Players who never install one keep them off. horizon-launcher mods install does the same.
  • A one-time notice first. The first Install of a registry native mod (browser::horizon::is_native_mod, read from the index already in memory, never the network) shows, before anything is installed: "Native mods compile into a game of their own. Installing one turns Native mods on: you then build the game with it in Settings > Native mods. The first build downloads Rust and can take 20 to 30 minutes; later builds are faster." · Install and turn on native mods · Cancel. Accepting is remembered (settings.native_mods_noticed, absent from the file while false), so it never shows again; Cancel installs nothing. The CLI prints it once.
  • Unchanged: the build still starts only from its own red trust warning ("I trust these mods: build"), whose time line now says 20 to 30 minutes the first time (it downloads Rust) instead of about ten. The Settings switch still turns them off. Turning a mod off in the game's Options > Mods works as before (game side, untouched).

No WebAssembly mod is considered (they are being removed).

Test: installing_a_native_mod_turns_native_mods_on (no native mod stays off, a native one turns on, on stays on, the notice only before the first, old settings files read as off and not noticed). Strings in fr, de, ru; docs/native-mods.md updated. Not driven in a real window: the notice needs a click on a registry native mod's Install.

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

Check Result
Scope ✅ 10 files, +170 −9
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed
launcher rustfmt ✅
launcher clippy ✅
launcher tests ✅ 251 passed
Parity ➖ lan_integration listed for CI (the launcher is not in the LAN suite)

🤖 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/3596 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/launcher-native-mods-auto-on` --- ### 📝 Commits (2) - [`f220157`](https://github.com/horizon-rust/horizon/commit/f220157a0fff07d101e0fa865f7a79b92d192ce3) Launcher: installing a native mod turns native mods on - [`8ea9a2c`](https://github.com/horizon-rust/horizon/commit/8ea9a2c849165da4a373622a836584cec51cb283) Merge remote-tracking branch 'origin/main' into fix/launcher-native-mods-auto-on ### 📊 Changes **10 files changed** (+170 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/native-mods.md` (+3 -2) 📝 `launcher/lang/de.json` (+4 -2) 📝 `launcher/lang/fr.json` (+3 -1) 📝 `launcher/lang/ru.json` (+3 -1) 📝 `launcher/src/backend.rs` (+6 -2) 📝 `launcher/src/browser/horizon.rs` (+8 -0) 📝 `launcher/src/cli.rs` (+12 -0) 📝 `launcher/src/main.rs` (+1 -1) 📝 `launcher/src/mods_page.rs` (+74 -0) 📝 `launcher/src/native_mods.rs` (+56 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Ludovic's decision (2026-10-29): native mods turn on automatically when a player installs a native mod. **Before:** installing a native mod from the Mods page put its `.hnmod` in `horizon-native-mods/`, and nothing else happened until the player found Settings → Game → **Native mods (experimental)** and turned it on. **Now:** - **Installing a native mod turns Native mods on** (`native_mods::turns_on`, read from the instance's installed list after every install or update, from the browse list or a project page), so Settings offers **Build** at once. Players who never install one keep them off. `horizon-launcher mods install` does the same. - **A one-time notice first.** The first Install of a registry native mod (`browser::horizon::is_native_mod`, read from the index already in memory, never the network) shows, before anything is installed: *"Native mods compile into a game of their own. Installing one turns Native mods on: you then build the game with it in Settings > Native mods. The first build downloads Rust and can take 20 to 30 minutes; later builds are faster."* · **Install and turn on native mods** · **Cancel**. Accepting is remembered (`settings.native_mods_noticed`, absent from the file while false), so it never shows again; Cancel installs nothing. The CLI prints it once. - **Unchanged:** the build still starts only from its own red trust warning ("I trust these mods: build"), whose time line now says 20 to 30 minutes the first time (it downloads Rust) instead of about ten. The Settings switch still turns them off. Turning a mod off in the game's Options > Mods works as before (game side, untouched). No WebAssembly mod is considered (they are being removed). Test: `installing_a_native_mod_turns_native_mods_on` (no native mod stays off, a native one turns on, on stays on, the notice only before the first, old settings files read as off and not noticed). Strings in fr, de, ru; docs/native-mods.md updated. Not driven in a real window: the notice needs a click on a registry native mod's Install. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at d203ca04b, 1 min 11 s) | Check | Result | | --- | --- | | Scope | ✅ 10 files, +170 −9 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed | | launcher rustfmt | ✅ | | launcher clippy | ✅ | | launcher tests | ✅ 251 passed | | Parity | ➖ lan_integration listed for CI (the launcher is not in the LAN suite) | 🤖 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:10:07 +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#5084
No description provided.