Skip to content

feat(infrast): Rotation 进驻总览预设 UI 与内联 preset 参数 - #98

Open
xjbsteven wants to merge 1 commit into
MaaAssistantArknights:masterfrom
xjbsteven:feat/infrast-auto-advance-plan-index
Open

feat(infrast): Rotation 进驻总览预设 UI 与内联 preset 参数#98
xjbsteven wants to merge 1 commit into
MaaAssistantArknights:masterfrom
xjbsteven:feat/infrast-auto-advance-plan-index

Conversation

@xjbsteven

@xjbsteven xjbsteven commented Jun 30, 2026

Copy link
Copy Markdown

Summary

  • Rotation station_preset:布局 Stepper、设施勾选、无人机、会客室开关、干员休整
  • 内联 preset / drones API 序列化(对接主仓 Core InfrastTask
  • 默认设施布局 423;新建任务继承 UserDefaults 上次布局
  • auto_advance_plan_index 仅 Custom 模式

主仓 PR:MaaAssistantArknights#17164(本 PR 须先合并,再由主仓 bump 子模块指针)

Test plan

  • Mac 开发版编译 + 真机实测(Rotation station_preset)

Made with Cursor

Summary by Sourcery

在核心 InfrastTask API 参数中,新增一种轮换样式(rotation style),该样式使用基础概览预设以及线路(wire)基础设施配置。

新功能:

  • 引入轮换样式选择器,用于在游戏内轮换和站点预设之间切换。
  • 提供 UI,用于配置站点预设布局、选定房间、休息行为以及预设特定的无人机使用方式。
  • 为每个任务提供对接待线索处理的控制,以及自动推进自定义计划索引的支持。
  • 为新的基础设施任务持久化并复用上一次使用的站点布局,作为默认配置,包括捆绑的预设计划。

增强:

  • 将基础设施任务参数重构为专用的 API 参数类型,并为预设、自定义计划和普通模式提供模式感知的序列化方式。
  • 改进基础设施任务的字幕和摘要,使其更清晰地体现自定义计划、轮换预设和游戏内轮换。
  • 在创建新的基础设施任务时,以基于预设的默认值进行初始化,而不是使用空配置。
Original summary in English

Summary by Sourcery

Add a new rotation style that uses base overview presets and wire infrast configuration to the core InfrastTask API parameters.

New Features:

  • Introduce a rotation style selector to switch between in-game rotation and station presets.
  • Provide UI for configuring station preset layouts, selected rooms, rest behavior, and preset-specific drone usage.
  • Add support for per-task control of reception clue handling and auto-advancing custom plan indices.
  • Persist and reuse the last used station layout as defaults for new infrastructure tasks, including a bundled preset plan.

Enhancements:

  • Refactor infrastructure task parameters into a dedicated API params type with mode-aware serialization for presets, custom plans, and normal modes.
  • Improve subtitles and summaries for infrastructure tasks to reflect custom plans, rotation presets, and in-game rotation more clearly.
  • Initialize new infrastructure tasks with preset-based defaults instead of an empty configuration.

@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.

Hey - 我在这里留下了一些高层面的反馈:

  • 与接收相关的开关现在在 defaultPreferenceFormstationPresetPreferenceForm 中被重复定义,而且排序也不一致,这会让视图更难维护;可以考虑抽取一个共享的子视图或辅助方法,在不同模式下保持这组开关的集合和顺序一致。
  • 现在 DronesPayload 已经是 Encodable 并接入了 InfrastTaskAPIParamsStationPresetDrones.apiPayload 字典似乎已经不再使用;可以考虑删除 apiPayload,或者让所有序列化都通过同一条代码路径,以避免逻辑分叉。
给 AI 代理的提示词
Please address the comments from this code review:

## Overall Comments
- 与接收相关的开关现在在 `defaultPreferenceForm``stationPresetPreferenceForm` 中被重复定义,而且排序也不一致,这会让视图更难维护;可以考虑抽取一个共享的子视图或辅助方法,在不同模式下保持这组开关的集合和顺序一致。
- 现在 `DronesPayload` 已经是 Encodable 并接入了 `InfrastTaskAPIParams``StationPresetDrones.apiPayload` 字典似乎已经不再使用;可以考虑删除 `apiPayload`,或者让所有序列化都通过同一条代码路径,以避免逻辑分叉。

Sourcery 对开源项目是免费的——如果你喜欢我们的代码审查,请考虑分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进今后的代码审查。
Original comment in English

Hey - I've left some high level feedback:

  • The reception-related toggles are now duplicated and ordered differently between defaultPreferenceForm and stationPresetPreferenceForm, which makes the view harder to maintain; consider extracting a shared subview or helper to keep the set and ordering of toggles consistent across modes.
  • The StationPresetDrones.apiPayload dictionary appears unused now that DronesPayload is Encodable and wired into InfrastTaskAPIParams; consider either removing apiPayload or routing all serialization through a single code path to avoid divergence.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The reception-related toggles are now duplicated and ordered differently between `defaultPreferenceForm` and `stationPresetPreferenceForm`, which makes the view harder to maintain; consider extracting a shared subview or helper to keep the set and ordering of toggles consistent across modes.
- The `StationPresetDrones.apiPayload` dictionary appears unused now that `DronesPayload` is Encodable and wired into `InfrastTaskAPIParams`; consider either removing `apiPayload` or routing all serialization through a single code path to avoid divergence.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@xjbsteven
xjbsteven force-pushed the feat/infrast-auto-advance-plan-index branch from 711daf6 to 7b11ba5 Compare June 30, 2026 03:03
- Custom 模式 auto_advance_plan_index:任务链完成后自动切下一班次
- Rotation station_preset:布局 Stepper、设施勾选、无人机、会客室开关
- 内联 preset/drones API 序列化;默认布局 423,UserDefaults 记忆上次布局

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant