feat: 自由模式,按按键增加时间的功能 - #153
Merged
Merged
Conversation
审查者指南通过按键或长按实现可配置的 Freedom Mode 时间延长功能,使用 Harmony/反射更新底层计时器和倒计时状态,并在时间结束后延长时间时修复计时器 UI。 延长 Freedom Mode 时间的时序图sequenceDiagram
participant GameMainObject
participant FreedomTimer
participant KeyListener
participant GameManager
participant PleaseWaitProcess
participant PleaseWaitMonitor
GameMainObject->>FreedomTimer: OnGameMainObjectUpdate()
FreedomTimer->>GameManager: IsFreedomMode
FreedomTimer->>KeyListener: GetKeyDownOrLongPress(addTimeKey, addTimeLongPress)
KeyListener-->>FreedomTimer: key pressed
FreedomTimer->>GameManager: _freedomTime += addTimeSeconds * 1000L
FreedomTimer->>GameManager: IsFreedomCountDown = true
FreedomTimer->>GameManager: IsFreedomTimeUp = false
FreedomTimer->>FreedomTimer: _pendingUiRefresh = true
PleaseWaitProcess->>FreedomTimer: ResetFreedomTimerState()
FreedomTimer->>GameManager: GetFreedomModeMSec()
FreedomTimer->>PleaseWaitMonitor: IsVisibleFreedomMode()
FreedomTimer->>PleaseWaitMonitor: SetOneMinute()
FreedomTimer->>PleaseWaitMonitor: StopAllCoroutines()
文件级变更
提示和命令与 Sourcery 交互
自定义使用体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's GuideImplements configurable Freedom Mode time extension through a key press or long press, updates the underlying timer and countdown state via Harmony/reflection, and repairs the timer UI when extending time after expiration. Sequence diagram for extending Freedom Mode timesequenceDiagram
participant GameMainObject
participant FreedomTimer
participant KeyListener
participant GameManager
participant PleaseWaitProcess
participant PleaseWaitMonitor
GameMainObject->>FreedomTimer: OnGameMainObjectUpdate()
FreedomTimer->>GameManager: IsFreedomMode
FreedomTimer->>KeyListener: GetKeyDownOrLongPress(addTimeKey, addTimeLongPress)
KeyListener-->>FreedomTimer: key pressed
FreedomTimer->>GameManager: _freedomTime += addTimeSeconds * 1000L
FreedomTimer->>GameManager: IsFreedomCountDown = true
FreedomTimer->>GameManager: IsFreedomTimeUp = false
FreedomTimer->>FreedomTimer: _pendingUiRefresh = true
PleaseWaitProcess->>FreedomTimer: ResetFreedomTimerState()
FreedomTimer->>GameManager: GetFreedomModeMSec()
FreedomTimer->>PleaseWaitMonitor: IsVisibleFreedomMode()
FreedomTimer->>PleaseWaitMonitor: SetOneMinute()
FreedomTimer->>PleaseWaitMonitor: StopAllCoroutines()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
clansty
reviewed
Sep 20, 2026
clansty
approved these changes
Sep 26, 2026
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.
给自由模式实现了一个功能,可以通过按指定的按键,延长自由模式的时间。
Sourcery 总结
允许玩家通过可配置的键盘快捷键,在游戏过程中延长自由模式的时间。
新功能:
错误修复:
Original summary in English
Sourcery 摘要
为自由模式添加可配置的按键加时能力,并确保计时结束后能够正确恢复倒计时状态。
新功能:
错误修复:
Original summary in English
Summary by Sourcery
为自由模式添加可配置的按键加时能力,并确保计时结束后能够正确恢复倒计时状态。
New Features:
Bug Fixes: