“管理”页面优化:“只显示不被依赖的mod”按照“检查可选依赖”检查、各开关的状态重启保存、增加了一个按钮来修复依赖、依赖判定中MiaoNet可作为CelesteNet的替代#66
Open
Kazero00 wants to merge 4 commits into
Open
“管理”页面优化:“只显示不被依赖的mod”按照“检查可选依赖”检查、各开关的状态重启保存、增加了一个按钮来修复依赖、依赖判定中MiaoNet可作为CelesteNet的替代#66Kazero00 wants to merge 4 commits into
Kazero00 wants to merge 4 commits into
Conversation
added 3 commits
June 11, 2026 22:45
- dfsRemove 现在响应「检查可选依赖」开关:开启时把可选依赖计入「被依赖」, 使仅作为可选依赖的 mod 也被过滤掉 - 新增栈路径(dfsPath)环检测,避免可选依赖常见的互相依赖环 导致无限递归/栈溢出闪退
将 checkOptionalDep / excludeDependents / fullTree / showUpdate / showDetailed 从 useState 改为 createPersistedStateByKey 持久化,并挂载各自的 init hook 使其在重启后读回;同时补上 autoDisableNewMods 遗漏的 initAutoDisableNewMods() 调用(原先只写不读,重启后丢失)。
在 Manage 页"禁用全部 / 启用全部"右侧新增按钮,一键启用所有 "已启用 Mod 引用的、已安装但当前被禁用"的依赖,修复依赖损坏态。 需要该按钮的场景(启用态的 Mod 引用了被禁用的依赖): - 手动禁用某个依赖:禁用级联只向下清孤儿子依赖,不阻止关掉仍被 其他已启用 Mod 需要的依赖。 - 禁用 A 时级联误伤共享依赖:禁用 A 会自动连带禁用 A、B 的共同 依赖 C,从而破坏 B 的依赖——因为 dependedBy 反向依赖表只记录 非可选依赖,当 B→C 为可选边时孤儿检查无法保护 C。 - 打开"检查可选依赖":此前被忽略的可选依赖(已装但禁用)进入考量, 损坏态浮现。 - Profile 切换 / 导入:黑名单整体替换可能落入不一致状态。 实现复用 switchMod 递归启用路径,因此遵循"检查可选依赖"开关、 跳过 CelesteNet.Client、由 visited 处理依赖循环。
- 任一启用时,另一个的依赖视为已满足(不再报「依赖·缺失/未启用」)
- 在被替代的 Mod 行末尾显示「{alt} 已开启」徽标
- excludeFromAutoEnableList 中添加 'MiaoNet'
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.
No description provided.