修复 Mod 缓存缺失时的错误启用,并接入自检 CI - #6
Merged
Merged
Conversation
kldsjfas
marked this pull request as ready for review
September 15, 2026 14:04
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 禁用后,如果部分缓存丢失且原始目录已移动,旧逻辑仍会将它标为启用:可用的包被替换,缺失的包却保留原版或其他 Mod 的内容。现在会在写入前检查当前游戏仍需要的每个资源包;缺失或不可读时列出包名,并保持游戏文件和禁用状态不变。完整缓存、原始目录兜底和游戏更新后跳过已移除资源的行为保持兼容。
将现有安全自检接入 PR,并作为主分支及标签构建的前置检查;自检通过后才打包。README 补充本地检查命令,同时把 Python 最低版本修正为当前 NumPy 所需的 3.11。
验证:
python selfcheck.py全部 10 项通过,覆盖来源缺失、不可读、缓存完整、原始目录兜底及游戏更新场景。git diff --check通过。测试使用临时目录中的模拟资源。本次未运行真实游戏,也未制作新版 exe;预检查不提供后续文件复制过程的事务回滚。