mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
docs.更新集成文档(还没实现)
This commit is contained in:
99
docs/集成文档.md
99
docs/集成文档.md
@@ -32,7 +32,7 @@ TaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const char* p
|
||||
##### 任务类型一览
|
||||
|
||||
- `StartUp`
|
||||
开始唤醒
|
||||
开始唤醒
|
||||
不支持设置参数
|
||||
|
||||
- `Fight`
|
||||
@@ -45,12 +45,47 @@ TaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const char* p
|
||||
"mecidine": int, // 最大使用理智药数量,可选,默认 0
|
||||
"stone": int, // 最大吃石头数量,可选,默认 0
|
||||
"times": int, // 指定次数,可选,默认无穷大
|
||||
"penguin_id": string // 企鹅数据汇报 id, 选填
|
||||
}
|
||||
```
|
||||
|
||||
- `Award`
|
||||
领取日常奖励
|
||||
不支持设置参数
|
||||
- `Recruit`
|
||||
公开招募
|
||||
|
||||
```jsonc
|
||||
// 对应的任务参数
|
||||
{
|
||||
"refresh": bool, // 是否刷新三星 Tags, 可选,默认 false
|
||||
"select": [ // 会去点击标签的 Tag 等级,必选
|
||||
int,
|
||||
...
|
||||
],
|
||||
"confirm": [ // 会去点击确认的 Tag 等级,必选。若仅公招计算,可设置为空数组
|
||||
int,
|
||||
...
|
||||
],
|
||||
"times": int, // 招募多少次,必选。若仅公招计算,可设置为 0
|
||||
"expedited": bool, // 是否使用加急许可,可选,默认 false
|
||||
"expedited_times": int, // 加急次数,仅在 expedited 为 true 时有效。
|
||||
// 可选,默认无限使用(直到 times 达到上限)
|
||||
}
|
||||
```
|
||||
|
||||
- `Infrast`
|
||||
基建换班
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"mode": int, // 换班工作模式,保留接口,暂时可以不传
|
||||
"facility": [ // 要换班的设施(有序),必选项
|
||||
string, // 设施名,"Mfg" | "Trade" | "Power" | "Control" | "Reception" | "Office" | "Dorm"
|
||||
...
|
||||
],
|
||||
"drones": string, // 无人机用途,可选项,默认不使用
|
||||
// "_NotUse"、"Money"、"SyntheticJade"、"CombatRecord"、"PureGold"、"OriginStone"、"Chip"
|
||||
"threshold": float, // 宿舍进驻心情阈值,必选项。取值范围 [0, 1.0]
|
||||
}
|
||||
```
|
||||
|
||||
- `Visit`
|
||||
访问好友
|
||||
@@ -71,6 +106,31 @@ TaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const char* p
|
||||
}
|
||||
```
|
||||
|
||||
- `Award`
|
||||
领取日常奖励
|
||||
不支持设置参数
|
||||
|
||||
- `Roguelike`
|
||||
无限刷肉鸽
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"mode": int, // 模式,必选项。
|
||||
// 0 - 尽可能一直往后打
|
||||
// 1 - 第一层投资完源石锭就退出
|
||||
// 2 - 投资过后再退出,没有投资就继续往后打
|
||||
|
||||
"oper": [ // 会去选择的干员,必选项。数组有序
|
||||
{
|
||||
"name": string, // 干员名,必选项
|
||||
"fullMatch": bool, // 干员名是否需要全字匹配,可选项。默认 false
|
||||
"skill": int, // 使用哪个技能,取值范围 [1, 3],可选项,默认 1
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### `AsstSetTaskParams`
|
||||
|
||||
#### 接口原型
|
||||
@@ -97,34 +157,3 @@ bool ASSTAPI AsstSetTaskParams(AsstHandle handle, TaskId id, const char* params)
|
||||
- `const char* params`
|
||||
任务参数,json string,与 `AsstAppendTask` 接口相同。
|
||||
未标注“不支持运行中设置”的字段都支持实时修改;否则若当前任务正在运行,会忽略对应的字段
|
||||
|
||||
### `AsstSetParam`
|
||||
|
||||
#### 接口原型
|
||||
|
||||
```c++
|
||||
bool ASSTAPI AsstSetParam(AsstHandle handle, const char* param_id, const char* param_value);
|
||||
```
|
||||
|
||||
#### 接口说明
|
||||
|
||||
设置实例级参数
|
||||
|
||||
#### 返回值
|
||||
|
||||
- `bool`
|
||||
返回是否设置成功
|
||||
|
||||
#### 参数说明
|
||||
|
||||
- `AsstHandle handle`
|
||||
实例句柄
|
||||
- `const char* param_id`
|
||||
参数 id
|
||||
- `const char* param_value`
|
||||
参数值,json string
|
||||
|
||||
| 参数作用 | 参数 id | 参数值 | 参数值示例 |
|
||||
| ------- | ------- | ----- | -------- |
|
||||
| 设置企鹅数据 id | `penguin_id` | { "id" : string } | `{ "id" : "1234567" }` |
|
||||
| 设置 OCR 任务目标 | `ocr_text` | { TaskName: [ string, ... ] } | `{ "Roguelike1ChooseOper" : [ "帕拉斯", "银灰" ] }`<br>`{ "CreditShop-NotToBuy" : [ "碳", "家具" ] }` |
|
||||
|
||||
Reference in New Issue
Block a user