Repository navigation
miaonet: 删掉「隐藏原生越界名字」选项(这个职责归 MiaoNet 自己) - #9
Merged
Dilant merged 1 commit intoNov 1, 2026
Merged
Conversation
Collaborator
|
我觉得直接把这个选项删掉吧
|
MiaoNet already owns this behaviour: GhostNameTag clamps names for players outside the camera onto the screen edge and fades them to OffScreenPlayerNameOpacity, which players can set to 0 if they want them gone. Keeping a second switch in mbqol meant coupling it to the minimap options and silently swallowing the labels when the plugin was enabled. Removes the GhostNameTag.Render detour (and its reflection/IL plumbing), the setting, the options row and the README lines.
std-external
force-pushed
the
fix/miaonet-offscreen-names
branch
from
November 1, 2026 07:41
7bfb3fb to
46834c1
Compare
Contributor
Author
|
已按这个意见改成直接删除,PR 现在是纯删除(+1/−84,5 个文件):
老配置里的旧键是安全的:Everest 的 验证: 流程上记下了:这类「先定成因」的活应该先在群里把成因和修改计划说清楚、等确认,再动 PR。 |
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.
按 @Dilant 的意见,这个改动从「修 bug」改成「直接删掉这个选项」。
为什么删
GhostNameTag.Render本来就把屏幕外的名字夹到屏幕边缘再按OffScreenPlayerNameOpacity渐隐,玩家把它设成 0 就没有越界名字了,不需要再加一个开关。而且默认开启时会直接吞掉标签。
删了什么
Source/MiaoNetBridge.cs:整个TryInstallOffscreenNameHook()(GhostNameTag.Render的DynamicMethod +
MonoMod.RuntimeDetour.Hookdetour)、ShouldRenderGhostNameTag()、钩子字段,以及
Update()的安装调用和Unload()的清理;顺带去掉System.Reflection.Emit、MonoMod.RuntimeDetour两个 using。MiaoNet 桥的其它部分(读玩家位置/名字/头像、/qol聊天命令)不动。Source/QolSettings.cs:HideMiaoNetOffscreenNames设置项。Source/QolSettingsOverlay.cs:小地图页里的「隐藏原生越界名字」开关。README.md/README.en.md:对应两行说明。删除设置项对老配置安全:Everest 的
YamlHelper.DeserializerUsing用IgnoreUnmatchedProperties()(Celeste.Mod.mm/Mod/Helpers/YamlHelper.cs:26),旧的HideMiaoNetOffscreenNames: true键会被忽略,下次保存设置就自动消失。净效果:
+1 / -84,5 个文件,没有残留的死代码。测试
dotnet build Source/MicroblocksQolUtils.csproj -c Release(CelesteRoot = Evereststable-1.6485.0lib-stripped)→ Build succeeded,0 warning / 0 error
dotnet run --project Tests/Capture/Capture.csproj -c Release→ PASS