Repository navigation
Hook:Aokana 同一句被设两次时,第二次也隐藏原文 - #696
Open
Plastic-time wants to merge 5 commits into
Open
Plastic-time wants to merge 5 commits into
Plastic-time wants to merge 5 commits into
Conversation
The same-setter twin now turns on at its first repeat, and repeats are compared without tags, so grey read lines count. Aokana's typewriter sets the whole line every frame with a per-character alpha fade; its buffered frames match row by row, and its frames are blanked with every tag and alpha kept.
The line that made MeguLit switch to the Aokana stream was not recorded as the selected line, so its typewriter twin was only recognised from the next line on, and the second line still showed the original.
A twin now repeats the line itself or a typewriter buffer of it (every row a start of the line, the last the whole line); a backlog page that merely holds the line is no twin. One embed frame must be the whole line. A same-hook context counts at its first repeat only for a Unity text setter, not any JIT:UNITY hook. The E560 guard now covers twins: more than two twins writing the shown line within 2 s go to cover mode, as other contexts of the selected Unity setter already do. Aokana has two. HookBridge --self-test runs the twin rules.
…r-twin # Conflicts: # native/HookBridge.cs
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.
问题
Aokana 开着「隐藏游戏原文」,可游戏自己的日文还留在对话框里,MeguLit 的日文又叠在上面,一句话显示两遍。
日志显示,每句台词经
TMP_Text.set_text设了两次,来自同一个 Hook 的两个上下文:这个上下文两边都没接住:
sel.code!=c.code),注释说交给ManyUnityContexts。ManyUnityContexts只在 embed 回调里检查,而这个上下文没开写回,只走 OnOutput,一直被当成 aux。改动
JaTwinHit:选中的 Unity 文本 setter 自己的另一个上下文(code 和 name 相同),重复选中的那句时也算日文双胞胎,第一次重复就打开写回,开头几句也能藏住。别的 Hook 仍要重复两次。<alpha>,外层透明色盖不住。这种帧把字换成空白,标签和 alpha 原样保留。--self-test会跑这些规则。在 Aokana(Steam 版)里实测:从第二句起原文不再出现,打字过程中也藏住,退出确认框等界面文字不受影响。切换流之后的第一句还会显示原文。单独一行的 backlog 或存档预览如果在新句出现 1.5 秒内显示同一句,也会被遮住。
修改前 / 修改后: