mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 10:57:45 +08:00
fix: 修复凹直升模式造成的bug
This commit is contained in:
68
CHANGELOG.md
68
CHANGELOG.md
@@ -1,40 +1,60 @@
|
||||
## v4.24.0-beta.4
|
||||
## v4.24.0-beta.5
|
||||
|
||||
### 新增
|
||||
|
||||
- 自动战斗新增战斗列表选项(异形UI不支持) (#6350) @status102
|
||||
- WPF自动战斗对于作业描述的视频自动跳转增加av号支持 (#6363) @status102
|
||||
- 肉鸽烧开水模式增加凹开局直升 (#6443) @Lancarus
|
||||
- 肉鸽适配高规格分队开局 (#6436) @Lancarus
|
||||
- 开始唤醒-账号切换新增手动切换,可单独执行开始唤醒流程 (#6433) @status102
|
||||
- 如果任务流程中勾选了刷理智,则在任务链结束时提供一个理智回满的预测时间 (#6456) @status102
|
||||
- macOS 国际服允许添加生息演算任务 @hguandl
|
||||
|
||||
### 改进
|
||||
|
||||
- 适配萨米肉鸽生活至上分队,优化部分逻辑 (#6385) @Lancarus
|
||||
- 基建换班-干员编组增加可用干员缓存,同时在单次换班任务中避免重复匹配已匹配的干员 (#6376) @status102
|
||||
- 下载更新资源先使用临时文件缓存 @MistEO
|
||||
- 优化定时任务 @ABA2396
|
||||
- 更新游戏资源时弹窗提示 @MistEO
|
||||
- 投资达到上限后退出到肉鸽主界面 (#6435) @zzyyyl
|
||||
- 优化傀影招募策略 (#6476) @Lancarus
|
||||
- 激活自动战斗-战斗列表时将同时激活自动编队,调整自动战斗UI (#6448) @status102
|
||||
- 优化傀影肉鸽招募和商店逻辑 (#6447) @Lancarus
|
||||
- 稍微优化下自动战斗界面 ui @moomiji
|
||||
- 优化 自动战斗-战斗列表 跳过战斗后剧情的逻辑 (#6430) @status102
|
||||
- 优化萨米招募逻辑 (#6422) @Lancarus
|
||||
- 稍微优化下自动战斗界面 ui @ABA2396
|
||||
- 水月肉鸽:增加支援道具,新干员分组,优化大君遗脉策略 (#6372) @Yumi0606
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复task.png阈值 @MistEO
|
||||
- 修复SettingsView的Idle不生效,将开始唤醒-账号切换在非Idle情况下锁定 (#6364) @status102
|
||||
- etag 解析报错 @ABA2396
|
||||
- 将账号切换输出文本中的目标账号由输入文本改为OCR结果,尝试修复账号切换出错 (#6353) @status102
|
||||
- 给关卡选择为 null 时打个补丁 @moomiji
|
||||
- 增加延迟以提高刷理智-当前理智识别成功率 (#6402) @status102
|
||||
- 修复 sanity_report == null 的问题 @zzyyyl
|
||||
- 加工站不设置干员时,直接报错并返回 @MistEO
|
||||
- 修复水月肉鸽卡在藏品 (#6464) @mole828
|
||||
- 修复 debug 模式下 tasks.json 检查未通过时的访问越界问题 @zzyyyl
|
||||
- 修复网络波动造成的使用理智药不清理智问题 @zzyyyl
|
||||
- 修复自动战斗-战斗列表的导航失效问题 (#6413) @status102
|
||||
- 修复Status缓存跨任务清理在任务链正常完成情况下失效的错误 (#6428) @status102
|
||||
- 修复外部通知错误 (#6414) @LiamSho
|
||||
- 修复资源读取错误,修复错误的界面提示 @ABA2396
|
||||
- 修复资源更新toast笔误 @MistEO
|
||||
- 通过进程名关闭蓝叠时如果模拟器个数超过1个则放弃关闭 @ABA2396
|
||||
|
||||
### 其他
|
||||
|
||||
- i18n: Translations update from MAA Weblate @LiamSho
|
||||
- Revert "chore: 兼容旧配置" @moomiji
|
||||
- EN infrast workshop and i18n @Constrat
|
||||
- tools: ignore templates @Constrat
|
||||
- 基建换班-编组缓存 使用value_or替代empty检查 (#6404) @status102
|
||||
- 更新qodana配置 (#6465) @hxdnshx
|
||||
- gui.log 在启动时记录当前版本 @ABA2396
|
||||
- 在Python脚本中添加活动关导航下载与加载的示例 (#3916) (#6451) @ZhaoZuohong
|
||||
- 删除多余的空任务 @zzyyyl
|
||||
- debug: 增加一项多余空任务的检查 @zzyyyl
|
||||
- fix algorithm error warning @Constrat
|
||||
- reordered objects, following zh-cn @Constrat
|
||||
- removed duplicate operator @Constrat
|
||||
- Alter Operators ^$ regex fix Yato alter, Noir alter, Terra Research ident. @Constrat
|
||||
- 无配置字段时储存默认值 @ABA2396
|
||||
- 全局选项设置减少嵌套,增加日志 @ABA2396
|
||||
|
||||
#### For overseas
|
||||
|
||||
#### YostarJP
|
||||
|
||||
- 添加日服生息演算翻译 | Reclamation Algorithm JP (#6340) @THSLP13
|
||||
### For overseas
|
||||
|
||||
#### YostarEN
|
||||
|
||||
- Gadget long name reduction for EN @Constrat
|
||||
- docs: YostarEN recommended resolution (#6303) @Constrat
|
||||
- EN SSReopen-XX adaptation @Constrat
|
||||
- EN Guide Ahead navigation @Constrat
|
||||
- 修复 EN 任务 `BattleQuickFormationFilter-Cost` @zzyyyl
|
||||
- 修复 EN 生息演算任务 `Reclamation@ManufactureStatus` roi 越界的问题 @zzyyyl
|
||||
|
||||
@@ -111,9 +111,9 @@ icon: ic:baseline-article
|
||||
|
||||
### 切换账号
|
||||
|
||||
- 仅支持切换至已登录的账号,使用登录名进行匹配,保证输入内容在所有已登录账号唯一即可
|
||||
- 官服:123****4567,可输入 123****4567、4567、123、3****4567
|
||||
- B服:张三,可输入 张三、张、三
|
||||
- 仅支持切换至已登录的账号,使用登录名进行查找,保证输入内容在所有已登录账号唯一即可
|
||||
- 官服:`123****4567`,可输入 `123****4567`、`4567`、`123`、`3****4567`
|
||||
- B服:`张三`,可输入 `张三`、`张`、`三`
|
||||
|
||||
### 自动战斗
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ icon: ph:question-fill
|
||||
|
||||
### 可能性 0 : 下载的压缩包不完整
|
||||
|
||||
- 完整 MAA 软件压缩包命名格式为 "MAA-`版本`-`平台`-`架构`.zip",其余均为无法单独使用的“零部件”,请仔细阅读。通常 Windows 用户只需下载 `MAA-*-win-x64.zip`。
|
||||
- 完整 MAA 软件压缩包命名格式为 "MAA-`版本`-`平台`-`架构`.zip",其余均为无法单独使用的“零部件”,请仔细阅读。
|
||||
- 若在某次自动更新后无法使用,可能是自动更新功能存在一些 bug, 可以尝试重新下载并解压完整包后手动迁移 `config` 文件夹。
|
||||
|
||||
### 可能性 1 : 架构错误
|
||||
|
||||
- 在绝大部分情况下,您需要使用 64 位操作系统以及 x64 架构的 MAA,即您需要下载 `MAA-*-win-x64.zip`,而非 `MAA-*-win-arm64.zip`。MAA 当前不支持 32 位操作系统。
|
||||
- 在绝大部分情况下,您需要使用 x64 架构的 MAA,即您需要下载 `MAA-*-win-x64.zip`,而非 `MAA-*-win-arm64.zip`。MAA 不会支持 32 位操作系统。
|
||||
|
||||
### 可能性 2 : 运行库问题
|
||||
|
||||
@@ -50,7 +50,6 @@ icon: ph:question-fill
|
||||
|
||||
- 提示:请参阅 [模拟器支持](1.3-模拟器支持.md) 确定正在使用的模拟器通过了支持性测试。
|
||||
- 若使用了游戏加速器等软件,请关闭软件并 **重启电脑** 后再次尝试。
|
||||
- 请检查您的解压软件 — 部分情况下使用如 `7z` 或 _其他小众解压软件_ 会导致 `Minitouch` 相关文件出错
|
||||
|
||||
### 方式 1 : 确认 adb 及连接地址正确
|
||||
|
||||
@@ -59,30 +58,16 @@ icon: ph:question-fill
|
||||
- 顶层或下层目录中大概率会有一个 `adb.exe`(不一定就叫这个名字,可能叫 `nox_adb.exe`;`HD-adb.exe`;`adb_server.exe` 等等,总之是名字带 `adb` 的 exe),搜索它,选择它!
|
||||
- 确认连接地址填写正确。可在网上搜索正在使用的模拟器 adb 调试地址是什么,一般是类似 `127.0.0.1:5555` 这样的格式(雷电模拟器除外)。
|
||||
|
||||
#### 常见安卓模拟器adb端口
|
||||
#### 模拟器调试端口
|
||||
|
||||
- 单开情况 / 多开时 首个模拟器
|
||||
- 相关文档及参考端口:
|
||||
- [Bluestacks](https://support.bluestacks.com/hc/zh-tw/articles/360061342631-%E5%A6%82%E4%BD%95%E5%B0%87%E6%82%A8%E7%9A%84%E6%87%89%E7%94%A8%E5%BE%9EBlueStacks-4%E8%BD%89%E7%A7%BB%E5%88%B0BlueStacks-5#%E2%80%9C2%E2%80%9D) `5555`
|
||||
- [MuMu 12](https://mumu.163.com/help/20230214/35047_1073151.html) `16384`
|
||||
- [MuMu 6](https://mumu.163.com/help/20210531/35047_951108.html) `7555`
|
||||
- [逍遥](https://bbs.xyaz.cn/forum.php?mod=viewthread&tid=365537) `21503`
|
||||
- [夜神](https://support.yeshen.com/zh-CN/qt/ml) `62001`
|
||||
|
||||
针对模拟器单开情况,参考各个模拟器文档和网易游戏高级游戏开发工程师@赵青青的[博客](https://www.cnblogs.com/zhaoqingqing/p/15238464.html),常见安卓模拟器的 adb 端口如下:
|
||||
|
||||
|模拟器|主模拟器默认端口|
|
||||
|-|:-:|
|
||||
|网易 MuMu 模拟器 6/X|7555|
|
||||
|网易 MuMu 模拟器 12|16384|
|
||||
|夜神安卓模拟器|62001|
|
||||
|逍遥安卓模拟器|21503|
|
||||
|蓝叠安卓模拟器|5555|
|
||||
|雷电安卓模拟器 9|5555 / emulator-5554|
|
||||
|
||||
纯数字的默认端口可以直接使用 `127.0.0.1:[port]` 来连接,雷电模拟器进行了封装,也可以使用 `emulator-5554` 进行连接。
|
||||
|
||||
在 Windows 与 Mac 的 `设置` - `连接设置` - `连接地址` 配置中如果有情况需要修改则可以参照上表。
|
||||
|
||||
- 多开情况
|
||||
|
||||
- 夜神模拟器第一个设备端口 `62001` ,从第二个开始端口从 `62025` 开始递增。
|
||||
- 网易 MuMu 模拟器 12 版本多开时 adb 端口无规律,可以通过点击 MuMu 多开器 12,启动需要运行的模拟器,点击右上角的 ADB 图标,即可查看当前正在运行的模拟器 adb 端口信息。
|
||||
- 雷电模拟器从 9 版本开始,模拟器 adb 从本地端口 `5555` 开始逐个递增 2 ,比如第二个模拟器本地端口为 `5557`。
|
||||
- 其他模拟器可参考 [赵青青的博客](https://www.cnblogs.com/zhaoqingqing/p/15238464.html)。
|
||||
|
||||
### 方式 2 : 关闭冗余 adb 进程
|
||||
|
||||
@@ -90,7 +75,7 @@ icon: ph:question-fill
|
||||
|
||||
### 方式 3 : 重启电脑
|
||||
|
||||
- 重启能解决 99% 的问题。(确信
|
||||
- 重启能解决 98% 的问题。(确信
|
||||
|
||||
### 方式 4 : 换模拟器
|
||||
|
||||
|
||||
@@ -139,8 +139,6 @@ const notSupportHtml = md.render(notSupport.join(''))
|
||||
本段内容虽已尽可能写的的简洁易懂,但也许仍对部分萌新用户不甚友好。若嫌麻烦、看不懂或操作不清还请继续使用模拟器
|
||||
:::
|
||||
|
||||
以 Windows 用户为主,其他系统请照葫芦画瓢。
|
||||
|
||||
- 由于 MAA 仅对 `16:9` 比例的 `720p` 及更高分辨率的支持较为完善,所以非 `16:9` 或 `9:16` 屏幕比例的设备需要强制修改分辨率,这包含大多数现代手机。
|
||||
- 若被连接设备屏幕分辨率比例原生为 `16:9` 或 `9:16`,则可跳过 `更改分辨率` 部分。
|
||||
|
||||
@@ -189,27 +187,35 @@ const notSupportHtml = md.render(notSupport.join(''))
|
||||
- 如果上文设备列表内仅有一台设备,则可直接运行以下命令更改/还原分辨率。
|
||||
|
||||
```bash
|
||||
adb shell wm size # 查看当前分辨率
|
||||
adb shell wm size reset # 还原默认分辨率
|
||||
:: 查看当前分辨率
|
||||
adb shell wm size
|
||||
:: 还原默认分辨率
|
||||
adb shell wm size reset
|
||||
|
||||
adb shell wm size 720x1280 # 更改分辨率为 720p
|
||||
adb shell wm size 1080x1920 # 更改分辨率为 1080p
|
||||
:: 更改分辨率为 720p
|
||||
adb shell wm size 720x1280
|
||||
:: 更改分辨率为 1080p
|
||||
adb shell wm size 1080x1920
|
||||
```
|
||||
|
||||
- 若存在多台设备,则需在 `adb` 和 `shell` 中间添加参数 `-s <目标设备序列号>`,例子如下。
|
||||
|
||||
```bash
|
||||
adb -s VFNDU1682100xxxx shell wm size # 查看当前分辨率
|
||||
adb -s VFNDU1682100xxxx shell wm size reset # 还原默认分辨率
|
||||
|
||||
adb -s VFNDU1682100xxxx shell wm size 720x1280 # 更改分辨率为 720p
|
||||
adb -s VFNDU1682100xxxx shell wm size 1080x1920 # 更改分辨率为 1080p
|
||||
:: 查看当前分辨率
|
||||
adb -s VFNDU1682100xxxx shell wm size
|
||||
:: 还原默认分辨率
|
||||
adb -s VFNDU1682100xxxx shell wm size reset
|
||||
|
||||
:: 更改分辨率为 720p
|
||||
adb -s VFNDU1682100xxxx shell wm size 720x1280
|
||||
:: 更改分辨率为 1080p
|
||||
adb -s VFNDU1682100xxxx shell wm size 1080x1920
|
||||
```
|
||||
|
||||
- 部分设计不规范的应用可能在还原分辨率后内容布局仍然错乱,一般重启对应应用或设备即可解决。
|
||||
|
||||
::: danger 注意
|
||||
务必于**重启设备前**还原分辨率 ,否则因设备而定可能会导致不可预料的后果 ~~,包括但不限于布局错乱,应用闪退,无法开机等~~
|
||||
务必于**重启设备前**还原分辨率 ,否则因设备而定可能会导致不可预料的后果 ~~,包括但不限于布局混乱,触控错位,应用闪退,无法开机等。~~
|
||||
:::
|
||||
|
||||
### 自动化更改分辨率
|
||||
@@ -217,20 +223,20 @@ const notSupportHtml = md.render(notSupport.join(''))
|
||||
1. 在 MAA 目录下新建两个文本文件,分别在其中填入以下内容。
|
||||
|
||||
```bash
|
||||
::调整分辨率为 1080p
|
||||
:: 调整分辨率为 1080p
|
||||
adb -s <目标设备序列号> shell wm size 1080x1920
|
||||
::降低屏幕亮度(可选)
|
||||
:: 降低屏幕亮度(可选)
|
||||
adb -s <目标设备序列号> shell settings put system screen_brightness 1
|
||||
```
|
||||
|
||||
```bash
|
||||
::还原分辨率
|
||||
:: 还原分辨率
|
||||
adb -s <目标设备序列号> shell wm size reset
|
||||
::提高屏幕亮度(可选)
|
||||
:: 提高屏幕亮度(可选)
|
||||
adb -s <目标设备序列号> shell settings put system screen_brightness 20
|
||||
::返回桌面(可选)
|
||||
:: 返回桌面(可选)
|
||||
adb -s <目标设备序列号> shell input keyevent 3
|
||||
::锁屏(可选)
|
||||
:: 锁屏(可选)
|
||||
adb -s <目标设备序列号> shell input keyevent 26
|
||||
```
|
||||
|
||||
@@ -261,7 +267,8 @@ const notSupportHtml = md.render(notSupport.join(''))
|
||||
1. 在刚刚的命令提示符窗口中输入以下命令以开启无线调试。
|
||||
|
||||
```bash
|
||||
adb tcpip 5555 # 如存在多台设备可参照上文内容在 adb 和 tcpip 中间添加参数
|
||||
adb tcpip 5555
|
||||
:: 存在多台设备则添加参数 -s 以指定序列号
|
||||
```
|
||||
|
||||
2. 查看设备 IP 地址。
|
||||
@@ -272,7 +279,3 @@ const notSupportHtml = md.render(notSupport.join(''))
|
||||
3. 将 `<IP>:5555` 填入 MAA `设置` - `连接设置` - `连接地址` 中,如 `192.168.1.2:5555`。
|
||||
4. Link Start!
|
||||
5. 任务结束后还原设备分辨率。
|
||||
|
||||
::: note
|
||||
如连接失败并提示“发生未知错误”,有可能是触控模式 `Minitouch` 的问题,可切换到 `MaaTouch` 再次尝试。由于 `Adb Input` 操作过于缓慢,请仅将其作为万不得已的模式。
|
||||
:::
|
||||
|
||||
@@ -44,13 +44,13 @@ icon: ri:game-fill
|
||||
|
||||
::: info 注意
|
||||
|
||||
1. 同一group内的干员和召唤物必须部署方式一致(即同为近战或者同为高台)
|
||||
1. 同一group内的干员和召唤物必须部署方式一致(即同为近战或者同为高台)
|
||||
|
||||
2. 允许同一干员或者召唤物根据用法不同,被分类至不同的group
|
||||
2. 允许同一干员或者召唤物根据用法不同,被分类至不同的group
|
||||
|
||||
3. 请不要修改已经存在的group名称,以免在MAA更新时导致之前版本的作业无法使用
|
||||
3. 请不要修改已经存在的group名称,以免在MAA更新时导致之前版本的作业无法使用
|
||||
|
||||
4. 请尽量不要新增group,尽量将新添加进作业的单位按照用法纳入已经存在的group
|
||||
4. 请尽量不要新增group,尽量将新添加进作业的单位按照用法纳入已经存在的group
|
||||
|
||||
:::
|
||||
|
||||
@@ -171,7 +171,7 @@ icon: ri:game-fill
|
||||
"promote_priority": 600, // 进阶优先级,数字越大优先级越高,900以上属于有希望就精二,400以下招募优先级低于招募普通三星干员
|
||||
"is_key": true, // true为key(关键)干员,false或省略为非key干员。在阵容完备检测未通过时,仅招募key干员与0希望干员,保存希望。
|
||||
"is_start": true, // true为开局选择干员,false或省略为非开局干员。在队伍中没有start干员时,仅招募start干员与0希望干员,用户填写的干员会强制未start干员
|
||||
"auto_retreat": 0, // 部署几秒后自动撤退,大于 0 时生效,主要用于特种干员
|
||||
"auto_retreat": 0, // 部署几秒后自动撤退,整数,大于 0 时生效,主要用于特种干员和投锋,由于肉鸽一般是2倍速,推荐设置为技能持续时间/2
|
||||
"promote_priority_when_team_full": 850,
|
||||
"recruit_priority_offsets": [ // 按当前阵容调控招募优先级
|
||||
{
|
||||
|
||||
@@ -98,6 +98,12 @@ icon: ic:baseline-article
|
||||
- 戰鬥過程中如果刮痧了一直打不完,超過 5 分鐘會自動撤退所有地面單位;超過 6 分鐘會自動放棄當局戰鬥,不會卡住。
|
||||
- 如果任務出現問題卡住了,會自動放棄當次探索並重試。但如果經常在某個地方卡住然後放棄、嚴重影響效率的,歡迎提個 issue 反饋一下~
|
||||
|
||||
### 切換賬號
|
||||
|
||||
- 僅支持切換至已登錄的賬號,使用登錄名進行查找,保證輸入內容在所有已登錄賬號唯一即可
|
||||
- 官服:`123****4567`,可輸入 `123****4567`、`4567`、`123`、`3****4567`
|
||||
- B服:`張三`,可輸入 `張三`、`張`、`三`
|
||||
|
||||
### 自動戰鬥
|
||||
|
||||
- 歡迎使用作業分享站 [prts.plus](https://prts.plus),[抄作業.com](https://抄作业.com) 使用 & 分享作業檔案!
|
||||
|
||||
@@ -3196,7 +3196,9 @@
|
||||
222,
|
||||
125
|
||||
],
|
||||
"text": "Deployment Cost"
|
||||
"text": [
|
||||
"Deployment Cost"
|
||||
]
|
||||
},
|
||||
"BattleQuickFormationRole-All-OCR": {
|
||||
"text": [
|
||||
@@ -5904,7 +5906,7 @@
|
||||
"Doc": "base_task",
|
||||
"algorithm": "OcrDetect",
|
||||
"roi": [
|
||||
1023,
|
||||
1021,
|
||||
336,
|
||||
259,
|
||||
109
|
||||
|
||||
BIN
resource/global/YoStarEN/resource/template/ReceiveMail.png
Normal file
BIN
resource/global/YoStarEN/resource/template/ReceiveMail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -3216,7 +3216,8 @@
|
||||
"StartUpBegin@LoadingIcon",
|
||||
"StartUp@ReturnTo",
|
||||
"StartUp@EndOfAction",
|
||||
"StartUp@FromStageSN"
|
||||
"StartUp@FromStageSN",
|
||||
"StartUp@Return-White"
|
||||
]
|
||||
},
|
||||
"GameStart": {
|
||||
@@ -3425,6 +3426,16 @@
|
||||
"#back"
|
||||
]
|
||||
},
|
||||
"Return-White": {
|
||||
"templThreshold": 0.8,
|
||||
"baseTask": "ReturnTo",
|
||||
"roi": [
|
||||
0,
|
||||
0,
|
||||
220,
|
||||
150
|
||||
]
|
||||
},
|
||||
"ReturnTo": {
|
||||
"template": "Return.png",
|
||||
"templThreshold": 0.7,
|
||||
@@ -3443,7 +3454,8 @@
|
||||
"ReturnTo@LoadingIcon",
|
||||
"CloseAnnos#next",
|
||||
"FromStageSN",
|
||||
"TodaysSupplies"
|
||||
"TodaysSupplies",
|
||||
"Return-White"
|
||||
]
|
||||
},
|
||||
"ReturnToConfirm": {
|
||||
@@ -3973,7 +3985,7 @@
|
||||
"roi": [
|
||||
1120,
|
||||
20,
|
||||
150,
|
||||
160,
|
||||
40
|
||||
],
|
||||
"ocrReplace": [
|
||||
@@ -4719,13 +4731,14 @@
|
||||
"action": "ClickRect",
|
||||
"specificRect": [
|
||||
600,
|
||||
600,
|
||||
630,
|
||||
60,
|
||||
60
|
||||
],
|
||||
"next": [
|
||||
"CloseTaskAwardDouble"
|
||||
]
|
||||
],
|
||||
"postDelay": 500
|
||||
},
|
||||
"CloseTaskAwardDouble": {
|
||||
"Doc": "有时候奖励出的太慢了,所以这里多点一次",
|
||||
@@ -4733,7 +4746,7 @@
|
||||
"action": "ClickRect",
|
||||
"specificRect": [
|
||||
600,
|
||||
600,
|
||||
630,
|
||||
60,
|
||||
60
|
||||
],
|
||||
@@ -4785,6 +4798,80 @@
|
||||
"Stop"
|
||||
]
|
||||
},
|
||||
"MailBegin": {
|
||||
"algorithm": "JustReturn",
|
||||
"action": "DoNothing",
|
||||
"next": [
|
||||
"MailReturnToHome@ReturnTo",
|
||||
"MailReturnToHome",
|
||||
"ReceiveMail"
|
||||
]
|
||||
},
|
||||
"MailReturnToHome": {
|
||||
"baseTask": "Home",
|
||||
"template": "Terminal.png",
|
||||
"action": "DoNothing",
|
||||
"next": [
|
||||
"Mail",
|
||||
"MailWithoutAward"
|
||||
]
|
||||
},
|
||||
"Mail": {
|
||||
"action": "ClickSelf",
|
||||
"cache": false,
|
||||
"roi": [
|
||||
120,
|
||||
0,
|
||||
150,
|
||||
135
|
||||
],
|
||||
"next": [
|
||||
"ReceiveMail",
|
||||
"Mail",
|
||||
"Stop"
|
||||
],
|
||||
"postDelay": 2000
|
||||
},
|
||||
"MailWithoutAward": {
|
||||
"action": "DoNothing",
|
||||
"cache": false,
|
||||
"roi": [
|
||||
120,
|
||||
0,
|
||||
150,
|
||||
135
|
||||
],
|
||||
"postDelay": 500,
|
||||
"next": [
|
||||
"Mail",
|
||||
"Stop"
|
||||
]
|
||||
},
|
||||
"ReceiveMail": {
|
||||
"action": "ClickSelf",
|
||||
"roi": [
|
||||
980,
|
||||
580,
|
||||
300,
|
||||
140
|
||||
],
|
||||
"next": [
|
||||
"CloseTaskMail"
|
||||
]
|
||||
},
|
||||
"CloseTaskMail": {
|
||||
"baseTask": "CloseTaskAward",
|
||||
"next": [
|
||||
"CloseTaskMailDouble"
|
||||
]
|
||||
},
|
||||
"CloseTaskMailDouble": {
|
||||
"baseTask": "CloseTaskAwardDouble",
|
||||
"next": [
|
||||
"Return-White",
|
||||
"CloseTaskMailDouble"
|
||||
]
|
||||
},
|
||||
"VisitBegin": {
|
||||
"algorithm": "JustReturn",
|
||||
"action": "DoNothing",
|
||||
@@ -7372,6 +7459,15 @@
|
||||
255
|
||||
]
|
||||
},
|
||||
"SkipForbiddenOperConfirm": {
|
||||
"action": "ClickSelf",
|
||||
"roi": [
|
||||
640,
|
||||
554,
|
||||
632,
|
||||
76
|
||||
]
|
||||
},
|
||||
"BattleStartAll": {
|
||||
"action": "DoNothing",
|
||||
"algorithm": "JustReturn",
|
||||
@@ -10291,8 +10387,6 @@
|
||||
]
|
||||
},
|
||||
"Phantom@Roguelike@InitalDrop": {},
|
||||
"Phantom@Roguelike@LastReward_normal_mode": {},
|
||||
"Phantom@Roguelike@LastReward_mode4": {},
|
||||
"Phantom@Roguelike@LastReward": {},
|
||||
"Phantom@Roguelike@LastReward2": {},
|
||||
"Phantom@Roguelike@LastReward3": {},
|
||||
@@ -10301,8 +10395,6 @@
|
||||
"Phantom@Roguelike@LastRewardRand": {},
|
||||
"Phantom@Roguelike@MissionFailedFlag": {},
|
||||
"Phantom@Roguelike@MissionFailedFlag2": {},
|
||||
"Phantom@Roguelike@LevelName": {},
|
||||
"Phantom@Roguelike@LevelName_normal_mode": {},
|
||||
"Phantom@Roguelike@LevelName_mode4": {
|
||||
"text": [
|
||||
"故土残躯"
|
||||
@@ -10388,19 +10480,6 @@
|
||||
"Phantom@Roguelike@StageEncounterOptionUnknown": {
|
||||
"templThreshold": 0.85
|
||||
},
|
||||
"Phantom@Roguelike@StageEncounterJudgeOption": {},
|
||||
"Phantom@Roguelike@StageEncounterJudgeClick": {},
|
||||
"Phantom@Roguelike@StageEncounterJudgeClick2": {},
|
||||
"Phantom@Roguelike@OptionChoose1-1": {},
|
||||
"Phantom@Roguelike@OptionChoose2-1": {},
|
||||
"Phantom@Roguelike@OptionChoose2-2": {},
|
||||
"Phantom@Roguelike@OptionChoose3-1": {},
|
||||
"Phantom@Roguelike@OptionChoose3-2": {},
|
||||
"Phantom@Roguelike@OptionChoose3-3": {},
|
||||
"Phantom@Roguelike@OptionChoose4-1": {},
|
||||
"Phantom@Roguelike@OptionChoose4-2": {},
|
||||
"Phantom@Roguelike@OptionChoose4-3": {},
|
||||
"Phantom@Roguelike@OptionChoose4-4": {},
|
||||
"Phantom@Roguelike@StageEncounterOptions": {
|
||||
"next": [
|
||||
"Phantom@Roguelike@StageEncounterOptionFree",
|
||||
@@ -10795,8 +10874,6 @@
|
||||
]
|
||||
},
|
||||
"Mizuki@Roguelike@InitalDrop": {},
|
||||
"Mizuki@Roguelike@LastReward_normal_mode": {},
|
||||
"Mizuki@Roguelike@LastReward_mode4": {},
|
||||
"Mizuki@Roguelike@LastReward": {},
|
||||
"Mizuki@Roguelike@LastReward2": {},
|
||||
"Mizuki@Roguelike@LastReward3": {},
|
||||
@@ -10818,8 +10895,6 @@
|
||||
},
|
||||
"Mizuki@Roguelike@MissionFailedFlag": {},
|
||||
"Mizuki@Roguelike@MissionFailedFlag2": {},
|
||||
"Mizuki@Roguelike@LevelName": {},
|
||||
"Mizuki@Roguelike@LevelName_normal_mode": {},
|
||||
"Mizuki@Roguelike@LevelName_mode4": {
|
||||
"text": [
|
||||
"波涛略地",
|
||||
@@ -10994,19 +11069,6 @@
|
||||
"Mizuki@Roguelike@CloseEvent"
|
||||
]
|
||||
},
|
||||
"Mizuki@Roguelike@StageEncounterJudgeOption": {},
|
||||
"Mizuki@Roguelike@StageEncounterJudgeClick": {},
|
||||
"Mizuki@Roguelike@StageEncounterJudgeClick2": {},
|
||||
"Mizuki@Roguelike@OptionChoose1-1": {},
|
||||
"Mizuki@Roguelike@OptionChoose2-1": {},
|
||||
"Mizuki@Roguelike@OptionChoose2-2": {},
|
||||
"Mizuki@Roguelike@OptionChoose3-1": {},
|
||||
"Mizuki@Roguelike@OptionChoose3-2": {},
|
||||
"Mizuki@Roguelike@OptionChoose3-3": {},
|
||||
"Mizuki@Roguelike@OptionChoose4-1": {},
|
||||
"Mizuki@Roguelike@OptionChoose4-2": {},
|
||||
"Mizuki@Roguelike@OptionChoose4-3": {},
|
||||
"Mizuki@Roguelike@OptionChoose4-4": {},
|
||||
"Mizuki@Roguelike@StageEncounterSpecialClose": {},
|
||||
"Mizuki@Roguelike@StageGambling": {
|
||||
"Doc": "骰子关卡",
|
||||
@@ -11355,8 +11417,6 @@
|
||||
]
|
||||
},
|
||||
"Sami@Roguelike@InitalDrop": {},
|
||||
"Sami@Roguelike@LastReward_normal_mode": {},
|
||||
"Sami@Roguelike@LastReward_mode4": {},
|
||||
"Sami@Roguelike@LastReward": {},
|
||||
"Sami@Roguelike@LastReward2": {},
|
||||
"Sami@Roguelike@LastReward3": {},
|
||||
@@ -11378,8 +11438,6 @@
|
||||
},
|
||||
"Sami@Roguelike@MissionFailedFlag": {},
|
||||
"Sami@Roguelike@MissionFailedFlag2": {},
|
||||
"Sami@Roguelike@LevelName": {},
|
||||
"Sami@Roguelike@LevelName_normal_mode": {},
|
||||
"Sami@Roguelike@LevelName_mode4": {
|
||||
"text": [
|
||||
"昧明冻土",
|
||||
@@ -11872,19 +11930,6 @@
|
||||
"Sami@Roguelike@CloseEvent"
|
||||
]
|
||||
},
|
||||
"Sami@Roguelike@StageEncounterJudgeOption": {},
|
||||
"Sami@Roguelike@StageEncounterJudgeClick": {},
|
||||
"Sami@Roguelike@StageEncounterJudgeClick2": {},
|
||||
"Sami@Roguelike@OptionChoose1-1": {},
|
||||
"Sami@Roguelike@OptionChoose2-1": {},
|
||||
"Sami@Roguelike@OptionChoose2-2": {},
|
||||
"Sami@Roguelike@OptionChoose3-1": {},
|
||||
"Sami@Roguelike@OptionChoose3-2": {},
|
||||
"Sami@Roguelike@OptionChoose3-3": {},
|
||||
"Sami@Roguelike@OptionChoose4-1": {},
|
||||
"Sami@Roguelike@OptionChoose4-2": {},
|
||||
"Sami@Roguelike@OptionChoose4-3": {},
|
||||
"Sami@Roguelike@OptionChoose4-4": {},
|
||||
"Sami@Roguelike@StageEncounterSpecialClose": {},
|
||||
"Sami@Roguelike@StageEncounterClickToLeave": {
|
||||
"next": [
|
||||
|
||||
BIN
resource/template/Mail.png
Normal file
BIN
resource/template/Mail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
resource/template/MailWithoutAward.png
Normal file
BIN
resource/template/MailWithoutAward.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
resource/template/ReceiveMail.png
Normal file
BIN
resource/template/ReceiveMail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
resource/template/Return-White.png
Normal file
BIN
resource/template/Return-White.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
resource/template/SkipForbiddenOperConfirm.png
Normal file
BIN
resource/template/SkipForbiddenOperConfirm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
6
src/Java/.gitignore
vendored
6
src/Java/.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
HELP.md
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
@@ -40,4 +39,7 @@ out/
|
||||
gradle.properties
|
||||
|
||||
/cache/
|
||||
/gradle/
|
||||
|
||||
/gradle/*
|
||||
!/gradle/wrapper/
|
||||
!/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
BIN
src/Java/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
src/Java/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@@ -421,6 +421,14 @@ void Assistant::working_proc()
|
||||
|
||||
if (m_tasks_list.empty()) {
|
||||
callback_json["finished_tasks"] = json::array(finished_tasks);
|
||||
|
||||
const auto& sanity_str = status()->get_str(Status::FightSanityReport);
|
||||
if (sanity_str) {
|
||||
auto sanity_array = json::array(json::parse(*sanity_str).value_or(json::value(json::array())));
|
||||
// ["100/135", "2023-09-01 09:31:53.527"]
|
||||
callback_json["sanity"] = sanity_array;
|
||||
}
|
||||
|
||||
append_callback(AsstMsg::AllTasksCompleted, callback_json);
|
||||
finished_tasks.clear();
|
||||
clear_cache();
|
||||
|
||||
@@ -139,6 +139,12 @@ bool asst::TaskData::parse(const json::value& json)
|
||||
// TemplateTask
|
||||
if (size_t p = name.find('@'); p != std::string::npos) {
|
||||
if (std::string base = name.substr(p + 1); generate_fun(base, false)) {
|
||||
#ifdef ASST_DEBUG
|
||||
if (task_json.as_object().empty() && get_raw(base)->algorithm != AlgorithmType::MatchTemplate) {
|
||||
// 多余的空任务
|
||||
Log.warn("Task", name, "is a redundant empty task because it is not MatchTemplate");
|
||||
}
|
||||
#endif
|
||||
return generate_task(name, name.substr(0, p), get_raw(base), task_json);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace asst
|
||||
|
||||
public:
|
||||
static inline const std::string InfrastAvailableOpersForGroup = "InfrastAvailableOpersForGroup";
|
||||
static inline const std::string FightSanityReport = "FightSanityReport";
|
||||
|
||||
static inline const std::string RoguelikeCharElitePrefix = "RoguelikeElite-";
|
||||
static inline const std::string RoguelikeCharLevelPrefix = "RoguelikeLevel-";
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Config/TaskData.h"
|
||||
#include "Controller/Controller.h"
|
||||
#include "Status.h"
|
||||
#include "Utils/ImageIo.hpp"
|
||||
#include "Utils/Logger.hpp"
|
||||
#include "Vision/RegionOCRer.h"
|
||||
@@ -19,6 +20,10 @@ bool asst::SanityBeforeStagePlugin::verify(AsstMsg msg, const json::value& detai
|
||||
if (task.ends_with("StartButton1")) {
|
||||
return true;
|
||||
}
|
||||
else if (task.ends_with("Stop") && details.at("pre_task").as_string().ends_with("StartButton1")) {
|
||||
// 次数达限
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
@@ -49,8 +54,8 @@ void asst::SanityBeforeStagePlugin::get_sanity()
|
||||
if (!analyzer.analyze()) {
|
||||
Log.info(__FUNCTION__, "Current Sanity analyze failed");
|
||||
|
||||
cv::rectangle(img, make_rect<cv::Rect>(Task.get("SanityMatch")->roi), cv::Scalar(0, 0, 255), 2);
|
||||
std::string stem = utils::get_time_filestem();
|
||||
cv::rectangle(img, make_rect<cv::Rect>(Task.get("SanityMatch")->roi), cv::Scalar(0, 0, 255), 2);
|
||||
imwrite(utils::path("debug") / utils::path("sanity") / (stem + "_failed_img.png"), img);
|
||||
return;
|
||||
}
|
||||
@@ -69,4 +74,9 @@ void asst::SanityBeforeStagePlugin::get_sanity()
|
||||
json::value sanity_info = basic_info_with_what("SanityBeforeStage");
|
||||
sanity_info["details"]["sanity"] = text;
|
||||
callback(AsstMsg::SubTaskExtraInfo, sanity_info);
|
||||
|
||||
json::array value;
|
||||
value.emplace_back(std::move(text));
|
||||
value.emplace_back(utils::get_format_time());
|
||||
status()->set_str(Status::FightSanityReport, value.dumps());
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ bool asst::InfrastProcessingTask::_run()
|
||||
m_all_available_opers.clear();
|
||||
|
||||
// 不是自定义的也换不了加工站
|
||||
if (!m_is_custom) {
|
||||
if (!is_use_custom_opers()) {
|
||||
return false;
|
||||
}
|
||||
// 加工站,啥也造不了,随便写一个
|
||||
|
||||
@@ -4,9 +4,31 @@
|
||||
|
||||
#include "Task/ProcessTask.h"
|
||||
|
||||
asst::AwardTask::AwardTask(const AsstCallback& callback, Assistant* inst) : InterfaceTask(callback, inst, TaskType)
|
||||
#include "Utils/Logger.hpp"
|
||||
|
||||
asst::AwardTask::AwardTask(const AsstCallback& callback, Assistant* inst) :
|
||||
InterfaceTask(callback, inst, TaskType),
|
||||
award_task_ptr(std::make_shared<ProcessTask>(m_callback, m_inst, TaskType)),
|
||||
mail_task_ptr(std::make_shared<ProcessTask>(m_callback, m_inst, TaskType))
|
||||
{
|
||||
auto award_task_ptr = std::make_shared<ProcessTask>(m_callback, m_inst, TaskType);
|
||||
LogTraceFunction;
|
||||
|
||||
award_task_ptr->set_tasks({ "AwardBegin" });
|
||||
mail_task_ptr->set_tasks({ "MailBegin" });
|
||||
|
||||
m_subtasks.emplace_back(award_task_ptr);
|
||||
m_subtasks.emplace_back(mail_task_ptr);
|
||||
}
|
||||
|
||||
bool asst::AwardTask::set_params(const json::value& params)
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
bool award = params.get("award", true);
|
||||
bool mail = params.get("mail", false);
|
||||
|
||||
award_task_ptr->set_enable(award);
|
||||
mail_task_ptr->set_enable(mail);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -12,5 +12,11 @@ namespace asst
|
||||
|
||||
AwardTask(const AsstCallback& callback, Assistant* inst);
|
||||
virtual ~AwardTask() override = default;
|
||||
|
||||
virtual bool set_params(const json::value& params) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ProcessTask> award_task_ptr = nullptr;
|
||||
std::shared_ptr<ProcessTask> mail_task_ptr = nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,6 +43,11 @@ asst::CopilotTask::CopilotTask(const AsstCallback& callback, Assistant* inst)
|
||||
m_copilot_list_notification_ptr = start_2_tp->register_plugin<CopilotListNotificationPlugin>();
|
||||
m_subtasks.emplace_back(start_2_tp);
|
||||
|
||||
//跳过“以下干员出战后将被禁用,是否继续?”对话框
|
||||
auto start_3_tp = std::make_shared<ProcessTask>(callback, inst, TaskType);
|
||||
start_3_tp->set_tasks({ "SkipForbiddenOperConfirm", "Stop" }).set_ignore_error(false);
|
||||
m_subtasks.emplace_back(start_3_tp);
|
||||
|
||||
m_subtasks.emplace_back(m_battle_task_ptr)->set_retry_times(0);
|
||||
|
||||
m_stop_task_ptr->set_enable(false);
|
||||
|
||||
@@ -125,6 +125,9 @@ namespace MaaWpfGui.Constants
|
||||
public const string CreditBlackListNew = "Mall.CreditBlackListNew";
|
||||
public const string CreditForceShoppingIfCreditFull = "Mall.CreditForceShoppingIfCreditFull";
|
||||
|
||||
public const string ReceiveAward = "Mission.ReceiveAward";
|
||||
public const string ReceiveMail = "Mission.ReceiveMail";
|
||||
|
||||
public const string CopilotAddUserAdditional = "Copilot.AddUserAdditional";
|
||||
public const string CopilotUserAdditional = "Copilot.UserAdditional";
|
||||
public const string CopilotLoopTimes = "Copilot.LoopTimes";
|
||||
|
||||
@@ -589,6 +589,7 @@ namespace MaaWpfGui.Main
|
||||
case AsstMsg.AllTasksCompleted:
|
||||
bool isMainTaskQueueAllCompleted = true;
|
||||
var finished_tasks = details["finished_tasks"] as JArray;
|
||||
var sanity_report = details["sanity"] as JArray;
|
||||
if (finished_tasks.Count == 1)
|
||||
{
|
||||
var unique_finished_task = (AsstTaskId)finished_tasks[0];
|
||||
@@ -617,19 +618,49 @@ namespace MaaWpfGui.Main
|
||||
|
||||
if (isMainTaskQueueAllCompleted)
|
||||
{
|
||||
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("AllTasksComplete"));
|
||||
bool isSanityForecastSucc = true;
|
||||
DateTimeOffset? reportTime = null;
|
||||
TimeSpan timeDiff = TimeSpan.Zero;
|
||||
if (isSanityForecastSucc &= sanity_report != null && sanity_report.Count == 2 && ((string)sanity_report[0]).Contains("/"))
|
||||
{
|
||||
int[] sanity = ((string)sanity_report[0]).Split('/').Select(i => Convert.ToInt32(i)).ToArray();
|
||||
reportTime = DateTimeOffset.Parse((string)sanity_report[1]);
|
||||
if (isSanityForecastSucc &= sanity.Length == 2 && sanity[1] > 1)
|
||||
{
|
||||
timeDiff = new TimeSpan(0, sanity[0] < sanity[1] ? (sanity[1] - sanity[0]) * 6 : 0, 0);
|
||||
reportTime = reportTime?.AddMinutes(timeDiff.TotalMinutes);
|
||||
}
|
||||
}
|
||||
|
||||
var allTaskCompleteTitle = LocalizationHelper.GetString("AllTasksComplete");
|
||||
var allTaskCompleteMessage = LocalizationHelper.GetString("AllTaskCompleteContent");
|
||||
var sanityReport = LocalizationHelper.GetString("SanityReport");
|
||||
|
||||
var configurationPreset = ConfigurationHelper.GetValue(ConfigurationKeys.CurrentConfiguration, "Default");
|
||||
var configurationPreset = ConfigurationHelper.GetCurrentConfiguration();
|
||||
|
||||
allTaskCompleteMessage = allTaskCompleteMessage
|
||||
.Replace("{Datetime}", DateTime.Now.ToString("U"))
|
||||
.Replace("{DateTime}", DateTime.Now.ToString("U"))
|
||||
.Replace("{Preset}", configurationPreset);
|
||||
if (isSanityForecastSucc)
|
||||
{
|
||||
sanityReport = sanityReport.Replace("{DateTime}", reportTime?.ToString("T")).Replace("{TimeDiff}", timeDiff.ToString(@"hh\:mm"));
|
||||
|
||||
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("AllTasksComplete") + Environment.NewLine + sanityReport);
|
||||
ExternalNotificationService.Send(allTaskCompleteTitle, allTaskCompleteMessage + Environment.NewLine + sanityReport);
|
||||
}
|
||||
else
|
||||
{
|
||||
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("AllTasksComplete"));
|
||||
ExternalNotificationService.Send(allTaskCompleteTitle, allTaskCompleteMessage);
|
||||
}
|
||||
|
||||
ExternalNotificationService.Send(allTaskCompleteTitle, allTaskCompleteMessage);
|
||||
using (var toast = new ToastNotification(allTaskCompleteTitle))
|
||||
{
|
||||
if (isSanityForecastSucc)
|
||||
{
|
||||
toast.AppendContentText(sanityReport);
|
||||
}
|
||||
|
||||
toast.Show();
|
||||
}
|
||||
|
||||
@@ -1465,12 +1496,19 @@ namespace MaaWpfGui.Main
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 领取日常奖励。
|
||||
/// 领取奖励。
|
||||
/// </summary>
|
||||
/// <param name="award">是否领取每日/每周任务奖励</param>
|
||||
/// <param name="mail">是否领取所有邮件奖励</param>
|
||||
/// <returns>是否成功。</returns>
|
||||
public bool AsstAppendAward()
|
||||
public bool AsstAppendAward(bool award, bool mail)
|
||||
{
|
||||
AsstTaskId id = AsstAppendTaskWithEncoding("Award");
|
||||
var task_params = new JObject
|
||||
{
|
||||
["award"] = award,
|
||||
["mail"] = mail,
|
||||
};
|
||||
AsstTaskId id = AsstAppendTaskWithEncoding("Award", task_params);
|
||||
_latestTaskId[TaskType.Award] = id;
|
||||
return id != 0;
|
||||
}
|
||||
|
||||
@@ -259,6 +259,8 @@ Please do not check it when the stage OF-1 is not unlocked.</system:String>
|
||||
<system:String x:Key="BlacklistDefault">Carbon;Furniture Part;Expedited Plan</system:String>
|
||||
<system:String x:Key="Drink">Would you like a drink🍷? doctor</system:String>
|
||||
<system:String x:Key="ForceShoppingIfCreditFull">Ignore blacklist if credits overflow</system:String>
|
||||
<system:String x:Key="ReceiveDailyAndWeeklyAward">Collect daily/weekly mission rewards</system:String>
|
||||
<system:String x:Key="ReceiveMail">Collect all mail rewards</system:String>
|
||||
<system:String x:Key="DroneUsage">Drone Usage</system:String>
|
||||
<system:String x:Key="MinimizeToTray">Hide to tray when minimized</system:String>
|
||||
<system:String x:Key="SystemNotification">System Notification</system:String>
|
||||
@@ -281,6 +283,7 @@ Enter 「SSReopen-XX」to pass SS normal difficulty level at one time</system:St
|
||||
<system:String x:Key="AutoDetectConnectionTip">This checkbox will be automatically unchecked after each detect is completed, and can be checked again if you need to re-detect</system:String>
|
||||
<system:String x:Key="AlwaysAutoDetectConnection">Re-detect every times</system:String>
|
||||
<system:String x:Key="AccountSwitch">Account Switch</system:String>
|
||||
<system:String x:Key="AccountSwitchManualRun">Manual switch</system:String>
|
||||
<system:String x:Key="AccountSwitchTip" xml:space="preserve">Fill in the account that needs to be switched to, leave blank to close the account switching
|
||||
Official(CN): Enter the mobile phone number displayed on the login interface, such as 123****4567
|
||||
Bilibili: Enter the account name displayed on the login interface, such as Zhang San
|
||||
@@ -302,7 +305,7 @@ Other client types are not supported</system:String>
|
||||
<system:String x:Key="Combat">Combat</system:String>
|
||||
<system:String x:Key="Visiting">Visit Friends</system:String>
|
||||
<system:String x:Key="Mall">Credit Store</system:String>
|
||||
<system:String x:Key="Mission">Daily & Weekly</system:String>
|
||||
<system:String x:Key="Mission">Collect Rewards</system:String>
|
||||
<system:String x:Key="AutoRoguelike">Auto I.S.</system:String>
|
||||
<system:String x:Key="ReclamationAlgorithm">Reclamation Algorithm</system:String>
|
||||
<system:String x:Key="Light">Light</system:String>
|
||||
@@ -541,7 +544,8 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
|
||||
<system:String x:Key="StartCombat" xml:space="preserve">Start combat: </system:String>
|
||||
<system:String x:Key="CompleteCombat">Complete combat</system:String>
|
||||
<system:String x:Key="AllTasksComplete">All task(s) completed!</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA has completed all tasks under the {Preset} configuration in {Datetime}.</system:String>
|
||||
<system:String x:Key="SanityReport">Sanity will be full on {DateTime} ({TimeDiff} later).</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA has completed all tasks under the {Preset} configuration in {DateTime}.</system:String>
|
||||
<system:String x:Key="BackgroundLinkStarted">Tasks started</system:String>
|
||||
<system:String x:Key="BackgroundLinkStopped">Tasks stopped</system:String>
|
||||
<system:String x:Key="FailedToOpenClient">Failed to open the client. Please check the configuration file</system:String>
|
||||
|
||||
@@ -259,6 +259,8 @@
|
||||
<system:String x:Key="BlacklistDefault">炭素材;家具;緊急招集票</system:String>
|
||||
<system:String x:Key="Drink">飲み物はいかがですか🍷?ドクター</system:String>
|
||||
<system:String x:Key="ForceShoppingIfCreditFull">クレジットがあふれた際はブラックリストを無視する</system:String>
|
||||
<system:String x:Key="ReceiveDailyAndWeeklyAward">毎日/毎週任務報酬を受取</system:String>
|
||||
<system:String x:Key="ReceiveMail">すべてのメール報酬を受取</system:String>
|
||||
<system:String x:Key="DroneUsage">ドローンの使用</system:String>
|
||||
<system:String x:Key="MinimizeToTray">最小化した際にトレイに表示</system:String>
|
||||
<system:String x:Key="SystemNotification">重要な通知をポップアップする</system:String>
|
||||
@@ -281,6 +283,7 @@
|
||||
<system:String x:Key="AutoDetectConnectionTip">このチェックボックスは、検出が完了するたびに自動的にチェックが外れますが、再検出が必要な場合は再度チェックを入れることができます</system:String>
|
||||
<system:String x:Key="AlwaysAutoDetectConnection">毎回再検出する</system:String>
|
||||
<system:String x:Key="AccountSwitch">アカウントの切り替え</system:String>
|
||||
<system:String x:Key="AccountSwitchManualRun">手動スイッチ</system:String>
|
||||
<system:String x:Key="AccountSwitchTip" xml:space="preserve">切り替える必要があるアカウントを入力し、空白のままにしてアカウントの切り替えを完了します
|
||||
公式(CN): ログイン インターフェイスに表示される携帯電話番号を入力します (例: 123****4567)
|
||||
Bilibili: ログイン インターフェイスに表示されるアカウント名 (Zhang San など) を入力します。
|
||||
@@ -541,7 +544,8 @@ Bilibili: ログイン インターフェイスに表示されるアカウント
|
||||
<system:String x:Key="StartCombat" xml:space="preserve">戦闘開始: </system:String>
|
||||
<system:String x:Key="CompleteCombat">戦闘完了</system:String>
|
||||
<system:String x:Key="AllTasksComplete">すべてのタスクが完了しました!</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA は、{Datetime} の {Preset} 構成の下にあるすべてのプリセット タスクを完了しました。</system:String>
|
||||
<system:String x:Key="SanityReport">理性は {DateTime} に満杯になります ({TimeDiff} 後)。</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA は、{DateTime} の {Preset} 構成の下にあるすべてのプリセット タスクを完了しました。</system:String>
|
||||
<system:String x:Key="BackgroundLinkStarted">Tasks started</system:String>
|
||||
<system:String x:Key="BackgroundLinkStopped">Tasks stopped</system:String>
|
||||
<system:String x:Key="FailedToOpenClient">クライアントを開くのに失敗しました。構成ファイルを確認してください</system:String>
|
||||
|
||||
@@ -259,6 +259,8 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요.</system:String>
|
||||
<system:String x:Key="BlacklistDefault">카본;가구 부품;즉시 완료 허가증</system:String>
|
||||
<system:String x:Key="Drink">술 한잔은 어떻습니까🍷? 박사님</system:String>
|
||||
<system:String x:Key="ForceShoppingIfCreditFull">크레딧이 넘치면 무시 항목도 구매</system:String>
|
||||
<system:String x:Key="ReceiveDailyAndWeeklyAward">일일/주간 미션 보상 받기</system:String>
|
||||
<system:String x:Key="ReceiveMail">모든 메일 보상 받기</system:String>
|
||||
<system:String x:Key="DroneUsage">드론 사용처</system:String>
|
||||
<system:String x:Key="MinimizeToTray">트레이로 최소화</system:String>
|
||||
<system:String x:Key="SystemNotification">중요 알림 팝업</system:String>
|
||||
@@ -281,6 +283,7 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요.</system:String>
|
||||
<system:String x:Key="AutoDetectConnectionTip">이 체크박스는 감지가 끝나면 자동으로 체크가 해제됩니다. 다시 감지하려면 다시 체크해주세요</system:String>
|
||||
<system:String x:Key="AlwaysAutoDetectConnection">매번 재감지</system:String>
|
||||
<system:String x:Key="AccountSwitch">계정 전환</system:String>
|
||||
<system:String x:Key="AccountSwitchManualRun">수동 스위치</system:String>
|
||||
<system:String x:Key="AccountSwitchTip" xml:space="preserve">전환할 계좌를 입력하고, 계좌 전환을 종료하려면 공백으로 남겨두세요.
|
||||
공식(CN): 로그인 인터페이스에 표시된 휴대폰 번호(예: 123****4567)를 입력하세요.
|
||||
Bilibili: 로그인 인터페이스에 표시되는 계정 이름(예: Zhang San)을 입력하세요.
|
||||
@@ -302,7 +305,7 @@ Bilibili: 로그인 인터페이스에 표시되는 계정 이름(예: Zhang San
|
||||
<system:String x:Key="Combat">이성 사용</system:String>
|
||||
<system:String x:Key="Visiting">친구 방문</system:String>
|
||||
<system:String x:Key="Mall">크레딧 수급 및 상점</system:String>
|
||||
<system:String x:Key="Mission">임무 보상 수령</system:String>
|
||||
<system:String x:Key="Mission">보상 수령</system:String>
|
||||
<system:String x:Key="AutoRoguelike">통합전략</system:String>
|
||||
<system:String x:Key="ReclamationAlgorithm">생명연산</system:String>
|
||||
<system:String x:Key="Light">라이트</system:String>
|
||||
@@ -541,7 +544,8 @@ Bilibili: 로그인 인터페이스에 표시되는 계정 이름(예: Zhang San
|
||||
<system:String x:Key="StartCombat" xml:space="preserve">작전 시작: </system:String>
|
||||
<system:String x:Key="CompleteCombat">작전 완료</system:String>
|
||||
<system:String x:Key="AllTasksComplete">모든 작업이 완료되었습니다!</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA는 {Datetime}의 {Preset} 구성에서 모든 사전 설정 작업을 완료했습니다.</system:String>
|
||||
<system:String x:Key="SanityReport">{DateTime}({TimeDiff} 이후)에 정신 상태가 가득 차게 됩니다.</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA는 {DateTime}의 {Preset} 구성에서 모든 사전 설정 작업을 완료했습니다.</system:String>
|
||||
<system:String x:Key="BackgroundLinkStarted">작업 시작됨</system:String>
|
||||
<system:String x:Key="BackgroundLinkStopped">작업 중지됨</system:String>
|
||||
<system:String x:Key="FailedToOpenClient">클라이언트를 시작하지 못했습니다. 설정 파일을 확인하세요</system:String>
|
||||
|
||||
@@ -259,6 +259,8 @@
|
||||
<system:String x:Key="BlacklistDefault">碳;家具;加急许可</system:String>
|
||||
<system:String x:Key="Drink">要来一杯美酒吗🍷?博士</system:String>
|
||||
<system:String x:Key="ForceShoppingIfCreditFull">信用溢出时无视黑名单</system:String>
|
||||
<system:String x:Key="ReceiveDailyAndWeeklyAward">领取每日/每周任务奖励</system:String>
|
||||
<system:String x:Key="ReceiveMail">领取所有邮件奖励</system:String>
|
||||
<system:String x:Key="DroneUsage">无人机用途</system:String>
|
||||
<system:String x:Key="MinimizeToTray">最小化时隐藏至托盘</system:String>
|
||||
<system:String x:Key="SystemNotification">重要信息弹出系统通知</system:String>
|
||||
@@ -281,9 +283,10 @@
|
||||
<system:String x:Key="AutoDetectConnectionTip">每次检测完成后会自动取消勾选,若需要重新检测可再次勾选,若反复连接失败可勾选始终自动检测连接</system:String>
|
||||
<system:String x:Key="AlwaysAutoDetectConnection">每次重新检测</system:String>
|
||||
<system:String x:Key="AccountSwitch">账号切换</system:String>
|
||||
<system:String x:Key="AccountSwitchTip" xml:space="preserve">填写需要切换至的账号,留空以关闭账号切换
|
||||
官服输入登录界面显示的手机号,如 123****4567
|
||||
B服输入登录界面显示的账号名,如 张三
|
||||
<system:String x:Key="AccountSwitchManualRun">手动切换</system:String>
|
||||
<system:String x:Key="AccountSwitchTip" xml:space="preserve">需要切换至的账号,留空以禁用
|
||||
官服输入登录界面显示的手机号,如「123****4567」,可输入「123****4567」或「4567」或「23****45」
|
||||
B服输入登录界面显示的账号名,如「张三」,可输入「张」或「三」
|
||||
暂不支持其他服</system:String>
|
||||
<system:String x:Key="ADBPath">ADB 路径 (相对/绝对)</system:String>
|
||||
<system:String x:Key="ConnectionAddress">连接地址</system:String>
|
||||
@@ -302,7 +305,7 @@
|
||||
<system:String x:Key="Combat">刷理智</system:String>
|
||||
<system:String x:Key="Visiting">访问好友</system:String>
|
||||
<system:String x:Key="Mall">获取信用及购物</system:String>
|
||||
<system:String x:Key="Mission">领取日常奖励</system:String>
|
||||
<system:String x:Key="Mission">领取奖励</system:String>
|
||||
<system:String x:Key="AutoRoguelike">自动肉鸽</system:String>
|
||||
<system:String x:Key="ReclamationAlgorithm">生息演算</system:String>
|
||||
<system:String x:Key="Light">亮色</system:String>
|
||||
@@ -541,7 +544,8 @@
|
||||
<system:String x:Key="StartCombat" xml:space="preserve">开始战斗: </system:String>
|
||||
<system:String x:Key="CompleteCombat">完成战斗</system:String>
|
||||
<system:String x:Key="AllTasksComplete">任务已全部完成!</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA 已在 {Datetime} 完成了 {Preset} 配置下所有预设的任务。</system:String>
|
||||
<system:String x:Key="SanityReport">理智将在 {DateTime} ({TimeDiff} 后) 回满。</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA 已在 {DateTime} 完成了 {Preset} 配置下所有预设的任务。</system:String>
|
||||
<system:String x:Key="BackgroundLinkStarted">开始执行任务</system:String>
|
||||
<system:String x:Key="BackgroundLinkStopped">任务终止</system:String>
|
||||
<system:String x:Key="FailedToOpenClient">打开客户端失败,请检查配置文件</system:String>
|
||||
|
||||
@@ -259,6 +259,8 @@
|
||||
<system:String x:Key="BlacklistDefault">碳;傢俱;加急許可</system:String>
|
||||
<system:String x:Key="Drink">要來一杯美酒嗎🍷?博士</system:String>
|
||||
<system:String x:Key="ForceShoppingIfCreditFull">信用溢出時無視黑名單</system:String>
|
||||
<system:String x:Key="ReceiveDailyAndWeeklyAward">收集每日/每週任務獎勵</system:String>
|
||||
<system:String x:Key="ReceiveMail">收集所有郵件獎勵</system:String>
|
||||
<system:String x:Key="DroneUsage">無人機用途</system:String>
|
||||
<system:String x:Key="MinimizeToTray">最小化時隱藏至工作列</system:String>
|
||||
<system:String x:Key="SystemNotification">重要訊息彈出系統通知</system:String>
|
||||
@@ -281,10 +283,11 @@
|
||||
<system:String x:Key="AutoDetectConnectionTip">每次檢測完成後會自動取消勾選,若需要重新檢測可再次勾選</system:String>
|
||||
<system:String x:Key="AlwaysAutoDetectConnection">每次重新檢測</system:String>
|
||||
<system:String x:Key="AccountSwitch">賬號切換</system:String>
|
||||
<system:String x:Key="AccountSwitchTip" xml:space="preserve">填寫需要切換至的賬號,留空以關閉賬號切換
|
||||
官服輸入登錄界面顯示的手機號,如 123****4567
|
||||
B服輸入登錄界面顯示的賬號名,如 張三
|
||||
暫不支持其他類型</system:String>
|
||||
<system:String x:Key="AccountSwitchManualRun">手動切换</system:String>
|
||||
<system:String x:Key="AccountSwitchTip" xml:space="preserve">需要切換至的賬號,留空以禁用
|
||||
官服輸入登錄界面顯示的手機號,如「123****4567」,可輸入「123****4567」或「4567」或「23****45」
|
||||
B服輸入登錄界面顯示的賬號名,如「張三」,可輸入「張」或「三」
|
||||
暫不支持其他服</system:String>
|
||||
<system:String x:Key="ADBPath">ADB 路徑(相對/絕對)</system:String>
|
||||
<system:String x:Key="ConnectionAddress">連接地址</system:String>
|
||||
<system:String x:Key="ConnectionAddressTip">若遇到問題可嘗試手動修改</system:String>
|
||||
@@ -302,7 +305,7 @@
|
||||
<system:String x:Key="Combat">刷理智</system:String>
|
||||
<system:String x:Key="Visiting">訪問好友</system:String>
|
||||
<system:String x:Key="Mall">獲取信用及購物</system:String>
|
||||
<system:String x:Key="Mission">領取日常獎勵</system:String>
|
||||
<system:String x:Key="Mission">領取獎勵</system:String>
|
||||
<system:String x:Key="AutoRoguelike">自動肉鴿</system:String>
|
||||
<system:String x:Key="ReclamationAlgorithm">生息演算</system:String>
|
||||
<system:String x:Key="Light">亮色</system:String>
|
||||
@@ -541,7 +544,8 @@
|
||||
<system:String x:Key="StartCombat" xml:space="preserve">開始戰鬥: </system:String>
|
||||
<system:String x:Key="CompleteCombat">完成戰鬥</system:String>
|
||||
<system:String x:Key="AllTasksComplete">任務已全部完成!</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA 已在 {Datetime} 完成了 {Preset} 配置下所有預設的任務。</system:String>
|
||||
<system:String x:Key="SanityReport">理智會在 {DateTime} ({TimeDiff} 後) 回滿。</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA 已在 {DateTime} 完成了 {Preset} 配置下所有預設的任務。</system:String>
|
||||
<system:String x:Key="BackgroundLinkStarted">開始執行任務</system:String>
|
||||
<system:String x:Key="BackgroundLinkStopped">任務終止</system:String>
|
||||
<system:String x:Key="FailedToOpenClient">打開用戶端失敗,請檢查設定檔</system:String>
|
||||
|
||||
@@ -560,6 +560,11 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
}
|
||||
}
|
||||
|
||||
public void AccountSwitchMannualRun()
|
||||
{
|
||||
Instances.TaskQueueViewModel.QuickSwitchAccount();
|
||||
}
|
||||
|
||||
private bool _minimizingStartup = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.MinimizingStartup, bool.FalseString));
|
||||
|
||||
/// <summary>
|
||||
@@ -1582,7 +1587,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
private string _roguelikeMode = ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeMode, "0");
|
||||
|
||||
/// <summary>
|
||||
/// 策略,往后打 / 刷一层就退
|
||||
/// 策略,往后打 / 刷一层就退 / 烧开水
|
||||
/// </summary>
|
||||
public string RoguelikeMode
|
||||
{
|
||||
@@ -1591,6 +1596,9 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
{
|
||||
SetAndNotify(ref _roguelikeMode, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeMode, value);
|
||||
|
||||
// 烧开水模式可选项
|
||||
this.RoguelikeStartWithEliteTwoEnable = mapRoguelikeStartWithEliteTwoEnable(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1676,6 +1684,31 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
}
|
||||
}
|
||||
|
||||
private string _roguelikeStartWithEliteTwoEnable = mapRoguelikeStartWithEliteTwoEnable(ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeMode, "0"));
|
||||
|
||||
public string RoguelikeStartWithEliteTwoEnable
|
||||
{
|
||||
get
|
||||
{
|
||||
return _roguelikeStartWithEliteTwoEnable;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _roguelikeStartWithEliteTwoEnable, value);
|
||||
}
|
||||
}
|
||||
|
||||
private static string mapRoguelikeStartWithEliteTwoEnable(string mode)
|
||||
{
|
||||
if (mode == "4")
|
||||
{
|
||||
return "Visible";
|
||||
}
|
||||
|
||||
return "Collapsed";
|
||||
}
|
||||
|
||||
private string _roguelikeUseSupportUnit = ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeUseSupportUnit, false.ToString());
|
||||
|
||||
/// <summary>
|
||||
@@ -1915,6 +1948,38 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
}
|
||||
}
|
||||
|
||||
/* 领取奖励设置 */
|
||||
|
||||
private bool _receiveAward = bool.Parse(ConfigurationHelper.GetValue(ConfigurationKeys.ReceiveAward, true.ToString()));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether receive award is enabled.
|
||||
/// </summary>
|
||||
public bool ReceiveAward
|
||||
{
|
||||
get => _receiveAward;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _receiveAward, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReceiveAward, value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private bool _receiveMail = bool.Parse(ConfigurationHelper.GetValue(ConfigurationKeys.ReceiveMail, false.ToString()));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether receive mail is enabled.
|
||||
/// </summary>
|
||||
public bool ReceiveMail
|
||||
{
|
||||
get => _receiveMail;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _receiveMail, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReceiveMail, value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/* 定时设置 */
|
||||
|
||||
public class TimerModel
|
||||
|
||||
@@ -732,6 +732,70 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<bool> ConnectToEmulator()
|
||||
{
|
||||
string errMsg = string.Empty;
|
||||
bool connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
|
||||
// 尝试启动模拟器
|
||||
if (!connected && Instances.SettingsViewModel.RetryOnDisconnected)
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("TryToStartEmulator"));
|
||||
|
||||
await Task.Run(() => Instances.SettingsViewModel.TryToStartEmulator(true));
|
||||
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return false;
|
||||
}
|
||||
|
||||
connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
}
|
||||
|
||||
// 尝试重启adb
|
||||
if (!connected && Instances.SettingsViewModel.AllowADBRestart)
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("RestartADB"));
|
||||
|
||||
await Task.Run(() => Instances.SettingsViewModel.RestartADB());
|
||||
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return false;
|
||||
}
|
||||
|
||||
connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
}
|
||||
|
||||
// 尝试杀掉adb进程
|
||||
if (!connected && Instances.SettingsViewModel.AllowADBHardRestart)
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("HardRestartADB"));
|
||||
|
||||
await Task.Run(() => Instances.SettingsViewModel.HardRestartADB());
|
||||
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return false;
|
||||
}
|
||||
|
||||
connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
}
|
||||
|
||||
if (!connected)
|
||||
{
|
||||
AddLog(errMsg, UiLogColor.Error);
|
||||
_runningState.SetIdle(true);
|
||||
SetStopped();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts.
|
||||
/// </summary>
|
||||
@@ -758,9 +822,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
AddLog(LocalizationHelper.GetString("AdbReplacementTips"), UiLogColor.Info);
|
||||
}
|
||||
|
||||
string errMsg = string.Empty;
|
||||
bool connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
|
||||
// 一般是点了“停止”按钮了
|
||||
if (Stopping)
|
||||
{
|
||||
@@ -768,59 +829,8 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
return;
|
||||
}
|
||||
|
||||
// 尝试启动模拟器
|
||||
if (!connected && Instances.SettingsViewModel.RetryOnDisconnected)
|
||||
if (!await ConnectToEmulator())
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("TryToStartEmulator"));
|
||||
|
||||
await Task.Run(() => Instances.SettingsViewModel.TryToStartEmulator(true));
|
||||
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return;
|
||||
}
|
||||
|
||||
connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
}
|
||||
|
||||
// 尝试重启adb
|
||||
if (!connected && Instances.SettingsViewModel.AllowADBRestart)
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("RestartADB"));
|
||||
|
||||
await Task.Run(() => Instances.SettingsViewModel.RestartADB());
|
||||
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return;
|
||||
}
|
||||
|
||||
connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
}
|
||||
|
||||
// 尝试杀掉adb进程
|
||||
if (!connected && Instances.SettingsViewModel.AllowADBHardRestart)
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("HardRestartADB"));
|
||||
|
||||
await Task.Run(() => Instances.SettingsViewModel.HardRestartADB());
|
||||
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return;
|
||||
}
|
||||
|
||||
connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
}
|
||||
|
||||
if (!connected)
|
||||
{
|
||||
AddLog(errMsg, UiLogColor.Error);
|
||||
_runningState.SetIdle(true);
|
||||
SetStopped();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -866,7 +876,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
break;
|
||||
|
||||
case "Mission":
|
||||
taskRet &= Instances.AsstProxy.AsstAppendAward();
|
||||
taskRet &= AppendAward();
|
||||
break;
|
||||
|
||||
case "AutoRoguelike":
|
||||
@@ -944,6 +954,68 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
_runningState.SetIdle(true);
|
||||
}
|
||||
|
||||
public async void QuickSwitchAccount()
|
||||
{
|
||||
if (!_runningState.GetIdle())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_runningState.SetIdle(false);
|
||||
|
||||
// 虽然更改时已经保存过了,不过保险起见还是在点击开始之后再保存一次任务及基建列表
|
||||
TaskItemSelectionChanged();
|
||||
Instances.SettingsViewModel.InfrastOrderSelectionChanged();
|
||||
|
||||
ClearLog();
|
||||
|
||||
await Task.Run(() => Instances.SettingsViewModel.RunScript("StartsWithScript"));
|
||||
|
||||
AddLog(LocalizationHelper.GetString("ConnectingToEmulator"));
|
||||
if (!Instances.SettingsViewModel.AdbReplaced && !Instances.SettingsViewModel.IsAdbTouchMode())
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("AdbReplacementTips"), UiLogColor.Info);
|
||||
}
|
||||
|
||||
string errMsg = string.Empty;
|
||||
bool connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg));
|
||||
|
||||
// 一般是点了“停止”按钮了
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!await ConnectToEmulator())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 一般是点了“停止”按钮了
|
||||
if (Stopping)
|
||||
{
|
||||
SetStopped();
|
||||
return;
|
||||
}
|
||||
|
||||
bool taskRet = true;
|
||||
taskRet &= AppendStart();
|
||||
|
||||
taskRet &= Instances.AsstProxy.AsstStart();
|
||||
|
||||
if (taskRet)
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("Running"));
|
||||
}
|
||||
else
|
||||
{
|
||||
AddLog(LocalizationHelper.GetString("UnknownErrorOccurs"));
|
||||
await Stop();
|
||||
SetStopped();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool AppendStart()
|
||||
{
|
||||
var mode = Instances.SettingsViewModel.ClientType;
|
||||
@@ -1118,6 +1190,14 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
Instances.SettingsViewModel.CreditForceShoppingIfCreditFull);
|
||||
}
|
||||
|
||||
private bool AppendAward()
|
||||
{
|
||||
var receiveAward = Instances.SettingsViewModel.ReceiveAward;
|
||||
var receiveMail = Instances.SettingsViewModel.ReceiveMail;
|
||||
|
||||
return Instances.AsstProxy.AsstAppendAward(receiveAward, receiveMail);
|
||||
}
|
||||
|
||||
private static bool AppendRecruit()
|
||||
{
|
||||
// for debug
|
||||
|
||||
@@ -238,7 +238,11 @@
|
||||
DataContext="{Binding TaskSettingDataContext}"
|
||||
IsEnabled="{Binding Idle}"
|
||||
Visibility="{c:Binding TaskSettingVisibilities.Mall}" />
|
||||
<Image Source="../../newlogo.ico" Visibility="{c:Binding TaskSettingVisibilities.Mission}" />
|
||||
<userControl:AwardSettingsUserControl
|
||||
s:View.ActionTarget="{Binding DataContext, RelativeSource={RelativeSource Self}}"
|
||||
DataContext="{Binding TaskSettingDataContext}"
|
||||
IsEnabled="{Binding Idle}"
|
||||
Visibility="{c:Binding TaskSettingVisibilities.Mission}" />
|
||||
<userControl:RoguelikeSettingsUserControl
|
||||
s:View.ActionTarget="{Binding DataContext, RelativeSource={RelativeSource Self}}"
|
||||
DataContext="{Binding TaskSettingDataContext}"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.AwardSettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignWidth="220"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<StackPanel Visibility="{c:Binding !TaskSettingVisibilities.EnableAdvancedSettings}">
|
||||
<CheckBox
|
||||
Margin="0,10"
|
||||
Content="{DynamicResource ReceiveDailyAndWeeklyAward}"
|
||||
IsChecked="{Binding ReceiveAward}" />
|
||||
<CheckBox
|
||||
Margin="0,10"
|
||||
Content="{DynamicResource ReceiveMail}"
|
||||
IsChecked="{Binding ReceiveMail}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,30 @@
|
||||
// <copyright file="AwardSettingsUserControl.xaml.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY
|
||||
// </copyright>
|
||||
using System.Reflection;
|
||||
|
||||
namespace MaaWpfGui.Views.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// InfrastSettingsUserContril.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class AwardSettingsUserControl : System.Windows.Controls.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AwardSettingsUserControl"/> class.
|
||||
/// </summary>
|
||||
public AwardSettingsUserControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,14 +14,29 @@
|
||||
d:DesignWidth="220"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<TextBox
|
||||
Margin="0,5"
|
||||
hc:TitleElement.Title="{DynamicResource AccountSwitch}"
|
||||
IsReadOnly="{c:Binding !Idle}"
|
||||
Style="{StaticResource TextBoxExtend}"
|
||||
Text="{Binding AccountName, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{DynamicResource AccountSwitchTip}"
|
||||
Visibility="{c:Binding '(ClientType == "Official") or (ClientType == "Bilibili") or (ClientType == "")'}" />
|
||||
<Grid Margin="0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox
|
||||
hc:TitleElement.Title="{DynamicResource AccountSwitch}"
|
||||
IsReadOnly="{c:Binding !Idle}"
|
||||
Style="{StaticResource TextBoxExtend}"
|
||||
Text="{Binding AccountName, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="{DynamicResource AccountSwitchTip}"
|
||||
Visibility="{c:Binding '(ClientType == "Official") or (ClientType == "Bilibili") or (ClientType == "")'}" />
|
||||
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Padding="12,1,12,1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
hc:BorderElement.CornerRadius="0,4,4,0"
|
||||
BorderThickness="0,1,1,1"
|
||||
Command="{s:Action AccountSwitchMannualRun}"
|
||||
Content="{DynamicResource AccountSwitchManualRun}" />
|
||||
</Grid>
|
||||
|
||||
<CheckBox
|
||||
Margin="0,10"
|
||||
|
||||
@@ -24,8 +24,22 @@ if __name__ == "__main__":
|
||||
# 设置更新器的路径和目标版本并更新
|
||||
Updater(path, Version.Stable).update()
|
||||
|
||||
# 外服需要再额外传入增量资源路径,例如
|
||||
# incremental_path=path / 'resource' / 'global' / 'YoStarEN'
|
||||
# 加载 dll 及资源
|
||||
#
|
||||
# incremental_path 参数表示增量资源所在路径。两种用法举例:
|
||||
# 1. 传入外服的增量资源路径:
|
||||
# Asst.load(path=path, incremental_path=path / 'resource' / 'global' / 'YoStarEN')
|
||||
# 2. 加载活动关导航(需额外下载):
|
||||
# # 下载活动关导航
|
||||
# import urllib.request
|
||||
# ota_tasks_url = 'https://ota.maa.plus/MaaAssistantArknights/api/resource/tasks.json'
|
||||
# ota_tasks_path = path / 'cache' / 'resource' / 'tasks.json'
|
||||
# ota_tasks_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
# with open(ota_tasks_path, 'w', encoding='utf-8') as f:
|
||||
# with urllib.request.urlopen(ota_tasks_url) as u:
|
||||
# f.write(u.read().decode('utf-8'))
|
||||
# # 加载
|
||||
# Asst.load(path=path, incremental_path=path / 'cache')
|
||||
Asst.load(path=path)
|
||||
|
||||
# 若需要获取详细执行信息,请传入 callback 参数
|
||||
|
||||
Reference in New Issue
Block a user