WIP: fix(menu): the restart line and question say which mods are switched, On or Off #305
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!305
Loading…
Reference in a new issue
No description provided.
Delete branch "snaildev99/Longshot:fix/mods-restart-names"
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?
Depends on #134 (the Mods tab): this branch is #134's head with one commit on top, so until #134 is in, the diff here shows its commits too. The commit to read is the last one. It stays work in progress until then.
Why
With #134's Mods tab, switching a mod asks for a restart, but the texts say "the mods" whatever changed: "Restart needed: the mods" and "Restart to apply the mods?" for one mod or five, switched on or off. A player who chose Later cannot see afterwards which mods wait for the restart, and after Later a mod switched again in the same visit to the menu is not asked about, where a row of the other tabs is. All three were found playing #134 by hand with eight mods.
What changed
gpu/vk/vk_menu.cpp,draw_ask): it counts what a restart applies ("Restart to apply 1 setting and 2 mods?") and lists it under that, a line each with the menu's diamond: the rows changed, the mods switched with their switch's word ("Character field swap (Off)"), the order when it changed. Eight lines at most, the last one then how many more; the window is as tall as its lines, and as before for one line and no list. This is the question for the other tabs' rows too, which were all put into its one sentence.restart_line,gpu/vk/menu_restart.hline_forms): the rows stay by name, the mods come after them as a group: one mod's switch by name, more as "2 mods", the first form that fits the line ("Output resolution, 2 mods", then "Output resolution and 1 more, 2 mods", then "2 settings, 2 mods").menu_restart.hmod_changes;mods_keep_start,restart_texts): the menu keeps the mods as the game started with them before the Mods tab's first change and tells what differs. No new host function:mod_infogives the list now. "the mods" stays for when the start's list is not known.draw_mods): a mod switched since the start has the gold mark a changed row has, and its help says it takes effect after a restart. The line is not shown while the selected mod's own switch is all that waits.menu_tick): a mod's change is told to the restart state asset_rowtells a row's, so a mod switched again in the same visit is asked about at the next close.tests/test_menu_restart.cpp(mod_changes,list,line_forms),tests/test_mods_menu.py(the menu's use of them); the README's Mods section and its paragraph on the restart.Flags and settings
Measurements
this PR: fix/mods-restart-names @
f3f11547Baseline: #134 @
5142c2d7main has no Mods tab, so main against this PR would show #134's change, not this one's: the comparison is #134's head against this branch, which is that head with one commit.
Hardware: RTX 3090, Windows 11
Scene: the Insert menu's Mods and Graphics tabs over the game in play, 2048x1152, eight mods in the
modsfolderMethod: this PR's
tests/test_menu_restart.cppandtests/test_mods_menu.pyon #134's sources and on this PR's (the files copied over #134's), twice each, the same result both times; and the menu by hand, with the pictures belowHow to reproduce:
python -I -B tests/test_menu_restart.py --cxx clang++ --cc clang,python -I -B tests/test_mods_menu.py --cxx clang++; in the game with two or more mods, F1, the Mods tab, switch two mods, close the menu5142c2d7f3f11547tests/test_menu_restart.cpp(this PR's)no member named 'Mod' in namespace 'mkwvk::menu_restart'tests/test_mods_menu.py(this PR's)the restart line and question do not name the mods a restart would switchTesting
Tested:
python -I -B tests/run_all.pyon Windows 11 atf3f11547, with llvm-mingw'sbinon the path: 498 passed, 36 skipped, 8 failed. The same eight fail on #134 @5142c2d7and on its base of main on this PC:test_builder_details_hitbox,test_builder_dlss_update,test_portable_archive,test_portable_builder_home,test_portable_builder_startup(no .NET SDK here),test_check_third_party,test_release,test_setup_runtime.vk_menu.cppcompiled alone atf3f11547with the build's flags and include folders (-fsyntax-only): no error, no new warning.Not tested:
Needs other testers:
Screenshots
From the test build named under Testing (this commit and #304's on top of #134), Windows 11, RTX 3090, taken by the tester, at this branch's second cut (the texts as they are now; the box of the help was moved since, in #304).
this PR (in the test build): the restart question, counting what it applies and listing it.
this PR (in the test build): the Mods tab with two mods switched, the line saying "2 mods".
Risk and rollback
The restart question changes for every tab: a count and a list where a sentence named the rows. A host whose mods change before the menu first runs would get "the mods" as before. Reverting the commit is enough.
Reviewer notes
help_boxa note with three states; whichever goes in second I rebase (the Mods tab's call then passes 1 before a switch and 2 after).Issues
See #134
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
"Restart needed: the mods" and "Restart to apply the mods?" read the same for one mod or several, switched on or off, and the question put every changed row into one sentence. - The question counts what a restart applies ("Restart to apply 1 setting and 2 mods?") and lists it under that, a line each: the rows changed, the mods switched with their switch's word ("Character field swap (Off)"), the order when it changed. Eight lines at most; its window is as tall as its lines, and as before for one line and no list. - The "Restart needed" line keeps the rows by name and groups the mods after them: one mod's switch by name, more as "2 mods" (menu_restart.h line_forms: the first form that fits the line). - On the Mods tab the line is not shown while the selected mod's own switch, which its help says, is all that waits. - menu_restart.h: mod_changes (what differs from the mods as the game started), list and line_forms, checked in tests/test_menu_restart.cpp; vk_menu.cpp keeps the mods as the game started before the Mods tab's first change. "the mods" stays for when they are not known. - A mod switched since the start has the gold mark a changed row has, and its help says it takes effect after a restart. - A mod's change is told to the restart state as set_row tells a row's: after Later, a mod switched again in the same visit to the menu is asked about at the next close. Co-Authored-By: Claude Fable 5.2 <[email protected]>Yeetbot90 referenced this pull request2026-11-14 10:05:30 +00:00
This pull request builds on #134 and conflicts with
mainthrough it. Could you rebase it once #134 has landed or been rebased? Thank you.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.