Port MajsoulMax MITM mod into Akagi-NG#66
Open
Capoouo wants to merge 2 commits intoXe-Persistent:masterfrom
Open
Port MajsoulMax MITM mod into Akagi-NG#66Capoouo wants to merge 2 commits intoXe-Persistent:masterfrom
Capoouo wants to merge 2 commits intoXe-Persistent:masterfrom
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
摘要
實作方式
這次變更是建立在 Akagi-NG 既有架構上做擴充,而不是重寫主架構。
1. Majsoul MITM 改包主鏈
akagi_ng/bridge/majsoul/bridge.pyakagi_ng/bridge/majsoul/liqi.pyakagi_ng/bridge/majsoul/modifier.pyakagi_ng/mitm_client/bridge_addon.py在既有 bridge / mitm 流程中加入 Majsoul mod 的封包解析、改寫與回寫能力。
2. mod proto 改為動態 loader
akagi_ng/bridge/majsoul/mod_proto/loader.pyakagi_ng/bridge/majsoul/mod_proto/config.descakagi_ng/bridge/majsoul/mod_proto/sheets.desc這次不再把
config_pb2.py/sheets_pb2.py作為源码納入版本控制,而是改成 descriptor-based loader,方向上對齊liqi.json的處理思路。3. 設定與前端
akagi_ng/dataserver/api.pyakagi_frontend/src/components/SettingsPanel.tsxakagi_frontend/src/components/settings/MajsoulModSection.tsxakagi_frontend/src/types.tsassets/settings.schema.json加入 Majsoul Mod 設定 API、前端設定區塊與多語系文案。
測試
已補充這次移植相關單元測試,覆蓋重點包含:
本地驗證:
ruff check通過ruff format --check通過175 passed這次移植主鏈 coverage:
bridge.py86%liqi.py95%modifier.py92%loader.py100%bridge_addon.py98%api.py94%總 coverage:
設計原則