Skip to content

请求适配pretask的controller属性 #262

Open

Description

@duorua

希望可以不显示和控制器不对应的预设
下面是MaaFw的字段
pretask object | object[] 💡 v2.7.0
可选。Controller 启动前执行的预任务配置,可以是单个对象或对象数组。Client 应在创建或连接 Controller 前按顺序启动这些程序,并等待其执行结束。若预任务启动失败或返回非零退出码,Client 应中止本次启动并向用户报告错误。
预任务的 CWD 为 interface.json 所在目录。
同一 pretask 字段也可出现在由顶层 import 加载的其他 PI 片段文件中;Client 应将各处的预任务合并为一条有序列表:先执行主 interface.json 中的条目(单个对象视为一项),再按 import 数组顺序依次追加各被引用文件中的 pretask(若为数组则按数组顺序;若为单个对象则视为一项)。实际执行顺序与该合并后的列表一致。

resource string[] 💡 v2.8.1
可选。指定该预任务支持的资源包列表。数组元素应与 resource 配置中的 name 字段对应。若不指定,则表示该预任务在所有资源包中都可用。Client 可将不支持当前资源包的预任务隐藏,或以不可用(灰色/禁用)状态展示以提示用户。

controller string[] 💡 v2.8.1
可选。指定该预任务支持的控制器类型列表。数组元素应与 controller 配置中的 name 字段对应。若不指定,则表示该预任务在所有控制器类型中都可用。Client 可将不支持当前控制器的预任务隐藏,或以不可用(灰色/禁用)状态展示以提示用户。

Activity

  1. changed the title [-]大佬可以适配pretask的controller选项吗[/-] [+]大佬可以适配pretask的controller属性吗[/+] on Oct 20, 2026
  2. changed the title [-]大佬可以适配pretask的controller属性吗[/-] [+]请求适配pretask的controller属性吗[/+] on Oct 20, 2026
  3. changed the title [-]请求适配pretask的controller属性吗[/-] [+]请求适配pretask的controller属性[/+] on Oct 20, 2026
  4. Craun718 commented on Oct 21, 2026

    @Craun718
    Member

    其实想说的应该是preset吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions