添加 MOD 管理器,支持运行时热启用和软停用 MOD,优化 MOD 列表刷新功能#549
Open
AlexBybye wants to merge 1 commit into
Open
Conversation
Co-authored-by: HKO00O <by9000p@foxmail.com>
Owner
|
我讨厌纯AI编程就是因为AI会加一堆没有用的东西, 比如说那个防抖, 明明一个禁用UI即可, 增加太多复杂度 |
Author
|
啊,那个是我自己提出的,我要不要简化下功能?
發自我的iPhone
…------------------ 原始邮件 ------------------
寄件人: ZouJin ***@***.***>
发送时间: 2026年7月1日 23:01
收件人: LorisYounger/VPet ***@***.***>
抄送: Klosure ***@***.***>, Author ***@***.***>
主旨: Re: [LorisYounger/VPet] 添加 MOD 管理器,支持运行时热启用和软停用 MOD,优化 MOD 列表刷新功能 (PR #549)
LorisYounger left a comment (LorisYounger/VPet#549)
我讨厌纯AI编程就是因为AI会加一堆没有用的东西, 比如说那个防抖, 明明一个禁用UI即可, 增加太多复杂度
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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.
本次提交已经在我自己仓库另一个分支跑了github action,确认了编译无问题
最重要的是需求本身:插件热插拔:
先把状态写到配置文件,把之前的"停用占位"删掉之后再重新构造 CoreMOD。
新加载的插件依次调 LoadPlugin() 和 GameLoaded()
异常处理是构造失败会自动回滚启用状态
发现无法做到热卸载,查询相关的文档:
https://learn.microsoft.com/zh-tw/dotnet/standard/assembly/unloadability
本次改动预期效果:
不用重启游戏就能启用、停用、发现 MOD 了,且坏 MOD 不会拖垮启动。
但 DLL 本体和动画缓存要等重启才能真正清干净,另外因为缓存是启动时生成的,动画/宠物模型可能仍需重启一次来增添或者解除效果
我认为可以开一个实验分支,然后在分支上检验下热启用、软停用、刷新显示MOD三个功能