fix(task): 游戏已在运行时提示启动参数本轮不会生效 - #867
Open
beichen24a1 wants to merge 2 commits into
Open
beichen24a1 wants to merge 2 commits into
beichen24a1 wants to merge 2 commits into
Conversation
窗口匹配分支同样绕过 MAS 启动游戏,漏了启动参数提示。
There was a problem hiding this comment.
Sorry @beichen24a1, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 2 days and 5 hours by commenting @sourcery-ai review. Upgrade to get a review now.
审查者指南本 PR 在各支持 Game.Arguments 的任务启动流程中,为“游戏已运行、MAS 跳过重复启动”的路径增加条件式提示,并通过既有日志渠道展示未生效的参数原文;同时补充 changelog,HSR 与 MaaEnd 因实现边界明确不纳入本次改动。 跳过启动参数提示流程图flowchart TD
A[任务准备启动游戏] --> B{检测到游戏已在运行}
B -->|否| C[按配置启动游戏]
B -->|是| D{Game.Arguments 有内容}
D -->|否| E[记录已运行并跳过启动]
D -->|是| F[记录启动参数本轮不会应用]
F --> E
E --> G[继续任务流程]
文件级变更
提示与命令与 Sourcery 交互
自定义使用体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's Guide本 PR 在各支持 Game.Arguments 的任务启动流程中,为“游戏已运行、MAS 跳过重复启动”的路径增加条件式提示,并通过既有日志渠道展示未生效的参数原文;同时补充 changelog,HSR 与 MaaEnd 因实现边界明确不纳入本次改动。 Flow diagram for skipped launch argument notificationflowchart TD
A[任务准备启动游戏] --> B{检测到游戏已在运行}
B -->|否| C[按配置启动游戏]
B -->|是| D{Game.Arguments 有内容}
D -->|否| E[记录已运行并跳过启动]
D -->|是| F[记录启动参数本轮不会应用]
F --> E
E --> G[继续任务流程]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
群友反馈「更新后启动参数失效」:游戏已经在运行时 MAS 不会重复启动它,于是配置里的启动参数被静默忽略——界面里参数还在、保存也成功,用户完全看不出这轮没生效。
检测到游戏已在运行,本轮不会应用启动参数(<参数原文>)Game.Arguments时才提示,没配参数的用户不受打扰_note_resolution_override_skipped():提示点紧贴「决定不启动」的那个 return 之前;各专项用自己既有的日志通道(logger.info/_push_dispatch_log/_append_log)没改的两处及理由
HSRConfig的游戏分组里没有Game.Arguments(MaaEnd / MaaFW / general / ok-ww / ok-nte / zzz 都有),用户根本填不到启动参数,HSR 启动游戏也不带参数。硬加这行会在「游戏已在运行」这条最常见路径上抛AttributeError。要覆盖得先在HSRConfig里补字段并真的把参数传下去,属另一个改动——本次不做。game_arguments交给 MaaEnd 自己启动游戏,没有「MAS 跳过启动」这条分支可挂。验证
ruff check/ruff format --check:通过(改动的 6 个文件)python -m pytest tests/task -q:17 passedpython -m pytest tests --collect-only -q:308 collected,exit 0Sourcery 总结
当已在运行的游戏导致此任务无法应用其配置的启动参数时,通知用户。
Bug 修复:
功能增强:
日常维护:
Original summary in English
Summary by Sourcery
Inform users when an already-running game prevents this task from applying its configured launch arguments.
Bug Fixes:
Enhancements:
Chores: