Repository navigation
fix(profile): 启动时不再关掉在 CeleMod 之外启用的 Mod - #101
Open
std-external wants to merge 1 commit into
Open
std-external wants to merge 1 commit into
std-external wants to merge 1 commit into
Conversation
预设模式在每次启动时都会把 blacklist.txt 重建成白名单。之前的修复只 收养 CeleMod「没见过」的 Mod,而 CeleMod 见过的 Mod 若是在游戏里的 Toggle Mods 菜单(或别的启动器)里被重新启用,下一次启动应用预设时 又会被关掉。 现在区分两种情况:当前 blacklist.txt 仍加载、且没有任何预设启用的 Mod,说明这次启用来自 CeleMod 之外,按当前状态收养进正在应用的预设; 若另一个预设本来就启用它,则保持预设切换的语义不变。「下载后默认 行为」只决定新加入的 Mod 的状态,不再影响这种外部启用。
std-external
force-pushed
the
fix/profile-keeps-mods-enabled-outside-celemod
branch
from
October 31, 2026 11:05
042034e to
3df6eca
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.
问题
玩家反馈:在游戏里启用某个 Mod(例:体力条显示)后关掉 CeleMod,再重新启动,这个 Mod 又被自动禁用了,需要每次手动再打开。
原因
预设模式下,
reloadBlacklistState(主页/管理页加载时触发)会先apply_mod_profiles,也就是把blacklist.txt按预设重建成白名单。Everest 只用Mods/blacklist.txt记录禁用项,游戏里的 Toggle Mods 菜单也只改这个文件。selectAdoptableModNames的收养逻辑原本只针对 CeleMod「没见过」的 Mod:CeleMod 见过的 Mod 如果是在游戏里被重新启用的,knownNames会把它跳过,随后重建白名单时它就被写回禁用。所以「在游戏里启用过的已知 Mod」每次启动都会被关掉。修改
selectAdoptableModNames增加allProfileEnabledNames(所有预设启用的 Mod 名),并把「Mod 是否新加入」和「Mod 当前是否被 blacklist.txt 加载」分开判断:blacklist.txt加载、且没有任何预设启用它 → 这次启用来自 CeleMod 之外,按当前状态收养进正在应用的预设;alwaysOnMods、被 CeleMod 主动禁用的 Mod、同名重复文件的行为不变。!enableNewMods直接整体返回空)。apply_mod_blacklist_profiles未动。验证
src/modAdoption.test.ts新增两条回归用例(旧实现下失败,修改后通过):在修改前跑同一份用例,两条新用例失败(
expected: ["Copied"] actual: [])。pnpm typecheck通过。pnpm lint仍有 5 个与本 PR 无关的既有 TS6133 报错(catalogDownload.test.ts、SteamLaunchProgress.test.tsx、SteamSyncProgress.test.tsx、stores/download.ts、themePreview.tsx)。备注
blacklist.txt同步最新的禁用列表 #34 的讨论)。本 PR 只处理「外部启用被白名单吞掉」。来源:Celeste 玩家交流群里的反馈。