Skip to content

fix(SixRealms): 限制选岛连续点击并增加超时退出 - #2000

Merged
runhey merged 1 commit into
runhey:devfrom
leovefy:dev
Nov 2, 2026
Merged

runhey merged 1 commit into
runhey:devfrom
leovefy:dev

Conversation

@leovefy

@leovefy leovefy commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

岛屿识别失败时,六区域轮流试点会持续密集点击。改为共用 1 秒点击间隔,15 秒未进入则抛出 GameStuckError,交由调度器恢复。

验证通过

  • .\toolkit\python.exe -m unittest discover -s tests -p test_six_realms_island_entry.py -v,4 项通过。
  • py_compile 和 git diff --check 通过。
  • 桌面版日志确认试点间隔约 1.25 秒,测试任务正常结束;15 秒超时退出已离线验证。

Sourcery 摘要

限制未知岛屿的进入尝试次数,并在导航卡住时将控制权交还给调度器进行恢复。

错误修复:

  • 在所有入口和取消提示之间强制执行统一的时间间隔,防止因反复尝试进入岛屿而点击过快。
  • 如果无法在 15 秒内成功进入未识别的岛屿,则抛出 GameStuckError。

测试:

  • 新增离线测试,覆盖岛屿入口轮换、点击限速、取消处理、立即完成进入以及超时行为。
Original summary in English

Summary by Sourcery

Bound unknown-island entry attempts and hand stalled navigation back to the scheduler for recovery.

Bug Fixes:

  • Prevent repeated island-entry attempts from clicking too rapidly by enforcing a shared interval across all entrances and cancellation prompts.
  • Raise GameStuckError when an unrecognized island entry does not succeed within 15 seconds.

Tests:

  • Add offline coverage for island-entry cycling, click throttling, cancellation handling, immediate entry completion, and timeout behavior.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗨——我已经审查了你的更改,整体看起来很棒!

Sourcery 评估

已批准。


Sourcery 对开源项目免费——如果你喜欢我们的评审,欢迎分享 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@runhey
runhey merged commit de497a3 into runhey:dev Nov 2, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants