js使用地图追踪返回值确定运行结果 - #3545
Conversation
三个脚本的地图追踪调用改用新返回值判定路线成败(完整走完才算成功), 仅在返回值存在时跳过每条路线完成后的坐标校验,旧版本BGI返回undefined时 静默回退原有坐标判定逻辑,无需修改bgi_version。
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
有回退处理,当返回结果为undefined时静默回到原逻辑,因此bgi未更新也不影响使用 |
采集cd管理、AAA狗粮批发、锄地一条龙三脚本的路线成败判定收紧为 runRes.success 为布尔时才使用返回值并输出日志,旧版BGI返回undefined 或字段取值异常时静默走原坐标校验回退,不再输出多余日志。
原版拾取(bgi原版拾取)模式下物品拾取由 BetterGI AutoPick 完成, 脚本仅交互调查,无需滚轮翻动物品列表,跳过两处滚轮动作。
背景
BGI 端(better-genshin-impact PR #3495)为
pathingScript.run / runFile / runFileFromUser新增了执行结果返回值,JS 可直接判断地图追踪是否真正完整走完,无需再依赖"读取路线终点坐标 + 获取当前坐标 + 距离阈值"等旁路推断。改动
适配以下 3 个脚本,使用新返回值确定路线运行结果:
executeRoute使用返回值判定路线成败;路径组模式复用executeRoute返回的pathRes,避免重复坐标校验runPath透出地图追踪执行结果,调用处直接用返回值判定(失败计failcount并跳过记录)runPath透出执行结果,组循环直接用返回值判定(失败发送通知并不记录运行数据)统一判定方式:
兼容性
runFile返回undefined,脚本自动回退原坐标校验逻辑,行为与之前一致bgi_version