feat(mods): menu theme mods load while the game runs, and two small menu follow-ups #3141

Merged
HumanBean merged 3 commits from HumanBean/Longshot:feat/theme-mods-live into main 2026-12-04 00:47:43 +00:00
Owner

Summary

Work in progress: not tried in the game.

Three follow-ups to the menu work, one commit each:

  • Menu theme mods load while the game runs. A mod that ships only menu themes (with or without ReShade presets) used
    to wait for a restart when copied in. It now joins, switches on and off, and can be removed while the game runs, as a
    presets-only mod does since #3105. While it is off, its
    theme shows as Modern dark and the player's choice is kept. Its Mods tab row lists "Menu themes".
  • Enable cheats' help now says that turning cheats on turns Autosave off (13 languages).
  • No "Unsafe" label on a player's mod in the Mods tab (row help, About, Permissions page). What a mod may do is
    unchanged: the permission prompt with each permission's words and risk, a code mod's warning and Accept, the grants and
    the sandbox are as before. A permission's risk word "unsafe" in the prompt stays.

Testing

Tested: Linux, game-free, before the last rebase: api tests (559 passed), the system mods' tests in modtool
(37 passed), sysmod-cheats (59 passed, with #3140's test
fix applied temporarily), longshot-game's menu theme test. The new tests fail with main's code. After rebasing onto
the current main (no conflicts): test_i18n_complete, test_menu_i18n, test_doc_anchors; the Rust and mod tests
were not run again. Clippy has not linted this (it stopped at an error on main that #3140 fixes). Nothing was run in
the game.

Still to test:

  • Linux or Windows: with the game running, copy a themes-only mod into mods, switch it on in the Mods tab, pick its
    theme, switch it off, remove it; expecting each to apply at once and Modern dark while it is off (by hand).
  • The Mods tab with a mod that asks for dangerous access: expecting the permission prompt as before, and no "Unsafe"
    label (by hand).

Measurements

Nothing to measure: it acts when a mod is added or switched, and changes texts.

Risks

  • A player has one warning fewer: the "Unsafe: full access..." line on a mod's row and About is gone.
  • Themes mods are now re-read in play; a broken one is what to try.
  • A revert is enough; nothing changes in saves or options.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (three small follow-ups in one)
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (not run in the game)
  • mise run test passes (any failure that also fails on main is named). (not run whole)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Screenshots of the same spot on main and here, for a change that shows on screen. (not run)
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ

## Summary **Work in progress:** not tried in the game. Three follow-ups to the menu work, one commit each: - **Menu theme mods load while the game runs.** A mod that ships only menu themes (with or without ReShade presets) used to wait for a restart when copied in. It now joins, switches on and off, and can be removed while the game runs, as a presets-only mod does since [#3105](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3105). While it is off, its theme shows as Modern dark and the player's choice is kept. Its Mods tab row lists "Menu themes". - **Enable cheats' help** now says that turning cheats on turns Autosave off (13 languages). - **No "Unsafe" label** on a player's mod in the Mods tab (row help, About, Permissions page). What a mod may do is unchanged: the permission prompt with each permission's words and risk, a code mod's warning and Accept, the grants and the sandbox are as before. A permission's risk word "unsafe" in the prompt stays. ## Testing **Tested:** Linux, game-free, before the last rebase: `api` tests (559 passed), the system mods' tests in `modtool` (37 passed), `sysmod-cheats` (59 passed, with [#3140](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3140)'s test fix applied temporarily), `longshot-game`'s menu theme test. The new tests fail with `main`'s code. After rebasing onto the current `main` (no conflicts): `test_i18n_complete`, `test_menu_i18n`, `test_doc_anchors`; the Rust and mod tests were not run again. Clippy has not linted this (it stopped at an error on `main` that #3140 fixes). Nothing was run in the game. **Still to test:** - Linux or Windows: with the game running, copy a themes-only mod into `mods`, switch it on in the Mods tab, pick its theme, switch it off, remove it; expecting each to apply at once and Modern dark while it is off (by hand). - The Mods tab with a mod that asks for dangerous access: expecting the permission prompt as before, and no "Unsafe" label (by hand). ## Measurements Nothing to measure: it acts when a mod is added or switched, and changes texts. ## Risks - **A player has one warning fewer:** the "Unsafe: full access..." line on a mod's row and About is gone. - **Themes mods** are now re-read in play; a broken one is what to try. - A revert is enough; nothing changes in saves or options. ## Checklist ### Ready for review - [ ] One topic, on current `main`; the title is a Conventional Commit. (three small follow-ups in one) - [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. (not run in the game) - [ ] `mise run test` passes (any failure that also fails on `main` is named). (not run whole) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. (not run) - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
A themes-only mod (themes with or without ReShade presets) is switched and
removed while the game runs, as a presets-only mod is, instead of being held
for a restart. Its themes are read at the frame it is switched, added or taken
out, with hot reload's watch off too. The player's chosen theme is still kept
by its key while the mod is off.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
fix(mods): no Unsafe label on a player's mod
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
PR description / Title and description (pull_request_target) Failing after 6s
CI / Third-party parts and guide screenshots (pull_request) Successful in 10s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m21s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 15m41s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 16m50s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 14m58s
CI / Website build and checks (pull_request) Failing after 1m14s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 15m8s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 54m18s
90fcdd2203
The Mods tab no longer labels a mod of the unsafe tier: not in its row's help
or About, nor beside its permissions. What a mod may do is unchanged: the
permission prompt (each permission's words and risk), a code mod's warning and
Accept, the grants and the sandbox are as before, and a high risk is still
marked on the Permissions page.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
HumanBean changed title from WIP: feat(mods): menu theme mods load while the game runs, and two small menu follow-ups to feat(mods): menu theme mods load while the game runs, and two small menu follow-ups 2026-12-04 00:47:33 +00:00
HumanBean deleted branch feat/theme-mods-live 2026-12-04 00:47:43 +00:00
Sign in to join this conversation.
No reviewers
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
MagicBeanDev/Longshot!3141
No description provided.