Compare commits

...

981 Commits

Author SHA1 Message Date
zzyyyl
02961e60e9 feat: 增加从 GitHub 直接获取资源文件的方式,并优先尝试从 GitHub 获取
github raw 没有 dynamic_list.txt
2024-07-14 17:34:23 +08:00
SherkeyXD
312e0296bd chore: CHANGELOG中文档修改独立分类 2024-07-14 15:01:34 +08:00
Hao Guan
0a6e7c794b feat: Mac GUI 添加萨米肉鸽策略 2024-07-14 13:18:01 +08:00
Constrat
c60d5544e9 fix: tweak Reed Alter, Noir Corne alter regex 2024-07-13 23:21:47 +02:00
zzyyyl
d52b1e13ec perf: 保持 commit 树不分叉
[skip changelog] [skip ci]
2024-07-14 03:06:44 +08:00
SherkeyXD
05668443fc ci: 更新checkout至v4
这怎么还有个漏网之鱼)
2024-07-14 02:55:25 +08:00
SherkeyXD
b495a16a0a docs: Update Changelogs of v5.4.1 2024-07-14 02:32:32 +08:00
Rbqwow
c6fa1a7258 docs: fix 17f0172
[skip changelog]
2024-07-14 02:04:47 +08:00
Rbqwow
c3bb7c8d17 docs: 修改win7相关问题描述&更新运行库 2024-07-14 02:04:46 +08:00
Rbqwow
530e32f1a1 docs: 修复字体和评论区分类 2024-07-14 02:04:44 +08:00
Rbqwow
d8f364aa58 docs: fix a bad link 2024-07-14 02:04:43 +08:00
Rbqwow
40f33fd2f2 docs: make i18n warnings show only once 2024-07-14 02:04:42 +08:00
uye
c632054716 refactor: website docs **translation needed** (#9287)
Co-authored-by: wlwxj <d1ve_wh4le@outlook.com>
Co-authored-by: Rbqwow <55343783+Rbqwow@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Wallsman <63186641+wallsman@users.noreply.github.com>
Co-authored-by: Loong <wangl.cc@outlook.com>
Co-authored-by: 神代綺凛 <i@loli.best>
Co-authored-by: SherkeyXD <57581480+SherkeyXD@users.noreply.github.com>
2024-07-14 01:47:19 +08:00
Constrat
38c1f77326 feat: YoStarEN resolution warning on client switch (#9539)
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-07-14 01:47:17 +08:00
Constrat
f74004d954 fix(docs): MD022/blanks-around-headings
[skip changelog]
2024-07-13 17:11:26 +02:00
Constrat
7eaf4f2de3 docs: beautified example images
[skip changelog]
2024-07-13 17:07:47 +02:00
status102
73458d38ca fix: 自动战斗开始时移除召唤物类头像缓存,以避免跨局错误识别相似技能的召唤物 (#9649)
* fix: 自动战斗开始时移除召唤物类头像缓存,以避免跨局错误识别相似技能的召唤物

* chore: description
2024-07-13 22:53:04 +08:00
Constrat
e6eef5a03d docs(chore): updated EN example images for consistency
[skip changelog]
2024-07-13 16:38:36 +02:00
DavidWang19
e20f429ae4 feat: WPF Gui support for roguelike collapsal paradigm task plugin (#9648)
* feat: WPF Gui support for roguelike collapsal paradigm task plugin
2024-07-13 14:34:36 +01:00
Constrat
434d05bcd9 chore: Auto Update Game Resources - 2024-07-13
[skip changelog]
2024-07-13 12:47:41 +00:00
Constrat
1ea5104aee docs: updated EN example images
[skip changelog]
2024-07-13 14:46:36 +02:00
zzyyyl
e18a46acfa perf: 删除 tasks.json 冗余行 (#9645) 2024-07-13 20:36:43 +08:00
Constrat
fcf25b2a2a chore: link for yostaren resolution
[skip changelo]
2024-07-13 14:14:12 +02:00
Constrat
624cef1e8c docs: more EN localization tweaks
[no ci] [skip changelog]
2024-07-13 14:13:19 +02:00
Constrat
9b7f1e36e0 docs: localized symbols for en_US
[no ci] [skip changelog]
2024-07-13 12:59:57 +02:00
HY
6963037ba0 fix: 繁中服部分角色無法正確辨識 (#9647) 2024-07-13 10:19:46 +01:00
zzyyyl
2642053096 feat: 增加 BattlePauseCancel 重试上限 2024-07-13 12:05:11 +08:00
zzyyyl
1da98683f3 fix: 修复连接前同步参数时日志报错的问题 (#9644)
m_controller is not inited
2024-07-13 10:02:16 +08:00
zzyyyl
ed4c7c0a04 fix: roi out of bounds 2024-07-13 08:27:28 +08:00
zzyyyl
05870cc6c7 feat: cache 统一默认为 false (#9642)
workaround for #9639

之后删了
2024-07-13 08:10:00 +08:00
zzyyyl
7a66c5315d feat: 重新加入 tasks.json 的默认值检查 (#9583) 2024-07-13 08:08:06 +08:00
Alisa
68e56325b6 i18n: Translations update from MAA Weblate (#9640)
* i18n: Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (723 of 723 strings)

Translation: MAA Assistant Arknights/WPF GUI
Translate-URL: https://weblate.maa-org.net/projects/maa/wpf-gui/zh_Hans/

* i18n: Translated using Weblate (English (United States))

Currently translated at 99.1% (717 of 723 strings)

Translation: MAA Assistant Arknights/WPF GUI
Translate-URL: https://weblate.maa-org.net/projects/maa/wpf-gui/en_US/

* i18n: Translated using Weblate (Japanese)

Currently translated at 99.1% (717 of 723 strings)

Translation: MAA Assistant Arknights/WPF GUI
Translate-URL: https://weblate.maa-org.net/projects/maa/wpf-gui/ja/

* i18n: Translated using Weblate (Korean)

Currently translated at 99.4% (719 of 723 strings)

Translation: MAA Assistant Arknights/WPF GUI
Translate-URL: https://weblate.maa-org.net/projects/maa/wpf-gui/ko/

---------

Co-authored-by: Rbqwow <Rbqwow@users.noreply.weblate.maa-org.net>
2024-07-12 23:26:24 +08:00
zzyyyl
140db8e274 feat: 由ci生成的非正式/公测/内测版判断为调试版本并且不再检查更新 (#9632)
close #7712

Fix of #7719
2024-07-12 23:09:47 +08:00
zzyyyl
8c3643b691 feat: 隐式空 text 检测仅对无基任务生效 2024-07-12 20:40:19 +08:00
status102
cef5797419 perf: add log output (#9636) 2024-07-12 19:36:46 +08:00
Weiyou Wang
8535c53289 fix: 修复萨米肉鸽因插件注册顺序导致的无法运行问题 (#9633)
* fix: m_roguelike_register_plugins

* refactor: !(A == B) --> (A != B)
2024-07-12 17:57:09 +08:00
SherkeyXD
aa032b5790 feat: 为调试版本添加无需更新的提示 2024-07-12 12:33:39 +08:00
SherkeyXD
b49a495f78 feat: 由ci生成的非正式/公测/内测版判断为调试版本并且不再检查更新
Co-authored-by: zzyyyl <aysyxx53@hotmail.com>
2024-07-12 12:33:31 +08:00
Constrat
970e45209a chore: Auto Update Game Resources - 2024-07-11
[skip changelog]
2024-07-11 17:26:57 +00:00
Constrat
edbf4aefda Style/gui consistency (#9567) 2024-07-11 18:26:33 +01:00
Weiyou Wang
87ea4fe357 fix: 修复坍缩范式插件导致的Gui和傀影/水月肉鸽初始化Bug (#9573)
* fix: call Clp_Pd plugin function directly from Encounter & FoldartalUse plugins

* refactor: 去除 tasks.json 中的冗余

* fix: 修正坍缩范式插件对banner文字位置的判断

* refactor: get_rare_clp_pds直接使用find结果返回

* refactor: delete code for debug

* refactor: 减少hard coding

* refactor: 减少hard coding

* refactor: use canonical debug mode

* refactor: add explanation for m_need_check_panel in comment

* fix: 日版翻译更正 thanks to @Manicsteiner

* refactor: refine the condition for using clp_pd_plugin in *.cpp files

* refactor: refine condition check for enabling clp_pd_task plugin

* refactor: change back to ASST_DEBUG
2024-07-12 01:12:02 +08:00
Manicsteiner
694572694d chore: YostarJP add SSSBuffChoose (#9629) 2024-07-11 23:28:28 +08:00
Sherkey
8b90bd7968 refactor: 肉鸽资源加载逻辑及目录结构重构 (#9555)
Todos:
~~+ [ ] autocopilot 也重构一下~~
+ [x] encounter 采用类似 tasks.json 的覆盖模式,各个模式的事件配置覆盖到 `default.json` 上面
+ [x] 肉鸽插件加载主题化(待定)
+ [x] Wait for #9561
2024-07-11 20:11:45 +08:00
Weiyou Wang
22221cce21 fix: delete mode tag which is no longer used 2024-07-11 18:26:44 +08:00
Constrat
f93f7979e1 chore: Auto Update Game Resources - 2024-07-11
[skip changelog]
2024-07-11 07:43:06 +00:00
Weiyou Wang
b3d991070e refactor: reduce redundancy in encounter.json files 2024-07-11 14:04:17 +08:00
Weiyou Wang
df9791e5d9 refactor: 肉鸽根据主题选择加载的插件 2024-07-11 14:04:16 +08:00
Weiyou Wang
4921fb7558 refactor: 重构肉鸽不期而遇策略的加载与使用 2024-07-11 14:03:44 +08:00
皆川すみれ
dadbfd92d0 fix: 为InfrastEnteredFlag添加延迟以避免信用通知对右上角基建提醒的遮挡 (#9597)
* fix: add postdelay for InfrastEnteredFlag to avoid office notification conflication

为InfrastEnteredFlag添加延迟以避免信用通知对右上角基建提醒的遮挡

* fix: remove comma
2024-07-11 13:55:19 +08:00
Sherkey
25e9e0d745 docs: fix Weblate status preview in README (#9616)
Fix Weblate preview images and links in
[README.md](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev/README.md#%E5%A4%9A%E8%AF%AD%E8%A8%80-i18n)
.

![image](https://github.com/MaaAssistantArknights/MaaAssistantArknights/assets/61692393/3546cb41-acad-4aaa-bcab-a850ef337010)

↓


![image](https://github.com/MaaAssistantArknights/MaaAssistantArknights/assets/61692393/c11b272c-d077-4f4a-902e-ecf999ac0c66)
2024-07-11 01:32:29 +08:00
Lemon-miaow
44a0b20c49 docs: Fix README.md 2024-07-11 01:27:37 +08:00
Weiyou Wang
7d8cb51689 fix: allow CMake build MaaCore with ASST_DEBUG under macOS 2024-07-11 00:02:39 +08:00
Rbqwow
f10eb36229 docs: fix 17f0172
[skip changelog]
2024-07-10 17:39:34 +08:00
Wallsman
5a303d9c34 Update ja-jp.json
Update JP ニヤニヤ谷
2024-07-10 18:25:58 +09:00
dantmnf
4473a45e63 fix: leak fastdeploy objects to avoid crash 2024-07-10 14:44:39 +08:00
Sherkey
48f9188fb4 chore: 删除 Qodana 静态检查 (#9553)
目前 Qodana 的许可证不知因为什么原因过期了,已经六个月没有运行过了
并且由于 Github 的 Secret 存储机制,没有很好的在 PR 上工作的方法
因此提议删除
2024-07-10 14:19:37 +08:00
uye
f761605bfc chore: 增加 ResourceUpdater 日志 2024-07-10 11:25:50 +08:00
ChingCdesu
2ba2db3c5a pref: 将Head和ETag请求设置为Connection: close 2024-07-10 10:08:57 +08:00
Alisa
ff8ba97918 i18n: Translations update from MAA Weblate (#9598)
* Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (723 of 723 strings)

Translation: MAA Assistant Arknights/WPF GUI
Translate-URL: https://weblate.maa-org.net/projects/maa/wpf-gui/zh_Hant/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (579 of 579 strings)

Translation: MAA Assistant Arknights/Glossary
Translate-URL: https://weblate.maa-org.net/projects/maa/glossary/zh_Hant/

---------

Co-authored-by: momomochi <as99us301@gmail.com>
2024-07-10 09:43:19 +08:00
Rbqwow
17f01726b4 docs: 修改win7相关问题描述&更新运行库 2024-07-10 04:23:49 +08:00
Constrat
1b8911f550 chore: Auto Update Game Resources - 2024-07-09
[skip changelog]
2024-07-09 17:26:34 +00:00
HX3N
9f5e502d42 chore: YostarKR ocr fix and remove SkipThePreBattlePlot
remove duplicate and follow CN  maskRange value
2024-07-10 01:37:43 +09:00
Weiyou Wang
1f49d6363d fix: Roguelike Invest System offset (#9590) 2024-07-10 00:18:25 +08:00
Manicsteiner
1e55c956b7 chore: YostarJP cor fix and roguelike shop text (#9591) 2024-07-09 18:01:58 +02:00
HY
e97b54173b fix: 修正繁中服薩米肉鴿獎勵無法多選一的問題 (#9584)
fix #9574, fix #9547, fix #9514, fix #9472
2024-07-09 20:10:56 +08:00
Constrat
496af0800f chore: Auto Update Game Resources - 2024-07-09
[skip changelog]
2024-07-09 08:28:53 +00:00
Constrat
34d0a637cf chore: Auto Update Game Resources - 2024-07-09
[skip changelog]
2024-07-09 07:25:16 +00:00
alisa
43c5306ba4 fix: add zh-tw glossary for weblate 2024-07-09 12:44:46 +08:00
alisa
718de46ac7 fix: merge glossary json into one for better webalte compatibility 2024-07-09 12:25:41 +08:00
alisa
b8df114b73 feat: change glossary from markdown to JSON 2024-07-09 12:12:57 +08:00
Constrat
fb560915d5 chore: Auto Update Game Resources - 2024-07-09
[skip changelog]
2024-07-09 04:02:50 +00:00
alisa
994be62578 feat: update turbo to v2 2024-07-09 11:00:17 +08:00
Constrat
41a87e3806 chore: Auto Update Game Resources - 2024-07-09
[skip changelog]
2024-07-09 02:22:29 +00:00
Horror Proton
78545b8dfe fix: fix typings in Recruit task
fix: https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9517
2024-07-09 00:31:49 +08:00
EvATive7
e7bff44fe1 chore: update python API (#9538)
* chore: update python API

* fix: remove non-exist return value

* style: docstring of param of set_static_option

* feat: python API get_image
2024-07-08 21:52:01 +08:00
Rbqwow
a530b93b5f docs: 修复字体和评论区分类 2024-07-08 17:18:41 +08:00
SherkeyXD
fd9c0d3f6e docs: 跟进肉鸽不期而遇目录重构的文档修改 2024-07-08 13:04:00 +08:00
Sherkey
e4e22d3c51 feat: 添加萨米肉鸽天途半道关卡战斗策略 (#9337) 2024-07-08 12:53:27 +08:00
Rbqwow
a50c00ea8f docs: fix a bad link 2024-07-08 05:05:56 +08:00
Rbqwow
a0608eb314 docs: make i18n warnings show only once 2024-07-08 04:11:16 +08:00
Constrat
a340d515ad refactor: Yostar interface consistency
[no ci] [skip changelog]
2024-07-07 21:37:41 +02:00
SherkeyXD
7891ba2c8d refactor: 重构肉鸽不期而遇策略的目录格式 2024-07-08 03:30:24 +08:00
SherkeyXD
6c61e42d9b chore: 规范化肉鸽策略命名 2024-07-08 03:29:42 +08:00
Constrat
11cc3b04b9 refactor: YoStar -> Yostar only for interfaces (#9548) 2024-07-07 21:28:16 +02:00
Rbqwow
6b63576798 fix: wrong proxy detection 2024-07-08 03:27:52 +08:00
Sherkey
c2f71bd49b docs: 增加关于肉鸽任务刷探索范式功能的说明 (#9552) 2024-07-08 03:01:40 +08:00
SherkeyXD
7071432e6c chore: 删除 Qodana 静态检查 2024-07-08 02:40:19 +08:00
Weiyou Wang
c6a9378dbf docs: 增加关于肉鸽任务刷探索范式功能的说明 2024-07-08 04:29:45 +10:00
uye
57fbe81be1 refactor: website docs **translation needed** (#9287)
Co-authored-by: wlwxj <d1ve_wh4le@outlook.com>
Co-authored-by: Rbqwow <55343783+Rbqwow@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Wallsman <63186641+wallsman@users.noreply.github.com>
Co-authored-by: Loong <wangl.cc@outlook.com>
Co-authored-by: 神代綺凛 <i@loli.best>
Co-authored-by: SherkeyXD <57581480+SherkeyXD@users.noreply.github.com>
2024-07-08 01:57:20 +08:00
Constrat
b6ba67b2b8 chore: Auto Update Game Resources - 2024-07-07
[skip changelog]
2024-07-07 13:03:44 +00:00
Sherkey
20b6cea436 feat: 增加识别坍缩范式的插件,增加萨米肉鸽刷隐藏坍缩范式模式 (#9172)
### 更新功能

1. 增加`RoguelikeMode::CLP_PDS = 5`作为萨米肉鸽刷隐藏坍缩范式的模式,可且仅可用于萨米肉鸽。

在此模式下,将在每次回到关卡选择界面时检查坍缩状态,同时会优先使用带有`_collapse`后缀的战斗部署方案,也会使用特有的不期而遇和购物设置。

2. 肉鸽任务新增以下参数:
- `check_collapsal_paradigms`:是否检查坍缩范式,若`mode = 5`则默认为`true`,否则为`false`。
- `double_check_collapsal_paradigms`:是否增加对坍缩范式的检查频率,若`mode =
5`则默认为`true`,否则为`false`。
- `expected_collapsal_paradigms`:需要刷的坍缩范式,若`mode = 5`则默认为两组隐藏坍缩范式。
- `use_foldartal`:是否使用密文板,若`mode = 5`则默认为`false`,否则为`true`。

### 机制介绍

本插件将以两种不同的手段检查坍缩范式:

- 在选关界面点击屏幕中上方展开坍缩状态栏(以下称`Panel Check`);
- 观察屏幕右侧是否有坍缩范式通知(以下称`Banner Check`)。

获取坍缩值的方法多种多样,本插件考虑到了以下情况:

1. 战斗后因非完美战斗而使坍缩值增加,进行`Banner Check`。
2. 战斗后因获得收藏品而使坍缩值变动,进行`Banner Check`。
3. 在不期而遇等(MAA中失与得等节点也会触发不期而遇插件)节点中使坍缩值变动,进行`Banner Check`。
4. 再诡异行商节点中因购买收藏品而使坍缩值变动,进行`Banner Check`。
5. 因使用密文版而使坍缩值减少,进行`Banner Check`。
6. 因进入新的一层而使坍缩值增加,进行`Panel Check`。
7. 若进行`Banner
Check`时发现坍缩范式消退,因不知道会不会一次性消退两层(即便会也概率极低),会在下一次回到选关洁面的时候额外触发一次`Panel
Check`。
8. 在`double_check_collapsal_paradigms =
true`的情况下,每次回到选关界面的时候都会额外触发一次`Panel
Check`以验证是否之前有漏、多记录坍缩范式,并以回调信息的形式传回Debug信息。

**注意事项**

1.
为了防止错过坍缩范式通知,会适当sleep,若检测到屏幕下方有`正在提交反馈至神经`的提示的话会额外sleep。所以开启检查坍缩范式的功能后整体流程会变得拖沓一些(目前在我本人可接受范围内)。
2.
在`RoguelikeMode::CLP_PDS`模式下,获得不需要的坍缩范式会直接重开,遇到需要的坍缩范式则会停止任务。理论上可能在不期而遇事件中获得了不需要的坍缩范式,但因为右上角没有退出按钮而没有及时重开。但我目前没有观察到这样的情形,故没有做处理。不放心的话请设置`double_check_collapsal_paradigms
= true`,等回到选关界面后再检查一遍已获得的坍缩范式。
3.
无论如何,强烈推荐开启`double_check_collapsal_paradigms`。慢点就慢点,求稳才是关键。在我本人测试的过程中,遇到过一两次遗漏`Banner
Check`的情况(截图错过了右上角通知),幸好在额外触发的`Panel
Check`中补上了。怀疑是系统卡顿或网络延迟所致(我在澳大利亚用着MBP2017开着MUMU+MAA刷官服,时间长了后模拟器本身就偶尔会卡住)。

### 回调信息

当`check_collapsal_paradigms == true`时会输出类似于下方的回调信息:
```C++
callback(AsstMsg::SubTaskExtraInfo, json::object { 
    { "what", "RoguelikeCollapsalParadigms" },
    { "details", json::object {
        { "cur", "目空一些" },
        { "deepen_or_weaken", 1 },
        { "prev", "睁眼瞎" }
    } }
});
```
其中`deepen_or_weaken = 1`代表坍缩范式从`prev`加深至`cur`,若`deepen_or_weaken =
-1`则代表坍缩范式消退。
偶尔也会有测试信息以`deepen_or_weaken = 0`被传回,主要用于我自己测试用。

### 任务设置范例

以下是我的测试用任务设置:
```Python
asst.append_task('Roguelike', {
    'theme': 'Sami',
    'mode': 5,
    'investment_enabled': False,
    'squad': '远程战术分队',
    'roles': '稳扎稳打',
    'core_char': '维什戴尔',
    # 'expected_collapsal_paradigms': ['趋同性消耗'],
    # 'check_collapsal_paradigms': True, # 在mode = 5时默认为True
    double_check_collapsal_paradigms': True, # 建议打开,以防万一错过了什么
    # 'use_foldartal': False # 在mode = 5时默认为False
})
```
建议在难度10刷隐藏坍缩,我只做了第一层的漏怪作业且以`维什戴尔`为战斗核心。

### To-Do(s)

- [ ] 补充相关文档 (要不就把上述文字作为文档吧?)

### Need Help

- [ ] 外服适配
- [ ] UI适配

---

小孩子不懂事乱写的代码,请各位多指教。
2024-07-07 20:56:14 +08:00
EvATive7
e3d1359626 fix: switch account failed when MuMuEmulator12Extras is enabled 2024-07-07 12:34:54 +02:00
Constrat
4b7cc9dc1e feat: YoStarEN resolution warning on client switch (#9539)
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-07-07 12:27:39 +02:00
uye
b2d06dd24d Release v5.4.0 (#9535) 2024-07-07 17:41:02 +08:00
uye
002bf0ab02 docs: Update CHANGELOG.md
[skip changelog]
2024-07-07 17:40:32 +08:00
uye
2baf567120 docs: Update CHANGELOG.md
[skip changelog]
2024-07-07 17:39:43 +08:00
github-actions[bot]
44aa11eccc docs: Auto Update Changelogs of v5.4.0 (#9546)
* docs: Auto Generate Changelog of Release v5.4.0

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-07-07 17:36:50 +08:00
Constrat
3c50d37ddd chore: 1080 requirement for YoStarEN
[skip changelog]
2024-07-06 15:44:36 +02:00
Autumn Sound
860bd8f155 feat: 减少上报企鹅物流的重试次数和等待时间 (#9527) 2024-07-06 11:06:17 +08:00
Constrat
89213dfbff chore: Auto Update Game Resources - 2024-07-05
[skip changelog]
2024-07-05 11:02:28 +00:00
Constrat
265c1b4ffe chore: Auto Update Game Resources - 2024-07-05
[skip changelog]
2024-07-05 01:34:47 +00:00
Constrat
112db812fb chore: Auto Update Game Resources - 2024-07-04
[skip changelog]
2024-07-04 20:03:32 +00:00
Hao Guan
aec6c0c070 chore: 适配PlayCover更新 2024-07-03 01:17:27 +08:00
Constrat
ad6ba8f81c chore: Auto Update Game Resources - 2024-07-02
[skip changelog]
2024-07-02 11:03:27 +00:00
Constrat
f20c839af5 chore: Auto Update Game Resources - 2024-07-02
[skip changelog]
2024-07-02 07:02:54 +00:00
Constrat
0aae618a29 chore: Auto Update Game Resources - 2024-07-01
[skip changelog]
2024-07-01 19:03:21 +00:00
Constrat
2bc9796c0c chore: Auto Update Game Resources - 2024-07-01
[skip changelog]
2024-07-01 15:03:28 +00:00
Constrat
37aff29443 chore: Auto Update Game Resources - 2024-06-27
[skip changelog]
2024-06-27 15:26:58 +00:00
HY
bc14fcb0dd chore: 繁中服「火山旅夢」活動導航 (#9497) 2024-06-27 17:17:22 +02:00
bodayw
3f858de1f3 feat: 更新 243 极限效率一天四换排班表(20240608 修订) (#9496) 2024-06-27 16:09:15 +02:00
Constrat
a624ffc461 chore: Auto Update Game Resources - 2024-06-27
[skip changelog]
2024-06-27 07:43:13 +00:00
Constrat
a0c90d4d8d chore: Auto Update Game Resources - 2024-06-27
[skip changelog]
2024-06-27 07:24:20 +00:00
Weiyou Wang
b4c8112322 feat: global adaptation 2024-06-27 15:24:48 +10:00
uye
b59fdc8db8 fix: test code
[skip changelog]
2024-06-27 00:49:13 +08:00
uye
f6f458a660 perf: 优化日志输出控制 2024-06-27 00:41:38 +08:00
uye
9ad82247db chore: 简化Release日志输出 2024-06-26 18:50:23 +08:00
Weiyou Wang
ef09a3ef12 feat: modify the combat strategy for collapse 2024-06-26 15:13:36 +10:00
HY
fa7f04c55b fix: 修正繁中服薩米肉鴿無法開始探索、密文板無法宣告的問題 (#9484) 2024-06-25 20:53:28 +01:00
Constrat
5252f67faf chore: unlocks update options (#9471)
chore: unlocks update options when UpdateCheck = false
2024-06-25 17:47:34 +08:00
Constrat
01ffe4886e chore: Auto Update Game Resources - 2024-06-25
[skip changelog]
2024-06-25 09:03:26 +00:00
Constrat
5bce745838 chore: Auto Update Game Resources - 2024-06-25
[skip changelog]
2024-06-25 08:28:38 +00:00
Constrat
6b0e1ef9ac Revert "chore: unlocks update options when UpdateCheck = false"
This reverts commit 4ff0343916.
2024-06-24 12:11:30 +02:00
Constrat
4ff0343916 chore: unlocks update options when UpdateCheck = false 2024-06-24 12:10:57 +02:00
uye
ec7720e3d0 chore: 一键启动(x
[skip changelog]
2024-06-23 22:56:00 +08:00
zzyyyl
37a8e5b0d9 feat: 更新模板图片优化工具并优化模板图片 (#9459)
* feat: 更新优化模板图片的工具

* perf: 优化模板图片

共缩小 1.31 MiB
2024-06-23 22:48:02 +08:00
uye
8bfb223dac fix: 五周年活动结束后单选领取月卡功能时报错
fix #9452
2024-06-22 18:12:04 +08:00
uye
adf18f00af chore: 修改日志输出
[skip changelog]
2024-06-22 16:15:43 +08:00
HY
6d72bb6e24 chore: 補充繁中服薩米肉鴿相關內容 (#9450) 2024-06-22 10:05:45 +02:00
Constrat
07669bc806 fix: increase mask range for SkipThePreBattlePlotConfirm (#9446) 2024-06-22 11:49:50 +08:00
Manicsteiner
a586c526a0 chore: YoStarJP ocr fix 锏 (#9447) 2024-06-22 11:48:55 +08:00
Constrat
5e66b9bfc8 chore: Auto Update Game Resources - 2024-06-22
[skip changelog]
2024-06-22 03:43:17 +00:00
HX3N
c587b11904 chore: YoStarKR modified CharsNameOcrReplace 2024-06-22 12:19:43 +09:00
HX3N
550353f9f9 chore: update operator.md 2024-06-22 12:03:15 +09:00
Constrat
ce00d41141 fix: optimized RSChapterToRS YostarEN
[skip changelog]
2024-06-22 00:16:57 +02:00
Constrat
973582a52e fix: priority to Flint 点火石 trap instead of operator 2024-06-22 00:12:24 +02:00
Constrat
a36c8f7644 chore: Auto Update Game Resources - 2024-06-21
[skip changelog]
2024-06-21 21:03:04 +00:00
Constrat
b7561c5b17 fix: ResourceUpdater temporary fix for trap_138_winstone having same as Flint
ref #9445
2024-06-21 22:59:48 +02:00
Constrat
b5cf46ddd0 chore: Improve error output in recruitment ResourceUpdater 2024-06-21 22:50:29 +02:00
uye
e295c1a830 feat: suppress pop-up changelog and announcements
[skip changelog]
2024-06-22 01:52:54 +08:00
Wallsman
5003df7cf8 Update operators.md
JP「銀心湖列車」Update
2024-06-22 01:23:33 +09:00
神代綺凛
35e1af29cd fix: arkntools localization (#9438) 2024-06-21 19:38:14 +08:00
uye
357353e23c chore: 删除多余 style 2024-06-21 17:44:40 +08:00
uye
fbd42db377 Release v5.4.0-beta.2 (#9423) 2024-06-21 17:09:49 +08:00
github-actions[bot]
80c1b50254 docs: Auto Update Changelogs of v5.4.0-beta.2 (#9437)
* docs: Auto Generate Changelog of Release v5.4.0-beta.2

* docs: Update CHANGELOG.md

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-06-21 17:09:28 +08:00
uye
3e3aad1569 perf: 优化仓库识别结果展示,支持多语言显示 (#9434) 2024-06-21 16:54:50 +08:00
lingting
3a18ab2970 feat: 无法连接设备时尝试断开连接然后重新连接 (#9433) 2024-06-21 16:53:09 +08:00
HY
0d8c150c21 chore: 初步適配繁中服薩米肉鴿 (#9429)
* chore: 更新薩米肉鴿相關 task

* chore: 補充薩米肉鴿相關截圖
2024-06-20 16:40:09 +01:00
Manicsteiner
55a6c41216 chore: YoStarJP RS navigation (#9427) 2024-06-20 16:39:27 +01:00
Manicsteiner
a4a8bf644d chore: YoStarJP roguelike ocr fix (#9426) 2024-06-20 16:39:14 +01:00
IzakyL
f4cc72a44b refactor: 继续#7904的重构 (#9409) 2024-06-20 17:55:56 +08:00
Constrat
114bd8d2d0 feat: YostarEN RS navigation 2024-06-20 11:46:02 +02:00
Rbqwow
d04838b846 chore: update cn-mumu-report.yaml 2024-06-20 15:42:05 +08:00
HX3N
063c8d54ef feat: YoStarKR RS stage navigation 2024-06-20 16:36:21 +09:00
uye
f815d850e6 style: 优化代码 2024-06-19 18:08:51 +08:00
Horror Proton
b5eb2a004f chore: fix missing includes 2024-06-19 17:15:48 +08:00
Horror Proton
fa51662273 refactor: use factory function instead of class 2024-06-19 17:06:43 +08:00
uye
ab484ffdc4 perf: 优化数据绑定逻辑,减少 AsstProxy 逻辑处理 2024-06-19 17:01:42 +08:00
uye
3efe3cc698 perf: 优化肉鸽选项显示逻辑 2024-06-19 17:01:42 +08:00
Constrat
9f242800e8 chore: Auto Update Game Resources - 2024-06-18
[skip changelog]
2024-06-18 20:03:16 +00:00
zzyyyl
c170147162 chore(issue-checker): bump zzyyyl/issue-checker from 1.7 to 1.8 2024-06-18 16:49:09 +08:00
zzyyyl
9eaa4a4afa chore(issue-checker): 修正生息演算相关打标签逻辑
现在不会给打了 reclamation 的再打 ambiguous 了

link to #8302
2024-06-18 16:39:56 +08:00
HX3N
14e546b4c3 i18n: YoStar add translations for new feat
EN/JP translation may require corrections
2024-06-18 01:45:15 +09:00
SherkeyXD
4ae002e1bb chore: changelog生成器repo独立设置 2024-06-17 03:29:09 +08:00
uye
8cc725f3e8 chore: 增加更新时解压更新包失败日志,增加解压失败解决方案 2024-06-16 19:30:39 +08:00
晓丶梦丶仁
718d2d07fa perf: 优化萨米肉鸽棘刺技能携带 (#9400) 2024-06-16 18:59:30 +08:00
Horror Proton
f5dea882d0 refactor: move functions to TileCalc2 and TileDef 2024-06-16 10:47:59 +08:00
Manicsteiner
98ecb301b4 chore: Amiya new promotion in RoguelikeBattleTaskPlugin (#9377) 2024-06-15 18:11:57 +08:00
uye
54dcd2736a perf: 优化热更新 2024-06-15 16:23:20 +08:00
dantmnf
d2e5001e7e fix: intentionally leak onnxruntime objects to avoid crash
This should be reverted when it get fixed upstream
2024-06-14 18:28:53 +08:00
dantmnf
d6572b2c7e feat: GPU acceleration (DX12/DirectML)
Co-authored-by: SherkeyXD <253294679@qq.com>
2024-06-14 18:26:41 +08:00
Constrat
3e5b6dd4fb chore: Auto Update Game Resources - 2024-06-14
[skip changelog]
2024-06-14 09:42:24 +00:00
HX3N
ccfcbd830d chore: YoStarKR fix ocr and add Collapsal
[skip changelog]
2024-06-14 18:37:31 +09:00
Weiyou Wang
895a22fcfe feat: modify the combat strategy for collapse 2024-06-14 18:53:14 +10:00
梁星逢
ff41a13170 fix: 弹药类技能不能二次关闭的问题 (#9379)
fix: 弹药类技能二次关闭问题
2024-06-14 03:21:15 +08:00
梁星逢
c9744cb5f0 fix: 自动战斗跳过对话模板更新 (#9380)
fix: 跳过对话模板更新
2024-06-14 03:20:37 +08:00
uye
d1a60aa1bb fix: 无法跳过关卡开始的剧情 2024-06-14 00:55:46 +08:00
uye
d1b581a3f5 feat: SideStory「生路」活动导航 2024-06-14 00:04:11 +08:00
zzyyyl
3d862ec61b chore(pr-checker): 允许使用“feat!”表示重大更新 2024-06-13 17:55:39 +08:00
zzyyyl
198043b865 chore(issue-checker): 允许使用“feat!”表示重大更新 2024-06-13 17:51:24 +08:00
zzyyyl
2dbd8fc83a chore(issue-checker): 修正肉鸽标签中关于 “I.S.” 的正则
[skip changelog]
2024-06-13 17:47:29 +08:00
Constrat
fd53a3e516 chore: Auto Update Game Resources - 2024-06-13
[skip changelog]
2024-06-13 06:03:33 +00:00
Constrat
1a40aa3fae chore: Auto Update Game Resources - 2024-06-13
[skip changelog]
2024-06-13 02:20:34 +00:00
Horror Proton
268cfebd13 fix: add /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9321
ref https://github.com/actions/runner-images/issues/10004
ref https://github.com/microsoft/STL/releases/tag/vs-2022-17.10
2024-06-13 09:46:58 +08:00
status102
f4572f9f94 fix: 战斗列表禁用包含非法字符的关卡名添加 (#9363)
* fix: 战斗列表禁用包含非法字符的关卡名添加
2024-06-12 12:49:58 +00:00
Lancarus
90d3c140fe feat: 增加暂停放技能和暂停撤退 (#9348) 2024-06-12 18:22:52 +08:00
Constrat
f2ca2e48aa chore: Auto Update Game Resources - 2024-06-12
[skip changelog]
2024-06-12 09:02:37 +00:00
dantmnf
4f1ef65a9c fix: add AsstSetConnectionExtras to wine bridge
useless though
2024-06-11 23:52:59 +08:00
dantmnf
1b2cc439f2 fix: check before destroy callback 2024-06-11 23:42:17 +08:00
dantmnf
33bca2e82a chore: use NativeLibrary for wine check 2024-06-11 23:36:47 +08:00
Fryze
6d9b12eff6 fix: depot analyzer to detect multipliers for KR (#9343) 2024-06-11 18:39:17 +09:00
uye
d6a65ec5db chore: 更新 py 回调 2024-06-11 03:10:22 +08:00
uye
825f3afe3f perf: 优化关卡选择为剿灭时的逻辑判断
fix #9327
2024-06-11 01:09:03 +08:00
uye
229d280724 fix: en 服在没有源石和理智药的情况下无法退出刷理智任务
fix #9329
2024-06-11 00:39:58 +08:00
Weiyou Wang
7f9c5c0b8c refactor: callback messages are now in English 2024-06-11 00:53:33 +10:00
Weiyou Wang
ed407de99c feat: global adaptation 2024-06-10 20:32:54 +10:00
Weiyou Wang
34d8a26c0a refactor: double check when expanding the collapsal paradigm panel 2024-06-10 20:32:54 +10:00
Weiyou Wang
7ef398bd54 refactor: use MatchTemplate instead of OcrDetect to recognise the current zone 2024-06-10 20:32:47 +10:00
Weiyou Wang
60d58bf93e refactor: matcher result will contain the name of the matched template 2024-06-10 18:49:39 +10:00
Fryze
47aa717a4d chore: Amiya new promotion (#9347) 2024-06-10 09:22:01 +02:00
IzakyL
ea5ae36654 docs: 修正临时招募优先度描述错误 (#9344) 2024-06-10 12:36:58 +08:00
铃语
7c58f1d493 perf: 优化肉鸽shopping策略 (#9332) 2024-06-10 02:07:14 +08:00
晓丶梦丶仁
ba9c282d96 feat: 添加萨米肉鸽天途半道关卡战斗策略 2024-06-09 22:09:02 +08:00
SherkeyXD
b704c9a941 chore: StyleCop链接使用cdn 2024-06-09 21:52:50 +08:00
SherkeyXD
0e2e1222a9 fix: 修复时间比较报错的问题 2024-06-09 21:44:29 +08:00
ChingCdesu
b1ecfd8304 fix: 刷理智结束时有概率报错 2024-06-09 19:18:51 +08:00
Weiyou Wang
327115b003 fix: 将上滑操作触发条件从“检测到3个坍缩范式”降低至“检测到2个坍缩范式” 2024-06-09 20:20:03 +10:00
晓丶梦丶仁
4fff19a738 perf: 优化萨米肉鸽夺树者高台对boss输出策略 (#9294) 2024-06-09 13:18:41 +08:00
Horror Proton
624b9834b0 fix: fix endless loop in InfrastProductionTask
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/8941
2024-06-09 11:01:20 +08:00
Horror Proton
c0b3ea28ea fix: fix coredump caused by screencap failure 2024-06-08 22:38:14 +08:00
铃语
6ec82116b7 fix: 保全文件命名错误 (#9322) 2024-06-08 14:32:12 +00:00
uye
1fc47ab475 perf: 更新关卡列表与提示延迟至空闲时间,避免动态修改关卡列表 2024-06-08 16:28:55 +08:00
uye
3286bf6164 Release v5.4.0-beta.1 (#9309) 2024-06-08 15:18:57 +08:00
github-actions[bot]
f72d36c67b docs: Auto Update Changelogs of v5.4.0-beta.1 (#9311)
* docs: Auto Generate Changelog of Release v5.4.0-beta.1

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-06-08 15:17:38 +08:00
Rbqwow
d03a5cfc2c chore: issue模板添加mumu反馈 (#8993)
* chore: issue模板添加mumu反馈

* chore: 修改方舟专版说明

* chore: update

* chore: update

* fix: typo

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>

* chore: bad uye

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>

* chore: fix

* chore: update

* chore: update

* chore: fix

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-06-08 00:06:57 +08:00
uye
77ccb26512 feat: 在理智恢复满时推送信息 (#9285)
fix #6919
2024-06-08 00:06:01 +08:00
Toby Shi
f078e19ce1 fix: #7266: 公招没有使用足量的加急许可 2024-06-07 18:10:39 +08:00
uye
0d8103777c feat: 增加设置开机自启失败提示 2024-06-07 15:18:04 +08:00
uye
1640f99668 fix: “dorm_notstationed_enabled”参数默认值错误
fix #9282
2024-06-07 15:00:08 +08:00
uye
83412902fb fix: 基建换班重试时只找缺少干员,已选干员无法入驻
fix #7429
2024-06-07 14:56:09 +08:00
Weiyou Wang
742898c624 feat: global adaptation 2024-06-07 12:00:54 +10:00
Weiyou Wang
9e8009299c feat: 初步实现肉鸽模式5:刷隐藏坍缩 2024-06-07 12:00:35 +10:00
uye
bed66f2c7b fix: 生息演算更新后无法选择日期
fix #9295
2024-06-06 21:48:08 +08:00
wlwxj
ce4e8692a7 docs: fix wrong link maa_cli (#9264)
* fix: doc_maacil

* fix

---------

Co-authored-by: 铃语 <74061867+ntgmc@users.noreply.github.com>
2024-06-06 20:18:35 +08:00
uye
67cb180ba8 chroe: 增加开技能最小间隔时间 2024-06-06 17:36:35 +08:00
uye
09baaf2c20 chore: 界面添加支援道具名称提示,传入内容为空白时自动切换为”荧光棒“ 2024-06-06 14:45:27 +08:00
Constrat
1102d933c8 chore: Auto Update Game Resources - 2024-06-05
[skip changelog]
2024-06-05 17:25:37 +00:00
Lancarus
b3f7af41ef docs: Update 肉鸽辅助协议.md 2024-06-06 00:39:46 +08:00
Constrat
b70e1ef492 chore: Auto Update Game Resources - 2024-06-05
[skip changelog]
2024-06-05 08:27:46 +00:00
Constrat
3532b4483e chore: Auto Update Game Resources - 2024-06-05
[skip changelog]
2024-06-05 07:03:41 +00:00
Constrat
ac43a1d5c9 chore: Auto Update Game Resources - 2024-06-05
[skip changelog]
2024-06-05 04:03:34 +00:00
Constrat
325ca10c70 chore: Auto Update Game Resources - 2024-06-05
[skip changelog]
2024-06-05 02:34:12 +00:00
uye
8cc7fe3e33 fix: 选择休眠动作则结束后脚本没时间运行
fix #7023
2024-06-05 00:22:11 +08:00
Hao Guan
39f09a4142 feat: MacGui 自定义填写招募次数 (#6182) 2024-06-04 22:49:41 +08:00
status102
9e3fd79b89 perf: 在掉落不超出一页时,不额外滑动掉落列表及截图拼接 (#9260)
缺少数据,尚未测试在掉落超出1页时的运行情况
2024-06-04 22:33:59 +08:00
uye
11b64cae3a fix: constexpr 构造错误 2024-06-04 20:55:49 +08:00
uye
0f14c11e3d feat: 增加保全、肉鸽、抄作业可配置截图最小间隔 2024-06-04 20:39:05 +08:00
Lancarus
e1c9705ff2 fix: 尝试修复水月肉鸽卡数据回溯 (#9276) 2024-06-04 20:29:17 +08:00
晓丶梦丶仁
8c45959ea6 perf: 优化萨米肉鸽自然之怒ew部署 (#9280) 2024-06-04 20:28:29 +08:00
uye
655e03f815 fix: 肉鸽部分选项在未显示时仍然生效
fix #9278
2024-06-04 16:26:45 +08:00
Weiyou Wang
47f912e998 feat: Roguelike任务下加入use_foldartal参数选项以控制是否使用密文版,默认为true 2024-06-04 02:44:14 +10:00
Lancarus
6c19c1ccbd fix: 尝试修复肉鸽编队错误,max page误判时仍然重置回最左边 (#9262) 2024-06-03 23:42:10 +08:00
70CentsApple
ef458b41fd fix: 公招 m_first_tag 匹配个数少于 3 个时的非预期情况 (#9258)
* fix: `m_first_tag` 匹配个数少于 3 个时的非预期情况

* docs: 添加刷新前提描述
2024-06-03 14:36:18 +00:00
梁星逢
f9a216ed2f fix: 尝试修复生息演算不进入下一天 (#9273)
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9271
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9272
2024-06-03 15:31:25 +08:00
Hao Guan
063e44a8b8 chore: 更新macOS SDK版本 2024-06-03 12:27:34 +08:00
Constrat
065c09b9d6 chore: Auto Update Game Resources - 2024-06-02
[skip changelog]
2024-06-02 20:03:20 +00:00
uye
e8eda19c02 perf: 垂直滑动优化 2024-06-03 01:25:06 +08:00
Constrat
66cde22297 chore: Auto Update Game Resources - 2024-06-02
[skip changelog]
2024-06-02 17:02:56 +00:00
uye
f89d71d5c1 feat: 生息演算支持制造物品刷点数 (#9268)
* feat: 支持制造物品刷点数

* feat: ui 支持 Reclamation2Ex 参数

* chore: 修改界面描述
2024-06-03 00:48:53 +08:00
uye
41e6c76d56 fix: 部分界面显示不全
fix #8865
2024-06-02 23:24:07 +08:00
Constrat
33cb6ef8eb chore: Auto Update Game Resources - 2024-06-02
[skip changelog]
2024-06-02 11:23:40 +00:00
Constrat
2e05ebb696 chore: reduced filename
check description for more info
2024-06-02 10:54:55 +02:00
status102
f62162317e perf: 在掉落不超出一页时,不额外滑动掉落列表及截图拼接 2024-06-02 12:17:43 +08:00
Lancarus
442c4218d4 fix: 自然之怒.json格式错误 2024-06-02 12:09:12 +08:00
晓丶梦丶仁
42e4e0223d perf: 优化萨米ew部署策略 (#9249) 2024-06-02 01:10:23 +08:00
uye
3fa6e72604 chore: Add trace log for scaled coordinates in ControlScaleProxy click & swipe 2024-06-01 00:19:00 +08:00
Hao Guan
10dd024bcf fix: Mac Gui使用Swift 5.9以下的语法 2024-05-31 17:33:50 +08:00
Hao Guan
8c245946a6 fix: 修复Mac Gui在CI的编译错误 2024-05-31 17:23:17 +08:00
Hao Guan
c8b32ba265 feat: Mac Gui 支持连战次数、指定掉落 2024-05-31 16:54:38 +08:00
Lancarus
ca557d7000 perf: 优化萨米肉鸽策略 (#9234) 2024-05-30 01:18:11 +08:00
Constrat
23e60d386c fix: unable to get rewards because ReceiveAward is too fast 2024-05-29 11:39:07 +02:00
Constrat
cc15014b9c chore: Auto Update Game Resources - 2024-05-28
[skip changelog]
2024-05-28 16:27:28 +00:00
Lancarus
d4d392819e perf: 优化萨米肉鸽策略 (#9232) 2024-05-28 21:28:19 +08:00
Lancarus
1bf5a67c87 perf: 优化萨米肉鸽部分关卡策略 (#9224) 2024-05-28 08:58:50 +08:00
Constrat
53df9b4e4d chore: Auto Update Game Resources - 2024-05-28
[skip changelog]
2024-05-28 00:05:20 +00:00
Lancarus
c6d332d625 fix: 尝试修复萨米卡0干扰并优化密文板使用策略 (#9223) 2024-05-28 07:48:25 +08:00
Lancarus
3b08454352 fix: 肉鸽特殊情况下第三层boss门口退出 (#9222) 2024-05-28 00:15:12 +08:00
北雁 Cryolitia
6240ca54ed ci: no need to checkout sumodule after https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/9168 2024-05-27 23:07:19 +08:00
uye
6c4d5951ae fix: call_command timeout时提前返回 std::nullopt
fix #9218
fix #9102
2024-05-27 18:23:39 +08:00
Linisdjxm
1652647f17 feat:在特定环节执行启动前/后脚本 (#9153)
* feat:在特定环节执行启动前/后脚本

* fix:fix
2024-05-26 23:01:29 +08:00
uye
7c57454c1b chore: 忽略括号周围resharper格式检查 2024-05-26 22:56:39 +08:00
uye
78f6ca6fa8 refactor: 统一使用OnUIThread,AddLog默认在ui线程执行 2024-05-26 22:25:54 +08:00
status102
d44a5f8257 fix: type cast 2024-05-26 16:55:01 +08:00
Constrat
f76a8627cc Revert "fix: adding delay between swipe and click" (#9170)
This reverts commit b4fc3528de.
2024-05-26 09:48:56 +02:00
status102
84bee958ce perf: 增加理智药插件中间结果输出
[skip changelog]
2024-05-26 13:28:56 +08:00
status102
d4d809dd45 style: format 2024-05-26 11:23:44 +08:00
北雁 Cryolitia
5b7029ca76 docs(treewide): fix license typo
introduced in b8e63a1223 (diff-4d3cb3f2d417ec9595021db8d2d4eb91950a210be491d64525152588b3a2f908R10)
2024-05-26 06:21:33 +08:00
aleck099
9855f565ab docs(回调消息协议): 增加「实例已销毁」 (#9201)
In addition to commit 1f9aa4c7a7

Co-authored-by: aleck099 <aleck099@outlook.com>
2024-05-26 06:05:21 +08:00
北雁 Cryolitia
4d0304b804 docs: add CITATION
by user required
follows: https://docs.github.com/zh/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files
2024-05-26 06:02:12 +08:00
北雁 Cryolitia
ccd6fbef29 docs: add LICENSE.SPDX
follows: https://spdx.github.io/spdx-spec/v2.3/
2024-05-26 06:02:12 +08:00
Constrat
de61d407f6 chore: Auto Update Game Resources - 2024-05-25
[skip changelog]
2024-05-25 20:03:16 +00:00
Manicsteiner
106bba6679 chore: YoStarJP roguelike ocr fix (#9203) 2024-05-25 20:47:32 +01:00
uye
303e0dd036 Release v5.3.1 (#9209) 2024-05-26 03:08:58 +08:00
github-actions[bot]
fff1e5d7ff docs: Auto Update Changelogs of v5.3.1 (#9210)
* docs: Auto Generate Changelog of Release v5.3.1

* Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-05-26 03:08:37 +08:00
uye
33823e1c81 fix: 暂时忽略吐司通知报错 2024-05-26 03:05:27 +08:00
uye
321347fa6b fix: 老版本 win10 吐司通知报错 2024-05-25 23:53:23 +08:00
Horror Proton
fa355d48bc chore: fix cmake fastdeploy target name 2024-05-25 16:15:21 +08:00
uye
c413b14df3 Release v5.3.0 (#9196) 2024-05-25 15:57:29 +08:00
uye
fc69d98d22 chore: Update CHANGELOG.md 2024-05-25 15:56:03 +08:00
github-actions[bot]
43dd9b5250 docs: Auto Update Changelogs of v5.3.0 (#9197)
* docs: Auto Generate Changelog of Release v5.3.0

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-05-25 15:46:29 +08:00
Manicsteiner
62bac0c6b9 feat: Sami theme for YoStarJP (#9194) 2024-05-25 08:38:25 +02:00
Loong
92ffafb769 feat: add cmake option USE_RANGE_V3 (#9169)
Co-authored-by: Horror Proton <107091537+horror-proton@users.noreply.github.com>
2024-05-25 04:47:11 +00:00
Horror Proton
8c9cec989a chore: include path of onnxruntime>=1.16 2024-05-25 12:32:22 +08:00
Horror Proton
b727e1d152 chore: cmake fastdeploy_ppocr, windows only option 2024-05-25 12:32:22 +08:00
Horror Proton
c69b810619 chore: update CMakeLists.txt 2024-05-25 12:32:22 +08:00
HX3N
295743e448 feat: Sami theme for YostarKR
EnterInfrastSami seems almost identical to CN...

might need tweaks when it comes out
2024-05-25 03:53:20 +09:00
Constrat
297f1612fe fix: YostarEN Phantom ISencounter
fix 9190
[skip changelog]
2024-05-24 20:13:18 +02:00
Constrat
49c5b3dff5 feat: Sami theme for YostarEN
might need tweaks when it comes out
2024-05-24 20:03:48 +02:00
Constrat
4629705d17 feat: DepotEnter for YostarEN themes 2024-05-24 20:00:09 +02:00
Constrat
2dec6372e0 chore(tools): updated missingtemplates py for overseas 2024-05-24 19:59:48 +02:00
Constrat
37fe1c97ea i18n: forgot to save changes
same as f3b02fbc98
[no ci] [skip changelog]
2024-05-24 19:34:49 +02:00
Constrat
f3b02fbc98 i18n: Arknight -> Arknights correction
[no ci] [skip changelog]
2024-05-24 19:30:52 +02:00
uye
8254c5b0fd fix: 部分立绘使用「银凇」主题无法进入刷理智任务
fix #9193
2024-05-25 00:42:20 +08:00
uye
b6f2df28b3 chore: 修改 mumu12 支持版本提示 2024-05-24 23:52:28 +08:00
Constrat
f7d30de263 chore: Auto Update Game Resources - 2024-05-24
[skip changelog]
2024-05-24 10:43:13 +00:00
Constrat
e2c43fc437 chore: Auto Update Game Resources - 2024-05-24
[skip changelog]
2024-05-24 09:03:27 +00:00
Constrat
22ff69e89a chore: Auto Update Game Resources - 2024-05-24
[skip changelog]
2024-05-24 07:42:20 +00:00
PukNgae Cryolitia
993ddae3bd refactor(WpfGui): config (#7683)
* refctor: config/GUI

* revert file

* Reduce warning

* refactor: config/{AnnouncementInfo|VersionUpdate}

* chore: 更新至 .net 8

真搞不懂这个吐司)

* feat: 使用 HandyControl 的 NotifyIcon

* fix: 尝试显示 Toast

* fix: 超链接点击报错

* fix: 开始前后脚本添加UseShellExecute = true,

* feat: 在托盘图标右键前往 Release 页

* fix: 超链接点击报错

* ci: Update smoke-testing.yml

* ci: Update smoke-testing.yml

* ci: 修复windows ci运行错误的问题

* fix: 移除过时的安全性方法

* chore: 对于GlobalHotKey包忽略框架版本不兼容警告

* chore: 调整csproj文件结构并删除旧的dotsettings文件

* chore: 不再生成maa.deps.json文件

* chore: 不再生成runtimes文件夹,且Release模式下不生成Maa.pdb文件

* feat: 升级至C#12.0并解决smoke-testing问题

* ci: 修复ci版本检测错误的问题

* ci: 使用的sdk更改为dotnet8.0正式版

* fix: smoke-testing.yml乱码

* ci: release-nightly-ota.yml

* chore: able to publish as single file and NUKE Fody

* fix: wpf build process

* chore: 在 ci 中为 MaaBuilder 添加日志折叠

* chore: 添加 RID 来修复 CI 问题

* style: 根据warning修改代码格式,并禁用部分警告

* 谁把我fody删了

* fix build

* Config/Rft: Timer, InfrastOrder, DragItemIsChecked

* rft/config: GUI

* chore: 更新至 .net 8

真搞不懂这个吐司)

* feat: 使用 HandyControl 的 NotifyIcon

* fix: 尝试显示 Toast

* fix: 超链接点击报错

* fix: 开始前后脚本添加UseShellExecute = true,

* feat: 在托盘图标右键前往 Release 页

* fix: 超链接点击报错

* ci: Update smoke-testing.yml

* ci: Update smoke-testing.yml

* ci: 修复windows ci运行错误的问题

* fix: 移除过时的安全性方法

* chore: 对于GlobalHotKey包忽略框架版本不兼容警告

* chore: 调整csproj文件结构并删除旧的dotsettings文件

* chore: 不再生成maa.deps.json文件

* chore: 不再生成runtimes文件夹,且Release模式下不生成Maa.pdb文件

* feat: 升级至C#12.0并解决smoke-testing问题

* ci: 修复ci版本检测错误的问题

* ci: 使用的sdk更改为dotnet8.0正式版

* fix: smoke-testing.yml乱码

* ci: release-nightly-ota.yml

* chore: able to publish as single file and NUKE Fody

* fix: wpf build process

* chore: 在 ci 中为 MaaBuilder 添加日志折叠

* chore: 添加 RID 来修复 CI 问题

* style: 根据warning修改代码格式,并禁用部分警告

* fix: 配置修改后无法保存

* update

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: 枫雨 <35213527+moomiji@users.noreply.github.com>
Co-authored-by: SherkeyXD <253294679@qq.com>
Co-authored-by: alisa <alisa@alisaqaq.moe>
2024-05-24 09:36:14 +08:00
Constrat
e5813e6430 chore: Auto Update Game Resources - 2024-05-23
[skip changelog]
2024-05-23 17:03:03 +00:00
Lancarus
cda4a9b498 perf: 优化萨米肉鸽策略 (#9185) 2024-05-23 22:39:13 +08:00
uye
3e4ad00c20 Release v5.3.0-beta.3 (#9182) 2024-05-23 21:48:43 +08:00
github-actions[bot]
86fc8a87fd docs: Auto Update Changelogs of v5.3.0-beta.3 (#9184)
* docs: Auto Generate Changelog of Release v5.3.0-beta.3

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-05-23 21:47:36 +08:00
uye
fed45e98b1 chore: 更新 mumu12 截图增强模式使用说明 2024-05-23 21:40:59 +08:00
Constrat
3edd84f137 chore: Auto Update Game Resources - 2024-05-23
[skip changelog]
2024-05-23 08:03:28 +00:00
HX3N
b79e3e7516 fix: handling KR-specific announcements (#9177)
fix #9175

created task on YoStarKR, since the announcement does not appear on other servers.
Adding a new task shouldn't be a problem, right?
2024-05-23 15:45:20 +08:00
Constrat
b05332fd04 chore: Auto Update Game Resources - 2024-05-23
[skip changelog]
2024-05-23 07:03:25 +00:00
Horror Proton
15cde5284b fix: update roi of RecruitNoPermit
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9150
2024-05-22 15:43:48 +08:00
aur3l14no
b5ae4f9fbc fix: change swipe position in StageDropsTaskPlugin 2024-05-22 15:09:08 +08:00
Constrat
8904bc1eab chore: Auto Update Game Resources - 2024-05-21
[skip changelog]
2024-05-21 11:03:07 +00:00
dantmnf
e0e49b5542 fix: attempt to fix winrt notification crash 2024-05-21 18:17:35 +08:00
uye
1e7e5b6d9f Revert "chore: force Aero2 theme" 2024-05-21 18:16:22 +08:00
HX3N
e5fb933b98 chore: YoStarKR IS navigation 2024-05-21 19:04:34 +09:00
Constrat
c343756e30 chore: Auto Update Game Resources - 2024-05-21
[skip changelog]
2024-05-21 10:02:33 +00:00
Constrat
ce4c9cd87c feat: YostarEN Siracusano navigation
EnterChapterIS might need future regex. Wait for event
2024-05-21 09:50:07 +00:00
Manicsteiner
748a602327 chore: YoStarJP IS rerun navigation (#9164) 2024-05-21 17:28:28 +08:00
Horror Proton
8df651bb82 feat: add workaround to limit roguelike framerate 2024-05-20 20:36:44 +08:00
Constrat
b4fc3528de fix: adding delay between swipe and click 2024-05-19 18:03:23 +02:00
Constrat
fb638a9c08 fix: delay between FriendsList analyze and click 2024-05-19 11:13:50 +02:00
Constrat
8bc3558cb5 chore: Auto Update Game Resources - 2024-05-19
[skip changelog]
2024-05-19 00:32:50 +00:00
Lancarus
28333e3f75 fix: 尝试修复肉鸽编队不选干员 (#9148) 2024-05-19 08:05:46 +08:00
Lancarus
c5cfd44a21 perf: 优化萨米肉鸽策略 (#9149) 2024-05-19 08:02:54 +08:00
Constrat
072057beff chore: Auto Update Game Resources - 2024-05-18
[skip changelog]
2024-05-18 20:24:13 +00:00
Lancarus
e35b09b19d feat: 萨米肉鸽刷等级增加商店刷新 (#9142)
* feat: 萨米肉鸽刷等级增加商店刷新

* chore: EN template + ignore

---------

Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2024-05-19 04:21:09 +08:00
Constrat
f52dbd116e chore(tools): bumped ignore template list
[skip ci] [skip changelog]
2024-05-18 16:09:00 +02:00
Constrat
031ff11bd8 feat: Improved Recruitment tab readability 2024-05-18 15:47:26 +02:00
Constrat
976f813ad2 fix: StartUpConnectingFlag not detecting 2024-05-18 14:49:15 +02:00
Constrat
2f8a5481f7 fix: regex Terra Research Commission
[skip ci] [skip changelog]
2024-05-17 19:38:54 +02:00
Constrat
750aa2ac67 refactor: StartGameTaskPlugin.cpp for improved readability 2024-05-17 17:09:31 +02:00
uye
41e488d2e7 Release v5.3.0-beta.2 (#9132) 2024-05-17 21:26:01 +08:00
uye
a01c5756a1 fix: typo 2024-05-17 21:11:18 +08:00
uye
0dc3ad50d3 Release v5.3.0-beta.2 (#9127) 2024-05-17 20:54:55 +08:00
uye
a429b634f5 feat: 「健将」名片识别
fix #9121
2024-05-17 20:51:55 +08:00
uye
75bb86b573 docs: Auto Update Changelogs of v5.3.0-beta.2 (#9128)
Target RP:
https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/9127

<details><summary>Debug info</summary>

```
tag_name: v5.3.0-beta.2
pr_title: docs: Auto Update Changelogs of v5.3.0-beta.2
latest_stable_tag: v5.2.3
newest_tag: v5.3.0-beta.1
latest: v5.3.0-beta.1
```

</details>
2024-05-17 16:06:24 +08:00
uye
a57d719ed5 docs:Update CHANGELOG.md 2024-05-17 16:06:03 +08:00
ABA2396
cf98c29553 docs: Auto Generate Changelog of Release v5.3.0-beta.2 2024-05-17 07:58:33 +00:00
uye
e27ff5502a perf: auto start optimization + MAC fix (#9083)
I have no way to test for MAC
2024-05-17 09:27:50 +08:00
Constrat
b396f37221 chore: Auto Update Game Resources - 2024-05-15
[skip changelog]
2024-05-15 14:03:22 +00:00
Constrat
a6f533afc6 chore: Auto Update Game Resources - 2024-05-15
[skip changelog]
2024-05-15 09:03:06 +00:00
SherkeyXD
02decce31e fix: 再次修正赠送月卡选项卡位移导致的领取失败问题 2024-05-15 11:18:49 +08:00
Constrat
ecab6b1ad2 chore: Auto Update Game Resources - 2024-05-14
[skip changelog]
2024-05-14 20:02:51 +00:00
Lancarus
6d7d595354 perf: 优化萨米肉鸽策略 (#9114) 2024-05-15 01:31:12 +08:00
Lancarus
17fca4e1ea fix: 部署失败后不清除已占用格子 (#9111) 2024-05-15 01:08:40 +08:00
HY
58b18c3782 chore: 繁中服「塵影餘音」復刻活動導航 (#9108) 2024-05-14 20:45:28 +08:00
Constrat
7ab466a17b feat: Stop implementation 2024-05-14 08:12:04 +00:00
Constrat
56c939d0e5 chore: Auto Update Game Resources - 2024-05-14
[skip changelog]
2024-05-14 07:42:34 +00:00
uye
73a3ba7f48 chore: 添加超链接未设置默认浏览器的报错解决方案 2024-05-14 13:35:23 +08:00
Horror Proton
c4b94ace10 fix: remove incorrect use of __cpp_lib_ranges 2024-05-13 18:56:47 +08:00
Horror Proton
94efd15f91 feat: add compile def to disable emulator extras 2024-05-13 18:35:50 +08:00
Constrat
47b38d5416 docs: run MaaWpfGui under Wine
ref 1f9aa4c7a7 #8960)
2024-05-12 18:30:01 +02:00
dantmnf
1f9aa4c7a7 feat: Wine 支持 (#8960)
* feat: WineRuntimeInformation

* fix: system theme crash under wine

* refactor: toast notification

* feat: add destory callback

* feat: detect winegcc

* feat: use native MaaCore under Wine

* feat: libnotify integration

* chore: disable hardware accelration under Wine

* fix: distorted icon under Wine

* chore: use Environment.ProcessPath instead of cursed alternatives

* chore: don't filter *.exe when using native MaaCore

* chore: force Aero2 theme

* chore: allow build MaaWpfGui without Windows

You need to extract native .NET SDK on top of Windows .NET SDK to get a working WPF SDK.

* feat: fontconfig integration

* docs: run MaaWpfGui under Wine
2024-05-12 23:27:46 +08:00
Zhaoyang Li
15eb4f87d8 docs: fix a bad link (#9085) 2024-05-12 15:22:16 +01:00
Constrat
b42f010e9d perf: optimized variable usage + limited for + general rewriting for readability 2024-05-12 16:03:37 +02:00
Constrat
63f3b90f1c revert: PlayToolsController returns 2024-05-12 16:02:29 +02:00
Constrat
32d06df501 chore: Add get_controller_type() to discern Android / PlayTools 2024-05-12 12:07:29 +02:00
Constrat
175c396053 fix: return specific values for auto starting methods 2024-05-12 11:10:43 +02:00
uye
de5dd23b36 fix: 触控模式不可用时仍继续任务 2024-05-12 16:41:01 +08:00
Constrat
16036b1b56 fix: increased roi + foldartal regex for EN 2024-05-11 22:59:51 +02:00
HX3N
64af0f5202 i18n: YoStarKR translation fix
add Reclamation translation
2024-05-12 02:15:25 +09:00
Manicsteiner
465c389c07 chore: YoStarJP ocr fix (#9068) 2024-05-11 15:55:47 +01:00
AnnAngela
9ec3c9f158 ci: macOS 版本使用运行于 M1 芯片的 macOS 14 系统编译 (#9071) 2024-05-11 20:33:55 +08:00
AnnAngela
3a18e5799a ci: 无需手动验证 doc (#9070) 2024-05-11 11:29:22 +00:00
uye
051c22ebdb Release v5.3.0-beta.1 (#9063) 2024-05-11 18:16:52 +08:00
Constrat
5cc8f751f2 chore: missing ocr
[skip ci] [skip changelog]
2024-05-11 11:51:48 +02:00
Constrat
f8da676839 fix: json InfrastEnterOperList typo
[skip ci] [skip changelog]
2024-05-11 11:38:26 +02:00
Constrat
a722071115 i18n: keep challenge consistency 2024-05-11 11:36:01 +02:00
Constrat
45e8ce93b5 fix: updated infrastructure EN ocr InfrastEnterOperList 2024-05-11 11:29:58 +02:00
github-actions[bot]
ae41b5fc5c docs: Auto Update Changelogs of v5.3.0-beta.1 (#9067)
* docs: Auto Generate Changelog of Release v5.3.0-beta.1

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-05-11 17:29:23 +08:00
uye
d0e3cba92e Revert "perf: mumu12模拟器路径默认值置空"
This reverts commit 76b03fdda9.
2024-05-11 17:22:47 +08:00
Alisa
9606274a28 i18n: Translations update from MAA Weblate (#9066)
i18n: Translated using Weblate (Chinese (Traditional))

Currently translated at 98.3% (696 of 708 strings)

i18n: Translated using Weblate (Korean)

Currently translated at 95.7% (678 of 708 strings)

i18n: Translated using Weblate (Japanese)

Currently translated at 97.8% (693 of 708 strings)

i18n: Translated using Weblate (English (United States))

Currently translated at 98.3% (696 of 708 strings)

i18n: Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (708 of 708 strings)


Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/en_US/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/ja/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/ko/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/zh_Hans/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/zh_Hant/
Translation: MaaAssistantArknights/MAA WPF Gui

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: uye <2396806385@qq.com>
2024-05-11 17:12:53 +08:00
Constrat
4dd3f0cba3 refactor: rename $isAllEqual to $noDiff
[skip changelog]
2024-05-10 17:43:19 +02:00
Constrat
752b2d7066 i18n: add favourite tip for i18n (#9051)
Co-authored-by: HX3N <128385247+HX3N@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: Manicsteiner <63437036+Manicsteiner@users.noreply.github.com>
2024-05-10 16:05:39 +01:00
uye
cbcfeac0de feat: 连战次数选项可隐藏 2024-05-10 22:28:53 +08:00
uye
4fd6030779 fix: 理智药数量识别错误
fix #9060
2024-05-10 19:12:21 +08:00
uye
41f2b72a9f chore: remove unused directives 2024-05-10 17:37:15 +08:00
uye
222b82f3f5 chore: 添加 MuMu 截图增强模式 启用方法提示 2024-05-10 17:31:10 +08:00
Toby Shi
b3cf1a5b01 feat: 自动公招公招手动确认支援机械改为手动确认1星 (#9047) 2024-05-10 11:29:46 +08:00
Rbqwow
4bc1e22058 docs: 更新文档 (#8981)
* docs: 新手上路同步英文文档

* doc:

* doc: 将新手上路写进readme

* doc: 补充日志说明&修复格式

* doc: 同步gui修改

* doc: 强调官方mumu

* doc: 添加克隆子模块说明

* doc: mumu12和uu加速器
2024-05-10 10:17:21 +08:00
KuTaKe
7251099996 fix(ocr):干员识别修正: 崖心8 -> 崖心 (#9048)
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2024-05-09 21:06:17 +01:00
Constrat
cbf4bbcf6a chore: reset score to default
[skip ci] [skip changelog]
2024-05-09 21:26:25 +02:00
Constrat
1ddf8f0236 perf: duplicate template
[skip ci] [skip changelog]
2024-05-09 21:02:20 +02:00
AnnAngela
5e2f206d95 ci: 补上另一个actions/checkout@v4 (#9044) 2024-05-09 09:46:07 +00:00
AnnAngela
cdd7e6cb12 ci: 更新 actions/checkout@v4 (#9042) 2024-05-09 08:25:19 +00:00
AnnAngela
6eb85ff640 ci: 修复受损引用 (#9041) 2024-05-09 07:36:09 +00:00
uye
6c62a8462d fix: 关卡导航无法识别部分关卡 2024-05-09 10:06:08 +08:00
uye
fa98339687 fix: 重复延迟 2024-05-09 09:33:40 +08:00
Manicsteiner
e9b485ac5b chore: YoStarJP ocr fix (#9033) 2024-05-08 17:06:37 +01:00
Constrat
ad63509588 fix: Skadi Alter EN ocr
[skip ci] [skip changelog]
2024-05-08 16:58:19 +02:00
uye
212836c466 fix: 自动编队选错排在末尾的干员 2024-05-08 18:01:37 +08:00
Constrat
4601501939 chore: Auto Update Game Resources - 2024-05-08
[skip changelog]
2024-05-08 09:03:52 +00:00
Constrat
d109106dcb fix: 塑心 ocr fix jp
fix #9028
[skip changelog]
2024-05-07 17:51:52 +02:00
HX3N
6896df67d4 docs: update glossary 2024-05-07 21:12:14 +09:00
uye
6b0f7ea6ef style: format TaskQueueViewModel 2024-05-07 14:38:49 +08:00
Wallsman
cdec1e1925 add JP ツウィリングトゥルムの黄金 2024-05-07 07:11:59 +09:00
Constrat
d03571fb2a feat: auto retry start on app startup crash (#8966) 2024-05-06 21:04:26 +01:00
Manicsteiner
214744aa69 chore: YoStarJP ocr fix (#9022)
fix #9012
2024-05-06 21:03:25 +01:00
Lancarus
f6bf20f7e3 perf: 优化肉鸽ew优先度 (#9020) 2024-05-06 21:42:52 +08:00
uye
c5d6bfa506 fix: 暂停下干员卡在结束部署后 2024-05-06 14:25:41 +08:00
uye
67456c0cb2 docs: Update bug-report (#9015)
* Update cn-bug-report.yaml

* docs: Update en-bug-report.yaml
2024-05-06 13:28:03 +08:00
Constrat
da78caa4f2 chore: Auto Update Game Resources - 2024-05-05
[skip changelog]
2024-05-05 14:25:08 +00:00
Manicsteiner
40c736ea46 chore: YoStarJP roguelike fix (#8991) 2024-05-05 15:11:28 +01:00
Constrat
b5f9b7601e fix: increase delay post "Mission Start" button (#8950)
fix: increase delay for SkipPreBattlePlot to compensate for loading times
2024-05-05 15:10:15 +01:00
Constrat
d70ce66cb4 fix: delay after enter floor affected by fast screenshots
ref afbe5e2 afbe5e2e03 (commitcomment-141687499)
2024-05-05 12:03:41 +02:00
AnnAngela
f0b8774d35 feat: 添加状态监测站 (#9001) 2024-05-05 07:18:07 +00:00
status102
62dbe304ca chore: 修复LT14-04地图参数 2024-05-05 13:01:36 +08:00
status102
d7034ab3f4 chore: 移动旧保全作业 2024-05-05 12:15:14 +08:00
status102
76b03fdda9 perf: mumu12模拟器路径默认值置空 2024-05-05 12:02:42 +08:00
status102
9a81ebe8df fix: 修复截图增强模式禁用时,模拟器路径无效时无法启动 2024-05-05 12:00:17 +08:00
status102
79cc49c512 chore: 更正Wpf中的MuMu 独家极速操控模式MuMu 截图增强模式 2024-05-05 10:00:33 +08:00
uye
e00c98ed11 chore: 路径不存在时弹窗提示 2024-05-04 20:41:44 +08:00
status102
928e2994a2 fix: typo
[skip changelog]
2024-05-04 20:01:23 +08:00
uye
43cd479aa7 chore: 连接时判断截图方式是否生效 2024-05-04 19:57:08 +08:00
status102
4a59b32911 perf: 增加Mumu12模拟器截图增强配置的模拟器路径存在检查
[skip changelog]
2024-05-04 19:56:38 +08:00
uye
7677fac783 chore: 修改注释 2024-05-04 19:29:55 +08:00
uye
8fffaa2eb0 fix: mumu模拟器连接失败
fix #8986
2024-05-04 19:17:24 +08:00
uye
978f35967e fix: MuMu极速模式关卡导航切换关卡难度报错
fix #8983
2024-05-04 17:24:54 +08:00
status102
6bed31fe28 perf: Mumu12模拟器截图增强模式禁用时隐藏配置项输入框 2024-05-04 17:24:37 +08:00
uye
49f24e42f1 style: format AsstProxy 2024-05-04 17:16:28 +08:00
status102
c70cd85a04 fix: unexpected change 2024-05-04 17:14:36 +08:00
status102
2b8f320ee1 perf: 增加Mumu12模拟器截图增强配置的模拟器路径存在检查 2024-05-04 17:12:27 +08:00
uye
e16ec680b2 fix: 开关 MuMu 极速操控需要重启生效
fix #8980
2024-05-04 16:44:22 +08:00
MistEO
afbe5e2e03 fix: 修复肉鸽关卡识别受截图速度影响的问题 2024-05-04 16:14:37 +08:00
Horror Proton
e36b185505 fix: fallback to normal for empty m_first_tags
format code

fix: https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/8968
2024-05-04 11:52:31 +08:00
Horror Proton
5f31cd9ab0 docs: fix markdown format 2024-05-04 11:45:12 +08:00
Rbqwow
a7d7a65a97 docs: 更新文档 MuMu 运行库 蓝叠 (#8964)
* doc: 添加蓝叠卸载说明

* doc: 优化新手上路安装运行库部分

* doc:  添加MuMu独家极速操控模式文档

* doc: 补充剩余理智说明

* doc: 改进新手上路安装运行库

* doc: Update docs/用户手册/新手上路.md

---------

Co-authored-by: Horror Proton <107091537+horror-proton@users.noreply.github.com>
2024-05-04 03:33:47 +00:00
Lancarus
ae93554f58 feat: 肉鸽适配新干员用法 (#8967) 2024-05-04 03:38:34 +08:00
bodayw
23945022e0 fix: 一图流 243 一天四换换班结束时的日志信息 (#8838) 2024-05-04 03:30:32 +08:00
MistEO
605dcda98a feat: mumu extras (#8939)
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2024-05-03 22:05:37 +08:00
uye
0165469ad0 docs: Update CHANGELOG.md 2024-05-03 21:00:45 +08:00
uye
949618ca3c Release v5.2.3 (#8962) 2024-05-03 20:32:32 +08:00
github-actions[bot]
0d1f415172 docs: Auto Update Changelogs of v5.2.3 (#8963)
* docs: Auto Generate Changelog of Release v5.2.3

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-05-03 20:32:04 +08:00
70CentsApple
362a872b00 feat: 新增公招 3 星 Tag 的倾向策略 (#8868)
* feat: 新增3星Tag的倾向策略

* docs: add docs for `first_tags`

* i18n: remove unexpected dots

* fix: 在 `NoExtra` 模式下返回默认 `final_combination`
2024-05-03 09:16:50 +00:00
Constrat
b3d9f6b64c chore: Auto Update Game Resources - 2024-05-02
[skip changelog]
2024-05-02 20:03:03 +00:00
HX3N
7f4854c47d chore: YoStarKR Improved RecruitRefresh recognition score 2024-05-02 21:03:42 +09:00
Sherkey
60af8c0f14 feat: 开放限时开采许可的ui (#8952)
Related: https://github.com/MaaAssistantArknights/MaaMacGui/pull/16
2024-05-02 17:46:02 +08:00
HX3N
8673a36de4 chore: YoStarKR fix some ocr 2024-05-02 16:13:58 +09:00
Hao Guan
82c6425c77 feat: Mac GUI 支持限时开采许可 2024-05-02 13:49:20 +08:00
Constrat
0fe64b28e0 chore: Auto Update Game Resources - 2024-05-01
[skip changelog]
2024-05-01 19:23:30 +00:00
Constrat
60446de766 chore: Auto Update Game Resources - 2024-05-01
[skip changelog]
2024-05-01 19:03:11 +00:00
SherkeyXD
36b7c4191c fix: 修复限时开采任务过早点击关闭的问题 2024-05-02 02:30:28 +08:00
SherkeyXD
8dcfcc06a8 feat: 开放限时开采许可的ui 2024-05-02 01:39:51 +08:00
SherkeyXD
34dd31fbbd fix: 修正赠送月卡选项卡位移导致的领取失败问题 2024-05-02 01:19:04 +08:00
Manicsteiner
704145a3d9 fix: 避免识别到不存在的连续作战图标 (#8951) 2024-05-01 22:45:51 +08:00
Constrat
4129033c3f fix: EN Vigil ocr
[skip changelog]
2024-05-01 12:00:49 +02:00
Constrat
a20f4097e4 chore: Auto Update Game Resources - 2024-05-01
[skip changelog]
2024-05-01 08:02:23 +00:00
Constrat
9dbf4e85ad chore: Auto Update Game Resources - 2024-05-01
[skip changelog]
2024-05-01 04:03:08 +00:00
Constrat
265ba6d2a6 chore: Auto Update Game Resources - 2024-05-01
[skip changelog]
2024-05-01 03:03:51 +00:00
Constrat
85d508a76f chore: Auto Update Game Resources - 2024-05-01
[skip changelog]
2024-05-01 02:44:01 +00:00
Constrat
6f6dccf02e chore: Auto Update Game Resources - 2024-05-01
[skip changelog]
2024-05-01 02:31:36 +00:00
Constrat
084fbb6f11 chore: Auto Update Game Resources - 2024-04-30
[skip changelog]
2024-04-30 17:04:21 +00:00
Constrat
9c3663c5d9 chore: Auto Update Game Resources - 2024-04-30
[skip changelog]
2024-04-30 07:24:45 +00:00
Hao Guan
0b08f525b2 feat: Mac GUI 领取赠送月卡 2024-04-30 11:43:18 +08:00
Loong
adcfb3dcf4 chore: bump maa-cli to v0.4.7 and update docs
- Bump maa-cli from v0.4.5 to v0.4.7
- Rename cli directory to user_manual_for_cli
- Change some icon of files
- Update cli documentation in en-us as same structure as zh-cn
2024-04-29 19:40:27 +08:00
uye
1f8bb96cc4 Release v5.2.2 (#8933) 2024-04-29 11:13:56 +08:00
uye
35e399c29d docs: Update CHANGELOG.md 2024-04-29 11:13:19 +08:00
github-actions[bot]
e675b4bd21 docs: Auto Update Changelogs of v5.2.2 (#8936)
* docs: Auto Generate Changelog of Release v5.2.2

* Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-04-29 11:11:03 +08:00
DavidWang19
9c843a9dc5 Update encounter.json
fix: 修复不进入树篱之途节点的问题
2024-04-29 03:59:48 +01:00
uye
0caf181bca chore: 调整UnsupportedLevel界面提示说明 2024-04-29 10:44:57 +08:00
uye
58a64c05a9 docs: update 新手上路.md 2024-04-29 09:50:27 +08:00
AnnAngela
414c7201eb feat: CC 镜像路径变动 (#8935) 2024-04-29 09:19:16 +08:00
uye
711b0ea043 feat: 标题栏显示多选框 (#8932)
* feat: 标题栏显示多选框

* chore: 完善标题栏显示多选框

* chore: 标题滚动可选开启

* feat: 标题栏内容可选隐藏

* i18n: 标题栏多选框内容翻译

* i18n: 标题栏选项翻译

---------

Co-authored-by: 枫雨 <35213527+moomiji@users.noreply.github.com>
2024-04-29 02:04:10 +08:00
SherkeyXD
cc970f60f2 docs: 更新Award的集成文档 2024-04-28 16:37:00 +08:00
uye
c12362a34b fix: 第一次启动时无法检测蓝叠国际版的adb路径
fix #8921
fix #8748
2024-04-28 15:24:57 +08:00
SherkeyXD
7d91810871 fix: 修复开始唤醒时卡在五周年月卡的问题 2024-04-28 09:11:44 +08:00
HX3N
7d847eaf0a feat: YoStarKR ZT navigation 2024-04-28 04:35:19 +09:00
Sherkey
78258ccc6f feat: 支持五周年赠送月卡的领取 (#8918) 2024-04-28 00:12:20 +08:00
Constrat
682b1458ee chore: Auto Update Game Resources - 2024-04-27
[skip changelog]
2024-04-27 14:03:09 +00:00
dantmnf
42154a24d7 fix: crash on background update 2024-04-27 20:25:00 +08:00
Constrat
fa08675fc5 feat: EN ZT navigation 2024-04-27 09:44:35 +02:00
Manicsteiner
a90792d17a chore: YoStarJP ZT navigation (#8912) 2024-04-27 08:12:17 +01:00
HX3N
772b3b010e docs: fix incorrect link in KR docs
and modify warning message
2024-04-27 01:37:17 +09:00
枫雨
167014fcef feat: "粘贴剪贴板"右键可添加作业集
- 鼠标放作业名称上可显示作业ID
2024-04-26 23:53:41 +08:00
uye
ce012da241 fix: 导航报错 2024-04-26 13:55:56 +08:00
status102
2ed9e994a4 fix: 修复#8892导致的崩溃
fix #8896, #8898

link to #8892
2024-04-26 08:46:21 +08:00
HY
3c151f8422 chore: 繁中服「空想花庭」活動導航 (#8897) 2024-04-25 15:18:30 +01:00
Constrat
8a02c9d75a i18n: translation fix
[skip changelog]
2024-04-25 16:15:49 +02:00
枫雨
fe742acb1c fix: 修复开局干员搜索的性能和显示问题 2024-04-25 22:06:52 +08:00
status102
72baf23452 fix: 增加对地图文件检查,避免只存在索引 (#8895)
- close #8860
2024-04-25 21:51:37 +08:00
uye
5e9055d5d8 chore: 标题滚动可选开启 2024-04-25 20:08:36 +08:00
status102
da8b1b669f fix: 增加对地图文件检查,避免只存在索引 2024-04-25 20:07:17 +08:00
Constrat
c6949bb76a chore: Auto Update Game Resources - 2024-04-25
[skip changelog]
2024-04-25 11:43:04 +00:00
uye
ff7136447a chore: 生息演算更新后BB导航 2024-04-25 19:17:40 +08:00
HX3N
1bd8dce63a fix: Copilot Combatlist H-1x-x Stage recognition (#8892)
fix: Copilot Combatlist H-1x-x Stage recognition (#8990)
2024-04-25 18:35:11 +09:00
uye
e94cbb1b7c fix: 标题过长时无法显示置顶按钮 2024-04-25 17:22:56 +08:00
Constrat
646d1e2172 chore: Auto Update Game Resources - 2024-04-25
[skip changelog]
2024-04-25 09:03:38 +00:00
枫雨
ff1164776b perf: 撤回掉修 NumericUpDown 的反射 2024-04-25 15:58:07 +08:00
枫雨
bc7de558e9 chore: update HandyControls to 3.5.2 2024-04-25 15:29:20 +08:00
枫雨
5e03372d56 chore: 更好的开局干员搜索
close #8889
2024-04-25 15:16:57 +08:00
枫雨
c668ebc4a9 chore: 更好的开局干员验证 2024-04-25 15:16:57 +08:00
Rbqwow
e1526c939a docs: 新手引导 (#8749)
* docs: 新手引导
2024-04-24 23:58:07 +08:00
alisa
fd5d523460 ci: fix azure deployment_environment error 2024-04-24 10:30:18 +08:00
alisa
bc01f3bf25 ci: fix unexpected build and deploy behavior 2024-04-24 10:22:18 +08:00
alisa
a2fcfadba2 ci: update website deployment action to support deployment_environment 2024-04-24 10:08:19 +08:00
Alisa
c2bd0133ba refactor: 合并 MAA Website 仓库 (#8886)
* chore: migrate maa website

* ci: change docs build test to website build test

* fix: rename artifact name to dist

* ci: add workflow to deploy website to azure
2024-04-24 09:31:52 +08:00
uye
cf2455770d fix: Unable to cast object of type LinearGradientBrush to type SolidColorBrush 2024-04-23 20:55:08 +08:00
Manicsteiner
0c4e9958fd chore: update YoStarJP DepotEnterMistCity (#8885)
[skip changelog]
2024-04-23 09:56:43 +01:00
alisa
01c96431ce feat: add google analytics to docs 2024-04-23 10:24:48 +08:00
uye
1e856c9a28 chore: 改个置顶的图标 2024-04-22 18:24:13 +08:00
uye
4c031484af feat: 界面置顶功能
close #8861
2024-04-22 18:12:19 +08:00
uye
d01d7b1368 fix: 日服 基建 火龙S黑角 识别错误
fix #8862
2024-04-22 16:30:09 +08:00
status102
03be3e77d6 fix 2024-04-22 10:07:44 +08:00
status102
a162f20f73 fix: 修复干员名识别识别含有《。前缀时,预处理结果错误
fix #8878
2024-04-22 10:04:40 +08:00
Rbqwow
a469b1d4ca docs: 更新明日方舟工具箱地址 (#8835) 2024-04-21 20:28:28 +08:00
Horror Proton
c084ad2593 fix: add quote around adb args with character | 2024-04-20 20:17:33 +08:00
Constrat
9960c5b7cd chore: Auto Update Game Resources - 2024-04-18
[skip changelog]
2024-04-18 09:03:16 +00:00
Constrat
ec27c41840 feat: EN Mist City theme 2024-04-18 09:30:55 +02:00
DL_君逸寒
11bc14592e feat: 新增 边地移动城镇另外两个元件的保全派驻作业 (#8858) 2024-04-18 07:38:20 +01:00
DL_君逸寒
c102233a54 perf: 优化边城保全声波记录扩音器脚本打法及修改脚本名称 (#8857) 2024-04-18 07:37:58 +01:00
Constrat
eba917d38a feat: YostarEN Dark theme 2024-04-17 23:20:53 +02:00
Manicsteiner
037991a66b chore: YoStarJP new UI theme templates (#8851) 2024-04-17 21:16:08 +01:00
Constrat
b532155b42 feat: EN IS4 all squads implementation
fix #8850
2024-04-17 15:58:29 +02:00
Constrat
c2d014a74d fix: EN adverse farming cache error
fix #8849
2024-04-17 15:49:20 +02:00
DL_君逸寒
827594cc29 feat: 新增 多索雷斯商业地块 保全派驻作业 (#8848) 2024-04-17 12:51:30 +01:00
DL_君逸寒
fb2f88e71b feat: 阿尔斯特甜品制作平台追加作业 (#8847) 2024-04-17 12:51:21 +01:00
Constrat
27bd5054fa chore: Auto Update Game Resources - 2024-04-17
[skip changelog]
2024-04-17 09:02:47 +00:00
AnnAngela
1ddd7023bc ci: 无变动时不再发起更新资源 (#8846) 2024-04-17 04:01:45 +00:00
DL_君逸寒
09c04eec27 feat: 新增 多索雷斯商业地块、边地移动城镇 保全派驻作业 (#8843) 2024-04-16 18:41:22 +01:00
HX3N
21cf20fea8 chore: YoStarKR add new UI Interface template images
Dark and MistCity Theme

DepotEnter / EnterInfrast / Friends / GachaEnter / OperBoxEnter / Recruit / Task / Terminal

deleted EnterOperator.png as it is no longer in use
2024-04-17 00:38:53 +09:00
HX3N
070662c513 chore: YoStarKR modify task.json
correction of U-Official recognition error and modify some Item
2024-04-17 00:26:12 +09:00
Constrat
0368f6e31a chore: Auto Update Game Resources - 2024-04-16
[skip changelog]
2024-04-16 12:06:50 +00:00
HX3N
eb9fc59e0a docs: modify KR document
fix typos and standardize formatting

(arranged the paragraphs to start with 'warning', followed by 'tip')
2024-04-16 20:38:25 +09:00
Constrat
b0a76fea8d chore: Auto Update Game Resources - 2024-04-16
[skip changelog]
2024-04-16 11:21:58 +00:00
碳黑橙子
5a65afbb49 doc: 修复404的链接 (#8839) 2024-04-16 10:18:48 +01:00
Wallsman
a22212c558 JP Chapter13 Update 2024-04-16 17:01:06 +09:00
Constrat
936db94023 chore: Auto Update Game Resources - 2024-04-16
[skip changelog]
2024-04-16 07:42:45 +00:00
Constrat
c0aee71d7b chore: Auto Update Game Resources - 2024-04-16
[skip changelog]
2024-04-16 07:24:26 +00:00
uye
fd13d970c1 Release v5.2.1 (#8831) 2024-04-15 19:45:04 +08:00
github-actions[bot]
08ecc3913c docs: Auto Update Changelogs of v5.2.1 (#8832)
* docs: Auto Generate Changelog of Release v5.2.1

* docs: Update CHANGELOG.md

* docs: changelog

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2024-04-15 19:44:28 +08:00
uye
e0dbd0a7a5 chore: BB-4 导航
fix #8824
2024-04-15 16:29:29 +08:00
bodayw
489403f832 feat: 更新一图流生成 243 极限效率一天四换排班表 (#8825)
* feat: 更新一图流生成 243 极限效率一天四换排班表

* fix: 243 极限效率一天四换一图流版宿舍换班问题

在开启“不将已进驻的干员放入宿舍”的情况下有可能导致下一次换班时宿舍找不到指定的人

* fix: 恢复旧版一图流生成 243 极限一天三换排班表
2024-04-15 15:01:01 +08:00
uye
b79de46f7f fix: 导航报错 2024-04-15 14:04:16 +08:00
AnnAngela
f5b6bf1ced feat: 巴别塔二、三阶段导航预载 (#8829)
https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/8827#discussion_r1565112368
2024-04-15 03:52:21 +00:00
AnnAngela
28d66894b8 feat: 巴别塔导航数据 (#8827) 2024-04-15 01:39:33 +00:00
HY
8b8ab2664f fix: 替換繁中服 StartToVisit 圖片 (#8817)
fix: 替換 StartToVisit 圖片
2024-04-12 21:50:24 +08:00
HX3N
bfc4f25756 docs: YoStarKR update operators.md 2024-04-12 12:26:40 +09:00
uye
7346ab4d6c fix: 无法进行访问好友 2024-04-12 01:31:48 +08:00
Constrat
dc2f99b32f chore: Auto Update Game Resources - 2024-04-11
[skip changelog]
2024-04-11 08:28:35 +00:00
uye
951634fbef style: ResourceUpdater 2024-04-11 13:46:27 +08:00
Constrat
b4b753c357 chore: Auto Update Game Resources - 2024-04-11
[skip changelog]
2024-04-11 04:02:54 +00:00
Constrat
ad723c9d3b chore: Auto Update Game Resources - 2024-04-11
[skip changelog]
2024-04-11 02:28:40 +00:00
uye
4c505faa86 fix: 部分场景下无法执行访问好友
fix #8775
2024-04-10 12:32:24 +08:00
vonnoq
cc2082e214 fix: 繁中服幹員識別修正 (#8807) 2024-04-09 18:38:44 +01:00
Manicsteiner
7635e124f9 docs: change image transparency (#8802) 2024-04-09 16:01:09 +01:00
Constrat
f0b07b7819 docs: en transparency
ref: 0c5a79f
2024-04-09 17:00:47 +02:00
HX3N
4de621c182 docs: update and refactor KR docs (#8793)
* docs: update readme

* docs: Update Android Device and CLI

* docs:  Improvement of Document Structure

* docs: update schema

* docs: update sidebar and dev docs

* docs: reconstruction

* docs: navbar

* docs: fix incorrect link

docs: sidebar

docs: fix somethings

* docs: update image

* docs: Correcting missing or incorrect links

* docs: change image link

* docs: change sidebar display

Last Check

* docs: correcting incorrect
2024-04-09 23:25:20 +09:00
uye
0c5a79f5a7 docs: 修改文档图片透明度
cc @Constrat @HX3N @Manicsteiner
2024-04-09 16:50:44 +08:00
Constrat
8795288e76 chore: Auto Update Game Resources - 2024-04-09
[skip changelog]
2024-04-09 07:42:51 +00:00
Constrat
470cefa834 chore: Auto Update Game Resources - 2024-04-09
[skip changelog]
2024-04-09 07:24:34 +00:00
status102
56122a6af2 perf: 战斗列表处于激活时,浏览带有难度标识的作业会自动添加对应难度到战斗列表 (#8491) 2024-04-08 17:33:24 +08:00
HoshinoAyako
d0121ba22e fix: 假日场景下,银淞主题UI无法进入基建 (#8795)
修复了roi范围
540+200=740>720

去除了模板的灰色色块
2024-04-08 16:27:48 +08:00
uye
b2eeaaa33e chore: 修改抗干扰值日志输出 2024-04-08 10:25:06 +08:00
uye
04044b4f7e docs: 生息演算介绍Update zh-cn.xaml 2024-04-07 17:24:01 +08:00
uye
8391b601fc fix: 抗干扰值解析 2024-04-07 16:16:07 +08:00
uye
0e3da9cf85 fix: switch not valid string_t 2024-04-07 15:28:18 +08:00
uye
390165b661 fix: 肉鸽解析Vision失败 2024-04-07 15:14:47 +08:00
Constrat
ea1446ea5b fix: 特米米 in battle ocr detection (#8788)
* fix: 特米米 in battle ocr detection

* chore: updated regex
2024-04-07 14:46:06 +08:00
Constrat
63d21f1ccb chore: Auto Update Game Resources - 2024-04-06
[skip changelog]
2024-04-06 13:43:04 +00:00
Constrat
a1b9a36b23 fix: reduced score for Recruitment IS4
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/8613#issuecomment-2041072238
[skip changelog]
2024-04-06 15:39:57 +02:00
Manicsteiner
20d8151895 fix: YoStarJP ocr グラベル (#8780)
[skip changelog]
2024-04-04 21:25:30 +01:00
Loong
0be47d1cb8 docs: use relative md instead of html links 2024-04-03 19:14:28 +08:00
Loong
73ad1c62e9 docs: split and update CLI documents 2024-04-03 19:14:28 +08:00
Manicsteiner
dcf331fabc chore: YoStarJP ocr fix (#8768)
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2024-04-03 10:08:14 +01:00
Constrat
03343070d0 chore: Auto Update Game Resources - 2024-04-03
[skip changelog]
2024-04-03 08:44:30 +00:00
Manicsteiner
bca181c365 fix: Global IS navigation (#8769) 2024-04-03 09:36:28 +01:00
uye
e1228e26fb fix: 刷理智愚人号任务出错
fix #8773
2024-04-03 16:13:03 +08:00
uye
74342c0a25 fix: 无奖励关卡无法匹配愚人号部分关卡 2024-04-03 15:54:27 +08:00
uye
b4c180f275 perf: Add missing headers & optimize the code 2024-04-03 15:31:20 +08:00
uye
b3350ac23b feat: Add Bark notification provider (#8701)
What is Bark?
https://bark.day.app/
2024-04-03 15:08:17 +08:00
uye
1c94820755 fix: 泡普卡识别错误
fix #7878
2024-04-03 14:11:26 +08:00
Constrat
41506ffa6f chore: Auto Update Game Resources - 2024-04-03
[skip changelog]
2024-04-03 03:02:57 +00:00
status102
f9717be116 perf: nullable
[skip changelog]
2024-04-03 10:54:30 +08:00
Horror Proton
f896ab1f84 fix: 尝试修复肉鸽导航 (#8764)
* fix: fix roguelike navigation

* chore: fix roguelike resource ci error
2024-04-03 10:49:31 +08:00
uye
8e00c54833 perf: 优化 LocalizationHelper 2024-04-03 10:36:43 +08:00
Constrat
c351323605 chore: Auto Update Game Resources - 2024-04-02
[skip changelog]
2024-04-02 17:26:33 +00:00
uye
9a1b8e8cc8 chore: 叉掉不触发 2024-04-03 00:30:11 +08:00
uye
70376024fa Revert "chore: 叉掉不触发"
This reverts commit 9c887176d5.
2024-04-03 00:27:43 +08:00
Constrat
44319974c5 chore: Auto Update Game Resources - 2024-04-02
[skip changelog]
2024-04-02 11:22:59 +00:00
Constrat
dc080cca33 chore: Auto Update Game Resources - 2024-04-02
[skip changelog]
2024-04-02 11:02:50 +00:00
uye
a529d83758 fix: pallas 无法获取 DynamicResource 2024-04-02 18:15:02 +08:00
uye
c5cf3900d4 fix: 找不到语言资源文件 2024-04-02 18:15:02 +08:00
Constrat
774b74575b chore: Auto Update Game Resources - 2024-04-02
[skip changelog]
2024-04-02 07:25:08 +00:00
Constrat
4165234f9c chore: Auto Update Game Resources - 2024-04-02
[skip changelog]
2024-04-02 07:03:30 +00:00
uye
be08f05be4 chore: 加点不期而遇的日志 2024-04-02 14:26:00 +08:00
uye
bf49151640 chore: LastBuyWineTime 改为全局配置 2024-04-02 10:28:01 +08:00
uye
9c887176d5 chore: 叉掉不触发 2024-04-02 09:32:10 +08:00
Constrat
a48a24932e chore: Auto Update Game Resources - 2024-04-01
[skip changelog]
2024-04-01 19:03:30 +00:00
Loong
2111a401b2 chore: update maa-cli to 0.4.5 and build with vendored-openssl 2024-04-01 23:13:57 +08:00
status102
246a628acf ci: 修改nightly changelog忽略多余抬头 2024-04-01 22:32:55 +08:00
status102
ef7e64a180 ci: 修正nightly读取changelog.md
[skip changelog]
2024-04-01 21:44:57 +08:00
Constrat
b954513444 style: Remote Control spacing 2024-04-01 14:51:09 +02:00
status102
57243d944d ci: 修正nightly使用生成文件 2024-04-01 20:20:11 +08:00
uye
4cc4ec9c64 chore: 一天只喝一次酒 2024-04-01 16:54:46 +08:00
Constrat
33818281c1 chore: Auto Update Game Resources - 2024-04-01
[skip changelog]
2024-04-01 08:27:52 +00:00
uye
9f05c01c5d style: LocalizationHelper & SettingsViewModel 2024-04-01 14:34:29 +08:00
uye
b8e69f62db fix: 无法进入设置
fix #8755
2024-04-01 11:25:26 +08:00
Horror Proton
2000bc3597 docs: sync with upstream, re-arrange for linux users (#8733)
- Upstream docs update:
https://github.com/MaaAssistantArknights/maa-cli/pull/248

- 明确区分编译MAA动态库,安装MAA动态库与安装maa-cli并添加相关指引

- 使用 markdownlint 格式化文本

- docs/zh-tw/1.6-CLI使用說明.md: 使用OpenCC转换,与简体中文最新文档同步

_TODO_: 日语与韩语文档待同步

---

review point: 需繁体中文文化环境相关的本地人员审阅繁体中文部分用语及习惯用词

*请勿 squash merge,应直接merge或rebase
2024-04-01 10:37:41 +08:00
AnnAngela
a0ce5e1acf ci: 修复gen_changelog的错误操作 (#8756) 2024-04-01 02:03:39 +00:00
Sherkey
b3b09a966d chore: 修复changelog_generator编码问题,以及部分重构 (#8739)
* ci: 修正changelog生成时的编码问题

* refactor: 使用更加现代的python写法部分重构changelog_generator
2024-04-01 08:24:34 +08:00
Constrat
17a3718853 i18n: EN correction 2024-03-31 17:04:17 +02:00
Constrat
f56643a1c0 i18n: translation small error fixes 2024-03-31 17:03:11 +02:00
Horror Proton
cd347b73e7 feat: calculate position of skill & retreat button 2024-03-31 10:16:20 +08:00
北雁 Cryolitia
8c2d73d76e docs: fix breakline 2024-03-31 10:15:23 +08:00
北雁 Cryolitia
724c3d0623 docs: declare license AGPL-3.0-only 2024-03-31 10:15:23 +08:00
Constrat
2f4dc75540 chore: Auto Update Game Resources - 2024-03-30
[skip changelog]
2024-03-30 20:03:29 +00:00
Constrat
02ec5be3a2 perf: Improved InfrastFilterMenuNotStationedButton recognition score 2024-03-30 17:05:00 +01:00
Loong
5c40b54bd2 ci: generate changelog with python script for nightly (#8728)
ci: generate changelog with python script for nightly releases
2024-03-30 23:39:15 +08:00
北雁 Cryolitia
42338942f5 docs: re-arrange for linux users
明确区分编译MAA动态库,安装MAA动态库与安装maa-cli并添加相关指引

使用 markdownlint 格式化文本

docs/zh-tw/1.6-CLI使用說明.md: 使用OpenCC转换,与简体中文最新文档同步

TODO: 日语与韩语文档待同步
2024-03-30 20:59:41 +08:00
北雁 Cryolitia
437a6958e4 docs: sync with upstream
https://github.com/MaaAssistantArknights/maa-cli/pull/248
2024-03-30 19:22:38 +08:00
status102
df90caba1b ci: output format 2024-03-29 11:06:47 +08:00
HX3N
38f7c32018 fix: YoStarKR Executor alter regex (#8723)
* fix: YoStarKR Executor alter ocr fix

* fix: Eyjafjalla the Hvít Aska regex
2024-03-28 20:50:08 +00:00
uye
fe11b359f4 Release v5.2.1-beta.1 (#8719) 2024-03-28 19:25:32 +08:00
github-actions[bot]
f3a86a94ac docs: (#8720)
* docs: Auto Generate Changelog of Release v5.2.1-beta.1

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-03-28 19:21:44 +08:00
uye
d945ef1d1b fix: 信用购买卡在购买完成界面
fix #8674
2024-03-28 18:25:40 +08:00
uye
21098fbeb8 chore: 修改不支持的关卡提示 2024-03-28 18:10:55 +08:00
Nitori
36d54df766 feat: add Bark Server configuration key 2024-03-28 15:53:30 +08:00
Nitori
c19302755d feat: Add Bark notification provider 2024-03-28 15:53:28 +08:00
uye
5a20a85dfe fix: macos 生息演算无法退出关卡
fix #8579
2024-03-28 14:53:33 +08:00
Valtameri Sieluna
379349d71a feat: add multi external notifications (#8628)
* feat: add discord notification

* feat: add telegram notification

* feat: add missing langauges

* fix: add missing space
2024-03-27 12:26:20 +08:00
MistEO
6b289e9c9b chore: 去掉太慢的clang-format配置 2024-03-26 16:35:05 +08:00
status102
979f2e91da fix: 训练室读取干员名失效 2024-03-26 14:49:22 +08:00
Constrat
02b1f0db62 fix: IS4 Rain! encounter regex
fix #8709
2024-03-25 18:28:11 +01:00
Rbqwow
dbb550f71a doc: 添加蓝叠核心版本推荐 (#8688) 2024-03-25 03:09:03 +08:00
guguji12
c4c1cbc7f5 doc: Update 肉鸽辅助协议.md (#8703)
订正错别字
2024-03-25 03:08:17 +08:00
status102
030b3f718e revert 35c639326e
[skip changelog]
2024-03-23 17:31:10 +08:00
status102
cf05d0d4bb perf: 肉鸽投资模式进入第二层拓展为投资模式启用购物、招募 (#8620)
perf: 肉鸽投资模式`进入第二层`拓展为`投资模式启用购物、招募`
2024-03-23 14:33:00 +08:00
Saratoga
6f450c18a2 fix: 干员名ocrReplace追加一煌-> & 夹子 2024-03-23 14:29:09 +08:00
status102
006201d12f fix: BattleQuickFormationOCR roi
[skip changelog]
2024-03-23 09:01:49 +08:00
status102
3b01249c11 fix: train regex
fix #8685
2024-03-23 08:30:55 +08:00
status102
35c639326e perf: 调整编队干员识别roi 2024-03-22 22:40:07 +08:00
status102
f4ea366bf3 fix: 干员名识别移除前缀c 2024-03-22 22:40:07 +08:00
status102
303162ed8b fix: 补充低信赖筛选错误 2024-03-22 22:39:50 +08:00
Manicsteiner
558f35e39b fix: custom ROI and notes for StartToVisit txwy (#8682) 2024-03-22 13:10:59 +00:00
status102
6eee1d85bc perf: 基建干员专精干员名替换优化
[skip changelog]
2024-03-22 17:47:48 +08:00
status102
3d3d8c1036 perf: 移除过多的剧情检查 2024-03-22 16:48:35 +08:00
status102
c00d1673f5 fix: 战斗中教程剧情导致错误的倍速切换 2024-03-22 16:20:29 +08:00
status102
634117c687 fix: 自动战斗-自动编队-补充低信赖时自动关闭特关 2024-03-22 11:42:48 +08:00
Constrat
2cd3781f00 feat: Skip the story before a battle for EN 2024-03-21 19:58:59 +01:00
HX3N
b4ee62714b fix: YoStarKR SkipThePreBattlePlot (#8671)
* fix: YoStarKR SkipThePreBattlePlot

* revert: change image

* fix: templThreshold

* fix: Remove fields except maskRange
2024-03-21 16:17:59 +01:00
status102
93f34fa002 fix: 干员名识别一山-> 2024-03-21 21:53:38 +08:00
Constrat
99e53443c3 chore: Auto Update Game Resources - 2024-03-21
[skip changelog]
2024-03-21 09:24:32 +00:00
Constrat
9e814827df chore: Auto Update Game Resources - 2024-03-21
[skip changelog]
2024-03-21 09:03:15 +00:00
Constrat
55e9ec4e1f fix: trying to fix the SkipPreBattle
[skip changelog]
2024-03-20 21:05:52 +01:00
Constrat
acf01e5698 chore: Auto Update Game Resources - 2024-03-20
[skip changelog]
2024-03-20 20:03:18 +00:00
Constrat
015ad7863f chore: Auto Update Game Resources - 2024-03-20
[skip changelog]
2024-03-20 19:42:43 +00:00
HX3N
f57bc040d5 fix: YoStarKR ocrReplace (#8665)
* fix: YoStarKR ocrReplace

fix Character / Encounter / Foldartal

* fix: regex

* fix: minimize duplicate
2024-03-20 19:26:10 +00:00
status102
de43c04f68 chore: 修改changelog_generator的无序列表格式,从- 改为* 2024-03-20 19:35:09 +08:00
Constrat
aabd8a199b chore: Auto Update Game Resources - 2024-03-20
[skip changelog]
2024-03-20 09:43:45 +00:00
Constrat
366e700c10 fix: OCR replace for Auto Battle (CV) 2024-03-19 18:22:39 +01:00
Constrat
80f30d4c8b fix: CV roi for navigation 2024-03-19 18:07:43 +01:00
Constrat
6796a2dcd1 chore: Auto Update Game Resources - 2024-03-19
[skip changelog]
2024-03-19 17:03:42 +00:00
Constrat
9f808db912 fix: Eyja Alter EN regex for SSS 2024-03-19 18:02:59 +01:00
Manicsteiner
48003b344d fix: YoStarJP ocrreplace (#8663) 2024-03-19 16:49:49 +00:00
Constrat
9e1b44491c chore: Auto Update Game Resources - 2024-03-19
[skip changelog]
2024-03-19 15:42:52 +00:00
Constrat
22900fdd71 perf: optimized roi for EN infrast training 2024-03-19 16:32:03 +01:00
HY
b2a604e7da chore: 繁中服「孤星」活動導航 (#8662) 2024-03-19 15:06:37 +00:00
status102
73bbf5fb68 ci: 调整nightly自动changelog格式
[skip changelog]
2024-03-19 19:16:50 +08:00
status102
fd762415e5 ci: 调整nightly自动changelog格式
[skip changelog]
2024-03-19 17:13:57 +08:00
uye
9d2a4720e7 fix: 所有任务都添加失败时清空任务列表
fix #8658
2024-03-19 16:50:37 +08:00
Constrat
05127b1f56 chore: Auto Update Game Resources - 2024-03-19
[skip changelog]
2024-03-19 07:42:23 +00:00
Constrat
f958383e3a chore: Auto Update Game Resources - 2024-03-19
[skip changelog]
2024-03-19 07:23:22 +00:00
Constrat
c3dbf2b129 chore: Auto Update Game Resources - 2024-03-19
[skip changelog]
2024-03-19 07:02:47 +00:00
EROTCZ
4b11f96141 fix: txwy ocrreplace (#8655)
Update tasks.json

繁中服基建換班濯塵芙蓉辨認異常
2024-03-19 14:45:22 +08:00
uye
05a1233c13 perf: 专精干员名称按ui语言显示 2024-03-19 14:41:56 +08:00
Constrat
0bde2ae92d chore: Auto Update Game Resources - 2024-03-19
[skip changelog]
2024-03-19 04:26:29 +00:00
Lin Chengfeng
1cc8381d4d fix: match the correct file suffix 2024-03-18 20:17:30 +08:00
Horror Proton
f6b81886fa chore: remobe unwanted files [skip changelog] 2024-03-18 19:46:47 +08:00
status102
155e45ea5c ci: 修复格式
[skip changelog]
2024-03-18 08:16:02 +08:00
HX3N
3594217fb0 chore: YoStarKR CV stage navigation and add Conductive Unit Upgrade (#8649)
* chore: YoStarKR CV stage navigation

* feat: YoStarKR SSS#3 add Conductive Unit upgrade
2024-03-17 20:53:26 +00:00
Constrat
98772abb3e chore: Auto Update Game Resources - 2024-03-17
[skip changelog]
2024-03-17 16:03:27 +00:00
Constrat
9a7369f9be chore: EN CV navigation 2024-03-17 16:46:15 +01:00
Manicsteiner
393cf1b373 chore: YoStarJP ダーティマネー navigation (#8647) 2024-03-17 15:21:54 +00:00
Constrat
81a5227005 fix: SSS json version
[skip changelog]
2024-03-17 16:19:24 +01:00
David
c3e18d3eef Feat: YostarEN SSS#3 (#8645)
* chore: removed older global SSS

* feat: SSSBuffChoose

* chore: moved older SSS scripts to /old

* feat: translated SSS scripts

* style: typo

* style: more typos

* style: even more typos

* fix: final ocr tweaks

* chore: added Conductive Unit replace

* fix: misindetification + highest priority for Equipment Activation Valve

* fix: skill activations
2024-03-17 15:11:32 +00:00
HX3N
5856ad2afe feat: YoStarKR SSS#3 (#8643)
Update tasks.json
2024-03-17 10:03:14 +00:00
vonnoq
58bac2c1d0 feat: 台服保全開場選元件ocr替换 (#8641) 2024-03-17 14:13:12 +08:00
Manicsteiner
2efe941daf feat: YoStarJP SSS#4 (#8630) 2024-03-16 17:35:32 +00:00
David
767edee59c fix: Eyjafjalla Alter ocr
Fix  #8629
[Skip changelog]
2024-03-16 08:50:16 +01:00
status102
e0d332e3fa ci: 移除空格转义 2024-03-16 15:29:55 +08:00
status102
302a82eb68 ci: 调整字符串拼接
[skip changelog]
2024-03-16 14:59:54 +08:00
status102
e2f15fbb16 ci: 修复nightly的changelog tag选取 2024-03-16 10:52:38 +08:00
status102
430f656a95 fix: 自动战斗作业自动点赞检测 2024-03-16 10:43:23 +08:00
status102
dcd6011141 fix: 自动战斗日志时间丢失
[skip changelog]
2024-03-16 09:42:12 +08:00
Constrat
531e169a1e fix: IS4 strategy level and encounter
[skip changelog]
2024-03-15 15:04:56 +01:00
HX3N
8ff37f3f73 chore: YoStarKR update operator.md (#8626) 2024-03-15 13:42:43 +00:00
Constrat
cf6cb8ab14 chore: Auto Update Game Resources - 2024-03-15
[skip changelog]
2024-03-15 11:04:04 +00:00
status102
217e3d40dd ci: 再修一下 2024-03-15 18:49:25 +08:00
status102
c686f8e187 ci: 尝试修复换行混乱 2024-03-15 18:09:46 +08:00
Wallsman
af8ff14e18 Update operators.md for JP ダーティマネー
Update operators.md for JP ダーティマネー
2024-03-15 18:40:08 +09:00
status102
897f8066fc ci: 修改自动生成changelog与上个tag对比,而非与上个公版 2024-03-15 16:48:13 +08:00
MistEO
5f8c3e0e02 chore: Update .clang-format
SeparateDefinitionBlocks: Always
2024-03-15 16:42:21 +08:00
Constrat
871f611141 chore: IS4 last template
[skip changelog]
2024-03-15 09:41:59 +01:00
Constrat
b250d7ac26 chore: IS4 template
[skip changelog]
2024-03-15 09:15:25 +01:00
status102
6c1f95637c ci: nightly auto changelog (#8614)
* ci: nightly auto changelog

* perf: 移除不必要的参数

* perf: review

Co-authored-by: AnnAngela <naganjue@vip.qq.com>

---------

Co-authored-by: AnnAngela <naganjue@vip.qq.com>
2024-03-15 15:51:05 +08:00
status102
37ae5d611e perf: 肉鸽投资模式进入第二层拓展为投资模式启用购物、招募 2024-03-15 11:40:14 +08:00
uye
a6be1dc4d5 fix: 外服小车名称识别 2024-03-14 23:18:21 +08:00
zayn7lie
a7db686116 docs: rename Linux模拟器.md to Linux模拟器&容器.md (#8513)
Update and rename Linux模拟器.md to Linux模拟器&容器.md
2024-03-14 23:09:26 +08:00
Constrat
6c06e49168 fix: IS4 EN foldartal declare text 2024-03-14 14:46:10 +01:00
Constrat
4d2214e413 i18n: EN consistencies
[skip ci] [skip changelog]
2024-03-14 14:30:20 +01:00
David
478765a2df fix: Foldartal use for IS4 - overseas (#8612)
* feat: resource updater Sami@Roguelike@FoldartalUseOcr

* chore: updated tasks
2024-03-14 13:08:32 +01:00
Constrat
c2aa103a49 chore: IS4 template
[skip changelog]
2024-03-14 12:04:43 +01:00
status102
aa7f98b836 ci: pr checker 2024-03-14 17:38:03 +08:00
Constrat
2915678e90 chore: Auto Update Game Resources - 2024-03-14
[skip changelog]
2024-03-14 09:02:44 +00:00
Constrat
3af7dd863a chore: IS4 bosky passage template
[skip changelog]
2024-03-14 08:38:39 +01:00
AnnAngela
2ac2ec7f79 ci: 优化changelog (#8608) 2024-03-14 07:25:43 +00:00
status102
7cc1e7b551 perf: 自动战斗-自动编队存储编队信息 (#8542) 2024-03-14 11:24:18 +08:00
status102
a4e5c595d3 style: var name 2024-03-14 11:22:36 +08:00
uye
54be213527 Release v5.2.0 (#8603) 2024-03-14 11:15:33 +08:00
github-actions[bot]
d160fc6572 docs: Auto Update Changelogs of v5.2.0 (#8606)
* docs: Auto Generate Changelog of Release v5.2.0

* docs: Update CHANGELOG.md

* docs: changelog

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2024-03-14 11:15:16 +08:00
uye
1858055b49 style: 格式化 2024-03-14 10:29:50 +08:00
Constrat
81f934647f chore: IS4 template
[skip ci] [skip changelog]
2024-03-13 22:03:54 +01:00
Constrat
ab76804767 chore: IS4 EN higher floors NextLevel text 2024-03-13 21:28:58 +01:00
Constrat
9759890b68 chore: Auto Update Game Resources - 2024-03-13
[skip changelog]
2024-03-13 20:03:24 +00:00
Constrat
a017f5a546 chore: removed threshold for IS trasks
[skip changelog]
[skip ci]
2024-03-13 20:50:44 +01:00
Constrat
6e35bb6379 fix: IS4 EN drop recruit selection option 2024-03-13 20:41:02 +01:00
Constrat
811c38e6a8 chore: Auto Update Game Resources - 2024-03-13
[skip changelog]
2024-03-13 13:44:28 +00:00
Constrat
e3fb8e608b chore: IS4 tasks
[skip changelog]
2024-03-13 14:39:32 +01:00
Constrat
0ad2df9813 refactor(tools): removed parenthesis for OCR
[skip changelog]
2024-03-13 13:28:06 +01:00
uye
d1a1010e53 fix: 基建換班 Lancet-2/Castle-3 识别异常
fix #8593
fix #7072
fix #8026
2024-03-13 18:17:13 +08:00
status102
a5fa75543b perf: 下调截图用时>800ms时的警告等级 2024-03-13 17:08:19 +08:00
status102
f9599282f9 fix: InfrastTrainingOperatorAndSkill.OcrReplace
[skip changelog]
2024-03-13 14:57:18 +08:00
status102
ba449e89f2 fix: 基建专精干员名切割错误 2024-03-13 10:01:06 +08:00
Constrat
b57a27fe2e chore: Auto Update Game Resources - 2024-03-12
[skip changelog]
2024-03-12 21:42:51 +00:00
Constrat
19fb2b0583 fix: file extension change for template
[skip changelog]
2024-03-12 22:23:36 +01:00
Constrat
2bd4bd58bc chore: safe house task IS4
[skip ci] [skip changelog]
2024-03-12 22:20:31 +01:00
Constrat
becd5e1a69 fix: IS4 EN floor detection workaround + continue text algorithm 2024-03-12 22:17:44 +01:00
Constrat
b46a6e5f82 chore(tools): ignore json translations
[skip changelog]
2024-03-12 22:16:44 +01:00
Constrat
374861e561 chore: IS4 EN templates
[skip changelog]
2024-03-12 22:16:24 +01:00
Constrat
50c804c7e0 fix: IS formation first operator misplace 2024-03-12 21:44:23 +01:00
Constrat
e4ce8009ad feat: added foldartal totems to resource updater 2024-03-12 21:43:36 +01:00
Constrat
60482d7dea chore: IS4 EN templates
[skip changelog]
2024-03-12 19:33:19 +01:00
Constrat
36b7cc180e chore(tools): ignoring templates Overseas 2024-03-12 19:32:50 +01:00
Constrat
d79a9b92ed chore: IS4 templates
[skip ci] [skip changelog]
2024-03-12 18:46:07 +01:00
status102
f90fc74916 fix: 修复#7848 2024-03-12 22:50:14 +08:00
status102
ce37e751de perf: 调整CopilotViewModel.AddLog
[skip changlog]
2024-03-12 18:07:09 +08:00
status102
c6ee063189 fix: 肉鸽投资无法禁用 2024-03-12 15:39:18 +08:00
status102
529e053edd perf: Toast改为win10API 2024-03-12 10:00:55 +08:00
Constrat
714015bb8e fix: increased roi for RoguelikeFormationOcr EN (fix long names) 2024-03-11 23:12:49 +01:00
Constrat
bda25e549f fix: ocr for trader shopping 2024-03-11 22:50:19 +01:00
Constrat
b5b30f9539 style: fix style typos
[skip ci] [skip changelog]
2024-03-11 16:53:24 +01:00
Constrat
58a2dc831c perf: reduced IS stages according to new Auto Updater EN
[skip changelog]
2024-03-11 16:51:49 +01:00
Constrat
5c0f903f43 perf: reduced Resource Auto Updater duplicate IS stages 2024-03-11 16:51:12 +01:00
Constrat
30cd2fc487 perf: redundant regex removed for EN 2024-03-11 16:50:48 +01:00
status102
fc2449feeb fix: 修修
[skip changelog]
2024-03-11 19:34:17 +08:00
status102
2725b30841 perf: 基建专精干员名增加ocrReplace 2024-03-11 19:23:05 +08:00
uye
8274997c45 style: typo 2024-03-11 17:50:27 +08:00
Manicsteiner
f89eca7794 perf: 水月肉鸽添加缺失干员用法 (#8574) 2024-03-11 17:43:53 +08:00
uye
2dee06a0f0 perf: 训练室干员名识别优化
fix #8352
fix #8566
2024-03-11 11:28:54 +08:00
status102
5153082de5 perf: TemplDecOCRer的RegionOCRer引入use_raw 2024-03-11 10:50:17 +08:00
Constrat
177f72fd01 chore: B-> 8 for NumberOcrReplace
[skip changelog]
2024-03-10 22:50:04 +01:00
Constrat
dd2e09f7ed chore: Auto Update Game Resources - 2024-03-10
[skip changelog]
2024-03-10 20:44:15 +00:00
David
47f93548fc Feat: IS4 - YostarEN early adaptation (#8524)
* chore: new IS4EN templates

* perf: optimized regex for trader shopping

* chore: encounter regex

* chore: encounters regex

* fix: regexed spaces between encounters.

* perf: RoguelikeTraderShoppingOcr regex reduction

* chore: floors strategies

* i18n: IS4 translations
[skip ci]

* fix: missing transl
[skip ci]

* chore: more templates

* fix: encounter not recognized correctly

* chore: templates

* fix: attempt to fix wrong level recognition in IS
2024-03-10 20:37:48 +00:00
status102
b318c4a878 docs: 调整账号切换功能说明 2024-03-10 23:15:23 +08:00
Constrat
9f3ff3c07a chore: Auto Update Game Resources - 2024-03-10
[skip changelog]
2024-03-10 14:42:33 +00:00
Constrat
482bfb7f39 style(tools): Resource updater
#8499 #8500
[skip changelog]
2024-03-10 15:35:29 +01:00
Constrat
e26e1f7f38 fix: missing trader item 2024-03-10 15:35:29 +01:00
HX3N
11f0aa4e2e chore: YoStarKR update tasks (#8568)
Update tasks.json
2024-03-10 13:00:45 +00:00
Lancarus
4915ef3276 perf: 肉鸽适配新干员用法 (#8565) 2024-03-10 19:51:01 +08:00
status102
60440f262b docs: 调整账号切换功能说明 2024-03-10 17:57:07 +08:00
Constrat
2992a1a02e chore(tools): ignore templates
[skip changelog]
2024-03-09 22:52:20 +01:00
HX3N
84b722ab23 chore: YoStarKR ROI for StartToVisit (#8558) 2024-03-09 20:59:46 +00:00
Hao Guan
b2c532e7aa chore: 锁定Xcode SDK版本 (#8533) 2024-03-10 04:06:55 +08:00
Manicsteiner
cdc15ee101 chore: YoStarJP ROI for StartToVisit, sami template StageFerociousPre… (#8555)
chore: YoStarJP ROI for StartToVisit, sami template StageFerociousPresageEnter
2024-03-09 16:55:06 +00:00
uye
56e545de3a fix: 蓝叠模拟器多开,在正确配置关键词时,两个MAA实例会指向同一个模拟器实例
fix #8547
2024-03-09 19:02:42 +08:00
Constrat
51e656ae8e chore: Auto Update Game Resources - 2024-03-09
[skip changelog]
2024-03-09 09:03:37 +00:00
status102
1c3d9be1b2 perf: 简化输出
[skip changelog]
2024-03-09 17:00:34 +08:00
Constrat
3e3c2450c8 fix: custom ROI for StartToVisit YostarEN
fix #8540
fix #8537
2024-03-09 09:45:45 +01:00
status102
dbb9e1c554 perf: FAQ文档增加截图耗时较长/过长说明,移除Wpf中的优化提示 2024-03-09 16:16:28 +08:00
Lancarus
1fd26107b9 perf: 密文板输入框支持全角分号 (#8545) 2024-03-09 15:58:07 +08:00
Lancarus
8054460c1a perf: 格式化#8539 (#8544) 2024-03-09 15:52:43 +08:00
uye
01ea6c00a9 feat: 萨米肉鸽增加凹远见密文板 (#8539) 2024-03-09 15:28:49 +08:00
status102
4361cb5ee3 perf: 减少不必要的变量赋值
[skip changelog]
2024-03-09 15:14:10 +08:00
status102
fa55db7e1e perf: 略微上调干员部署滑动
参照#7246
2024-03-09 15:14:10 +08:00
MistEO
94a69d74c1 chore: update clang-format 2024-03-09 15:06:15 +08:00
uye
581b95db0d fix: 「银淞」无法进入基建
fix #8541
2024-03-09 14:57:19 +08:00
Lancarus
18355621b9 perf: 肉鸽失败重试次数上限改为999 2024-03-09 12:29:16 +08:00
Lancarus
bf73e14937 feat: 萨米肉鸽增加凹远见密文板 2024-03-09 12:17:13 +08:00
uye
04b230cc8c Release v5.2.0-beta.2 (#8525) 2024-03-09 03:34:37 +08:00
github-actions[bot]
1ee4dd9f58 docs: Auto Update Changelogs of v5.2.0-beta.2 (#8526)
* docs: Auto Generate Changelog of Release v5.2.0-beta.2

* docs: Update CHANGELOG.md

* docs: changelog

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2024-03-09 03:34:23 +08:00
Constrat
6b5f836e22 perf(auto-updater): reduced IS trader items + auto space remover for KR 2024-03-08 20:16:52 +01:00
status102
f12323deeb fix: 修复肉鸽投资ocr几率出错 2024-03-08 19:37:47 +08:00
Rbqwow
97aa809072 docs: fix links&winget&rip wsa (#8485)
* docs: 修复损坏的超链接&使用winget安装运行库

* doc: rip wsa
2024-03-08 18:19:14 +08:00
Constrat
d9ca21913b perf: removed duplicate regex
[skip ci] [skip changelog]
2024-03-08 10:35:36 +01:00
uye
11c5419871 chore: 调整访问好友的模板图 2024-03-08 16:11:47 +08:00
Constrat
b4438d7a9f chore: Auto Update Game Resources - 2024-03-08
[skip changelog]
2024-03-08 08:03:50 +00:00
uye
486efee545 fix: 「围攻」部分透明度高的模板图片无法识别
fix #8507
2024-03-08 16:01:19 +08:00
Constrat
8a28f57ac0 perf: reduced items count in Auto Resource Updater 2024-03-08 08:54:30 +01:00
Constrat
fba373469d chore: Auto Update Game Resources - 2024-03-08
[skip changelog]
2024-03-08 07:25:20 +00:00
Manicsteiner
e997986102 chore: YoStarJP roguelike data remove duplicate and fixes (#8521) 2024-03-08 15:15:51 +08:00
zzyyyl
979e3af778 feat: 根据灰度二值化关卡名后再识别 (#7848)
feat: RegionOCRer 允许设置参数使 OCR 识别时的图片为二值化的;关卡名二值化后再识别
2024-03-08 08:59:10 +08:00
Constrat
33c6f06773 i18n: changed Sami theme name to reduce issues 2024-03-07 23:07:13 +01:00
Lemon-miaow
9da3312a22 feat: Templates for new GUI (Siege) and fix #8503 (#8510)
* templates for new GUI (Siege)

* templates for new GUI (Siege)

* change roi
2024-03-07 19:22:50 +01:00
Constrat
3d4923b78d chore: Auto Update Game Resources - 2024-03-07
[skip changelog]
2024-03-07 15:25:00 +00:00
HY
9c6ae6cd06 chore: 繁中服「愚人號」復刻活動導航 (#8505) 2024-03-07 16:10:43 +01:00
Constrat
dfbc147ffb chore: Auto Update Game Resources - 2024-03-07
[skip changelog]
2024-03-07 12:30:24 +00:00
uye
127803b3b5 feat: 水晶箭行动活动导航 2024-03-07 20:24:43 +08:00
HX3N
1f1f94b2cb chore: YoStarKR update tasks for Sami roguelike (#8495)
* chore: YoStarKR update tasks for Sami roguelike

chore: update tasks.json

chore: YoStarKR update tasks (NextLevel)

* chore: Add missing items and remove duplicates

* chore: run resource updater

executed the Resource Updater that was in #8493

* chore: tweak 解脱 and 解脱? regex
2024-03-07 10:14:40 +01:00
David
3412d57f2c feat: Visit Friends can be toggled off (#8488) 2024-03-07 16:58:42 +08:00
status102
14d8bc0f5d perf: null check
[skip changelog]
2024-03-07 16:27:31 +08:00
Constrat
26b0589e0b chore: Auto Update Game Resources - 2024-03-07
[skip changelog]
2024-03-07 08:24:29 +00:00
Constrat
8b4c73e01a chore: Auto Update Game Resources - 2024-03-07
[skip changelog]
2024-03-07 04:02:58 +00:00
Constrat
1246f2f582 chore: Auto Update Game Resources - 2024-03-07
[skip changelog]
2024-03-07 02:23:48 +00:00
status102
90be17900d Revert "perf: 优化仓库识别速度 (#8113)"
This reverts commit 7df2060c3c.
2024-03-06 22:13:52 +08:00
status102
51d637659c perf: 移除不可达代码
[skip changelog]
2024-03-06 22:10:59 +08:00
status102
c217eaefc0 perf(WpfGui): 指定Wpf目标操作系统版本为win10 (#8409)
* perf(WpfGui): 指定Wpf目标操作系统版本为win10

* docs: 补充windows10 1809相关说明

* Revert "docs: 补充windows10 1809相关说明"

This reverts commit 97d8cb8b73.
2024-03-06 18:07:42 +08:00
Manicsteiner
d3245dcb86 chore: YoStarJP Sami rogue templates and tasks (#8486)
* chore: YoStarJP Sami rogue templates and tasks

* chore: add RoguelikeTempRecruitFlag.png

* chore: add remained templates
2024-03-06 08:31:54 +01:00
status102
589d5962b9 perf: null check
[skip changelog]
2024-03-06 14:33:32 +08:00
status102
2e1d34e43c perf: null check
[skip changelog]
2024-03-06 12:36:01 +08:00
Constrat
0e9151266a chor(tools): added more ignore templates
[skip ci] [skip changelog]
2024-03-05 22:44:57 +01:00
Constrat
0dfba56443 chore(tools): removed sami from ignore list
[skip changelog]
[skip ci]
2024-03-05 22:31:18 +01:00
Constrat
f49427e1dc fix: greyy alter ocr in battle
[skip ci]
2024-03-05 22:10:32 +01:00
Constrat
9160d6d912 chore: Auto Update Game Resources - 2024-03-05
[skip changelog]
2024-03-05 17:42:40 +00:00
Constrat
5abe552d56 fix: DV navigation
[skip ci] [skip navigation]
2024-03-05 18:34:44 +01:00
Constrat
d3ff599ab4 fix: "Retrospection" needed for "Rerun" events
[skip ci]
2024-03-05 18:31:03 +01:00
Constrat
3bbd61aedf Revert "feat: VisitFriends can be toggled off"
This reverts commit 37d92becca.
2024-03-05 18:03:41 +01:00
Constrat
ea77fcce91 chore: Auto Update Game Resources - 2024-03-05
[skip changelog]
2024-03-05 17:03:26 +00:00
Constrat
37d92becca feat: VisitFriends can be toggled off 2024-03-05 18:02:28 +01:00
Clock
1f0b06b165 chore: update template images (YostarKR) 2024-03-06 01:55:39 +09:00
Clock
845a9995aa chore: add missing resource for YoStarKR 2024-03-06 01:16:51 +09:00
Clock
ad87ab956b chore: update YostarKR resources 2024-03-06 01:06:22 +09:00
uye
aef7a82007 chore: 添加截图过长解决方案 2024-03-06 00:01:04 +08:00
HX3N
a3d7745954 chore: YoStarKR Sami roguelike templates and tasks (#8487) 2024-03-06 00:50:09 +09:00
Constrat
d4dc518774 chore: Auto Update Game Resources - 2024-03-05
[skip changelog]
2024-03-05 11:22:34 +00:00
uye
9203b3d9c3 Release v5.2.0-beta.1 (#8483) 2024-03-05 16:33:46 +08:00
github-actions[bot]
925bdf2a81 docs: Auto Update Changelogs of v5.2.0-beta.1 (#8484)
* docs: Auto Generate Changelog of Release v5.2.0-beta.1

* docs: changelog

* docs: changelog

* docs: changelog

* docs: changelog

* docs: Update CHANGELOG.md

---------

Co-authored-by: ABA2396 <ABA2396@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2024-03-05 16:32:57 +08:00
Constrat
0db0149b01 chore: Auto Update Game Resources - 2024-03-05
[skip changelog]
2024-03-05 07:02:33 +00:00
Clock
0dd832526c chore: Update ko-kr.xaml 2024-03-04 23:12:28 +09:00
status102
d393a227ea perf: 战斗列表添加作业时自动滚动到添加位置 (#8455)
perf: 战斗列表添加作业时自动滚动到添加位置
2024-03-04 18:38:35 +08:00
Constrat
a9b580da1e chore: DV navigation
d65fd35341
2024-03-04 11:20:51 +01:00
Constrat
543964929b chore: Auto Update Game Resources - 2024-03-04
[skip changelog]
2024-03-04 09:31:55 +00:00
status102
55d10017a1 perf: 使用PropertyChangedEventArgs.NewStartingIndex代替固定滚动到最后一个ListItem 2024-03-04 17:09:00 +08:00
Manicsteiner
87d3993226 chore: YoStarJP task for 翠玉の夢 and sami rogue (#8475) 2024-03-04 16:52:31 +08:00
Manicsteiner
c44d9132ad perf: 肉鸽开局奖励template删除文字部分 (#7991)
perf: standardized rewards for all clients, add more rewards of mizuki rogue
2024-03-04 16:48:45 +08:00
status102
dcbca0c672 perf(WpfGui): 统一碎石、吃药最大值为999
[skip changelog]
2024-03-04 16:34:07 +08:00
status102
c555bd5021 docs: 更正同时使用理智药+碎石的短路说明 (#8452)
docs: 更正同时使用理智药+碎石的短路说明
2024-03-04 14:42:25 +08:00
Constrat
dbddb55595 chore: Auto Update Game Resources - 2024-03-04
[skip changelog]
2024-03-04 04:06:27 +00:00
Fryze
9aa361cb6e chore: update resources for YostarKR (#8450) 2024-03-03 18:37:52 +01:00
Lancarus
94a8b7dcb1 perf: 增加肉鸽商店中招募券的购买优先度 (#8469)
* perf: 增加肉鸽商店中招募券的购买优先度
2024-03-03 22:19:49 +08:00
Rbqwow
3aa1261a34 doc: 合并还没冲突的冲突&重新写个例子 (#9) 2024-03-03 21:32:30 +08:00
Lancarus
32632402d3 fix: 傀影肉鸽选项造成的卡死 (#8468) 2024-03-03 20:10:50 +08:00
status102
26a1734e7a perf: 战斗列表添加作业时自动滚动到底部 2024-03-03 15:18:03 +08:00
status102
31c23c44e7 refactor: 调整SettingsViewModel的init (#8467)
[skip changelog]
2024-03-03 14:31:28 +08:00
status102
6c65842a9c refactor: 调整init
[skip changelog]
2024-03-03 14:02:15 +08:00
status102
c5370d1f1c fix: 已勾选理智药时再勾选碎石,无法自动9999
[skip changelog]
2024-03-03 11:47:54 +08:00
status102
2c72213108 fix: 修复取消勾选理智药时错误调整至9999 2024-03-03 10:44:42 +08:00
uye
12d1cf2ea6 perf: 抽卡风险提示默认选择取消 2024-03-03 03:05:35 +08:00
uye
f7270a349e fix: 生息演算卡在战斗结算
fix #8404
2024-03-03 02:00:16 +08:00
Lancarus
e61783dfec fix: 助战勾选框不出现bug (#8459) 2024-03-03 01:42:11 +08:00
status102
88c9054a91 fix: revert some change
[skip changelog]
2024-03-02 19:51:46 +08:00
Constrat
e8b1a4a65a style: tweaked comment description
[skip ci] [skip changelog]
2024-03-02 12:00:37 +01:00
Constrat
035ff6c926 style(i18n): spacing for reconnection gui log
[skip ci][skip changelog]
2024-03-02 11:08:08 +01:00
status102
8b5fb20957 docs: 更正同时使用理智药+碎石的短路说明 2024-03-02 16:14:49 +08:00
status102
e6367fd2a7 perf(WpfGui): 碎石时锁定理智药使用量为9999 (#8415)
perf(WpfGui): 碎石时锁定理智药使用量为9999
2024-03-02 13:50:05 +08:00
Lancarus
f725860acf fix: 修复肉鸽重复部署一个干员后不会开启技能 (#8447) 2024-03-02 13:27:03 +08:00
Constrat
4319a0f4ef chore: Auto Update Game Resources - 2024-03-02
[skip changelog]
2024-03-02 05:25:09 +00:00
status102
858de4ef40 perf: reduce warning
[skip changelog]
2024-03-02 09:13:36 +08:00
status102
6bcb238f9a perf(WpfGui): 运行期允许滚动战斗列表
fix #8421
2024-03-02 08:43:19 +08:00
Constrat
690c99c4e3 fix: updated YostarEN infrast templates
fix #8439
2024-03-01 20:19:35 +01:00
FreeSky-X
7df2060c3c perf: 优化仓库识别速度 (#8113)
* perf:仓库识别

* perf:仓储识别

* fix:depot遗漏材料

* fix:ci集成

* fix:定位得分低

* feat: update analyze_all_items, format code

---------

Co-authored-by: Horror Proton <107091537+horror-proton@users.noreply.github.com>
2024-03-01 21:29:41 +08:00
Manicsteiner
8157dedc22 i18n: update ja-jp.xaml for sami (#8435) 2024-02-29 20:45:49 +01:00
HX3N
8f4e63d633 i18n: updated ko-kr.xaml for 探索者的银凇止境 (#8433)
i18n: some change
2024-02-29 20:45:40 +01:00
Manicsteiner
531c65ed7c perf: 肉鸽开局干员 隐藏未实装干员 (#8436) 2024-02-29 20:42:50 +01:00
Manicsteiner
f3d6358dd7 docs: update glossary (#8437) 2024-02-29 20:13:54 +01:00
Constrat
9b2da02bdd chore(tools): updated ignore templates list
[skip ci] [skip changelog]
2024-02-28 22:13:14 +01:00
Lancarus
999f9087b5 feat: 刷开局模式增加萨米肉鸽生活队凹密文板 (#8408)
* feat: 增加萨米肉鸽凹密文板UI,优化肉鸽部分UI的显示

* feat: 凹开局板子相关逻辑

* perf: 优化相关逻辑

* perf: 传参使用array代替string

* style: format

---------

Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2024-02-28 13:01:15 +08:00
Manicsteiner
400dc9f42f chore: YoStarJP modified template image (#8423) 2024-02-28 12:15:52 +08:00
HX3N
5397727f95 chore: YoStarKR modified ocrReplace and template image (#8418)
chore: YoStarKR modified ocrReplace and template image due to UI Changes
2024-02-27 19:58:08 +01:00
Constrat
437ae363ae chore: updated Friends Terminal templates for EN after 27-02-2024 update
[skip ci]
2024-02-27 19:56:32 +01:00
Constrat
129cff1ac2 i18n: EN tweak raid -> challenge
[skip ci] [skip changelog]
2024-02-27 19:25:23 +01:00
Constrat
637b8be32c chore: Auto Update Game Resources - 2024-02-27
[skip changelog]
2024-02-27 12:03:21 +00:00
status102
3c7f0d8e00 perf: 减少部分传参
[skip changelog]
2024-02-27 20:00:29 +08:00
Constrat
eca4f95612 chore: Auto Update Game Resources - 2024-02-27
[skip changelog]
2024-02-27 11:23:26 +00:00
uye
d0392b70c7 chore: await Async 2024-02-27 11:19:44 +08:00
status102
5581776313 perf(WpfGui): 碎石时锁定理智药使用量为9999 2024-02-27 11:09:01 +08:00
Constrat
8a7cf9ee56 chore: Auto Update Game Resources - 2024-02-27
[skip changelog]
2024-02-27 03:03:46 +00:00
uye
1ec93236f6 docs: 更新&重构文档 (#8316)
~~怎么就发版了~~
把除了jp以外所有的`<br>`全都改成了双空格或者回车 jp在另一个专门写jp的pr ~~md就好好去用md的换行啊kora!~~
更新所有的一图流链接 ~~甚至改了个maacore注释结果一直触发action对不起github~~
添加win7用net8的缓解措施
添加手机助手会占用adb
改了一些小东西 大概 具体看comment
加回了mumu6的文档 但是标记停更
同步zh的readme和根目录下的的readme
修改了一些文风 大概更贴近“官方文档”这种? 哪里不对劲可以说说(
2024-02-27 10:33:27 +08:00
Manicsteiner
55f5c5508e docs: refactor JP docs (#8298)
* docs: refactor JP docs

* docs: JP docs update part2

* docs: JP docs update part3

* docs: JP docs update part4

* docs: JP docs update part5

* docs: JP docs update part6

* docs: JPdocs update part7

* docs: JPdocs update part8

* docs: JPdocs update part8

* docs: JPdocs update part10

* docs: JPdocs update part11

* docs: JPdocs update part12
2024-02-27 10:19:07 +08:00
uye
af71f497ec fix: [台服] 自定義基建換班辨認 麒麟R夜刀 失敗
fix #7698
2024-02-27 10:15:21 +08:00
status102
436eabcb76 perf: 识别不到干员的重试次数下调为1 2024-02-26 19:38:20 +08:00
status102
4ec8c32a9d fix: 回调自动编队时识别不到干员的重试次数
[skip changelog]
2024-02-26 19:17:41 +08:00
status102
55345e6efa fix: 修复使用干员组切换技能用法失效 (#8410)
fix: 修复使用干员组切换技能用法失效
2024-02-26 08:05:13 +08:00
status102
61fbb12099 perf(MaaCore): 移除自动战斗设置参数时不必要的警告输出 2024-02-25 22:45:11 +08:00
SmilingPie
1079844c22 perf: 优化自动编队逻辑 (#8393)
现在当识别到缺失的干员时会记录并继续编队,全部编队完成后一并报告并退出
并将自动编队重试次数调为0(不重试)
TODO:当仅缺失一个干员时自动借助战
2024-02-25 21:50:55 +08:00
status102
931b11339c fix: 修复使用干员组切换技能用法失效 2024-02-25 20:58:51 +08:00
status102
6f29561f57 perf: 调整基建专精输出文本 2024-02-25 20:10:44 +08:00
status102
172dfa62a4 perf: 移除肉鸽投资相关的无用代码 2024-02-25 18:28:38 +08:00
status102
cf15e7d65b perf: 优化自动战斗-干员追加处理正则及jarry初始化
[skip changelog]
2024-02-25 16:48:39 +08:00
status102
0ee6079edc perf(WpfGui): 肉鸽高级设置-只凹精二,不可用时隐藏 2024-02-25 16:12:59 +08:00
Horror Proton
0478eb3be8 fix: update yituliu report url
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/8332
2024-02-25 11:11:35 +08:00
MistEO
3fdc1d2011 chore: update meojson to v4.0.1 2024-02-25 01:10:19 +08:00
MistEO
3ee30f23ff fix: wrong std::move of meojson 2024-02-25 00:02:27 +08:00
status102
50f6813de8 perf: asst.log中的输出使用相对路径取代绝对路径 (#8385)
* perf: AbstractConfig::Load改为输出相对路径

* perf: 输出相对路径
2024-02-24 22:31:19 +08:00
MistEO
c8cc39515a fix: build error from meojson updates 2024-02-24 22:25:19 +08:00
MistEO
bc4313e9e2 chore: update meojson to v4.0.0 2024-02-24 22:25:19 +08:00
status102
33dac71960 fix: 修复引航者试炼S4地图TN-1、TN-3的部分数据错误 2024-02-24 20:31:40 +08:00
HX3N
9de91e8709 chore: update operator.md (#8403)
add kr operator
[skip changelog]
2024-02-24 12:32:39 +01:00
Lancarus
84f34ebdb2 perf: 优化傀影肉鸽部分关卡策略 (#8401) 2024-02-24 19:00:04 +08:00
status102
1ba2c557d5 chore: 触发版本更新
[skip changelog]
2024-02-24 18:13:32 +08:00
status102
647cf6d656 fix: 修复引航者试炼S4地图TN-2、TN-4的部分数据错误 2024-02-24 18:00:05 +08:00
status102
501003b108 fix: 干员冷却RectMove 2024-02-24 16:17:51 +08:00
Wallsman
9c94dfea97 Update operators.md
Update 「樹影にて眠る」
2024-02-24 14:56:42 +09:00
status102
53b644b688 fix: 修复肉鸽切换模式时,投资可能在禁用的情况下显示已启用
fix #8396
2024-02-24 12:14:06 +08:00
status102
1f2a6ca7eb perf: 结束后动作仅一次在执行后不恢复为无动作,而是上一次的选择项 (#8387)
perf: 结束后动作`仅一次`在执行后不恢复为`无动作`,而是上一次的选择项
2024-02-24 10:57:46 +08:00
status102
762e433036 perf: 将肉鸽开局干员组和开局干员移动至常规设置,未勾选使用助战时隐藏可选非好友助战 (#8389) 2024-02-24 01:16:50 +08:00
status102
3d85b7a351 perf(WpfGui): 当自动战斗选择不支持的关卡时,输出作业中的关卡名 2024-02-23 17:41:55 +08:00
status102
b40a5ec180 perf: 结束后动作仅一次在执行后不恢复为无动作,而是上一次的选择项 2024-02-23 10:58:41 +08:00
Constrat
f92f2f729f fix: b1d62d4d29 2024-02-22 17:46:50 +01:00
Constrat
b1d62d4d29 i18n: ContinueTraining EN translation
[skip changelog]
2024-02-22 16:20:54 +01:00
status102
4067c9d369 chore: 领航者S4地图 2024-02-22 23:14:26 +08:00
uye
ac3dcd9175 chore: 删除continue 2024-02-22 20:30:15 +08:00
uye
7fe35dfa24 fix: 肉鸽闪退 2024-02-22 20:26:11 +08:00
Constrat
9867a46106 chore: Auto Update Game Resources - 2024-02-22
[skip changelog]
2024-02-22 10:25:53 +00:00
Rbqwow
3001fc30ba doc: 于是我加回了mumu6 2024-02-22 18:23:36 +08:00
Rbqwow
4e02c82efd docs: review update 2024-02-22 18:17:32 +08:00
Constrat
573a16e143 chore: Auto Update Game Resources - 2024-02-22
[skip changelog]
2024-02-22 06:43:09 +00:00
uye
7e97aadb5f feat: 支持肉鸽事件choice_require解析 (#7904)
- fix #5442 
- fix #7789 
- fix #7800 
- fix #7900 
- fix #7938
- fix #7943
2024-02-22 14:35:06 +08:00
Constrat
d6a4c9df20 chore: Auto Update Game Resources - 2024-02-21
[skip changelog]
2024-02-21 20:24:16 +00:00
Horror Proton
6f00c2db39 fix: fix ocr replace [skip changelog] 2024-02-21 21:55:26 +08:00
Horror Proton
078feead6f fix: fix oper rect in InfrastOperImageAnalyzer
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/8377
2024-02-21 18:23:28 +08:00
Horror Proton
396460fe7e fix: update template DepotEnterMistCity
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/8344
2024-02-21 00:57:10 +08:00
aur3l14no
d5cac654cb chore: 增加连接配置项 CompatPOSIXShellWithoutScreencapErr (#8359)
增加连接配置项 CompatPOSIXShellWithoutScreencapErr

以支援 Linux + AMDGPU 的情形
2024-02-20 17:59:27 +08:00
Horror Proton
d3686d4262 fix: update ocr replace for 亚梅塔 and 「弦驚] 2024-02-20 17:26:59 +08:00
Horror Proton
18f572e0e3 fix: fix oper rect in InfrastOperImageAnalyzer
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/8362
2024-02-20 17:13:52 +08:00
Alisa
15b537b0e2 i18n: Translations update from MAA Weblate (#8339)
* Translated using Weblate (Japanese)

Currently translated at 99.4% (680 of 684 strings)

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translated using Weblate (Chinese (Traditional))

Currently translated at 99.6% (659 of 661 strings)

Translated using Weblate (Japanese)

Currently translated at 99.3% (657 of 661 strings)

Translated using Weblate (English (United States))

Currently translated at 99.3% (657 of 661 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 98.1% (649 of 661 strings)

Co-authored-by: Manicsteiner <manicsteiner@outlook.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: drunkenQCat <songjh123123@outlook.com>
Co-authored-by: uye <2396806385@qq.com>
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/en_US/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/ja/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/zh_Hans/
Translate-URL: https://weblate.maa-org.net/projects/maa-assistant-arknights/maa-wpf-gui/zh_Hant/
Translation: MaaAssistantArknights/MAA WPF Gui

* i18n: en typos

* style: format

---------

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Manicsteiner <manicsteiner@outlook.com>
Co-authored-by: drunkenQCat <songjh123123@outlook.com>
Co-authored-by: uye <2396806385@qq.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2024-02-20 11:19:57 +08:00
Sherkey
58e1788072 fix: 修复未识别到幸运墙时报错的问题 2024-02-19 21:05:39 +08:00
status102
ed7da40e60 perf: 版本字符串中文资源优化对齐 2024-02-19 15:48:51 +08:00
Rbqwow
dd5e9519a9 docs: 把被git顶丢的改加来 2024-02-18 23:31:19 +08:00
Rbqwow
7dce5b6c25 doc: 加个停更版本号 2024-02-18 23:19:13 +08:00
status102
1a65cd840b fix: 修复部分角色冷却识别错误 (#8366)
fix: 修复部分角色冷却识别错误
2024-02-18 22:57:24 +08:00
status102
e6bf3c4605 chore: 待部署区识别debug时m_image_draw增加冷却中文本 2024-02-18 22:44:31 +08:00
status102
39693497ea fix: 修复部分角色冷却识别错误 2024-02-18 22:41:48 +08:00
status102
65e96f7313 docs: 用户手册补充备选关卡相关 (#8355)
* docs: 用户手册补充备选关卡相关

* style: format
2024-02-18 20:31:44 +08:00
Manicsteiner
88aa5cc9e9 chore: YoStarJP training template (#8351) 2024-02-18 12:42:56 +01:00
status102
4f55990e8f fix: typo 2024-02-18 12:01:27 +08:00
status102
d9486f2432 perf: fix some info from visual studio 2024-02-18 09:48:34 +08:00
status102
e8e9937c43 fix: 战斗列表突袭标志点击后暂时不可见 2024-02-18 09:13:10 +08:00
status102
4a464c14ec fix: 自动战斗-战斗列表的突袭关描述从Adverse修正为Raid (#8082)
* fix: 修复WpfGui中对突袭关的错误描述
2024-02-17 19:28:31 +08:00
Constrat
f4df22907a chore: Auto Update Game Resources - 2024-02-16
[skip changelog]
2024-02-16 11:03:14 +00:00
status102
4fb9aa2c8b perf: 如果待部署区未识别干员全部为冷却中,则跳过暂停识别 (#8337)
perf: 如果待部署区未识别干员全部为冷却中,则跳过暂停识别
2024-02-16 17:21:12 +08:00
status102
6c79ff49ee fix: 修复部分情况下待部署区干员无法正确识别为冷却中 (#8336)
* fix: 修复部分情况下待部署区干员无法正确识别为冷却中

* fix: remove test code
2024-02-15 19:42:35 +08:00
status102
6d8ca0f3ae perf: 如果待部署区未识别干员全部为冷却中,则跳过暂停识别 2024-02-15 16:15:54 +08:00
Rbqwow
8e69781d5e docs: 修细节&更新 2024-02-14 23:18:06 +08:00
Rbqwow
627fd12893 doc: 接着修超链接&合并修改 2024-02-14 21:55:42 +08:00
Rbqwow
c704e2aa70 doc: readme超链接改错了 改回来 2024-02-14 21:52:28 +08:00
Rbqwow
f3eef61341 docs: 修复所有的一图流失效链接&同步两个readme 2024-02-14 21:43:00 +08:00
Rbqwow
e346b24d33 docs: 改掉en-us的<br> 2024-02-14 21:26:29 +08:00
Rbqwow
95b3bea4be docs: 改掉ko-kr的<br>和bug 2024-02-14 21:24:41 +08:00
Rbqwow
294cfee63f docs: 改掉zh-tw的<br> 2024-02-14 21:19:25 +08:00
Rbqwow
05625c3f5e docs: xjb改点细节 2024-02-14 21:11:16 +08:00
Rbqwow
7686c29a10 docs: 接着改<br> 2024-02-14 20:54:37 +08:00
Rbqwow
d42722b127 docs: 改掉所有能改的<br> 2024-02-14 20:49:09 +08:00
Rbqwow
04c921c873 doc: 改掉readme所有的<br> 2024-02-14 20:21:45 +08:00
Rbqwow
55a9db2218 doc: 改掉readme中多余的空行 2024-02-14 20:18:50 +08:00
Rbqwow
3ac0a1d1d4 chore: 改回去! 2024-02-14 20:17:29 +08:00
Rbqwow
60ad3e1f7c doc: 添加关闭手机助手 2024-02-14 20:16:35 +08:00
Rbqwow
7a88dbb780 doc: 改两个字 2024-02-12 23:38:57 +08:00
Rbqwow
5dc39561e3 doc: 添加win7缓解措施 2024-02-12 22:19:42 +08:00
SherkeyXD
3d11713555 refactor: 初步重构 choice_require 结构 2024-02-05 16:02:31 +08:00
zzyyyl
a4024f19c5 perf: 优化代码 2024-02-05 16:02:31 +08:00
zzyyyl
be34b07274 perf: 将实现移入 .cpp 并稍作优化 2024-02-05 16:02:31 +08:00
Horror Proton
6365c70196 fix: fix task name of SpecialValRecognition, etc 2024-02-05 16:02:31 +08:00
uye
1a99d4d95d fix: 抗干扰值字段名错误 2024-02-05 16:02:31 +08:00
uye
b71168e601 style: 调整返回格式 2024-02-05 16:02:31 +08:00
uye
a72dfbee70 fix: typo 2024-02-05 16:02:31 +08:00
uye
6bf3619d66 fix: requirement.chaos_level.type改为枚举 2024-02-05 16:02:31 +08:00
uye
b725c3aa72 chore: 循环中判断是否点击了停止 2024-02-05 16:02:31 +08:00
uye
ac4d249b35 chore: 识别到hp的时候从下往上点 2024-02-05 16:02:31 +08:00
uye
167991fae4 fix: typo 2024-02-05 16:02:31 +08:00
uye
8e8378583a feat: 添加hp识别判断是否成功点击 2024-02-05 16:02:31 +08:00
uye
808c10446d chore: use utils::chars_to_number<int, true> 2024-02-05 16:02:31 +08:00
uye
6cc215e552 chore: "Sami" -> RoguelikeTheme::Sami
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2024-02-05 16:02:31 +08:00
uye
e876017275 chore: ChaosLevel支持字符串类型的value 2024-02-05 16:02:31 +08:00
uye
6e5aed1317 chore: choice_require添加choose属性 2024-02-05 16:02:31 +08:00
uye
eb0838a485 feat: 支持肉鸽事件choice_require解析 2024-02-05 16:02:31 +08:00
1702 changed files with 470509 additions and 183203 deletions

View File

@@ -1,35 +1,45 @@
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# for clang-format 17.0.1
Language: Json
ColumnLimit: 1000
IndentWidth: 4
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
BasedOnStyle: 'WebKit'
# AccessModifierOffset: 2
AlignAfterOpenBracket: 'AlwaysBreak'
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: None
# AlignConsecutiveShortCaseStatements: None
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
AlignTrailingComments:
Kind: Always
OverEmptyLines: 1
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
# AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
# AttributeMacros:
# - __pragma
# - _Pragma
# - __attribute__
# - __declspec
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: After
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
@@ -37,159 +47,147 @@ BraceWrapping:
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
# AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: false
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# BracedInitializerIndentWidth: 4
BreakAfterAttributes: Never
BreakAfterJavaFieldAnnotations: true
BreakArrays: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeConceptDeclarations: Always
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Leave
ColumnLimit: 100
# CommentPragmas: '^ MEO pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: BinPack
BasedOnStyle: ''
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: true
# ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
# ForEachMacros:
# - foreach
# - Q_FOREACH
# - BOOST_FOREACH
# IfMacros:
# - 'KJ_IF_MAYBE'
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
# IncludeCategories:
# IncludeIsMainRegex:
# IncludeIsMainSourceRegex:
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: false
IndentPPDirectives: None
IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
IndentWrappedFunctionNames: true
InsertBraces: true
InsertNewlineAtEOF: true
InsertTrailingCommas: Wrapped
IntegerLiteralSeparator:
Binary: 4
BinaryMinDigits: 9
Decimal: 3
DecimalMinDigits: 7
Hex: -1
# JavaImportGroups:
# JavaScriptQuotes:
# JavaScriptWrapImports:
KeepEmptyLinesAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
# LineEnding: LF
# MacroBlockBegin: "MAA.*_NS_BEGIN$"
# MacroBlockEnd: "MAA.*_NS_END$"
# Macros:
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000
PenaltyIndentedWhitespace: 0
NamespaceIndentation: None
# NamespaceMacros:
# ObjCBinPackProtocolList:
# ObjCBlockIndentWidth:
# ObjCBreakBeforeNestedBlockParam:
# ObjCSpaceAfterProperty:
# ObjCSpaceBeforeProtocolList:
PackConstructorInitializers: Never
# PenaltyBreakAssignment:
# PenaltyBreakBeforeFirstCallParameter:
# PenaltyBreakComment:
# PenaltyBreakFirstLessLess:
# PenaltyBreakOpenParenthesis:
# PenaltyBreakTemplateDeclaration:
# PenaltyExcessCharacter:
# PenaltyIndentedWhitespace:
# PenaltyReturnTypeOnItsOwnLine:
PointerAlignment: Left
PPIndentWidth: -1
ReferenceAlignment: Pointer
# QualifierAlignment: Custom
# QualifierOrder:
# - inline
# - static
# - const
# - constexpr
# - type
ReferenceAlignment: Left
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 50
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 1000
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
# SortJavaStaticImport:
SortUsingDeclarations: Lexicographic
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: true
AfterRequiresInExpression: true
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
# SpaceBeforeParensOptions:
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInParens: Never
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: c++20
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
# StatementAttributeLikeMacros:
# StatementMacros:
TabWidth: 4
UseCRLF: false
# TypeNames:
# TypenameMacros:
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
# VerilogBreakBetweenInstancePorts:
# WhitespaceSensitiveMacros:

View File

@@ -10,72 +10,3 @@ end_of_line = lf
[*.json]
indent_size = 4
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}]
indent_size = 4
# Visual C++ Code Style settings
cpp_generate_documentation_comments = xml
# Visual C++ Formatting settings
cpp_indent_braces = false
cpp_indent_multi_line_relative_to = innermost_parenthesis
cpp_indent_within_parentheses = indent
cpp_indent_preserve_within_parentheses = true
cpp_indent_case_contents = true
cpp_indent_case_labels = false
cpp_indent_case_contents_when_block = false
cpp_indent_lambda_braces_when_parameter = true
cpp_indent_goto_labels = one_left
cpp_indent_preprocessor = leftmost_column
cpp_indent_access_specifiers = false
cpp_indent_namespace_contents = true
cpp_indent_preserve_comments = false
cpp_new_line_before_open_brace_namespace = new_line
cpp_new_line_before_open_brace_type = new_line
cpp_new_line_before_open_brace_function = new_line
cpp_new_line_before_open_brace_block = same_line
cpp_new_line_before_open_brace_lambda = same_line
cpp_new_line_scope_braces_on_separate_lines = false
cpp_new_line_close_brace_same_line_empty_type = false
cpp_new_line_close_brace_same_line_empty_function = false
cpp_new_line_before_catch = true
cpp_new_line_before_else = true
cpp_new_line_before_while_in_do_while = false
cpp_space_before_function_open_parenthesis = remove
cpp_space_within_parameter_list_parentheses = false
cpp_space_between_empty_parameter_list_parentheses = false
cpp_space_after_keywords_in_control_flow_statements = true
cpp_space_within_control_flow_statement_parentheses = false
cpp_space_before_lambda_open_parenthesis = false
cpp_space_within_cast_parentheses = false
cpp_space_after_cast_close_parenthesis = false
cpp_space_within_expression_parentheses = false
cpp_space_before_block_open_brace = true
cpp_space_between_empty_braces = false
cpp_space_before_initializer_list_open_brace = false
cpp_space_within_initializer_list_braces = true
cpp_space_preserve_in_initializer_list = true
cpp_space_before_open_square_bracket = false
cpp_space_within_square_brackets = false
cpp_space_before_empty_square_brackets = false
cpp_space_between_empty_square_brackets = false
cpp_space_group_square_brackets = true
cpp_space_within_lambda_brackets = false
cpp_space_between_empty_lambda_brackets = false
cpp_space_before_comma = false
cpp_space_after_comma = true
cpp_space_remove_around_member_operators = true
cpp_space_before_inheritance_colon = true
cpp_space_before_constructor_colon = true
cpp_space_remove_before_semicolon = true
cpp_space_after_semicolon = false
cpp_space_remove_around_unary_operator = true
cpp_space_around_binary_operator = insert
cpp_space_around_assignment_operator = insert
cpp_space_pointer_reference_alignment = left
cpp_space_around_ternary_operator = insert
cpp_wrap_preserve_blocks = one_liners

View File

@@ -9,9 +9,9 @@ body:
options:
- label: 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
required: true
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
required: true
- label: 我已查看最新测试版本的更新内容,并未提及该 bug 已被修复的情况
- label: 我已查看最新测试版本的更新内容,并未提及该 Bug 已被修复的情况
required: true
- label: 我已检查了置顶议题pinned issue确认我的问题未被提及
required: true
@@ -27,7 +27,7 @@ body:
attributes:
label: Version
description: >-
请提供 MAA 版本。可在 MAA -> 设置 -> 软件更新中找到。(点击图标可复制)
请提供 MAA 版本。可在 MAA -> 设置 -> 软件更新中找到点击图标可复制)
placeholder: |
Resource Version:
UI Version:
@@ -39,7 +39,7 @@ body:
attributes:
label: 日志文件
description: |
**上传 `debug` 文件夹中的 `asst.log` 和 `gui.log` 日志文件,并说明问题出现的大致时间点**
**请在关闭MAA后上传 `debug` 文件夹中的 `asst.log` 和 `gui.log` 日志文件,并说明问题出现的大致时间点**
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
validations:
required: true

View File

@@ -7,9 +7,9 @@ body:
attributes:
label: 在提问之前...
options:
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
required: true
- label: 我基本确定这是一个新功能/建议,而不是遇到了 bug不确定的话请附上日志
- label: 我基本确定这是一个新功能/建议,而不是遇到了 Bug不确定的话请附上日志
required: true
- type: textarea
id: describe

View File

@@ -0,0 +1,81 @@
name: MuMu 截图增强反馈(使用中文)
description: 有关 MuMu 截图增强功能的集中反馈
labels: ['mumu api']
body:
- type: checkboxes
id: checks
attributes:
label: 在提问之前...
options:
- label: 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
required: true
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
required: true
- label: 我已检查了置顶议题Pinned Issue确认我的问题未被提及
required: true
- label: 我正在使用最新的 MAA 内测版本和最新的**官版** MuMu 模拟器
required: true
- label: 我已参考文档确定安装路径、实例编号、屏幕编号填写正确,并确认在关闭截图增强模式后问题消失
required: true
- label: 我未开启高帧率模式,且显存使用策略为“画面表现更好”
required: false
- label: 我正在使用后台保活功能,并确定该问题仅在开启后台保活时出现
required: false
- type: textarea
id: describe
attributes:
label: 问题描述
description: 描述问题时请尽可能详细
validations:
required: true
- type: textarea
id: version
attributes:
label: Version
description: >-
请提供 MAA 版本和 MuMu 版本。MAA 版本可在 MAA -> 设置 -> 软件更新中找到点击图标可复制。MuMu 版本可在右上角菜单按钮 -> 关于 MuMu 中找到。
placeholder: |
Resource Version:
UI Version:
Core Version:
MuMu 版本号:
validations:
required: true
- type: textarea
id: logs
attributes:
label: MAA 日志文件
description: |
**上传 `debug` 文件夹中的 `asst.log` 和 `gui.log` 日志文件,并说明问题出现的大致时间点**
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
validations:
required: true
- type: textarea
id: mumulogs
attributes:
label: MuMu 问题诊断
description: |
**在 MuMu 右上角菜单按钮 -> 问题诊断 中点击 复制配置信息,并将全部内容粘贴进来。**
**注意隐去 电脑出口IP地址 等以保护个人隐私**
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: 截图
description: |
如果有,添加屏幕截图以帮助解释你的问题,包括但不限于 MAA 软件截图、游戏画面截图
若是**识别相关问题**,请尽可能提供模拟器自带的截图工具截取的无遮挡的**原图**(或通过 adb 截取原图)
用其他的工具如QQ截取的图片包含窗口边框不利于我们排除bug
`debug` 文件夹下有一些自动截图的错误图片,若有相关的,请一并打包上传
validations:
required: false
- type: textarea
id: others
attributes:
label: 还有别的吗?
description: |
操作系统?相关的配置?链接?参考资料?
任何能让我们对你所遇到的问题有更多了解的东西
validations:
required: false

View File

@@ -1,5 +1,5 @@
name: 其他议题(使用中文)
description: 提出问题,而不是 bug 反馈或需求建议
description: 提出问题,而不是 Bug 反馈或需求建议
labels: ['question']
body:
- type: textarea

View File

@@ -52,7 +52,7 @@ body:
attributes:
label: Log files
description: >-
**Upload the `asst.log` and `gui.log` log file in the `debug` folder and**
**After closing the MAA, upload the `asst.log` and `gui.log` log file in the `debug` folder and**
**indicate the approximate point in time when the problem occurred.**
**Please drag and drop the full file in, not your own cuttings or copies;**

View File

@@ -67,6 +67,12 @@ labels:
- name: remove roguelike
content:
regexes: '[Rr]emove (?:[Ll]abels? |)(?:`|)(?:[Mm]odule: |)roguelike(?:`|)'
- name: skip reclamation
content:
regexes: '[Ss]kip (?:[Ll]abels? |)(?:`|)(?:[Mm]odule: |)reclamation(?:`|)'
- name: remove reclamation
content:
regexes: '[Rr]emove (?:[Ll]abels? |)(?:`|)(?:[Mm]odule: |)reclamation(?:`|)'
- name: skip client
content:
@@ -167,7 +173,7 @@ labels:
- name: roguelike
content: "module: roguelike"
regexes:
"肉[鸽鴿]|集成战略|[Rr]ogue|[Ii]ntegrated [Ss]tategy|I.S.|ローグ"
"肉[鸽鴿]|集成战略|[Rr]ogue|[Ii]ntegrated [Ss]tategy|I\\.S\\.|ローグ"
skip-if:
- skip all
- skip module
@@ -185,11 +191,11 @@ labels:
skip-if:
- skip all
- skip module
- skip roguelike
- skip reclamation
remove-if:
- remove all
- remove module
- remove roguelike
- remove reclamation
# `module: copilot`
- name: copilot1
@@ -375,7 +381,7 @@ labels:
- name: pr-ambiguous
# 不符合 commitizen 的 PR
content: ambiguous
regexes: '^(?!(?:build|chore|ci|docs?|feat|fix|i18n|perf|refactor|rft|style|test)[\:\.\(\,]|[Rr]evert|[Rr]elease)'
regexes: '^(?!(?:build|chore|ci|docs?|feat!?|fix|i18n|perf|refactor|rft|style|test)[\:\.\(\,]|[Rr]evert|[Rr]elease)'
mode:
pull_request_target:
skip-if:
@@ -408,6 +414,7 @@ labels:
- others
- recruit
- roguelike
- reclamation
# `release`
- name: release

158095
.github/qodana.sarif.json vendored

File diff suppressed because it is too large Load Diff

View File

@@ -106,6 +106,7 @@ jobs:
uses: actions/checkout@v4
with:
show-progress: false
submodules: recursive
- name: Cache .nuke/temp, ~/.nuget/packages
id: cache-nuget
@@ -224,19 +225,18 @@ jobs:
CC: ${{ matrix.arch == 'x86_64' && 'ccache gcc-12' || 'ccache aarch64-linux-gnu-gcc-12' }}
CXX: ${{ matrix.arch == 'x86_64' && 'ccache g++-12' || 'ccache aarch64-linux-gnu-g++-12' }}
- name: Setup Rust
- name: Setup Cross Compile Toolchains for CLI
uses: ./src/maa-cli/.github/actions/setup
with:
os: ubuntu-latest
arch: ${{ matrix.arch }}
target_arch: ${{ matrix.arch }}
- name: Build CLI
run: |
cargo build --release --locked --package maa-cli \
${{ matrix.arch != 'x86_64' && '--features vendored-openssl' || '' }}
cargo build --release --locked --package maa-cli --features vendored-openssl
cp -v target/$CARGO_BUILD_TARGET/release/maa $GITHUB_WORKSPACE/install/maa
cargo build --release --locked --package maa-cli --no-default-features \
--features ${{ matrix.arch != 'x86_64' && 'git2,vendored-openssl' || 'git2' }}
--features git2,vendored-openssl
cp -v target/$CARGO_BUILD_TARGET/release/maa $GITHUB_WORKSPACE/appimage-maa
working-directory: src/maa-cli
@@ -292,7 +292,7 @@ jobs:
macOS-Core:
needs: meta
runs-on: macos-13
runs-on: macos-14
strategy:
matrix:
arch: [arm64, x86_64]
@@ -330,7 +330,7 @@ jobs:
macOS-GUI:
needs: [meta, macOS-Core]
runs-on: macos-13
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -367,7 +367,7 @@ jobs:
- name: Build XCFramework
run: |
xcodebuild -create-xcframework -library libMaaCore.dylib -headers ../include -output MaaCore.xcframework
xcodebuild -create-xcframework -library libMaaDerpLearning.dylib -output MaaDerpLearning.xcframework
xcodebuild -create-xcframework -library libfastdeploy_ppocr.dylib -output fastdeploy_ppocr.xcframework
xcodebuild -create-xcframework -library libonnxruntime.*.dylib -output ONNXRuntime.xcframework
xcodebuild -create-xcframework -library libopencv*.dylib -output OpenCV.xcframework
working-directory: build

View File

@@ -1,48 +0,0 @@
name: Build Test for docs
on:
push:
branches-ignore:
- "master"
paths:
- "docs/**"
pull_request:
branches:
- "dev"
paths:
- "docs/**"
workflow_dispatch:
jobs:
build-test:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
show-progress: false
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm i
working-directory: "./docs"
- name: Cleanup files
run: rm tsconfig.json
working-directory: "./docs"
- name: Build
run: npm run build
working-directory: "./docs"
- name: Upload artifact to GitHub
uses: actions/upload-artifact@v4
with:
name: docs
path: "./docs/.vuepress/dist"

View File

@@ -2,12 +2,16 @@ name: gen-changelog
on:
pull_request:
types: [opened, reopened, ready_for_review]
types:
- opened
- reopened
- ready_for_review
workflow_dispatch:
jobs:
gen:
if: github.event.pull_request.draft == false && startsWith(github.event.pull_request.title, 'Release v') # startsWith 表达式不区分大小写
# startsWith 表达式不区分大小写
if: github.event.pull_request.draft == false && startsWith(github.event.pull_request.title, 'Release v')
runs-on: ubuntu-latest
steps:
- name: Checkout code
@@ -18,6 +22,8 @@ jobs:
- name: Extract tag name
id: extract_tag
env:
PR_BODY: ${{ format('{0}/{1}', runner.temp, 'output' ) }}
run: |
tag_name=$(echo "${{ github.event.pull_request.title }}" | sed -E 's/(Release|release)//' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT
@@ -27,19 +33,33 @@ jobs:
latest_stable_tag=$(git tag -l 'v*' | grep -v '-' | sort -V | tail -n 1) # 上一个 stable 版本
newest_tag=$(git describe --tags --match "v*" --abbrev=0) # 最新版本
echo "latest_stable_tag: $latest_stable_tag"
echo "newest_tag: $newest_tag"
echo "latest_stable_tag=$latest_stable_tag" >> $GITHUB_OUTPUT
echo "newest_tag=$newest_tag" >> $GITHUB_OUTPUT
if [[ $tag_name == *-* ]]; then # 判断新版本是否为 beta 版本
latest=$newest_tag # 若是,则将 latest 参数设置为最新版本
if [[ $tag_name == *-* ]]; then # 判断新版本是否为 beta 版本
latest=$newest_tag # 若是,则将 latest 参数设置为最新版本
else
latest=$latest_stable_tag # 若否,则设置为上一个 stable 版本
latest=$latest_stable_tag # 若否,则设置为上一个 stable 版本
fi
echo "latest=$latest" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
echo '======='
echo 'Target RP: ${{ github.event.pull_request.html_url }}' >> $PR_BODY
echo '' >> $PR_BODY
echo '<details><summary>Debug info</summary>' >> $PR_BODY
echo '' >> $PR_BODY
echo '```' >> $PR_BODY
sed 's/=/: /1' $GITHUB_OUTPUT >> $PR_BODY
echo '```' >> $PR_BODY
echo '' >> $PR_BODY
echo '</details>' >> $PR_BODY
cat $PR_BODY
- name: Generate Changelog
run: |
git switch dev
@@ -63,7 +83,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: ${{ steps.extract_tag.outputs.pr_title }}
body: ${{ github.event.pull_request.html_url }}
body-path: ${{ format('{0}/{1}', runner.temp, 'output' ) }}
base: "dev"
branch: "changelog"
delete-branch: true

View File

@@ -16,7 +16,7 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: zzyyyl/issue-checker@v1.7
- uses: zzyyyl/issue-checker@v1.8
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue-checker.yml

49
.github/workflows/markdown-checker.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: Lint Markdown files
on:
push:
paths:
- "**/*.md"
- ".github/workflows/lint-markdown.yml"
pull_request:
paths:
- "**/*.md"
- ".github/workflows/lint-markdown.yml"
schedule:
- cron: "44 7 * * 2"
workflow_dispatch:
jobs:
lint:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@v16
with:
config: docs/.markdownlint.yaml
globs: |
README.md
docs/**/*.md
# check-links:
# name: Check Dead Links
# runs-on: ubuntu-latest
# steps:
# - name: Check out code
# uses: actions/checkout@v4
# with:
# show-progress: false
#
# - name: Check Dead Link
# uses: umbrelladocs/action-linkspector@v1
# with:
# # Use github-pr-review when triggered by a pull request; otherwise, use github-check
# reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'github-check' }}
# filter_mode: nofilter
# fail_on_error: true

View File

@@ -1,12 +1,9 @@
name: PR Checker
on:
pull_request:
pull_request_target:
types: [opened, edited, ready_for_review, reopened, synchronize]
permissions:
issues: write
pull-requests: write
jobs:
check_commit_name_in_pr:
@@ -16,7 +13,6 @@ jobs:
- name: Cleanup Previous Comment
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
@@ -32,11 +28,9 @@ jobs:
comment_id: previousComment.id
});
}
- name: Check Commits
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: commits } = await github.rest.pulls.listCommits({
owner: context.repo.owner,
@@ -45,7 +39,7 @@ jobs:
per_page: 100
});
const regex = /^((build|chore|ci|docs?|feat|fix|perf|refactor|rft|style|test|i18n|typo)[\:\.\(\,]|[Rr]evert|[Rr]elease)/;
const regex = /^((build|chore|ci|docs?|feat!?|fix|perf|refactor|rft|style|test|i18n|typo)[\:\.\(\,]|[Rr]evert|[Rr]elease)/;
const invalidCommits = commits.filter(commit => !regex.test(commit.commit.message) || commit.parents.length > 1);
console.log(`Checked ${commits.length} commit(s)`);
@@ -62,4 +56,4 @@ jobs:
});
core.setFailed(`Found ${invalidCommits.length} invalid commit(s):\n${invalidCommitNames.join("\n-------------------\n")}`);
}
}

View File

@@ -1,45 +0,0 @@
name: Qodana static analysis
on:
workflow_dispatch:
pull_request: # 在 PR 更新的场合进行扫描
paths:
- ".github/workflows/qodana.yml"
- "src/MaaWpfGui/*"
- "qodana.yaml"
- "src/MaaWpfGui/**"
- "MAA.sln"
push: # 在主分支推送代码的场合进行扫描
branches:
- master
- "releases/*"
- dev
paths:
- ".github/workflows/qodana.yml"
- "src/MaaWpfGui/**"
- "qodana.yaml"
permissions:
contents: write
pull-requests: write
checks: write
jobs:
qodana:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
show-progress: false
- name: Qodana Scan
uses: JetBrains/qodana-action@main
with:
pr-mode: false
post-pr-comment: true
args: --baseline,.github/qodana.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

View File

@@ -37,6 +37,7 @@ jobs:
tag: ${{ steps.set_tag.outputs.tag }}
pre_version: ${{ steps.set_tag.outputs.pre_version }}
main_tag_name: ${{ steps.push_main_tag.outputs.main_tag_name }}
changelog: ${{ steps.generate_changelog.outputs.changelog }}
steps:
- uses: actions/checkout@v4
with:
@@ -59,6 +60,9 @@ jobs:
- name: Set tag
id: set_tag
run: |
# pre_version是上一个公版这里需要拉上一个tag避免堆积过多commit
$latest_tag=$(git describe --tags --abbrev=0)
echo "latest_tag=$latest_tag" >> $env:GITHUB_OUTPUT
$described = $(git describe --tags --long --match 'v*')
$ids = $($described -split "-")
if ($ids.length -eq 3) {
@@ -89,6 +93,17 @@ jobs:
git push --tags origin HEAD:refs/tags/$main_tag_name -f
echo "main_tag_name=$main_tag_name" >> $env:GITHUB_OUTPUT
- name: Generate Changelog
id: generate_changelog
run: |
python3 tools/ChangelogGenerator/changelog_generator.py --latest "${{ steps.set_tag.outputs.latest_tag }}" --tag "${{ steps.set_tag.outputs.tag }}"
$content=$(((Get-Content .\changelog.md) | Select-Object -Skip 2) -join "\n\n")
echo "changelog=$content" >> $env:GITHUB_OUTPUT
echo $content
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHONIOENCODING: "utf-8"
- name: Cache .nuke/temp, ~/.nuget/packages
id: cache-nuget
uses: actions/cache@v4
@@ -97,7 +112,7 @@ jobs:
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Restore dependencies
if: steps.cache-nuget.outputs.cache-hit != 'true'
run: dotnet restore
@@ -233,7 +248,7 @@ jobs:
run: |
pre_version=${{ needs.build-win-nightly.outputs.pre_version }}
cur_version=${{ needs.build-win-nightly.outputs.main_tag_name }}
echo -e "${{ inputs.release_body || '' }}\n\n**Full Changelog**: [$pre_version -> $cur_version](https://github.com/$GITHUB_REPOSITORY/compare/$pre_version...$cur_version)" > alpha_changelog.md
echo -e "${{ inputs.release_body || '' }}\n\n${{ needs.build-win-nightly.outputs.changelog }}\n\n**Full Changelog**: [$pre_version -> $cur_version](https://github.com/$GITHUB_REPOSITORY/compare/$pre_version...$cur_version)" > alpha_changelog.md
export r=$(cat alpha_changelog.md)
# https://github.com/svenstaro/upload-release-action

View File

@@ -9,12 +9,12 @@ on:
limit:
description: Number of releases to fetch from MaaAssistantArknights, 2 at least
required: false
default: 31
default: '31'
type: number
limit_2:
description: Number of releases to fetch from MaaRelease
required: false
default: 30
default: '30'
type: number
env:
@@ -25,8 +25,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Fetch MaaRelease
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false
repository: ${{ format('{0}/{1}', github.repository_owner, 'MaaRelease') }}
path: MaaRelease
fetch-depth: 0
@@ -86,16 +87,18 @@ jobs:
uses: actions/download-artifact@v4
- name: Fetch MaaRelease
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false
repository: ${{ format('{0}/{1}', github.repository_owner, 'MaaRelease') }}
path: MaaRelease
fetch-depth: 0
token: ${{ secrets.MAARELEASE_RELEASE }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false
path: MaaAssistantArknights
- name: Download latest version for server
@@ -123,7 +126,7 @@ jobs:
make-ota-mac:
needs: create-tag
runs-on: macos-13
runs-on: macos-14
steps:
- name: Fetch release info
run: gh release list --repo 'MaaAssistantArknights/MaaAssistantArknights' --limit ${{ inputs.limit || 31 }} | tee ./release_maa.txt
@@ -200,30 +203,3 @@ jobs:
- name: Setup release mirror
run: |
gh workflow --repo MaaAssistantArknights/MaaRelease run release-mirrors.yml
- name: Deploy docs
run: |
mkdir -p ${{ runner.temp }}/new
mkdir -p ${{ runner.temp }}/old
gh api /repos/MaaAssistantArknights/MaaAssistantArknights/tags --jq '.[].name' > ${{ runner.temp }}/release_maa.txt
export NEW_VERSION=$(sed -n '1p' ${{ runner.temp }}/release_maa.txt)
echo "NEW_VERSION: $NEW_VERSION"
export OLD_VERSION=$(sed -n '2p' ${{ runner.temp }}/release_maa.txt)
echo "OLD_VERSION: $OLD_VERSION"
gh api "/repos/MaaAssistantArknights/MaaAssistantArknights/tarball/$NEW_VERSION" > ${{ runner.temp }}/new.tar.gz
gh api "/repos/MaaAssistantArknights/MaaAssistantArknights/tarball/$OLD_VERSION" > ${{ runner.temp }}/old.tar.gz
tar -xzf ${{ runner.temp }}/new.tar.gz -C ${{ runner.temp }}/new
tar -xzf ${{ runner.temp }}/old.tar.gz -C ${{ runner.temp }}/old
export NEW_PATH="${{ runner.temp }}/new/$(ls ${{ runner.temp }}/new)/docs"
echo "NEW_PATH: $NEW_PATH"
export OLD_PATH="${{ runner.temp }}/old/$(ls ${{ runner.temp }}/old)/docs"
echo "OLD_PATH: $OLD_PATH"
export DOCS_DIFF=$(diff -aqr $NEW_PATH $OLD_PATH)
if [ -n "$DOCS_DIFF" ]; then
echo "Found changes, start to deploy the docs:"
echo "$DOCS_DIFF"
gh workflow --repo MaaAssistantArknights/maa-website run build-and-deploy.yaml
echo "Deploying the docs."
else
echo "Nothing changed, exit."
fi

View File

@@ -60,7 +60,7 @@ jobs:
uses: actions/checkout@v4
with:
show-progress: false
repository: Kengxxiao/ArknightsGameData_YoStar
repository: Kengxxiao/ArknightsGameData_Yostar
ref: main
path: .\tools\ResourceUpdater\x64\Release\Overseas
sparse-checkout: |
@@ -121,23 +121,23 @@ jobs:
echo "numbers: "$numbers
$length = $numbers.Length
$isAllEqual = $true
$noDiff = $true
for ($i = 0; $i -lt $length; $i += 2) {
$firstNumber = $numbers[$i]
$secondNumber = $numbers[$i+1]
if ($firstNumber -gt 1) {
$isAllEqual = $false
$noDiff = $false
break
}
if ($firstNumber -ne $secondNumber) {
$isAllEqual = $false
$noDiff = $false
break
}
}
echo "isAllEqual: "$isAllEqual
echo "only_sorted=$isAllEqual" >> $env:GITHUB_OUTPUT
echo "noDiff: "$noDiff
echo "only_sorted=$noDiff" >> $env:GITHUB_OUTPUT
- name: Cancelling
if: steps.check_only_sorted.outputs.only_sorted == 'True'
@@ -177,6 +177,7 @@ jobs:
github_token: ${{ secrets.MISTEOWORKFLOW }}
- name: Update OTA resource
if: steps.add_files.outputs.have_commits == 'True'
run: |
gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml

View File

@@ -33,6 +33,7 @@ jobs:
uses: actions/checkout@v4
with:
show-progress: false
submodules: recursive
- name: Restore dependencies
run: dotnet restore
@@ -53,17 +54,17 @@ jobs:
run: |
.\x64\Debug\Sample.exe
- name: Run tests - YoStarJP
- name: Run tests - YostarJP
run: |
.\x64\Debug\Sample.exe YoStarJP
.\x64\Debug\Sample.exe YostarJP
- name: Run tests - YoStarEN
- name: Run tests - YostarEN
run: |
.\x64\Debug\Sample.exe YoStarEN
.\x64\Debug\Sample.exe YostarEN
- name: Run tests - YoStarKR
- name: Run tests - YostarKR
run: |
.\x64\Debug\Sample.exe YoStarKR
.\x64\Debug\Sample.exe YostarKR
- name: Run tests - txwy
run: |

109
.github/workflows/website-workflow.yml vendored Normal file
View File

@@ -0,0 +1,109 @@
name: MaaWebsite Workflow
on:
push:
branches:
- "master"
- "dev"
paths:
- ".github/workflows/website-workflow.yml"
- "docs/**"
- "website/**"
pull_request:
paths:
- ".github/workflows/website-workflow.yml"
- "docs/**"
- "website/**"
workflow_dispatch:
inputs:
deploy-to-prod-env:
description: "Deploy to production environment"
default: false
required: true
type: boolean
jobs:
build:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: './website/pnpm-lock.yaml'
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: "./website"
- name: Build
run: pnpm run build
working-directory: "./website"
- name: Upload artifact to GitHub
uses: actions/upload-artifact@v4
with:
name: dist
path: "./website/dist"
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- name: Download website artifacts
uses: actions/download-artifact@v4
with:
name: dist
- name: Set deployment environment
id: set-deployment-env
run: |
if [[ "${{ github.event_name }}" != "workflow_dispatch" && "${{ github.ref }}" == "refs/heads/master" ]] || [[ "${{ github.event.inputs.deploy-to-prod-env }}" == "true" ]]; then
echo "AZURE_TARGET_ENV=prod" >> $GITHUB_ENV
else
echo "AZURE_TARGET_ENV=dev" >> $GITHUB_ENV
fi
- name: Show environment
run: echo ${{ env.AZURE_TARGET_ENV }}
- name: Deploy to Azure (prod)
id: deploy-prod
uses: Azure/static-web-apps-deploy@v1
if: env.AZURE_TARGET_ENV == 'prod'
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_MAA_WEBSITE }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "."
api_location: ""
skip_app_build: true
skip_api_build: true
- name: Deploy to Azure (dev)
id: deploy-dev
uses: Azure/static-web-apps-deploy@v1
if: env.AZURE_TARGET_ENV == 'dev'
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_MAA_WEBSITE }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
deployment_environment: dev
app_location: "."
api_location: ""
skip_app_build: true
skip_api_build: true

3
.gitmodules vendored
View File

@@ -12,3 +12,6 @@
[submodule "src/maa-cli"]
path = src/maa-cli
url = https://github.com/MaaAssistantArknights/maa-cli.git
[submodule "3rdparty/EmulatorExtras"]
path = 3rdparty/EmulatorExtras
url = https://github.com/MaaXYZ/EmulatorExtras.git

5
.linkspector.yml Normal file
View File

@@ -0,0 +1,5 @@
dirs:
- .
useGitIgnore: true
ignorePatterns:
- pattern: "^https?://127.0.0.1(:\\d+)?/"

1
3rdparty/EmulatorExtras vendored Submodule

Submodule 3rdparty/EmulatorExtras added at 42442b1183

View File

@@ -1,172 +0,0 @@
#pragma once
#include <cmath>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <meojson/json.hpp>
#include <opencv2/core.hpp>
#include "TileDef.hpp"
namespace Map
{
struct Tile
{
int heightType = 0;
int buildableType = 0;
std::string tileKey;
};
class Level
{
public:
Level(const json::value& data);
int get_width() const { return width; }
int get_height() const { return height; }
Tile get_item(int y, int x) const { return tiles[y][x]; }
std::vector<cv::Point3d> view;
LevelKey key;
private:
int height = 0;
int width = 0;
std::vector<std::vector<Tile>> tiles;
};
class TileCalc
{
public:
TileCalc(int width, int height);
bool run(const Level& level, bool side, std::vector<std::vector<cv::Point2d>>& out_pos,
std::vector<std::vector<Tile>>& out_tiles, double shift_x = 0, double shift_y = 0) const;
private:
bool adapter(double& x, double& y) const;
int width = 0;
int height = 0;
const double degree = atan(1.0) * 4 / 180;
std::vector<Level> levels;
cv::Mat MatrixP = cv::Mat(4, 4, CV_64F);
cv::Mat MatrixX = cv::Mat(4, 4, CV_64F);
cv::Mat MatrixY = cv::Mat(4, 4, CV_64F);
};
inline void InitMat4x4(cv::Mat& m, double (*num)[4])
{
for (int i = 0; i < m.rows; i++)
for (int j = 0; j < m.cols; j++)
m.at<double>(i, j) = num[i][j];
}
inline Level::Level(const json::value& data)
{
key.stageId = data.at("stageId").as_string();
key.code = data.at("code").as_string();
key.levelId = data.at("levelId").as_string();
key.name = data.get("name", "null");
this->height = data.at("height").as_integer();
this->width = data.at("width").as_integer();
for (const json::value& point_data : data.at("view").as_array()) {
cv::Point3d tmp;
auto point_array = point_data.as_array();
tmp.x = point_array[0].as_double();
tmp.y = point_array[1].as_double();
tmp.z = point_array[2].as_double();
this->view.emplace_back(std::move(tmp));
}
for (const json::value& row : data.at("tiles").as_array()) {
std::vector<Tile> tmp;
tmp.reserve(this->width);
for (const json::value& tile : row.as_array()) {
tmp.emplace_back(Tile { tile.at("heightType").as_integer(), tile.at("buildableType").as_integer(),
tile.get("tileKey", std::string()) });
}
tiles.emplace_back(std::move(tmp));
}
}
inline TileCalc::TileCalc(int width, int height)
{
this->width = width;
this->height = height;
double ratio = static_cast<double>(height) / width;
double matrixP[4][4] { { ratio / tan(20 * degree), 0, 0, 0 },
{ 0, 1 / tan(20 * degree), 0, 0 },
{ 0, 0, -(1000 + 0.3) / (1000 - 0.3), -(1000 * 0.3 * 2) / (1000 - 0.3) },
{ 0, 0, -1, 0 } };
InitMat4x4(this->MatrixP, matrixP);
double matrixX[4][4] { { 1, 0, 0, 0 },
{ 0, cos(30 * degree), -sin(30 * degree), 0 },
{ 0, -sin(30 * degree), -cos(30 * degree), 0 },
{ 0, 0, 0, 1 } };
InitMat4x4(this->MatrixX, matrixX);
double matrixY[4][4] { { cos(10 * degree), 0, sin(10 * degree), 0 },
{ 0, 1, 0, 0 },
{ -sin(10 * degree), 0, cos(10 * degree), 0 },
{ 0, 0, 0, 1 } };
InitMat4x4(this->MatrixY, matrixY);
}
inline bool TileCalc::run(const Level& level, bool side, std::vector<std::vector<cv::Point2d>>& out_pos,
std::vector<std::vector<Tile>>& out_tiles, double shift_x, double shift_y) const
{
auto [x, y, z] = level.view[side ? 1 : 0];
double adapter_y = 0, adapter_z = 0;
this->adapter(adapter_y, adapter_z);
double matrix[4][4] {
{ 1, 0, 0, -x }, { 0, 1, 0, -y - adapter_y }, { 0, 0, 1, -z - adapter_z }, { 0, 0, 0, 1 }
};
auto raw = cv::Mat(cv::Size(4, 4), CV_64F);
auto Finall_Matrix = cv::Mat(cv::Size(4, 4), CV_64F);
InitMat4x4(raw, matrix);
if (side) {
Finall_Matrix = this->MatrixP * this->MatrixX * this->MatrixY * raw;
}
else {
Finall_Matrix = this->MatrixP * this->MatrixX * raw;
}
int h = level.get_height();
int w = level.get_width();
auto map_point = cv::Mat(cv::Size(1, 4), CV_64F);
map_point.at<double>(3, 0) = 1;
auto tmp_pos = std::vector<cv::Point2d>(w);
auto tmp_tiles = std::vector<Tile>(w);
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
tmp_tiles[j] = level.get_item(i, j);
map_point.at<double>(0, 0) = j - (w - 1) / 2.0 + shift_x;
map_point.at<double>(1, 0) = (h - 1) / 2.0 - i + shift_y;
map_point.at<double>(2, 0) = tmp_tiles[j].heightType * -0.4;
cv::Mat view_point = Finall_Matrix * map_point;
view_point = view_point / view_point.at<double>(3, 0);
view_point = (view_point + 1) / 2;
tmp_pos[j] = cv::Point2d(view_point.at<double>(0, 0) * this->width,
(1 - view_point.at<double>(1, 0)) * this->height);
}
out_pos.emplace_back(tmp_pos);
out_tiles.emplace_back(tmp_tiles);
}
return true;
}
inline bool TileCalc::adapter(double& x, double& y) const
{
const double fromRatio = 9.0 / 16;
const double toRatio = 3.0 / 4;
double ratio = static_cast<double>(height) / width;
if (ratio < fromRatio - 0.00001) {
x = 0;
y = 0;
return false;
}
double t = (ratio - fromRatio) / (toRatio - fromRatio);
x = -1.4 * t;
y = -2.8 * t;
return true;
}
} // namespace Map

View File

@@ -0,0 +1,137 @@
#pragma once
#include <meojson/json.hpp>
#include <numbers>
#include <opencv2/core/matx.hpp>
#include <opencv2/core/types.hpp>
#include "TileDef.hpp"
namespace Map::TileCalc2
{
using vec3d = cv::Vec3d;
using matrix4x4 = cv::Matx44d;
static constexpr double degree = std::numbers::pi / 180;
inline vec3d camera_pos(const Level& level, bool side = false, int width = 1280, int height = 720)
{
const auto [x, y, z] = level.view[side ? 1 : 0];
static constexpr double fromRatio = 9. / 16;
static constexpr double toRatio = 3. / 4;
const double ratio = static_cast<double>(height) / width;
const double t = (fromRatio - ratio) / (fromRatio - toRatio);
const vec3d pos_adj = { -1.4 * t, -2.8 * t, 0 };
return { x + pos_adj[0], y + pos_adj[1], z + pos_adj[2] };
}
inline vec3d camera_euler_angles_yxz(const Level& /*level*/, bool side = false)
{
if (side) {
return { 10 * degree, 30 * degree, 0 };
}
return { 0, 30 * degree, 0 };
}
inline matrix4x4 camera_matrix_from_trans(
const vec3d& pos,
const vec3d& euler,
double ratio,
double fov_2_y = 20 * degree,
double far = 1000,
double near = 0.3)
{
const double cos_y = std::cos(euler[0]);
const double sin_y = std::sin(euler[0]);
const double cos_x = std::cos(euler[1]);
const double sin_x = std::sin(euler[1]);
const double tan_f = std::tan(fov_2_y);
const matrix4x4 translate = {
1, 0, 0, -pos[0], //
0, 1, 0, -pos[1], //
0, 0, 1, -pos[2], //
0, 0, 0, 1,
};
const matrix4x4 matrixY = {
cos_y, 0, sin_y, 0, //
0, 1, 0, 0, //
-sin_y, 0, cos_y, 0, //
0, 0, 0, 1,
};
const matrix4x4 matrixX = {
1, 0, 0, 0, //
0, cos_x, -sin_x, 0, //
0, -sin_x, -cos_x, 0, //
0, 0, 0, 1,
};
const matrix4x4 proj = {
// clang-format off
ratio / tan_f, 0, 0, 0,
0, 1 / tan_f, 0, 0,
0, 0, -(far + near) / (far - near), -(far * near * 2) / (far - near),
0, 0, -1, 0,
// clang-format on
};
return proj * matrixX * matrixY * translate;
}
inline cv::Point
world_to_screen(const Level& level, const vec3d& world_pos, bool side, const vec3d& offset = {})
{
static constexpr double width = 1280;
static constexpr double height = 720;
const vec3d pos_cam = camera_pos(level, side, width, height) + offset;
const vec3d euler = camera_euler_angles_yxz(level, side);
const matrix4x4 matrix = camera_matrix_from_trans(pos_cam, euler, height / width);
auto result = matrix * cv::Point3d(world_pos);
result = result / result(3);
result = (result + cv::Vec4d::ones()) / 2.;
return {
static_cast<int>(std::round(result(0) * width)),
static_cast<int>(std::round((1 - result(1)) * height)),
};
}
inline vec3d get_tile_world_pos(const Level& level, int tile_y, int tile_x)
{
const int h = level.get_height();
const int w = level.get_width();
const auto& tile = level.get_item(tile_y, tile_x);
return {
tile_x - (w - 1) / 2.,
(h - 1) / 2. - tile_y,
tile.heightType * -0.4,
};
}
inline auto get_tile_screen_pos(
const Level& level,
int tile_y,
int tile_x,
bool side = false,
const vec3d& offset = {})
{
return world_to_screen(level, get_tile_world_pos(level, tile_y, tile_x), side, offset);
}
static constexpr double rel_pos_x = 1.3143386840820312;
static constexpr double rel_pos_y = 1.314337134361267;
static constexpr double rel_pos_z = -0.3967874050140381;
inline auto get_retreat_screen_pos(const Level& level)
{
const vec3d relative_pos = { -rel_pos_x, +rel_pos_y, rel_pos_z };
return world_to_screen(level, relative_pos, true);
}
inline auto get_skill_screen_pos(const Level& level)
{
const vec3d relative_pos = { +rel_pos_x, -rel_pos_y, rel_pos_z };
return world_to_screen(level, relative_pos, true);
}
} // namespace Map::TileCalc2

View File

@@ -1,32 +1,94 @@
#pragma once
#include <string>
#include <vector>
#include <meojson/json.hpp>
#include <opencv2/core.hpp>
namespace Map
{
struct LevelKey
{
std::string stageId;
std::string code;
std::string levelId;
std::string name;
struct LevelKey
{
std::string stageId;
std::string code;
std::string levelId;
std::string name;
bool empty_or_equal(const std::string& lhs, const std::string& rhs) const noexcept
{
return (lhs.empty() || rhs.empty()) ? true : lhs == rhs;
bool empty_or_equal(const std::string& lhs, const std::string& rhs) const noexcept
{
return (lhs.empty() || rhs.empty()) ? true : lhs == rhs;
}
bool operator==(const LevelKey& other) const noexcept
{
return empty_or_equal(stageId, other.stageId) && empty_or_equal(code, other.code)
&& empty_or_equal(levelId, other.levelId) && empty_or_equal(name, other.name);
}
bool operator==(const std::string& any_key) const noexcept
{
if (any_key.empty()) {
return false;
}
bool operator==(const LevelKey& other) const noexcept
{
return empty_or_equal(stageId, other.stageId) && empty_or_equal(code, other.code) &&
empty_or_equal(levelId, other.levelId) && empty_or_equal(name, other.name);
return empty_or_equal(stageId, any_key) || empty_or_equal(code, any_key)
|| empty_or_equal(levelId, any_key) || empty_or_equal(name, any_key);
}
};
struct Tile
{
int heightType = 0;
int buildableType = 0;
std::string tileKey;
};
class Level
{
public:
explicit Level(const json::value& data);
Level() = default;
int get_width() const { return width; }
int get_height() const { return height; }
Tile get_item(int y, int x) const { return tiles[y][x]; }
std::vector<cv::Point3d> view {};
LevelKey key {};
private:
int height = 0;
int width = 0;
std::vector<std::vector<Tile>> tiles;
};
inline Level::Level(const json::value& data)
{
key.stageId = data.at("stageId").as_string();
key.code = data.at("code").as_string();
key.levelId = data.at("levelId").as_string();
key.name = data.get("name", "null");
this->height = data.at("height").as_integer();
this->width = data.at("width").as_integer();
for (const json::value& point_data : data.at("view").as_array()) {
cv::Point3d tmp;
auto point_array = point_data.as_array();
tmp.x = point_array[0].as_double();
tmp.y = point_array[1].as_double();
tmp.z = point_array[2].as_double();
this->view.emplace_back(tmp);
}
for (const json::value& row : data.at("tiles").as_array()) {
std::vector<Tile> tmp;
tmp.reserve(this->width);
for (const json::value& tile : row.as_array()) {
tmp.emplace_back(Tile { tile.at("heightType").as_integer(),
tile.at("buildableType").as_integer(),
tile.get("tileKey", std::string()) });
}
bool operator==(const std::string& any_key) const noexcept
{
if (any_key.empty()) {
return false;
}
return empty_or_equal(stageId, any_key) || empty_or_equal(code, any_key) ||
empty_or_equal(levelId, any_key) || empty_or_equal(name, any_key);
}
};
tiles.emplace_back(std::move(tmp));
}
}
} // namespace Map

View File

@@ -1,195 +0,0 @@
Language: Json
ColumnLimit: 1000
IndentWidth: 4
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: false
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: BinPack
BasedOnStyle: ''
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RequiresClausePosition: OwnLine
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 50
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: true
AfterRequiresInExpression: true
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: c++20
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME

View File

@@ -0,0 +1,533 @@
#pragma once
#include <initializer_list>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include <vector>
#include "exception.hpp"
#include "utils.hpp"
namespace json
{
template <typename string_t>
class basic_array
{
friend class basic_value<string_t>;
friend class basic_object<string_t>;
public:
using raw_array = std::vector<basic_value<string_t>>;
using value_type = typename raw_array::value_type;
using iterator = typename raw_array::iterator;
using const_iterator = typename raw_array::const_iterator;
using reverse_iterator = typename raw_array::reverse_iterator;
using const_reverse_iterator = typename raw_array::const_reverse_iterator;
using char_t = typename string_t::value_type;
public:
basic_array() = default;
basic_array(const basic_array<string_t>& rhs) = default;
basic_array(basic_array<string_t>&& rhs) noexcept = default;
basic_array(std::initializer_list<value_type> init_list);
basic_array(typename raw_array::size_type size);
// explicit basic_array(const basic_value<string_t>& val);
// explicit basic_array(basic_value<string_t>&& val);
template <typename collection_t,
std::enable_if_t<_utils::is_collection<collection_t> &&
std::is_constructible_v<value_type, _utils::range_value_t<collection_t>>,
bool> = true>
basic_array(collection_t arr)
: _array_data(std::make_move_iterator(arr.begin()), std::make_move_iterator(arr.end()))
{}
template <typename jsonization_t,
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
basic_array(const jsonization_t& value) : basic_array(value.to_json())
{}
template <typename jsonization_t,
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
basic_array(const jsonization_t& value) : basic_array(ext::jsonization<jsonization_t>().to_json(value))
{}
~basic_array() noexcept = default;
bool empty() const noexcept { return _array_data.empty(); }
size_t size() const noexcept { return _array_data.size(); }
bool contains(size_t pos) const { return pos < _array_data.size(); }
bool exists(size_t pos) const { return contains(pos); }
const basic_value<string_t>& at(size_t pos) const;
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
string_t to_string() const;
string_t format(size_t indent = 4) const { return format(indent, 0); }
template <typename value_t>
bool all() const;
template <typename value_t, template <typename...> typename collection_t = std::vector>
collection_t<value_t> as_collection() const;
// Usage: get(key_1, key_2, ..., default_value);
template <typename... key_then_default_value_t>
auto get(key_then_default_value_t&&... keys_then_default_value) const;
template <typename value_t = basic_value<string_t>>
std::optional<value_t> find(size_t pos) const;
template <typename... args_t>
decltype(auto) emplace_back(args_t&&... args);
template <typename... args_t>
decltype(auto) push_back(args_t&&... args);
void clear() noexcept;
bool erase(size_t pos);
bool erase(iterator iter);
iterator begin() noexcept;
iterator end() noexcept;
const_iterator begin() const noexcept;
const_iterator end() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
reverse_iterator rbegin() noexcept;
reverse_iterator rend() noexcept;
const_reverse_iterator rbegin() const noexcept;
const_reverse_iterator rend() const noexcept;
const_reverse_iterator crbegin() const noexcept;
const_reverse_iterator crend() const noexcept;
const basic_value<string_t>& operator[](size_t pos) const;
basic_value<string_t>& operator[](size_t pos);
basic_array<string_t> operator+(const basic_array<string_t>& rhs) const&;
basic_array<string_t> operator+(basic_array<string_t>&& rhs) const&;
basic_array<string_t> operator+(const basic_array<string_t>& rhs) &&;
basic_array<string_t> operator+(basic_array<string_t>&& rhs) &&;
basic_array<string_t>& operator+=(const basic_array<string_t>& rhs);
basic_array<string_t>& operator+=(basic_array<string_t>&& rhs);
basic_array<string_t>& operator=(const basic_array<string_t>&) = default;
basic_array<string_t>& operator=(basic_array<string_t>&&) noexcept = default;
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_array<string_t>>, bool> = true>
basic_array<string_t>& operator=(value_t rhs)
{
return *this = basic_array<string_t>(std::move(rhs));
}
bool operator==(const basic_array<string_t>& rhs) const;
bool operator!=(const basic_array<string_t>& rhs) const { return !(*this == rhs); }
template <typename value_t, template <typename...> typename collection_t = std::vector,
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
explicit operator collection_t<value_t>() const
{
return as_collection<value_t, collection_t>();
}
template <typename jsonization_t,
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
explicit operator jsonization_t() const
{
jsonization_t dst {};
if (!dst.from_json(*this)) {
throw exception("Wrong JSON");
}
return dst;
}
template <typename jsonization_t,
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
explicit operator jsonization_t() const
{
jsonization_t dst {};
if (!ext::jsonization<jsonization_t>().from_json(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
private:
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const;
template <typename value_t, typename... rest_keys_t>
auto get_helper(const value_t& default_value, size_t pos, rest_keys_t&&... rest) const;
template <typename value_t>
auto get_helper(const value_t& default_value, size_t pos) const;
string_t format(size_t indent, size_t indent_times) const;
private:
raw_array _array_data;
};
template <typename string_t>
inline basic_array<string_t>::basic_array(std::initializer_list<value_type> init_list) : _array_data(init_list)
{}
template <typename string_t>
inline basic_array<string_t>::basic_array(typename raw_array::size_type size) : _array_data(size)
{}
// template <typename string_t>
// inline basic_array<string_t>::basic_array(const basic_value<string_t>& val) : basic_array<string_t>(val.as_array())
//{}
//
// template <typename string_t>
// inline basic_array<string_t>::basic_array(basic_value<string_t>&& val)
// : basic_array<string_t>(std::move(val.as_array()))
//{}
template <typename string_t>
inline void basic_array<string_t>::clear() noexcept
{
_array_data.clear();
}
template <typename string_t>
inline bool basic_array<string_t>::erase(size_t pos)
{
return erase(_array_data.begin() + pos);
}
template <typename string_t>
inline bool basic_array<string_t>::erase(iterator iter)
{
return _array_data.erase(iter) != _array_data.end();
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_array<string_t>::emplace_back(args_t&&... args)
{
static_assert(std::is_constructible_v<value_type, args_t...>,
"Parameter can't be used to construct a raw_array::value_type");
return _array_data.emplace_back(std::forward<args_t>(args)...);
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_array<string_t>::push_back(args_t&&... args)
{
return emplace_back(std::forward<args_t>(args)...);
}
template <typename string_t>
inline const basic_value<string_t>& basic_array<string_t>::at(size_t pos) const
{
return _array_data.at(pos);
}
template <typename string_t>
inline string_t basic_array<string_t>::to_string() const
{
string_t str { '[' };
for (auto iter = _array_data.cbegin(); iter != _array_data.cend();) {
str += iter->to_string();
if (++iter != _array_data.cend()) {
str += ',';
}
}
str += char_t(']');
return str;
}
template <typename string_t>
inline string_t basic_array<string_t>::format(size_t indent, size_t indent_times) const
{
const string_t tail_indent(indent * indent_times, ' ');
const string_t body_indent(indent * (indent_times + 1), ' ');
string_t str { '[', '\n' };
for (auto iter = _array_data.cbegin(); iter != _array_data.cend();) {
str += body_indent + iter->format(indent, indent_times + 1);
if (++iter != _array_data.cend()) {
str += ',';
}
str += '\n';
}
str += tail_indent + char_t(']');
return str;
}
template <typename string_t>
template <typename value_t>
inline bool basic_array<string_t>::all() const
{
for (const auto& elem : _array_data) {
if (!elem.template is<value_t>()) {
return false;
}
}
return true;
}
namespace _as_collection_helper
{
template <typename T>
class has_emplace_back
{
template <typename U>
static auto test(int) -> decltype(std::declval<U>().emplace_back(), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
}
template <typename string_t>
template <typename value_t, template <typename...> typename collection_t>
inline collection_t<value_t> basic_array<string_t>::as_collection() const
{
collection_t<value_t> result;
if constexpr (_as_collection_helper::has_emplace_back<collection_t<value_t>>::value) {
for (const auto& elem : _array_data) {
result.emplace_back(elem.template as<value_t>());
}
}
else {
for (const auto& elem : _array_data) {
result.emplace(elem.template as<value_t>());
}
}
return result;
}
template <typename string_t>
template <typename... key_then_default_value_t>
inline auto basic_array<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
{
return get(std::forward_as_tuple(keys_then_default_value...),
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
}
template <typename string_t>
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
inline auto basic_array<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const
{
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
return get_helper(std::get<default_value_index>(keys_then_default_value),
std::get<keys_indexes_t>(keys_then_default_value)...);
}
template <typename string_t>
template <typename value_t, typename... rest_keys_t>
inline auto basic_array<string_t>::get_helper(const value_t& default_value, size_t pos, rest_keys_t&&... rest) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
std::is_same_v<basic_array<string_t>, value_t> ||
std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(pos)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
return at(pos).get_helper(default_value, std::forward<rest_keys_t>(rest)...);
}
template <typename string_t>
template <typename value_t>
inline auto basic_array<string_t>::get_helper(const value_t& default_value, size_t pos) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
std::is_same_v<basic_array<string_t>, value_t> ||
std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(pos)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
auto val = _array_data.at(pos);
if (val.template is<value_t>()) {
if constexpr (is_string) {
return val.template as<string_t>();
}
else {
return val.template as<value_t>();
}
}
else {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
}
template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_array<string_t>::find(size_t pos) const
{
if (!contains(pos)) {
return std::nullopt;
}
const auto& val = _array_data.at(pos);
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>()) : std::nullopt;
}
template <typename string_t>
inline typename basic_array<string_t>::iterator basic_array<string_t>::begin() noexcept
{
return _array_data.begin();
}
template <typename string_t>
inline typename basic_array<string_t>::iterator basic_array<string_t>::end() noexcept
{
return _array_data.end();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::begin() const noexcept
{
return _array_data.begin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::end() const noexcept
{
return _array_data.end();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::cbegin() const noexcept
{
return _array_data.cbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::cend() const noexcept
{
return _array_data.cend();
}
template <typename string_t>
inline typename basic_array<string_t>::reverse_iterator basic_array<string_t>::rbegin() noexcept
{
return _array_data.rbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::reverse_iterator basic_array<string_t>::rend() noexcept
{
return _array_data.rend();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::rbegin() const noexcept
{
return _array_data.rbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::rend() const noexcept
{
return _array_data.rend();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::crbegin() const noexcept
{
return _array_data.crbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::crend() const noexcept
{
return _array_data.crend();
}
template <typename string_t>
inline basic_value<string_t>& basic_array<string_t>::operator[](size_t pos)
{
return _array_data[pos];
}
template <typename string_t>
inline const basic_value<string_t>& basic_array<string_t>::operator[](size_t pos) const
{
return _array_data[pos];
}
template <typename string_t>
inline basic_array<string_t> basic_array<string_t>::operator+(const basic_array<string_t>& rhs) const&
{
basic_array<string_t> temp = *this;
temp._array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return temp;
}
template <typename string_t>
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) const&
{
basic_array<string_t> temp = *this;
temp._array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return temp;
}
template <typename string_t>
inline basic_array<string_t> basic_array<string_t>::operator+(const basic_array<string_t>& rhs) &&
{
_array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return std::move(*this);
}
template <typename string_t>
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) &&
{
_array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
return std::move(*this);
}
template <typename string_t>
inline basic_array<string_t>& basic_array<string_t>::operator+=(const basic_array<string_t>& rhs)
{
_array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return *this;
}
template <typename string_t>
inline basic_array<string_t>& basic_array<string_t>::operator+=(basic_array<string_t>&& rhs)
{
_array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
return *this;
}
template <typename string_t>
inline bool basic_array<string_t>::operator==(const basic_array<string_t>& rhs) const
{
return _array_data == rhs._array_data;
}
template <typename ostream_t, typename string_t,
typename std_ostream_t =
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
typename enable_t =
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
ostream_t& operator<<(ostream_t& out, const basic_array<string_t>& arr)
{
out << arr.format();
return out;
}
} // namespace json

View File

@@ -0,0 +1,26 @@
#pragma once
#include <exception>
#include <string>
namespace json
{
class exception : public std::exception
{
public:
exception() = default;
exception(const std::string& msg) : _what(msg) {}
exception(const exception&) = default;
exception& operator=(const exception&) = default;
exception(exception&&) = default;
exception& operator=(exception&&) = default;
virtual ~exception() noexcept override = default;
virtual const char* what() const noexcept override { return _what.empty() ? "Unknown exception" : _what.c_str(); }
protected:
std::string _what;
};
}

View File

@@ -0,0 +1,474 @@
#pragma once
#include <initializer_list>
#include <map>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include "exception.hpp"
#include "utils.hpp"
namespace json
{
template <typename string_t>
class basic_object
{
friend class basic_value<string_t>;
friend class basic_array<string_t>;
public:
using raw_object = std::map<string_t, basic_value<string_t>>;
using key_type = typename raw_object::key_type;
using mapped_type = typename raw_object::mapped_type;
using value_type = typename raw_object::value_type;
using iterator = typename raw_object::iterator;
using const_iterator = typename raw_object::const_iterator;
using char_t = typename string_t::value_type;
public:
basic_object() = default;
basic_object(const basic_object<string_t>& rhs) = default;
basic_object(basic_object<string_t>&& rhs) noexcept = default;
basic_object(std::initializer_list<value_type> init_list);
// explicit basic_object(const basic_value<string_t>& val);
// explicit basic_object(basic_value<string_t>&& val);
template <typename map_t, std::enable_if_t<_utils::is_map<map_t> &&
std::is_constructible_v<value_type, _utils::range_value_t<map_t>>,
bool> = true>
basic_object(map_t map) : _object_data(std::make_move_iterator(map.begin()), std::make_move_iterator(map.end()))
{}
template <typename jsonization_t,
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
basic_object(const jsonization_t& value) : basic_object(value.to_json())
{}
template <typename jsonization_t,
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
basic_object(const jsonization_t& value) : basic_object(ext::jsonization<jsonization_t>().to_json(value))
{}
~basic_object() = default;
bool empty() const noexcept { return _object_data.empty(); }
size_t size() const noexcept { return _object_data.size(); }
bool contains(const string_t& key) const;
bool exists(const string_t& key) const { return contains(key); }
const basic_value<string_t>& at(const string_t& key) const;
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
string_t to_string() const;
string_t format(size_t indent = 4) const { return format(indent, 0); }
template <typename value_t>
bool all() const;
template <typename value_t, template <typename...> typename map_t = std::map>
map_t<string_t, value_t> as_map() const;
// Usage: get(key_1, key_2, ..., default_value);
template <typename... key_then_default_value_t>
auto get(key_then_default_value_t&&... keys_then_default_value) const;
template <typename value_t = basic_value<string_t>>
std::optional<value_t> find(const string_t& key) const;
template <typename... args_t>
decltype(auto) emplace(args_t&&... args);
template <typename... args_t>
decltype(auto) insert(args_t&&... args);
void clear() noexcept;
bool erase(const string_t& key);
bool erase(iterator iter);
iterator begin() noexcept;
iterator end() noexcept;
const_iterator begin() const noexcept;
const_iterator end() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
basic_value<string_t>& operator[](const string_t& key);
basic_value<string_t>& operator[](string_t&& key);
basic_object<string_t> operator|(const basic_object<string_t>& rhs) const&;
basic_object<string_t> operator|(basic_object<string_t>&& rhs) const&;
basic_object<string_t> operator|(const basic_object<string_t>& rhs) &&;
basic_object<string_t> operator|(basic_object<string_t>&& rhs) &&;
basic_object<string_t>& operator|=(const basic_object<string_t>& rhs);
basic_object<string_t>& operator|=(basic_object<string_t>&& rhs);
basic_object<string_t>& operator=(const basic_object<string_t>&) = default;
basic_object<string_t>& operator=(basic_object<string_t>&&) = default;
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_object<string_t>>, bool> = true>
basic_object<string_t>& operator=(value_t rhs)
{
return *this = basic_object<string_t>(std::move(rhs));
}
bool operator==(const basic_object<string_t>& rhs) const;
bool operator!=(const basic_object<string_t>& rhs) const { return !(*this == rhs); }
template <typename value_t, template <typename...> typename map_t = std::map,
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
explicit operator map_t<string_t, value_t>() const
{
return as_map<value_t, map_t>();
}
template <typename jsonization_t,
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
explicit operator jsonization_t() const
{
jsonization_t dst {};
if (!dst.from_json(*this)) {
throw exception("Wrong JSON");
}
return dst;
}
template <typename jsonization_t,
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
explicit operator jsonization_t() const
{
jsonization_t dst {};
if (!ext::jsonization<jsonization_t>().from_json(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
private:
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const;
template <typename value_t, typename... rest_keys_t>
auto get_helper(const value_t& default_value, const string_t& key, rest_keys_t&&... rest) const;
template <typename value_t>
auto get_helper(const value_t& default_value, const string_t& key) const;
string_t format(size_t indent, size_t indent_times) const;
private:
raw_object _object_data;
};
template <typename string_t>
inline basic_object<string_t>::basic_object(std::initializer_list<value_type> init_list)
: _object_data(std::make_move_iterator(init_list.begin()), std::make_move_iterator(init_list.end()))
{}
// template <typename string_t>
// inline basic_object<string_t>::basic_object(const basic_value<string_t>& val) :
// basic_object<string_t>(val.as_object())
//{}
//
// template <typename string_t>
// inline basic_object<string_t>::basic_object(basic_value<string_t>&& val)
// : basic_object<string_t>(std::move(val.as_object()))
//{}
template <typename string_t>
inline bool basic_object<string_t>::contains(const string_t& key) const
{
return _object_data.find(key) != _object_data.cend();
}
template <typename string_t>
inline const basic_value<string_t>& basic_object<string_t>::at(const string_t& key) const
{
return _object_data.at(key);
}
template <typename string_t>
inline void basic_object<string_t>::clear() noexcept
{
_object_data.clear();
}
template <typename string_t>
inline bool basic_object<string_t>::erase(const string_t& key)
{
return _object_data.erase(key) > 0 ? true : false;
}
template <typename string_t>
inline bool basic_object<string_t>::erase(iterator iter)
{
return _object_data.erase(iter) != _object_data.end();
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_object<string_t>::emplace(args_t&&... args)
{
static_assert(std::is_constructible_v<value_type, args_t...>,
"Parameter can't be used to construct a raw_object::value_type");
return _object_data.emplace(std::forward<args_t>(args)...);
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_object<string_t>::insert(args_t&&... args)
{
return emplace(std::forward<args_t>(args)...);
}
template <typename string_t>
inline string_t basic_object<string_t>::to_string() const
{
string_t str { '{' };
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
const auto& [key, val] = *iter;
str += char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':' } + val.to_string();
if (++iter != _object_data.cend()) {
str += ',';
}
}
str += char_t('}');
return str;
}
template <typename string_t>
inline string_t basic_object<string_t>::format(size_t indent, size_t indent_times) const
{
const string_t tail_indent(indent * indent_times, ' ');
const string_t body_indent(indent * (indent_times + 1), ' ');
string_t str { '{', '\n' };
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
const auto& [key, val] = *iter;
str += body_indent + char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':', ' ' } +
val.format(indent, indent_times + 1);
if (++iter != _object_data.cend()) {
str += ',';
}
str += '\n';
}
str += tail_indent + char_t('}');
return str;
}
template <typename string_t>
template <typename value_t>
inline bool basic_object<string_t>::all() const
{
for (const auto& [_, val] : _object_data) {
if (!val.template is<value_t>()) {
return false;
}
}
return true;
}
template <typename string_t>
template <typename value_t, template <typename...> typename map_t>
inline map_t<string_t, value_t> basic_object<string_t>::as_map() const
{
map_t<string_t, value_t> result;
for (const auto& [key, val] : _object_data) {
result.emplace(key, val.template as<value_t>());
}
return result;
}
template <typename string_t>
template <typename... key_then_default_value_t>
inline auto basic_object<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
{
return get(std::forward_as_tuple(keys_then_default_value...),
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
}
template <typename string_t>
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
inline auto basic_object<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const
{
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
return get_helper(std::get<default_value_index>(keys_then_default_value),
std::get<keys_indexes_t>(keys_then_default_value)...);
}
template <typename string_t>
template <typename value_t, typename... rest_keys_t>
inline auto basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key,
rest_keys_t&&... rest) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
std::is_same_v<basic_array<string_t>, value_t> ||
std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(key)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
return at(key).get_helper(default_value, std::forward<rest_keys_t>(rest)...);
}
template <typename string_t>
template <typename value_t>
inline auto basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
std::is_same_v<basic_array<string_t>, value_t> ||
std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(key)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
auto val = _object_data.at(key);
if (val.template is<value_t>()) {
if constexpr (is_string) {
return val.template as<string_t>();
}
else {
return val.template as<value_t>();
}
}
else {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
}
template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_object<string_t>::find(const string_t& key) const
{
auto iter = _object_data.find(key);
if (iter == _object_data.end()) {
return std::nullopt;
}
const auto& val = iter->second;
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>()) : std::nullopt;
}
template <typename string_t>
inline typename basic_object<string_t>::iterator basic_object<string_t>::begin() noexcept
{
return _object_data.begin();
}
template <typename string_t>
inline typename basic_object<string_t>::iterator basic_object<string_t>::end() noexcept
{
return _object_data.end();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::begin() const noexcept
{
return _object_data.begin();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::end() const noexcept
{
return _object_data.end();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::cbegin() const noexcept
{
return _object_data.cbegin();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::cend() const noexcept
{
return _object_data.cend();
}
template <typename string_t>
inline basic_value<string_t>& basic_object<string_t>::operator[](const string_t& key)
{
return _object_data[key];
}
template <typename string_t>
inline basic_value<string_t>& basic_object<string_t>::operator[](string_t&& key)
{
return _object_data[std::move(key)];
}
template <typename string_t>
inline basic_object<string_t> basic_object<string_t>::operator|(const basic_object<string_t>& rhs) const&
{
basic_object<string_t> temp = *this;
temp._object_data.insert(rhs.begin(), rhs.end());
return temp;
}
template <typename string_t>
inline basic_object<string_t> basic_object<string_t>::operator|(basic_object<string_t>&& rhs) const&
{
basic_object<string_t> temp = *this;
// temp._object_data.merge(std::move(rhs._object_data));
temp._object_data.insert(std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
return temp;
}
template <typename string_t>
inline basic_object<string_t> basic_object<string_t>::operator|(const basic_object<string_t>& rhs) &&
{
_object_data.insert(rhs.begin(), rhs.end());
return std::move(*this);
}
template <typename string_t>
inline basic_object<string_t> basic_object<string_t>::operator|(basic_object<string_t>&& rhs) &&
{
//_object_data.merge(std::move(rhs._object_data));
_object_data.insert(std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
return std::move(*this);
}
template <typename string_t>
inline basic_object<string_t>& basic_object<string_t>::operator|=(const basic_object<string_t>& rhs)
{
_object_data.insert(rhs.begin(), rhs.end());
return *this;
}
template <typename string_t>
inline basic_object<string_t>& basic_object<string_t>::operator|=(basic_object<string_t>&& rhs)
{
_object_data.insert(std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
return *this;
}
template <typename string_t>
inline bool basic_object<string_t>::operator==(const basic_object<string_t>& rhs) const
{
return _object_data == rhs._object_data;
}
template <typename ostream_t, typename string_t,
typename std_ostream_t =
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
typename enable_t =
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
ostream_t& operator<<(ostream_t& out, const basic_object<string_t>& obj)
{
out << obj.format();
return out;
}
} // namespace json

View File

@@ -0,0 +1,170 @@
#pragma once
#include <type_traits>
#include "types.hpp"
#include "utils.hpp"
namespace json
{
namespace _serialization_helper
{
template <typename in_t, typename serializer_t>
class is_serializable
{
template <typename U>
static auto test(int) -> decltype(std::declval<serializer_t>()(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<in_t>(0))::value;
};
struct empty_serializer
{
// sample:
// json::value operator()(const type_1&) const { return ...; }
// json::value operator()(const type_2&) const { return ...; }
// json::value operator()(const type_3&) const { return ...; }
};
template <typename T>
void unable_to_serialize()
{
static_assert(!sizeof(T), "Unable to serialize T. "
#ifdef _MSC_VER
"See T below: " __FUNCSIG__
#else
// "See T below: " __PRETTY_FUNCTION__
#endif
);
}
}
namespace _serialization_helper
{
template <typename out_t, typename deserializer_t, typename string_t = default_string_t>
class is_deserializable
{
template <typename U>
static auto test(int)
-> decltype(std::declval<deserializer_t>()(std::declval<basic_value<string_t>>(), std::declval<U&>()),
std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<out_t>(0))::value;
};
struct empty_deserializer
{
// sample:
// bool operator()(const json::value&, type_1&) const { return ...; }
// bool operator()(const json::value&, type_2&) const { return ...; }
// bool operator()(const json::value&, type_3&) const { return ...; }
};
template <typename T>
void unable_to_deserialize()
{
static_assert(!sizeof(T), "Unable to deserialize T. "
#ifdef _MSC_VER
"See T below: " __FUNCSIG__
#else
// "See T below: " __PRETTY_FUNCTION__
#endif
);
}
}
template <typename in_t, typename serializer_t = _serialization_helper::empty_serializer,
typename string_t = default_string_t>
basic_value<string_t> serialize(in_t&& in, const serializer_t& serializer = {})
{
if constexpr (_serialization_helper::is_serializable<in_t, serializer_t>::value) {
return serializer(std::forward<in_t>(in));
}
else if constexpr (std::is_constructible_v<basic_value<string_t>, in_t>) {
return basic_value<string_t>(std::forward<in_t>(in));
}
else if constexpr (_utils::is_collection<std::decay_t<in_t>>) {
basic_array<string_t> arr;
for (auto&& elem : in) {
using elem_t = decltype(elem);
auto j_elem = serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
arr.emplace_back(std::move(j_elem));
}
return arr;
}
else if constexpr (_utils::is_map<std::decay_t<in_t>>) {
basic_object<string_t> obj;
for (auto&& [key, elem] : in) {
using key_t = decltype(key);
using elem_t = decltype(elem);
auto j_elem = serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
obj.emplace(std::forward<key_t>(key), std::move(j_elem));
}
return obj;
}
else {
_serialization_helper::unable_to_serialize<in_t>();
}
}
template <typename out_t, typename deserializer_t = _serialization_helper::empty_deserializer,
typename string_t = default_string_t>
bool deserialize(const basic_value<string_t>& in, out_t& out, const deserializer_t& deserializer = {})
{
if constexpr (_serialization_helper::is_deserializable<out_t, deserializer_t>::value) {
return deserializer(in, out);
}
else if constexpr (std::is_constructible_v<out_t, basic_value<string_t>>) {
out = out_t(in);
return true;
}
else if constexpr (_utils::is_collection<std::decay_t<out_t>>) {
if (!in.is_array()) {
return false;
}
for (auto&& j_elem : in.as_array()) {
using elem_t = typename out_t::value_type;
elem_t elem {};
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
return false;
}
if constexpr (_as_collection_helper::has_emplace_back<out_t>::value) {
out.emplace_back(std::move(elem));
}
else {
out.emplace(std::move(elem));
}
}
return true;
}
else if constexpr (_utils::is_map<std::decay_t<out_t>>) {
if (!in.is_object()) {
return false;
}
for (auto&& [key, j_elem] : in.as_object()) {
using elem_t = typename out_t::value_type;
elem_t elem {};
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
return false;
}
out.emplace(std::move(elem));
}
return true;
}
else {
_serialization_helper::unable_to_deserialize<out_t>();
}
}
} // namespace json

View File

@@ -0,0 +1,5 @@
#pragma once
#include "array.hpp"
#include "object.hpp"
#include "value.hpp"

View File

@@ -0,0 +1,235 @@
#pragma once
#include <string>
#include <type_traits>
namespace json
{
template <typename string_t>
class basic_value;
template <typename string_t>
class basic_array;
template <typename string_t>
class basic_object;
using default_string_t = std::string;
using value = basic_value<default_string_t>;
using array = basic_array<default_string_t>;
using object = basic_object<default_string_t>;
using wvalue = basic_value<std::wstring>;
using warray = basic_array<std::wstring>;
using wobject = basic_object<std::wstring>;
}
namespace json::ext
{
template <typename T>
class jsonization
{
public:
// json::value to_json(const T&) const;
// bool check_json(const json::value&) const;
// bool from_json(const json::value&, T&) const;
};
}
namespace json::_utils
{
template <typename T>
using iterator_t = decltype(std::declval<T&>().begin());
template <typename T>
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;
template <typename T>
using iter_value_t = typename std::iterator_traits<remove_cvref_t<T>>::value_type;
template <typename R>
using range_value_t = iter_value_t<iterator_t<R>>;
template <typename T, typename = void>
constexpr bool is_string = false;
template <typename T>
constexpr bool is_string<T, std::void_t<typename T::traits_type>> =
std::is_same_v<typename T::traits_type, std::char_traits<typename T::value_type>>;
template <typename T, typename = void>
constexpr bool is_container = false;
template <typename T>
constexpr bool is_container<T, std::void_t<typename T::value_type, range_value_t<T>>> =
std::is_same_v<typename T::value_type, range_value_t<T>> && !is_string<T>;
template <typename T, typename = void>
constexpr bool is_map = false;
template <typename T>
constexpr bool is_map<T, std::void_t<typename T::key_type, typename T::mapped_type>> = is_container<T>;
template <typename T, typename = void>
constexpr bool is_collection = false;
template <typename T>
constexpr bool is_collection<T> = is_container<T> && !is_map<T>;
template <typename T>
class has_to_json_in_member
{
template <typename U>
static auto test(int) -> decltype(std::declval<U>().to_json(), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T>
class has_to_json_in_templ_spec
{
template <typename U>
static auto test(int) -> decltype(std::declval<ext::jsonization<U>>().to_json(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_check_json_in_member
{
template <typename U>
static auto test(int)
-> decltype(std::declval<U>().check_json(std::declval<json::basic_value<string_t>>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_check_json_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<U>>().check_json(std::declval<json::basic_value<string_t>>()),
std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_from_json_in_member
{
template <typename U>
static auto test(int)
-> decltype(std::declval<U>().from_json(std::declval<json::basic_value<string_t>>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_from_json_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<U>>().from_json(std::declval<json::basic_value<string_t>>(),
std::declval<U&>()),
std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename string_t>
static constexpr string_t unescape_string(const string_t& str)
{
using char_t = typename string_t::value_type;
string_t result {};
auto cur = str.cbegin();
auto end = str.cend();
auto no_escape_beg = cur;
char_t escape = 0;
for (; cur != end; ++cur) {
switch (*cur) {
case '"':
escape = '"';
break;
case '\\':
escape = '\\';
break;
case '\b':
escape = 'b';
break;
case '\f':
escape = 'f';
break;
case '\n':
escape = 'n';
break;
case '\r':
escape = 'r';
break;
case '\t':
escape = 't';
break;
default:
break;
}
if (escape) {
result += string_t(no_escape_beg, cur) + char_t('\\') + escape;
no_escape_beg = cur + 1;
escape = 0;
}
}
result += string_t(no_escape_beg, cur);
return result;
}
template <typename string_t>
static constexpr string_t true_string()
{
return { 't', 'r', 'u', 'e' };
}
template <typename string_t>
static constexpr string_t false_string()
{
return { 'f', 'a', 'l', 's', 'e' };
}
template <typename string_t>
static constexpr string_t null_string()
{
return { 'n', 'u', 'l', 'l' };
}
template <typename string_t, typename any_t>
string_t to_basic_string(any_t&& arg)
{
if constexpr (std::is_same_v<string_t, std::string>) {
return std::to_string(std::forward<any_t>(arg));
}
else if constexpr (std::is_same_v<string_t, std::wstring>) {
return std::to_wstring(std::forward<any_t>(arg));
}
else {
static_assert(!sizeof(any_t), "Unsupported type");
}
}
} // namespace json::_utils

View File

@@ -0,0 +1,994 @@
#pragma once
#include <cstddef>
#include <initializer_list>
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include <variant>
#include "exception.hpp"
#include "utils.hpp"
namespace json
{
template <typename string_t>
class basic_value
{
using array_ptr = std::unique_ptr<basic_array<string_t>>;
using object_ptr = std::unique_ptr<basic_object<string_t>>;
public:
enum class value_type : char
{
invalid,
null,
boolean,
string,
number,
array,
object
};
using var_t = std::variant<string_t, array_ptr, object_ptr>;
using char_t = typename string_t::value_type;
public:
basic_value();
basic_value(const basic_value<string_t>& rhs);
basic_value(basic_value<string_t>&& rhs) noexcept;
basic_value(bool b);
basic_value(int num);
basic_value(unsigned num);
basic_value(long num);
basic_value(unsigned long num);
basic_value(long long num);
basic_value(unsigned long long num);
basic_value(float num);
basic_value(double num);
basic_value(long double num);
basic_value(const char_t* str);
basic_value(string_t str);
basic_value(std::nullptr_t);
basic_value(basic_array<string_t> arr);
basic_value(basic_object<string_t> obj);
basic_value(std::initializer_list<typename basic_object<string_t>::value_type> init_list);
// Constructed from raw data
template <typename... args_t>
basic_value(value_type type, args_t&&... args);
template <typename collection_t,
std::enable_if_t<_utils::is_collection<collection_t> &&
std::is_constructible_v<typename basic_array<string_t>::value_type,
_utils::range_value_t<collection_t>>,
bool> = true>
basic_value(collection_t&& collection) : basic_value(basic_array<string_t>(std::forward<collection_t>(collection)))
{}
template <typename map_t, std::enable_if_t<_utils::is_map<map_t> &&
std::is_constructible_v<typename basic_object<string_t>::value_type,
_utils::range_value_t<map_t>>,
bool> = true>
basic_value(map_t&& map) : basic_value(basic_object<string_t>(std::forward<map_t>(map)))
{}
template <typename jsonization_t,
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
basic_value(const jsonization_t& value) : basic_value(value.to_json())
{}
template <typename jsonization_t,
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
basic_value(const jsonization_t& value) : basic_value(ext::jsonization<jsonization_t>().to_json(value))
{}
template <typename value_t, std::enable_if_t<!std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
basic_value(value_t) = delete;
// I don't know if you want to convert char to string or number, so I delete these constructors.
basic_value(char) = delete;
basic_value(wchar_t) = delete;
basic_value(char16_t) = delete;
basic_value(char32_t) = delete;
~basic_value();
bool valid() const noexcept { return _type != value_type::invalid; }
bool empty() const noexcept { return is_null(); }
bool is_null() const noexcept { return _type == value_type::null; }
bool is_number() const noexcept { return _type == value_type::number; }
bool is_boolean() const noexcept { return _type == value_type::boolean; }
bool is_string() const noexcept { return _type == value_type::string; }
bool is_array() const noexcept { return _type == value_type::array; }
bool is_object() const noexcept { return _type == value_type::object; }
template <typename value_t>
bool is() const noexcept;
template <typename value_t>
bool all() const;
bool contains(const string_t& key) const;
bool contains(size_t pos) const;
bool exists(const string_t& key) const { return contains(key); }
bool exists(size_t pos) const { return contains(pos); }
value_type type() const noexcept { return _type; }
const basic_value<string_t>& at(size_t pos) const;
const basic_value<string_t>& at(const string_t& key) const;
bool erase(size_t pos);
bool erase(const string_t& key);
// Usage: get(key_1, key_2, ..., default_value);
template <typename... key_then_default_value_t>
auto get(key_then_default_value_t&&... keys_then_default_value) const;
template <typename value_t = basic_value<string_t>>
std::optional<value_t> find(size_t pos) const;
template <typename value_t = basic_value<string_t>>
std::optional<value_t> find(const string_t& key) const;
bool as_boolean() const;
int as_integer() const;
unsigned as_unsigned() const;
long as_long() const;
unsigned long as_unsigned_long() const;
long long as_long_long() const;
unsigned long long as_unsigned_long_long() const;
float as_float() const;
double as_double() const;
long double as_long_double() const;
string_t as_string() const;
const basic_array<string_t>& as_array() const;
const basic_object<string_t>& as_object() const;
template <typename value_t, template <typename...> typename collection_t = std::vector>
collection_t<value_t> as_collection() const;
template <typename value_t, template <typename...> typename map_t = std::map>
map_t<string_t, value_t> as_map() const;
template <typename value_t>
value_t as() const;
basic_array<string_t>& as_array();
basic_object<string_t>& as_object();
template <typename... args_t>
decltype(auto) emplace(args_t&&... args);
void clear() noexcept;
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
// return raw string
string_t to_string() const;
string_t format(size_t indent = 4) const { return format(indent, 0); }
basic_value<string_t>& operator=(const basic_value<string_t>& rhs);
basic_value<string_t>& operator=(basic_value<string_t>&&) noexcept;
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
basic_value<string_t>& operator=(value_t rhs)
{
return *this = basic_value<string_t>(std::move(rhs));
}
bool operator==(const basic_value<string_t>& rhs) const;
bool operator!=(const basic_value<string_t>& rhs) const { return !(*this == rhs); }
const basic_value<string_t>& operator[](size_t pos) const;
basic_value<string_t>& operator[](size_t pos);
basic_value<string_t>& operator[](const string_t& key);
basic_value<string_t>& operator[](string_t&& key);
basic_value<string_t> operator|(const basic_object<string_t>& rhs) const&;
basic_value<string_t> operator|(basic_object<string_t>&& rhs) const&;
basic_value<string_t> operator|(const basic_object<string_t>& rhs) &&;
basic_value<string_t> operator|(basic_object<string_t>&& rhs) &&;
basic_value<string_t>& operator|=(const basic_object<string_t>& rhs);
basic_value<string_t>& operator|=(basic_object<string_t>&& rhs);
basic_value<string_t> operator+(const basic_array<string_t>& rhs) const&;
basic_value<string_t> operator+(basic_array<string_t>&& rhs) const&;
basic_value<string_t> operator+(const basic_array<string_t>& rhs) &&;
basic_value<string_t> operator+(basic_array<string_t>&& rhs) &&;
basic_value<string_t>& operator+=(const basic_array<string_t>& rhs);
basic_value<string_t>& operator+=(basic_array<string_t>&& rhs);
explicit operator bool() const { return as_boolean(); }
explicit operator int() const { return as_integer(); }
explicit operator unsigned() const { return as_unsigned(); }
explicit operator long() const { return as_long(); }
explicit operator unsigned long() const { return as_unsigned_long(); }
explicit operator long long() const { return as_long_long(); }
explicit operator unsigned long long() const { return as_unsigned_long_long(); }
explicit operator float() const { return as_float(); }
explicit operator double() const { return as_double(); }
explicit operator long double() const { return as_long_double(); }
explicit operator string_t() const { return as_string(); }
explicit operator basic_array<string_t>() const { return as_array(); }
explicit operator basic_object<string_t>() const { return as_object(); }
template <typename value_t, template <typename...> typename collection_t = std::vector,
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
explicit operator collection_t<value_t>() const
{
return as_collection<value_t, collection_t>();
}
template <typename value_t, template <typename...> typename map_t = std::map,
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
explicit operator map_t<string_t, value_t>() const
{
return as_map<value_t, map_t>();
}
template <typename jsonization_t,
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
explicit operator jsonization_t() const
{
jsonization_t dst {};
if (!dst.from_json(*this)) {
throw exception("Wrong JSON");
}
return dst;
}
template <typename jsonization_t,
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
explicit operator jsonization_t() const
{
jsonization_t dst {};
if (!ext::jsonization<jsonization_t>().from_json(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
private:
friend class basic_array<string_t>;
friend class basic_object<string_t>;
string_t format(size_t indent, size_t indent_times) const;
static var_t deep_copy(const var_t& src);
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const;
template <typename value_t, typename first_key_t, typename... rest_keys_t>
auto get_helper(const value_t& default_value, first_key_t&& first, rest_keys_t&&... rest) const;
template <typename value_t, typename unique_key_t>
auto get_helper(const value_t& default_value, unique_key_t&& first) const;
const string_t& as_basic_type_str() const;
string_t& as_basic_type_str();
value_type _type = value_type::null;
var_t _raw_data;
};
template <typename string_t>
inline basic_value<string_t>::basic_value() = default;
template <typename string_t>
inline basic_value<string_t>::basic_value(const basic_value<string_t>& rhs)
: _type(rhs._type), _raw_data(deep_copy(rhs._raw_data))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(basic_value<string_t>&& rhs) noexcept = default;
template <typename string_t>
inline basic_value<string_t>::basic_value(bool b)
: _type(value_type::boolean),
_raw_data(string_t(b ? _utils::true_string<string_t>() : _utils::false_string<string_t>()))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(int num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(unsigned num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(long num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(unsigned long num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(long long num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(unsigned long long num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(float num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(double num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(long double num)
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(const char_t* str) : _type(value_type::string), _raw_data(string_t(str))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(string_t str) : _type(value_type::string), _raw_data(std::move(str))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(std::nullptr_t) : _type(value_type::null)
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(basic_array<string_t> arr)
: _type(value_type::array), _raw_data(std::make_unique<basic_array<string_t>>(std::move(arr)))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(basic_object<string_t> obj)
: _type(value_type::object), _raw_data(std::make_unique<basic_object<string_t>>(std::move(obj)))
{}
template <typename string_t>
inline basic_value<string_t>::basic_value(std::initializer_list<typename basic_object<string_t>::value_type> init_list)
: _type(value_type::object), _raw_data(std::make_unique<basic_object<string_t>>(init_list))
{}
// for Pimpl
template <typename string_t>
inline basic_value<string_t>::~basic_value() = default;
template <typename string_t>
template <typename value_t>
inline bool basic_value<string_t>::is() const noexcept
{
if constexpr (std::is_same_v<basic_value<string_t>, value_t>) {
return true;
}
else if constexpr (_utils::has_check_json_in_member<value_t, string_t>::value) {
return value_t().check_json(*this);
}
else if constexpr (_utils::has_check_json_in_templ_spec<value_t, string_t>::value) {
return ext::jsonization<value_t>().check_json(*this);
}
else if constexpr (std::is_same_v<bool, value_t>) {
return is_boolean();
}
else if constexpr (std::is_arithmetic_v<value_t>) {
return is_number();
}
else if constexpr (std::is_constructible_v<string_t, value_t>) {
return is_string();
}
else if constexpr (std::is_same_v<basic_array<string_t>, value_t>) {
return is_array();
}
else if constexpr (_utils::is_collection<value_t>) {
return is_array() && all<typename value_t::value_type>();
}
else if constexpr (std::is_same_v<basic_object<string_t>, value_t>) {
return is_object();
}
else if constexpr (_utils::is_map<value_t>) {
return is_object() && std::is_constructible_v<string_t, typename value_t::key_type> &&
all<typename value_t::mapped_type>();
}
else {
static_assert(!sizeof(value_t), "Unsupported type");
}
}
template <typename string_t>
inline bool basic_value<string_t>::contains(const string_t& key) const
{
return is_object() && as_object().contains(key);
}
template <typename string_t>
inline bool basic_value<string_t>::contains(size_t pos) const
{
return is_array() && as_array().contains(pos);
}
template <typename string_t>
inline const basic_value<string_t>& basic_value<string_t>::at(size_t pos) const
{
return as_array().at(pos);
}
template <typename string_t>
inline const basic_value<string_t>& basic_value<string_t>::at(const string_t& key) const
{
return as_object().at(key);
}
template <typename string_t>
inline bool basic_value<string_t>::erase(size_t pos)
{
return as_array().erase(pos);
}
template <typename string_t>
inline bool basic_value<string_t>::erase(const string_t& key)
{
return as_object().erase(key);
}
template <typename string_t>
template <typename... key_then_default_value_t>
inline auto basic_value<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
{
return get(std::forward_as_tuple(keys_then_default_value...),
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
}
template <typename string_t>
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
inline auto basic_value<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const
{
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
return get_helper(std::get<default_value_index>(keys_then_default_value),
std::get<keys_indexes_t>(keys_then_default_value)...);
}
template <typename string_t>
template <typename value_t, typename first_key_t, typename... rest_keys_t>
inline auto basic_value<string_t>::get_helper(const value_t& default_value, first_key_t&& first,
rest_keys_t&&... rest) const
{
if constexpr (std::is_constructible_v<string_t, first_key_t>) {
return is_object() ? as_object().get_helper(default_value, std::forward<first_key_t>(first),
std::forward<rest_keys_t>(rest)...)
: default_value;
}
else if constexpr (std::is_integral_v<std::decay_t<first_key_t>>) {
return is_array() ? as_array().get_helper(default_value, std::forward<first_key_t>(first),
std::forward<rest_keys_t>(rest)...)
: default_value;
}
else {
static_assert(!sizeof(first_key_t), "Parameter must be integral or string_t constructible");
}
}
template <typename string_t>
template <typename value_t, typename unique_key_t>
inline auto basic_value<string_t>::get_helper(const value_t& default_value, unique_key_t&& first) const
{
if constexpr (std::is_constructible_v<string_t, unique_key_t>) {
return is_object() ? as_object().get_helper(default_value, std::forward<unique_key_t>(first)) : default_value;
}
else if constexpr (std::is_integral_v<std::decay_t<unique_key_t>>) {
return is_array() ? as_array().get_helper(default_value, std::forward<unique_key_t>(first)) : default_value;
}
else {
static_assert(!sizeof(unique_key_t), "Parameter must be integral or string_t constructible");
}
}
template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_value<string_t>::find(size_t pos) const
{
return is_array() ? as_array().template find<value_t>(pos) : std::nullopt;
}
template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_value<string_t>::find(const string_t& key) const
{
return is_object() ? as_object().template find<value_t>(key) : std::nullopt;
}
template <typename string_t>
inline bool basic_value<string_t>::as_boolean() const
{
if (is_boolean()) {
if (const string_t& b_str = as_basic_type_str(); b_str == _utils::true_string<string_t>()) {
return true;
}
else if (b_str == _utils::false_string<string_t>()) {
return false;
}
else {
throw exception("Unknown Parse Error");
}
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline int basic_value<string_t>::as_integer() const
{
if (is_number()) {
return std::stoi(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline unsigned basic_value<string_t>::as_unsigned() const
{
// I don't know why there is no std::stou.
return static_cast<unsigned>(as_unsigned_long());
}
template <typename string_t>
inline long basic_value<string_t>::as_long() const
{
if (is_number()) {
return std::stol(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline unsigned long basic_value<string_t>::as_unsigned_long() const
{
if (is_number()) {
return std::stoul(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline long long basic_value<string_t>::as_long_long() const
{
if (is_number()) {
return std::stoll(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline unsigned long long basic_value<string_t>::as_unsigned_long_long() const
{
if (is_number()) {
return std::stoull(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline float basic_value<string_t>::as_float() const
{
if (is_number()) {
return std::stof(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline double basic_value<string_t>::as_double() const
{
if (is_number()) {
return std::stod(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline long double basic_value<string_t>::as_long_double() const
{
if (is_number()) {
return std::stold(as_basic_type_str());
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline string_t basic_value<string_t>::as_string() const
{
if (is_string()) {
return as_basic_type_str();
}
else {
throw exception("Wrong Type");
}
}
template <typename string_t>
inline const basic_array<string_t>& basic_value<string_t>::as_array() const
{
if (is_array()) {
return *std::get<array_ptr>(_raw_data);
}
throw exception("Wrong Type");
}
template <typename string_t>
inline const basic_object<string_t>& basic_value<string_t>::as_object() const
{
if (is_object()) {
return *std::get<object_ptr>(_raw_data);
}
throw exception("Wrong Type or data empty");
}
template <typename string_t>
inline basic_array<string_t>& basic_value<string_t>::as_array()
{
if (empty()) {
*this = basic_array<string_t>();
}
if (is_array()) {
return *std::get<array_ptr>(_raw_data);
}
throw exception("Wrong Type");
}
template <typename string_t>
inline basic_object<string_t>& basic_value<string_t>::as_object()
{
if (empty()) {
*this = basic_object<string_t>();
}
if (is_object()) {
return *std::get<object_ptr>(_raw_data);
}
throw exception("Wrong Type or data empty");
}
template <typename string_t>
template <typename value_t>
inline value_t basic_value<string_t>::as() const
{
if constexpr (std::is_same_v<basic_value<string_t>, value_t>) {
return *this;
}
else if constexpr (_utils::has_from_json_in_member<value_t, string_t>::value) {
value_t dst {};
if (!dst.from_json(*this)) {
throw exception("Wrong JSON");
}
return dst;
}
else if constexpr (_utils::has_from_json_in_templ_spec<value_t, string_t>::value) {
value_t dst {};
if (!ext::jsonization<value_t>().from_json(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
else {
return static_cast<value_t>(*this);
}
}
template <typename string_t>
inline const string_t& basic_value<string_t>::as_basic_type_str() const
{
return std::get<string_t>(_raw_data);
}
template <typename string_t>
inline string_t& basic_value<string_t>::as_basic_type_str()
{
return std::get<string_t>(_raw_data);
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_value<string_t>::emplace(args_t&&... args)
{
constexpr bool is_array_args = std::is_constructible_v<typename basic_array<string_t>::value_type, args_t...>;
constexpr bool is_object_args = std::is_constructible_v<typename basic_object<string_t>::value_type, args_t...>;
static_assert(is_array_args || is_object_args, "Args can not constructure a array or object value");
if constexpr (is_array_args) {
return as_array().emplace_back(std::forward<args_t>(args)...);
}
else if constexpr (is_object_args) {
return as_object().emplace(std::forward<args_t>(args)...);
}
}
template <typename string_t>
inline void basic_value<string_t>::clear() noexcept
{
*this = basic_value<string_t>();
}
template <typename string_t>
inline string_t basic_value<string_t>::to_string() const
{
switch (_type) {
case value_type::null:
return _utils::null_string<string_t>();
case value_type::boolean:
case value_type::number:
return as_basic_type_str();
case value_type::string:
return char_t('"') + _utils::unescape_string(as_basic_type_str()) + char_t('"');
case value_type::array:
return as_array().to_string();
case value_type::object:
return as_object().to_string();
default:
throw exception("Unknown basic_value Type");
}
}
template <typename string_t>
inline string_t basic_value<string_t>::format(size_t indent, size_t indent_times) const
{
switch (_type) {
case value_type::null:
case value_type::boolean:
case value_type::number:
case value_type::string:
return to_string();
case value_type::array:
return as_array().format(indent, indent_times);
case value_type::object:
return as_object().format(indent, indent_times);
default:
throw exception("Unknown basic_value Type");
}
}
template <typename string_t>
template <typename value_t>
inline bool basic_value<string_t>::all() const
{
if (is_array()) {
return as_array().template all<value_t>();
}
else if (is_object()) {
return as_object().template all<value_t>();
}
else {
return false;
}
}
template <typename string_t>
template <typename value_t, template <typename...> typename collection_t>
inline collection_t<value_t> basic_value<string_t>::as_collection() const
{
return as_array().template as_collection<value_t, collection_t>();
}
template <typename string_t>
template <typename value_t, template <typename...> typename map_t>
inline map_t<string_t, value_t> basic_value<string_t>::as_map() const
{
return as_object().template as_map<value_t, map_t>();
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator=(const basic_value<string_t>& rhs)
{
_type = rhs._type;
_raw_data = deep_copy(rhs._raw_data);
return *this;
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator=(basic_value<string_t>&& rhs) noexcept = default;
template <typename string_t>
inline bool basic_value<string_t>::operator==(const basic_value<string_t>& rhs) const
{
if (_type != rhs._type) return false;
switch (_type) {
case value_type::null:
return rhs.is_null();
case value_type::boolean:
case value_type::number:
case value_type::string:
return _raw_data == rhs._raw_data;
case value_type::array:
return as_array() == rhs.as_array();
case value_type::object:
return as_object() == rhs.as_object();
default:
throw exception("Unknown basic_value Type");
}
}
template <typename string_t>
inline const basic_value<string_t>& basic_value<string_t>::operator[](size_t pos) const
{
// basic_array not support to create by operator[]
return as_array()[pos];
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator[](size_t pos)
{
// basic_array not support to create by operator[]
return as_array()[pos];
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator[](const string_t& key)
{
if (empty()) {
*this = basic_object<string_t>();
}
return as_object()[key];
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator[](string_t&& key)
{
if (empty()) {
*this = basic_object<string_t>();
}
return as_object()[std::move(key)];
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator|(const basic_object<string_t>& rhs) const&
{
return as_object() | rhs;
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator|(basic_object<string_t>&& rhs) const&
{
return as_object() | std::move(rhs);
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator|(const basic_object<string_t>& rhs) &&
{
return std::move(as_object()) | rhs;
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator|(basic_object<string_t>&& rhs) &&
{
return std::move(as_object()) | std::move(rhs);
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator|=(const basic_object<string_t>& rhs)
{
as_object() |= rhs;
return *this;
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator|=(basic_object<string_t>&& rhs)
{
as_object() |= std::move(rhs);
return *this;
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator+(const basic_array<string_t>& rhs) const&
{
return as_array() + rhs;
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator+(basic_array<string_t>&& rhs) const&
{
return as_array() + std::move(rhs);
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator+(const basic_array<string_t>& rhs) &&
{
return std::move(as_array()) + rhs;
}
template <typename string_t>
inline basic_value<string_t> basic_value<string_t>::operator+(basic_array<string_t>&& rhs) &&
{
return std::move(as_array()) + std::move(rhs);
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator+=(const basic_array<string_t>& rhs)
{
as_array() += rhs;
return *this;
}
template <typename string_t>
inline basic_value<string_t>& basic_value<string_t>::operator+=(basic_array<string_t>&& rhs)
{
as_array() += std::move(rhs);
return *this;
}
template <typename string_t>
template <typename... args_t>
inline basic_value<string_t>::basic_value(value_type type, args_t&&... args)
: _type(type), _raw_data(std::forward<args_t>(args)...)
{
static_assert(std::is_constructible_v<var_t, args_t...>, "Parameter can't be used to construct a var_t");
}
template <typename string_t>
inline typename basic_value<string_t>::var_t basic_value<string_t>::deep_copy(const var_t& src)
{
var_t dst;
if (const auto string_ptr = std::get_if<string_t>(&src)) {
dst = *string_ptr;
}
else if (const auto arr_ptr = std::get_if<array_ptr>(&src)) {
dst = std::make_unique<basic_array<string_t>>(**arr_ptr);
}
else if (const auto obj_ptr = std::get_if<object_ptr>(&src)) {
dst = std::make_unique<basic_object<string_t>>(**obj_ptr);
}
else {
// maybe invalid_value
}
return dst;
}
template <typename ostream_t, typename string_t,
typename std_ostream_t =
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
typename =
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
ostream_t& operator<<(ostream_t& out, const basic_value<string_t>& val)
{
out << val.format();
return out;
}
} // namespace json

File diff suppressed because it is too large Load Diff

4
3rdparty/include/meojson/json5.hpp vendored Normal file
View File

@@ -0,0 +1,4 @@
#pragma once
#include "common/types.hpp"
#include "parser5/parser5.hpp"

View File

@@ -138,5 +138,4 @@ using packed_bytes_trait_max =
std::conditional_t<packed_bytes_trait<16>::available, packed_bytes_trait<16>,
std::conditional_t<packed_bytes_trait<8>::available, packed_bytes_trait<8>,
packed_bytes_trait<4>>>>;
} // namespace json::_packed_bytes

View File

@@ -0,0 +1,627 @@
#pragma once
#include <fstream>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include "../common/types.hpp"
#include "packed_bytes.hpp"
namespace json
{
// ****************************
// * parser declare *
// ****************************
template <typename string_t = default_string_t, typename parsing_t = void,
typename accel_traits = _packed_bytes::packed_bytes_trait_max>
class parser
{
public:
using parsing_iter_t = typename parsing_t::const_iterator;
public:
~parser() noexcept = default;
static std::optional<basic_value<string_t>> parse(const parsing_t& content);
private:
parser(parsing_iter_t cbegin, parsing_iter_t cend) noexcept : _cur(cbegin), _end(cend) { ; }
std::optional<basic_value<string_t>> parse();
basic_value<string_t> parse_value();
basic_value<string_t> parse_null();
basic_value<string_t> parse_boolean();
basic_value<string_t> parse_number();
// parse and return a basic_value<string_t> whose type is value_type::string
basic_value<string_t> parse_string();
basic_value<string_t> parse_array();
basic_value<string_t> parse_object();
// parse and return a string_t
std::optional<string_t> parse_stdstring();
bool skip_string_literal_with_accel();
bool skip_whitespace() noexcept;
bool skip_digit();
private:
parsing_iter_t _cur;
parsing_iter_t _end;
};
// ***************************
// * utils declare *
// ***************************
template <typename parsing_t>
auto parse(const parsing_t& content);
template <typename char_t>
auto parse(char_t* content);
template <typename istream_t,
typename = std::enable_if_t<std::is_base_of_v<std::basic_istream<typename istream_t::char_type>, istream_t>>>
auto parse(istream_t& istream, bool check_bom);
template <typename ifstream_t = std::ifstream, typename path_t = void>
auto open(const path_t& path, bool check_bom = false);
namespace literals
{
value operator""_json(const char* str, size_t len);
wvalue operator""_json(const wchar_t* str, size_t len);
value operator""_jvalue(const char* str, size_t len);
wvalue operator""_jvalue(const wchar_t* str, size_t len);
array operator""_jarray(const char* str, size_t len);
warray operator""_jarray(const wchar_t* str, size_t len);
object operator""_jobject(const char* str, size_t len);
wobject operator""_jobject(const wchar_t* str, size_t len);
}
template <typename string_t = default_string_t>
const basic_value<string_t> invalid_value();
// *************************
// * parser impl *
// *************************
template <typename string_t, typename parsing_t, typename accel_traits>
inline std::optional<basic_value<string_t>> parser<string_t, parsing_t, accel_traits>::parse(const parsing_t& content)
{
return parser<string_t, parsing_t, accel_traits>(content.cbegin(), content.cend()).parse();
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline std::optional<basic_value<string_t>> parser<string_t, parsing_t, accel_traits>::parse()
{
if (!skip_whitespace()) {
return std::nullopt;
}
basic_value<string_t> result_value;
switch (*_cur) {
case '[':
result_value = parse_array();
break;
case '{':
result_value = parse_object();
break;
default: // A JSON payload should be an basic_object or basic_array
return std::nullopt;
}
if (!result_value.valid()) {
return std::nullopt;
}
// After the parsing is complete, there should be no more content other than
// spaces behind
if (skip_whitespace()) {
return std::nullopt;
}
return result_value;
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_value()
{
switch (*_cur) {
case 'n':
return parse_null();
case 't':
case 'f':
return parse_boolean();
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return parse_number();
case '"':
return parse_string();
case '[':
return parse_array();
case '{':
return parse_object();
default:
return invalid_value<string_t>();
}
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_null()
{
for (const auto& ch : _utils::null_string<string_t>()) {
if (_cur != _end && *_cur == ch) {
++_cur;
}
else {
return invalid_value<string_t>();
}
}
return basic_value<string_t>();
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_boolean()
{
switch (*_cur) {
case 't':
for (const auto& ch : _utils::true_string<string_t>()) {
if (_cur != _end && *_cur == ch) {
++_cur;
}
else {
return invalid_value<string_t>();
}
}
return true;
case 'f':
for (const auto& ch : _utils::false_string<string_t>()) {
if (_cur != _end && *_cur == ch) {
++_cur;
}
else {
return invalid_value<string_t>();
}
}
return false;
default:
return invalid_value<string_t>();
}
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_number()
{
const auto first = _cur;
if (*_cur == '-') {
++_cur;
}
// numbers cannot have leading zeroes
if (_cur != _end && *_cur == '0' && _cur + 1 != _end && std::isdigit(*(_cur + 1))) {
return invalid_value<string_t>();
}
if (!skip_digit()) {
return invalid_value<string_t>();
}
if (*_cur == '.') {
++_cur;
if (!skip_digit()) {
return invalid_value<string_t>();
}
}
if (*_cur == 'e' || *_cur == 'E') {
if (++_cur == _end) {
return invalid_value<string_t>();
}
if (*_cur == '+' || *_cur == '-') {
++_cur;
}
if (!skip_digit()) {
return invalid_value<string_t>();
}
}
return basic_value<string_t>(basic_value<string_t>::value_type::number, string_t(first, _cur));
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_string()
{
auto string_opt = parse_stdstring();
if (!string_opt) {
return invalid_value<string_t>();
}
return basic_value<string_t>(basic_value<string_t>::value_type::string, std::move(string_opt).value());
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_array()
{
if (*_cur == '[') {
++_cur;
}
else {
return invalid_value<string_t>();
}
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
else if (*_cur == ']') {
++_cur;
// empty basic_array
return basic_array<string_t>();
}
typename basic_array<string_t>::raw_array result;
while (true) {
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
basic_value<string_t> val = parse_value();
if (!val.valid() || !skip_whitespace()) {
return invalid_value<string_t>();
}
result.emplace_back(std::move(val));
if (*_cur == ',') {
++_cur;
}
else {
break;
}
}
if (skip_whitespace() && *_cur == ']') {
++_cur;
}
else {
return invalid_value<string_t>();
}
return basic_array<string_t>(std::move(result));
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_object()
{
if (*_cur == '{') {
++_cur;
}
else {
return invalid_value<string_t>();
}
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
else if (*_cur == '}') {
++_cur;
// empty basic_object
return basic_object<string_t>();
}
typename basic_object<string_t>::raw_object result;
while (true) {
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
auto key_opt = parse_stdstring();
if (key_opt && skip_whitespace() && *_cur == ':') {
++_cur;
}
else {
return invalid_value<string_t>();
}
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
basic_value<string_t> val = parse_value();
if (!val.valid() || !skip_whitespace()) {
return invalid_value<string_t>();
}
result.emplace(std::move(*key_opt), std::move(val));
if (*_cur == ',') {
++_cur;
}
else {
break;
}
}
if (skip_whitespace() && *_cur == '}') {
++_cur;
}
else {
return invalid_value<string_t>();
}
return basic_object<string_t>(std::move(result));
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_stdstring()
{
if (*_cur == '"') {
++_cur;
}
else {
return std::nullopt;
}
string_t result;
auto no_escape_beg = _cur;
while (_cur != _end) {
if constexpr (sizeof(*_cur) == 1 && accel_traits::available) {
if (!skip_string_literal_with_accel()) {
return std::nullopt;
}
}
switch (*_cur) {
case '\t':
case '\r':
case '\n':
return std::nullopt;
case '\\': {
result += string_t(no_escape_beg, _cur++);
if (_cur == _end) {
return std::nullopt;
}
switch (*_cur) {
case '"':
result.push_back('"');
break;
case '\\':
result.push_back('\\');
break;
case '/':
result.push_back('/');
break;
case 'b':
result.push_back('\b');
break;
case 'f':
result.push_back('\f');
break;
case 'n':
result.push_back('\n');
break;
case 'r':
result.push_back('\r');
break;
case 't':
result.push_back('\t');
break;
// case 'u':
// result.push_back('\u');
// break;
default:
// Illegal backslash escape
return std::nullopt;
}
no_escape_beg = ++_cur;
break;
}
case '"': {
result += string_t(no_escape_beg, _cur++);
return result;
}
default:
++_cur;
break;
}
}
return std::nullopt;
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline bool parser<string_t, parsing_t, accel_traits>::skip_string_literal_with_accel()
{
if constexpr (sizeof(*_cur) != 1) {
return false;
}
while (_end - _cur >= accel_traits::step) {
auto pack = accel_traits::load_unaligned(&(*_cur));
auto result = accel_traits::less(pack, 32);
result = accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('"')));
result = accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('\\')));
if (accel_traits::is_all_zero(result)) {
_cur += accel_traits::step;
}
else {
auto index = accel_traits::first_nonzero_byte(result);
_cur += index;
break;
}
}
return _cur != _end;
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline bool parser<string_t, parsing_t, accel_traits>::skip_whitespace() noexcept
{
while (_cur != _end) {
switch (*_cur) {
case ' ':
case '\t':
case '\r':
case '\n':
++_cur;
break;
case '\0':
return false;
default:
return true;
}
}
return false;
}
template <typename string_t, typename parsing_t, typename accel_traits>
inline bool parser<string_t, parsing_t, accel_traits>::skip_digit()
{
// At least one digit
if (_cur != _end && std::isdigit(*_cur)) {
++_cur;
}
else {
return false;
}
while (_cur != _end && std::isdigit(*_cur)) {
++_cur;
}
if (_cur != _end) {
return true;
}
else {
return false;
}
}
// *************************
// * utils impl *
// *************************
template <typename parsing_t>
auto parse(const parsing_t& content)
{
using string_t = std::basic_string<typename parsing_t::value_type>;
return parser<string_t, parsing_t>::parse(content);
}
template <typename char_t>
auto parse(char_t* content)
{
return parse(std::basic_string_view<std::decay_t<char_t>> { content });
}
template <typename istream_t, typename _>
auto parse(istream_t& ifs, bool check_bom)
{
using string_t = std::basic_string<typename istream_t::char_type>;
ifs.seekg(0, std::ios::end);
auto file_size = ifs.tellg();
ifs.seekg(0, std::ios::beg);
string_t str(file_size, '\0');
ifs.read(str.data(), file_size);
if (check_bom) {
using uchar = unsigned char;
static constexpr uchar Bom_0 = 0xEF;
static constexpr uchar Bom_1 = 0xBB;
static constexpr uchar Bom_2 = 0xBF;
if (str.size() >= 3 && static_cast<uchar>(str.at(0)) == Bom_0 && static_cast<uchar>(str.at(1)) == Bom_1 &&
static_cast<uchar>(str.at(2)) == Bom_2) {
str.assign(str.begin() + 3, str.end());
}
}
return parse(str);
}
template <typename ifstream_t, typename path_t>
auto open(const path_t& filepath, bool check_bom)
{
using char_t = typename ifstream_t::char_type;
using string_t = std::basic_string<char_t>;
using json_t = json::basic_value<string_t>;
using return_t = std::optional<json_t>;
ifstream_t ifs(filepath, std::ios::in);
if (!ifs.is_open()) {
return return_t(std::nullopt);
}
auto opt = parse(ifs, check_bom);
ifs.close();
return opt;
}
namespace literals
{
inline value operator""_json(const char* str, size_t len)
{
return operator""_jvalue(str, len);
}
inline wvalue operator""_json(const wchar_t* str, size_t len)
{
return operator""_jvalue(str, len);
}
inline value operator""_jvalue(const char* str, size_t len)
{
return parse(std::string_view(str, len)).value_or(value());
}
inline wvalue operator""_jvalue(const wchar_t* str, size_t len)
{
return parse(std::wstring_view(str, len)).value_or(wvalue());
}
inline array operator""_jarray(const char* str, size_t len)
{
auto val = parse(std::string_view(str, len)).value_or(value());
return val.is_array() ? val.as_array() : array();
}
inline warray operator""_jarray(const wchar_t* str, size_t len)
{
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
return val.is_array() ? val.as_array() : warray();
}
inline object operator""_jobject(const char* str, size_t len)
{
auto val = parse(std::string_view(str, len)).value_or(value());
return val.is_object() ? val.as_object() : object();
}
inline wobject operator""_jobject(const wchar_t* str, size_t len)
{
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
return val.is_object() ? val.as_object() : wobject();
}
} // namespace literals
template <typename string_t>
const basic_value<string_t> invalid_value()
{
return basic_value<string_t>(basic_value<string_t>::value_type::invalid, typename basic_value<string_t>::var_t());
}
} // namespace json

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,241 @@
#pragma once
#include <string>
#include <type_traits>
#include "../common/types.hpp"
namespace json::_jsonization_helper
{
struct next_is_optional_t
{};
struct va_arg_end
{};
struct dumper
{
template <typename var_t, typename... rest_t>
json::value _to_json(const char* key, const var_t& var, rest_t&&... rest) const
{
json::value result = _to_json(std::forward<rest_t>(rest)...);
result.emplace(key, var);
return result;
}
template <typename... rest_t>
json::value _to_json(const char*, next_is_optional_t, rest_t&&... rest) const
{
return _to_json(std::forward<rest_t>(rest)...);
}
json::value _to_json(va_arg_end) const { return {}; }
};
struct checker
{
template <typename var_t, typename... rest_t>
bool _check_json(const json::value& in, std::string& error_key, const char* key, const var_t&,
rest_t&&... rest) const
{
auto opt = in.find(key);
if (!opt || !opt->is<var_t>()) {
error_key = key;
return false;
}
return _check_json(in, error_key, std::forward<rest_t>(rest)...);
}
template <typename var_t, typename... rest_t>
bool _check_json(const json::value& in, std::string& error_key, const char*, next_is_optional_t, const char* key,
const var_t&, rest_t&&... rest) const
{
auto opt = in.find(key);
if (opt) {
if (!opt->is<var_t>()) {
error_key = key;
return false;
}
} // next_is_optional_t, ignore key not found
return _check_json(in, error_key, std::forward<rest_t>(rest)...);
}
bool _check_json(const json::value&, std::string&, va_arg_end) const { return true; }
};
struct loader
{
template <typename var_t, typename... rest_t>
bool _from_json(const json::value& in, std::string& error_key, const char* key, var_t& var, rest_t&&... rest) const
{
auto opt = in.find(key);
if (!opt || !opt->is<var_t>()) {
error_key = key;
return false;
}
var = std::move(opt)->as<var_t>();
return _from_json(in, error_key, std::forward<rest_t>(rest)...);
}
template <typename var_t, typename... rest_t>
bool _from_json(const json::value& in, std::string& error_key, const char*, next_is_optional_t, const char* key,
var_t& var, rest_t&&... rest) const
{
auto opt = in.find(key);
if (opt) {
if (!opt->is<var_t>()) {
error_key = key;
return false;
}
var = std::move(opt)->as<var_t>();
} // next_is_optional_t, ignore key not found
return _from_json(in, error_key, std::forward<rest_t>(rest)...);
}
bool _from_json(const json::value&, std::string&, va_arg_end) const { return true; }
};
} // namespace json::_jsonization_helper
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#endif
namespace json::_private_macro
{
#define _MEOJSON_STRINGIZE(arg) _MEOJSON_STRINGIZE1(arg)
#define _MEOJSON_STRINGIZE1(arg) _MEOJSON_STRINGIZE2(arg)
#define _MEOJSON_STRINGIZE2(arg) #arg
#define _MEOJSON_CONCATENATE(arg1, arg2) _MEOJSON_CONCATENATE1(arg1, arg2)
#define _MEOJSON_CONCATENATE1(arg1, arg2) _MEOJSON_CONCATENATE2(arg1, arg2)
#define _MEOJSON_CONCATENATE2(arg1, arg2) arg1##arg2
#define _MEOJSON_EXPAND(x) x
#define _MEOJSON_FOR_EACH_0(pred, ...)
#define _MEOJSON_FOR_EACH_1(pred, x, ...) pred(x)
#define _MEOJSON_FOR_EACH_2(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_1(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_3(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_2(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_4(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_3(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_5(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_4(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_6(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_5(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_7(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_6(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_8(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_7(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_9(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_8(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_10(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_9(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_11(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_10(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_12(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_11(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_13(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_12(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_14(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_13(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_15(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_14(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_16(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_15(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_17(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_16(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_18(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_17(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_19(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_18(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_20(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_19(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_21(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_20(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_22(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_21(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_23(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_22(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_24(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_23(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_25(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_24(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_26(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_25(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_27(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_26(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_28(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_27(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_29(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_28(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_30(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_29(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_31(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_30(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_32(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_31(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_33(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_32(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_34(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_33(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_35(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_34(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_36(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_35(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_37(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_36(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_38(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_37(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_39(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_38(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_40(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_39(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_41(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_40(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_42(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_41(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_43(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_42(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_44(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_43(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_45(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_44(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_46(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_45(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_47(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_46(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_48(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_47(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_49(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_48(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_50(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_49(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_51(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_50(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_52(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_51(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_53(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_52(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_54(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_53(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_55(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_54(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_56(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_55(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_57(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_56(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_58(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_57(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_59(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_58(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_60(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_59(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_61(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_60(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_62(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_61(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_63(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_62(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_64(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_63(pred, __VA_ARGS__))
#define _MEOJSON_ARG_COUNT(...) \
_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT1(0, ##__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, \
49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \
30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, \
11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
#define _MEOJSON_ARG_COUNT1(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \
_20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, \
_38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, \
_56, _57, _58, _59, _60, _61, _62, _63, _64, N, ...) \
N
#define _MEOJSON_FOR_EACH_(N, pred, ...) _MEOJSON_EXPAND(_MEOJSON_CONCATENATE(_MEOJSON_FOR_EACH_, N)(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH(pred, ...) \
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH_(_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT(__VA_ARGS__)), pred, __VA_ARGS__))
#define _MEOJSON_VARNAME(x) _MEOJSON_CONCATENATE(_meojson_jsonization_, x)
#define _MEOJSON_KEY_VALUE(x) _MEOJSON_STRINGIZE(x), x,
} // namespace json::_private_macro
#define MEO_TOJSON(...) \
json::value to_json() const \
{ \
return json::_jsonization_helper::dumper()._to_json(_MEOJSON_EXPAND( \
_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) json::_jsonization_helper::va_arg_end {}); \
}
#define MEO_CHECKJSON(...) \
bool check_json(const json::value& _MEOJSON_VARNAME(in)) const \
{ \
std::string _MEOJSON_VARNAME(error_key); \
return check_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
} \
bool check_json(const json::value& _MEOJSON_VARNAME(in), std::string& _MEOJSON_VARNAME(error_key)) const \
{ \
return json::_jsonization_helper::checker()._check_json( \
_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key), \
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
json::_jsonization_helper::va_arg_end {}); \
}
#define MEO_FROMJSON(...) \
bool from_json(const json::value& _MEOJSON_VARNAME(in)) \
{ \
std::string _MEOJSON_VARNAME(error_key); \
return from_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
} \
bool from_json(const json::value& _MEOJSON_VARNAME(in), std::string& _MEOJSON_VARNAME(error_key)) \
{ \
return json::_jsonization_helper::loader()._from_json( \
_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key), \
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
json::_jsonization_helper::va_arg_end {}); \
}
#define MEO_JSONIZATION(...) \
_MEOJSON_EXPAND(MEO_TOJSON(__VA_ARGS__)) \
_MEOJSON_EXPAND(MEO_CHECKJSON(__VA_ARGS__)) \
_MEOJSON_EXPAND(MEO_FROMJSON(__VA_ARGS__))
#define MEO_OPT json::_jsonization_helper::next_is_optional_t {},
#if defined(__clang__)
#pragma clang diagnostic pop // -Wgnu-zero-variadic-macro-arguments
#endif

View File

@@ -1,96 +1,15 @@
## v5.1.0
## v5.4.1
### 新增 | New
### 文档 | Docs
- 生息演算2 (#8190) (Mac 版本需点加号手动添加) @SherkeyXD @hguandl @ABA2396
- 开放每日免费单抽功能 (#8185) @SherkeyXD
- 新增只购买折扣信用商品白名单商品除外和少于300信用点停止购物的选项 (#7659) @lpowo @status102
- 基建领取专精功能 (#7754) @broken-paint @Constrat
- 合成玉签到task (#8223) @Sherkey @status102
- 抽卡提示不许勾下次不再提示 @ABA2396
- 运行 ReclamationAlgorithm 时默认运行 Reclamation2 而不是旧演算 (#8229) @horror-proton @ABA2396
- 强制定时启动添加提示对话框并可选是否显示窗口 (#8062) @moomiji
- 在自动编队过程中缺少干员时停止并记录 (#8051) @KevinT3Hu
### 改进 | Improved
- 更新文档到.net8 @ABA2396
- 移除CopilotTask不必要的传参 @status102
- 更新部分step的版本 @SherkeyXD
- 增加账号切换时登录键点击重试 @status102
- 远程控制对非 https 连接仅提出警告 (#8061) @Sherkey
- 肉鸽适配新干员用法 (#8273) @Lancarus
- 肉鸽投资后结束本次战斗 (#8268) @status102
- 优化肉鸽投资速度及输出 (#8177) @status102
- 调整生息演算任务 @status102
- 增加生稀盐酸跳过等待 @status102
- 全反选排除生息演算 @ABA2396
- Mac 全部启用任务时排除生息演算 @Hao Guan
- 优化可变位置文字识别 @ABA2396
- 部分需重启生效的选项添加重启确认弹窗 @ABA2396
- 缓存待部署区识别减少CPU占用 (#8275) @status102
- ScreenCost截图失败次数为0时不返回fault_times字段 @status102
- 优化基建领取专精 (#8207) @broken-paint
### 修复 | Fix
- 未开启吐司通知时仍弹出通知 @ABA2396
- 生息演算开局教程对话有概率卡住 @status102
- 修复无限提示远控地址为空的问题 @Sherkey
- 连续截图出错30次 / 启动时连续截图出错10次 导致MAA崩溃 (#8280) @status102
- 写剪贴板时应该用Unicode而不是ANSI (#8204) @Immueggpain
- 修复肉鸽存款余额ocr错误 @status102
- 修复干员小满概率性识别为`小/满` @status102
- 延长进图等待时间 @ABA2396
- 生息演算卡在主界面 @ABA2396
- 修复没有赠送次数时单抽任务报错的问题 (#8233) @SherkeyXD
- 修复生息演算部分情况下无法跳过开局对话 @status102
- 尝试修复剩余理智连战次数无法选择 @status102
- 干员识别修正: 红集 -> 红隼 @aur3l14no
- 修复更新后弹窗错误 @ABA2396
- 修复生息演算在卡顿情况下无法正常退出关卡 @ABA2396
- 限制连续战斗次数调整失败重试次数 @status102
- 生息演算卡在进入第四日 @ABA2396
- screencap failure with amdgpu on some emulators (even with GeneralWithoutScreencapErr) (#8225) @aur3l14no
- 修复部分分辨率下无法识别删除存档 @ABA2396
- 内测版 wpf tag 错误 @ABA2396
- 内测版修改ui版本号 @ABA2396
- 修复模拟器自动检测失败时可能导致WpfGui崩溃 (#8288) @status102
- gui.log 无法显示完整版本号 @ABA2396
### 其他 | Other
- 修复Mac生息演算任务名 @Hao Guan
- ScreencapCost输出失败次数 @status102
- fix typo and undefined behavior of minmax @Horror Proton
- 生息演算高级设置文本框增加换行 @status102
- EasterEggs 前两次点击不生效 @ABA2396
- 抽卡风险提示 @ABA2396
- 生息演算提示文本调整 @status102
- 移除肉鸽结算输出多余空格 @status102
- Update release-nightly-ota.yml @ABA2396
- 更新界面文字 (#8206#8214#8218) @AnnAngela
- fix appimage cross build issue @Horror Proton
- 更新文档 (#8283) @Rbqwow
- 添加等宽字体的备用字体 @SherkeyXD
- added regex for module-reclamation (#8302) @Constrat
- 升级依赖移除package-lock.json @SherkeyXD
- 更新连战文档 (#8308) @Rbqwow
* website docs (#9287) @ABA2396 @Rbqwow @Constrat @wangl-cc @HX3N @SherkeyXD
* 修改win7相关问题描述&更新运行库 @Rbqwow
* fix a bad link @Rbqwow
* make i18n warnings show only once @Rbqwow
* 修复字体和评论区分类 @Rbqwow
### For Overseas
##### YoStarJP
#### YostarEN
- YoStarJP ocr fix shamare, ansel, nien (#8194) @Manicsteiner
- YoStarJP ocr fix #8180 (#8184) @Manicsteiner
- YoStarJP 理想都市 navigation (#8263) @Manicsteiner
- YoStarJP ocr fix (#8260) @Manicsteiner
##### YoStarKR
- YoStarKR 理想都市 navigation (#8265) @HX3N
- YoStarKR ocr fix (假日威龙陈/苍苔/青枳/淬羽赫默 etc) (#8246) @HX3N
- YoStarKR update StageAnnihilation.png (#8239) @HX3N
- YoStarKR ocr fix (#8236) @HX3N
- modified ko-kr.xaml (#8235) @HX3N
- YoStarKR add training template image and text (#8295) @HX3N
* YoStarEN resolution warning on client switch (#9539) @Constrat @ABA2396

17
CITATION.cff Normal file
View File

@@ -0,0 +1,17 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: MaaAssistantArknights
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- name: Maa Team
website: 'https://maa.plus/'
date-start: '2021-07-10'
repository-code: >-
https://github.com/MaaAssistantArknights/MaaAssistantArknights/
url: 'https://maa.plus/'
license: AGPL-3.0-only

View File

@@ -13,9 +13,13 @@ option(BUILD_UNIVERSAL "build both arm64 and x86_64 on macOS" OFF)
option(INSTALL_PYTHON "install python ffi" OFF)
option(INSTALL_RESOURCE "install resource" OFF)
option(INSTALL_DEVEL "install development files" OFF)
option(INSTALL_FLATTEN "do not use bin lib include directory" ON)
option(INSTALL_THIRD_LIBS "install third party libraries" ON)
option(USE_MAADEPS "use third-party libraries built by MaaDeps" ON)
option(USE_RANGE_V3 "use range-v3" OFF)
option(WITH_EMULATOR_EXTRAS "build with emulator extras" ${WIN32})
option(WITH_THRIFT "build with thrift" OFF)
option(WITH_ASST_DEBUG "build with ASST_DEBUG defined" OFF)
include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/thrift-gen.cmake)
@@ -24,29 +28,28 @@ if(USE_MAADEPS)
include(${PROJECT_SOURCE_DIR}/MaaDeps/maadeps.cmake)
endif()
if (MSVC)
add_compile_options("/utf-8")
add_compile_options("/MP")
add_compile_options("/W4;/WX")
add_compile_options("/wd4127") # conditional expression is constant
add_compile_options("/Wv:19.35.32217") # disable warning introduced after this version
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else ()
add_compile_options("-Wall;-Werror;-Wextra;-Wpedantic;-Wno-missing-field-initializers")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
add_compile_options("-Wno-restrict")
endif()
endif ()
add_library(header_only_libraries INTERFACE)
target_include_directories(header_only_libraries INTERFACE 3rdparty/include)
target_include_directories(header_only_libraries INTERFACE 3rdparty/include 3rdparty/EmulatorExtras)
file(GLOB_RECURSE maa_src src/MaaCore/*.cpp)
add_library(MaaCore SHARED ${maa_src})
if (MSVC)
target_compile_options(MaaCore PRIVATE "/utf-8")
target_compile_options(MaaCore PRIVATE "/MP")
target_compile_options(MaaCore PRIVATE "/W4;/WX")
target_compile_options(MaaCore PRIVATE "/wd4127") # conditional expression is constant
target_compile_options(MaaCore PRIVATE "/Wv:19.35.32217") # disable warning introduced after this version
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else ()
target_compile_options(MaaCore PRIVATE "-Wall;-Werror;-Wextra;-Wpedantic;-Wno-missing-field-initializers")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
target_compile_options(MaaCore PRIVATE "-Wno-restrict")
endif()
endif ()
if (WIN32)
#注意相比VS版本缺少了 -D_CONSOLE -D_WINDLL 两项
target_compile_definitions(MaaCore PRIVATE ASST_DLL_EXPORTS _UNICODE UNICODE)
@@ -77,26 +80,61 @@ endif (BUILD_TEST)
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs videoio)
find_package(ZLIB REQUIRED)
find_package(MaaDerpLearning REQUIRED)
find_package(asio REQUIRED)
find_package(ONNXRuntime)
find_package(cpr CONFIG REQUIRED)
list(APPEND maa_libs ${OpenCV_LIBS} ZLIB::ZLIB cpr::cpr header_only_libraries)
if(USE_MAADEPS)
find_package(asio REQUIRED)
list(APPEND maa_libs asio::asio)
endif()
find_package(onnxruntime CONFIG REQUIRED) # provided by onnxruntime>=1.16
list(APPEND maa_libs onnxruntime::onnxruntime)
if(DEFINED fastdeploy_SOURCE_DIR)
# TODO: FetchContent github.com/MaaAssistantArknights/FastDeploy
if(NOT DEFINED fastdeploy_BINARY_DIR)
set(fastdeploy_BINARY_DIR ${CMAKE_BINARY_DIR}/fastdeploy)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_subdirectory(${fastdeploy_SOURCE_DIR} ${fastdeploy_BINARY_DIR} EXCLUDE_FROM_ALL SYSTEM)
if(NOT DEFINED fastdeploy_INCLUDE_DIRS)
set(fastdeploy_INCLUDE_DIRS ${fastdeploy_SOURCE_DIR})
endif()
target_include_directories(MaaCore SYSTEM PRIVATE ${fastdeploy_INCLUDE_DIRS})
get_target_property(fastdeploy_type fastdeploy_ppocr TYPE)
if(fastdeploy_type STREQUAL "SHARED_LIBRARY")
install(TARGETS fastdeploy_ppocr)
endif()
else()
find_package(fastdeploy_ppocr REQUIRED)
endif()
list(APPEND maa_libs fastdeploy_ppocr)
target_link_libraries(MaaCore ${maa_libs})
if(WITH_EMULATOR_EXTRAS AND NOT EXISTS ${PROJECT_SOURCE_DIR}/3rdparty/EmulatorExtras/Mumu)
message(WARNING "EmulatorExtras not found, please run `git submodule update --init 3rdparty/EmulatorExtras`")
set(WITH_EMULATOR_EXTRAS OFF)
endif()
target_compile_definitions(MaaCore PRIVATE ASST_WITH_EMULATOR_EXTRAS=$<BOOL:${WITH_EMULATOR_EXTRAS}>)
if(WITH_THRIFT)
find_package(Thrift CONFIG REQUIRED)
endif(WITH_THRIFT)
target_link_libraries(MaaCore ${OpenCV_LIBS} MaaDerpLearning asio::asio ZLIB::ZLIB ONNXRuntime::ONNXRuntime cpr::cpr header_only_libraries)
if(WITH_THRIFT)
add_subdirectory(src/MaaThriftController)
target_link_libraries(MaaCore MaaThriftController)
endif(WITH_THRIFT)
if (WITH_ASST_DEBUG)
target_compile_definitions(MaaCore PRIVATE ASST_DEBUG)
endif ()
if(WIN32)
target_link_libraries(MaaCore ws2_32)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
if (USE_RANGE_V3)
target_compile_definitions(MaaCore PRIVATE ASST_USE_RANGES_RANGE_V3)
find_package(range-v3 REQUIRED)
target_link_libraries(MaaCore range-v3::range-v3)
endif ()
@@ -105,12 +143,11 @@ if(INSTALL_DEVEL)
set(MaaCore_install_extra_args PUBLIC_HEADER DESTINATION devel/include ARCHIVE DESTINATION devel/lib)
endif()
install(TARGETS MaaCore
RUNTIME DESTINATION .
LIBRARY DESTINATION .
PUBLIC_HEADER DESTINATION .
${MaaCore_install_extra_args}
)
if(INSTALL_FLATTEN)
set(MaaCore_install_flatten_args RUNTIME DESTINATION . LIBRARY DESTINATION . PUBLIC_HEADER DESTINATION .)
endif()
install(TARGETS MaaCore ${MaaCore_install_flatten_args} ${MaaCore_install_extra_args})
if(INSTALL_THIRD_LIBS AND USE_MAADEPS)
maadeps_install()

6
LICENSE.spdx Normal file
View File

@@ -0,0 +1,6 @@
SPDXVersion: SPDX-2.3
DataLicense: CC0-1.0
PackageName: MaaAssistantArknights
PackageOriginator: Maa Team and all contributors
PackageHomePage: https://github.com/MaaAssistantArknights/MaaAssistantArknights
PackageLicenseDeclared: AGPL-3.0-only

View File

@@ -41,6 +41,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bilibili/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bluestacks/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=bsconsole/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ctrler/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=desp/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=dnplayer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ehem/@EntryIndexedValue">True</s:Boolean>
@@ -50,6 +51,8 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=FLASHW/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=FLASHWINFO/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=foldartal/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Foldartals/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=framerate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=furni/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gacha/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gavial/@EntryIndexedValue">True</s:Boolean>
@@ -67,7 +70,9 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=memuc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Minitouch/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mizuki/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mumu/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nemu/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Netease/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=netstat/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nonfriend/@EntryIndexedValue">True</s:Boolean>
@@ -86,7 +91,6 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=ppidl/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Prts/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=pwfi/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=qodana/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=rcast/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=rdfend/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=rguard/@EntryIndexedValue">True</s:Boolean>
@@ -99,6 +103,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=serilog/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Showminimized/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Shownormal/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=specialaccess/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SSS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=STGM/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=strlen/@EntryIndexedValue">True</s:Boolean>

Submodule MaaDeps updated: 1297324ea7...10d51f5832

162
README.md
View File

@@ -1,3 +1,5 @@
<!-- markdownlint-disable -->
<div align="center">
<img alt="LOGO" src="https://cdn.jsdelivr.net/gh/MaaAssistantArknights/design@main/logo/maa-logo_512x512.png" width="256" height="256" />
@@ -21,7 +23,9 @@
</div>
<br>
[简体中文](https://maa.plus/docs/) | [繁體中文](https://maa.plus/docs/zh-tw/) | [English](https://maa.plus/docs/en-us/) | [日本語](https://maa.plus/docs/ja-jp/) | [한국어](https://maa.plus/docs/ko-kr/)
<!-- markdownlint-restore -->
[简体中文](https://maa.plus/docs/zh-cn/) | [繁體中文](https://maa.plus/docs/zh-tw/) | [English](https://maa.plus/docs/en-us/) | [日本語](https://maa.plus/docs/ja-jp/) | [한국어](https://maa.plus/docs/ko-kr/)
MAA 的意思是 MAA Assistant Arknights
@@ -29,33 +33,52 @@ MAA 的意思是 MAA Assistant Arknights
基于图像识别技术,一键完成全部日常任务!
绝赞更新中 ✿✿ヽ(°▽°)ノ✿<br>
绝赞更新中 ✿✿ヽ(°▽°)ノ✿
</div>
## 亮点功能
- 刷理智,掉落识别及上传 [企鹅物流](https://penguin-stats.cn/)
- 智能基建换班,自动计算干员效率,单设施内最优解;同时也支持 [自定义排班](https://maa.plus/docs/协议文档/基建排班协议.html)
- 自动公招,可选使用加急许可,一次全部刷完!公招数据上传 [企鹅物流](https://penguin-stats.cn/result/stage/recruit/recruit)[一图流](https://yituliu.site/maarecruitdata)
- 支持手动识别公招界面,方便对高星公招做出选择 ~~(你的这个高姿回费出的是推王呢还是推王呢)~~
- 支持识别干员列表,统计已有和未有干员(还能为手动识别公招界面提供已有潜能数据提示);
- 支持识别养成材料,并导出至 [企鹅物流刷图规划](https://penguin-stats.cn/planner)[明日方舟工具箱](https://arkn.lolicon.app/#/material) 计算缺少的养成材料;
- 访问好友、收取信用及购物、领取日常奖励等,一键全日常自动长草
- 肉鸽全自动刷源石锭和蜡烛,自动识别干员及练度
- 选择作业 JSON 文件,自动抄作业, [视频演示](https://www.bilibili.com/video/BV1H841177Fk/)
- 仓库识别并支持导出至 [企鹅物流刷图规划器](https://penguin-stats.cn/planner), [明日方舟工具箱](https://arkn.lolicon.app/#/material), [ARK-NIGHTS 干员培养表](https://ark-nights.com/settings)
- 刷理智,掉落识别及上传 [企鹅物流](https://penguin-stats.cn/)[一图流](https://ark.yituliu.cn/)
- 智能基建换班,自动计算干员效率,单设施内最优解;同时也支持 [自定义排班](https://maa.plus/docs/zh-cn/protocol/base-scheduling-schema.html)
- 自动公招,可选使用加急许可,一次全部刷完!公招数据自动上传 [企鹅物流](https://penguin-stats.cn/result/stage/recruit/recruit)[一图流](https://ark.yituliu.cn/survey/maarecruitdata)
- 支持手动识别公招界面,方便对高星公招做出选择 ~~(你的这个高姿回费出的是推王呢还是推王呢)~~
- 支持识别干员列表,统计已有和未有干员及潜能,并在公招识别显示
- 支持识别养成材料,并导出至 [企鹅物流刷图规划](https://penguin-stats.cn/planner)[明日方舟工具箱](https://arkntools.app/#/material)、[ARK-NIGHTS 干员培养表](https://ark-nights.com/settings)
- 访问好友、收取信用及购物、领取日常奖励等,一键全日常自动长草
- 肉鸽全自动刷源石锭和等级,自动烧水和凹直升,智能识别干员及练度
- 选择作业 JSON 文件,自动抄作业, [视频演示](https://www.bilibili.com/video/BV1H841177Fk/)
- 支持 C, Python, Java, Rust, Golang, Java HTTP, Rust HTTP 等多种接口,方便集成调用,自定义你的 MAA
话不多说,看图!<br>
<!-- markdownlint-disable -->
![zh1](https://user-images.githubusercontent.com/9762652/259595058-1529207a-ef3d-4eca-a016-4759eb534c6e.png)
![zh2](https://user-images.githubusercontent.com/9762652/259594965-882b61e6-bf31-40c1-8c03-3f51f82a0d42.png)
![zh3](https://user-images.githubusercontent.com/9762652/259594874-07abdd9f-33f0-4446-8da3-799849bf7328.png)
![zh4](https://user-images.githubusercontent.com/9762652/259594649-c08b6558-7d17-45a8-9ba0-3ebc9a6f5589.png)
<details><summary>话不多说,看图!</summary>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/1-dark.png">
<img alt="zh1" src="./docs/.vuepress/public/image/zh-cn/readme/1-light.png">
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/2-dark.png">
<img alt="zh2" src="./docs/.vuepress/public/image/zh-cn/readme/2-light.png">
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/3-dark.png">
<img alt="zh3" src="./docs/.vuepress/public/image/zh-cn/readme/3-light.png">
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/4-dark.png">
<img alt="zh4" src="./docs/.vuepress/public/image/zh-cn/readme/4-light.png">
</picture>
</details>
<!-- markdownlint-restore -->
## 下载地址
前往[官网](https://maa.plus)自动匹配镜像源并下载稳定版,或:
- [稳定版/公测版](https://github.com/MaaAssistantArknights/MaaAssistantArknights/releases)
- [内测版](https://github.com/MaaAssistantArknights/MaaRelease/releases)
@@ -63,33 +86,28 @@ MAA 的意思是 MAA Assistant Arknights
### 基本说明
1. 请根据 [模拟器和设备支持情况](https://maa.plus/docs/用户手册/模拟器和设备支持),进行对应的操作;
2. 修改模拟器分辨率为 `16:9` 比例,最低 `1280 * 720`,最高 `2K`<br>
对于国际服(美服)玩家,由于界面布局、字号等问题,我们则建议您将分辨率修改为 `1920 * 1080`
3. 开始使用吧!
更多使用说明请参考 [详细介绍](https://maa.plus/docs/用户手册/详细介绍.html)
请参阅 [新手上路](https://maa.plus/docs/zh-cn/manual/newbie.html) 与 [功能介绍](https://maa.plus/docs/zh-cn/manual/introduction/)。
### 常见问题
- 软件一打开就闪退;
- 连接错误、不知道 adb 路径怎么填写;
- 连接错误、不知道 ADB 路径怎么填写;
- 连接成功了,但没反应;
- 如何连接自定义端口;
- 下载速度慢,且镜像站无法打开网页;
- 下载到一半提示“登陆”/“鉴权”;
- 连接正常,任务开始了,但是没反应。
请参 [常见问题](https://maa.plus/docs/用户手册/常见问题.html)
请参 [常见问题](https://maa.plus/docs/zh-cn/manual/faq.html)
### 外服支持
目前国际服(美服)、日服、韩服、繁中服的绝大部分功能均已支持。但由于外服用户较少及项目人手不足,很多功能并没有进行全面的测试,所以请自行体验。<br>
若您遇到了 Bug或对某个功能有强需求欢迎在 [Issues](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues) 和 [讨论区](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions) 催更;或加入我们一起建设 MAA请参 [外服适配教程](#外服适配)
目前国际服(美服)、日服、韩服、繁中服的绝大部分功能均已支持。但由于外服用户较少及项目人手不足,很多功能并没有进行全面的测试,所以请自行体验。
若您遇到了 Bug或对某个功能有强需求欢迎在 [Issues](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues) 和 [讨论区](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions) 催更;或加入我们一起建设 MAA请参 [外服适配教程](https://maa.plus/docs/zh-cn/develop/overseas-client-adaptation.html)
### CLI支持
### CLI 支持
MAA 支持命令行界面CLI操作支持 LinuxmacOS 和 Windows可用于自动化脚本或在无图形界面的服务器上使用。请参 [CLI 使用指南](https://maa.plus/docs/用户手册/CLI使用指南.html)
MAA 支持命令行界面CLI操作支持 LinuxmacOS 和 Windows可用于自动化脚本或在无图形界面的服务器上使用。请参 [CLI 使用指南](https://maa.plus/docs/zh-cn/manual/cli/intro.html)
## 加入我们
@@ -97,7 +115,7 @@ MAA 支持命令行界面CLI操作支持 LinuxmacOS 和 Windows
**目前项目组非常缺前端大佬,若您有相关经验,欢迎加入我们!**
- 全新框架:[MaaFramework](https://github.com/MaaAssistantArknights/MaaFramework)
- 全新框架:[MaaFramework](https://github.com/MaaXYZ/MaaFramework)
- 全新 GUI[MaaX](https://github.com/MaaAssistantArknights/MaaX)
- [作业站](https://prts.plus) 前端:[maa-copilot-frontend](https://github.com/MaaAssistantArknights/maa-copilot-frontend)
- [作业站](https://prts.plus) 后端:[MaaBackendCenter](https://github.com/MaaAssistantArknights/MaaBackendCenter)
@@ -110,52 +128,45 @@ MAA 支持多国语言,并使用 Weblate 进行本地化管理。如果您通
MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)为准。
[![Weblate](https://weblate.maa-org.net/widgets/maa-assistant-arknights/zh_Hans/maa-wpf-gui/multi-auto.svg)](https://weblate.maa-org.net/engage/maa-assistant-arknights/zh_Hans/)
[![Weblate](https://weblate.maa-org.net/widget/maa/wpf-gui/multi-auto.svg)](https://weblate.maa-org.net/engage/maa/)
### Windows
### 参与开发
1. 下载预构建的第三方库
#### Windows
```cmd
python maadeps-download.py
```
请参阅 [开始开发](https://maa.plus/docs/zh-cn/develop/development.html)。
2. 使用 Visual Studio 2022 打开 `MAA.sln`,右键 `MaaWpfGui`,设为启动项目
3. VS 上方配置选择 `RelWithDebInfo` `x64` (如果编译 Release 包 或 ARM 平台,请忽略这步)
4. 右键 `MaaWpfGui` - 属性 - 调试 - 启用本地调试(这样就能把断点挂到 C++ Core 那边了)
5. (可选)若准备提交 PR建议启用 [clang-format 支持](https://maa.plus/docs/开发文档/开始开发.html#在-visual-studio-中启用-clang-format)
#### Linux | macOS
### Linux | macOS
请参阅 [Linux 编译教程](https://maa.plus/docs/zh-cn/develop/linux-tutorial.html)。
请参考 [Linux 编译教程](https://maa.plus/docs/开发文档/Linux编译教程.html)
### API
#### API
- [C 接口](include/AsstCaller.h)[集成示例](src/Cpp/main.cpp)
- [Python 接口](src/Python/asst/asst.py)[集成示例](src/Python/sample.py)
- [Golang 接口](src/Golang/)[集成示例](src/Golang/maa/maa.go)
- [Dart 接口](src/Dart/)
- [Golang 接口](src/Golang)[集成示例](src/Golang/maa/maa.go)
- [Dart 接口](src/Dart)
- [Java 接口](src/Java/src/main/java/com/iguigui/maaj/easySample/MaaCore.java)[集成示例](src/Java/src/main/java/com/iguigui/maaj/easySample/MaaJavaSample.java)
- [Java HTTP 接口](src/Java/Readme.md)
- [Rust 接口](src/Rust/src/maa_sys/)[HTTP 接口](src/Rust)
- [TypeScript 接口](https://github.com/MaaAssistantArknights/MaaAsstElectronUI/tree/main/packages/main/coreLoader)
- [Woolang 接口](src/Woolang/maa.wo)[集成示例](src/Woolang/main.wo)
- [集成文档](https://maa.plus/docs/协议文档/集成文档.html)
- [回调消息协议](https://maa.plus/docs/协议文档/回调消息协议.html)
- [任务流程协议](https://maa.plus/docs/协议文档/任务流程协议.html)
- [自动抄作业协议](https://maa.plus/docs/协议文档/战斗流程协议.html)
- [Rust 接口](src/Rust/src/maa_sys)[HTTP 接口](src/Rust)
- [TypeScript 接口](https://github.com/MaaAssistantArknights/MaaX/tree/main/packages/main/coreLoader)
- [Woolang 接口](src/Woolang/maa.wo)[集成示例](src/Woolang/demo.wo)
- [集成文档](https://maa.plus/docs/zh-cn/protocol/integration.html)
- [回调消息协议](https://maa.plus/docs/zh-cn/protocol/callback-schema.html)
- [任务流程协议](https://maa.plus/docs/zh-cn/protocol/task-schema.html)
- [自动抄作业协议](https://maa.plus/docs/zh-cn/protocol/copilot-schema.html)
### 外服适配
#### 外服适配
请参 [外服适配教程](https://maa.plus/docs/开发文档/外服适配教程.html),对于国服已支持的功能,绝大部分的外服适配工作仅需要截图 + 简单的 JSON 修改即可。
请参 [外服适配教程](https://maa.plus/docs/zh-cn/develop/overseas-client-adaptation.html),对于国服已支持的功能,绝大部分的外服适配工作仅需要截图 + 简单的 JSON 修改即可。
### 想参与开发,但不太会用 GitHub?
#### 想参与开发,但不太会用 GitHub?
[GitHub Pull Request 流程简述](https://maa.plus/docs/开发文档/开始开发.html#github-pull-request-流程简述)
[GitHub Pull Request 流程简述](https://maa.plus/docs/zh-cn/develop/development.html#github-pull-request-流程简述)
### Issue bot
#### Issue bot
请参 [Issue bot 使用方法](https://maa.plus/docs/开发文档/IssueBot使用方法.html)
请参 [Issue Bot 使用方法](https://maa.plus/docs/zh-cn/develop/issue-bot-usage.html)
## 致谢
@@ -168,23 +179,23 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
- 机器学习加速器:[onnxruntime](https://github.com/microsoft/onnxruntime)
- ~~关卡掉落识别:[企鹅物流识别](https://github.com/penguin-statistics/recognizer)~~
- 地图格子识别:[Arknights-Tile-Pos](https://github.com/yuanyan3060/Arknights-Tile-Pos)
- C++ JSON库[meojson](https://github.com/MistEO/meojson.git)
- C++ JSON 库:[meojson](https://github.com/MistEO/meojson.git)
- C++ 运算符解析器:[calculator](https://github.com/kimwalisch/calculator)
- ~~C++ base64编解码[cpp-base64](https://github.com/ReneNyffenegger/cpp-base64)~~
- ~~C++ base64 编解码:[cpp-base64](https://github.com/ReneNyffenegger/cpp-base64)~~
- C++ 解压压缩库:[zlib](https://github.com/madler/zlib)
- C++ Gzip封装[gzip-hpp](https://github.com/mapbox/gzip-hpp)
- 安卓触控事件器:[minitouch](https://github.com/openstf/minitouch)
- C++ Gzip 封装:[gzip-hpp](https://github.com/mapbox/gzip-hpp)
- 安卓触控事件器:[Minitouch](https://github.com/DeviceFarmer/minitouch)
- 安卓触控事件器:[MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch)
- WPF MVVM框架[Stylet](https://github.com/canton7/Stylet)
- WPF控件库[HandyControl](https://github.com/HandyOrg/HandyControl) -> [HandyControls](https://github.com/ghost1372/HandyControls)
- WPF MVVM 框架:[Stylet](https://github.com/canton7/Stylet)
- WPF 控件库:[HandyControl](https://github.com/HandyOrg/HandyControl) -> [HandyControls](https://github.com/ghost1372/HandyControls)
- C# 日志:[Serilog](https://github.com/serilog/serilog)
- C# JSON库[Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) & [System.Text.Json](https://github.com/dotnet/runtime)
- C# JSON 库:[Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) & [System.Text.Json](https://github.com/dotnet/runtime)
- ~~下载器:[aria2](https://github.com/aria2/aria2)~~
### 数据源
- ~~公开招募数据:[明日方舟工具箱](https://www.bigfun.cn/tools/aktools/hr)~~
- ~~干员及基建数据:[PRTS明日方舟中文WIKI](http://prts.wiki/)~~
- ~~干员及基建数据:[PRTS Wiki](http://prts.wiki/)~~
- 关卡数据:[企鹅物流数据统计](https://penguin-stats.cn/)
- 游戏数据及资源:[明日方舟客户端素材](https://github.com/yuanyan3060/ArknightsGameResource)
- ~~游戏数据:[《明日方舟》游戏数据](https://github.com/Kengxxiao/ArknightsGameData)~~
@@ -197,17 +208,18 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
## 声明
- 本软件 logo 并非使用 AGPL 3.0 协议开源,[耗毛](https://weibo.com/u/3251357314)、vie 两位画师及软件全体开发者保留所有权利。不得以 AGPL 3.0 协议已授权为由在未经授权的情况下使用本软件 logo不得在未经授权的情况下将本软件 logo 用于任何商业用途
- 本软件开源、免费,仅供学习交流使用。若您遇到商家使用本软件进行代练并收费,可能是设备与时间等费用,产生的问题及后果与本软件无关
- 本软件使用 [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html) 开源
- 本软件 logo 并非使用 AGPL 3.0 协议开源,[耗毛](https://weibo.com/u/3251357314)、vie 两位画师及软件全体开发者保留所有权利。不得以 AGPL 3.0 协议已授权为由在未经授权的情况下使用本软件 logo不得在未经授权的情况下将本软件 logo 用于任何用途
- 本软件开源、免费,仅供学习交流使用。若您遇到商家使用本软件进行代练并收费,可能由于设备或时间等原因,产生的任何问题及后果与本软件无关。
## 广告
用户交流 QQ 群:[MAA 使用 & 粥游交流 QQ 群](https://ota.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)<br>
用户交流 TG 群:[Telegram 群](https://t.me/+Mgc2Zngr-hs3ZjU1)<br>
自动战斗 JSON 作业分享:[prts.plus](https://prts.plus) 或 [抄作业.com](http://抄作业.com)<br>
Bilibili 直播间:[直播间](https://live.bilibili.com/2808861) 每晚直播敲代码,近期很长一段时间应该都是在写本软件~<br>
用户交流 QQ 群:[MAA 使用 & 粥游交流 QQ 群](https://ota.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
用户交流 TG 群:[Telegram 群](https://t.me/+Mgc2Zngr-hs3ZjU1)
自动战斗 JSON 作业分享:[prts.plus](https://prts.plus) 或 [抄作业.com](http://抄作业.com)
Bilibili 直播间:[直播间](https://live.bilibili.com/2808861) 每晚直播敲代码,近期很长一段时间应该都是在写本软件~
技术群(舟无关、禁水):[内卷地狱!(QQ 群)](https://jq.qq.com/?_wv=1027&k=ypbzXcA2)<br>
开发者群:[QQ 群](https://jq.qq.com/?_wv=1027&k=JM9oCk3C)<br>
技术群(舟无关、禁水):[内卷地狱!(QQ 群)](https://jq.qq.com/?_wv=1027&k=ypbzXcA2)
开发者群:[QQ 群](https://jq.qq.com/?_wv=1027&k=JM9oCk3C)
如果觉得软件对你有帮助,帮忙点个 Star 吧!~(网页最上方右上角的小星星),这就是对我们最大的支持了!

View File

@@ -1,22 +0,0 @@
# TODO: replace with cmake-generated interface file
find_path(FastDeploy_INCLUDE_DIR NAMES fastdeploy/fastdeploy_model.h)
find_library(FastDeploy_LIBRARY NAMES fastdeploy)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
FastDeploy
REQUIRED_VARS FastDeploy_LIBRARY FastDeploy_INCLUDE_DIR
)
if(FastDeploy_FOUND)
set(FastDeploy_INCLUDE_DIRS ${FastDeploy_INCLUDE_DIR})
if(NOT TARGET FastDeploy::FastDeploy)
add_library(FastDeploy::FastDeploy UNKNOWN IMPORTED)
set_target_properties(FastDeploy::FastDeploy PROPERTIES
IMPORTED_LOCATION "${FastDeploy_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${FastDeploy_INCLUDE_DIR}"
)
endif()
endif()

View File

@@ -1,20 +0,0 @@
find_path(ONNXRuntime_INCLUDE_DIR NAMES onnxruntime/core/session/onnxruntime_c_api.h)
find_library(ONNXRuntime_LIBRARY NAMES onnxruntime)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
ONNXRuntime
REQUIRED_VARS ONNXRuntime_LIBRARY ONNXRuntime_INCLUDE_DIR
)
if(ONNXRuntime_FOUND)
set(ONNXRuntime_INCLUDE_DIRS ${ONNXRuntime_INCLUDE_DIR})
if(NOT TARGET ONNXRuntime::ONNXRuntime)
add_library(ONNXRuntime::ONNXRuntime UNKNOWN IMPORTED)
set_target_properties(ONNXRuntime::ONNXRuntime PROPERTIES
IMPORTED_LOCATION "${ONNXRuntime_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ONNXRuntime_INCLUDE_DIR}"
)
endif()
endif()

View File

@@ -1,50 +0,0 @@
set(FASTDEPLOY_URL_PREFIX "https://github.com/MaaAssistantArknights/build-fastdeploy/releases/download")
set(FASTDEPLOY_TAG "gac255b8a")
set(COMPRESSED_SUFFIX ".tar.gz")
if(WIN32)
set(FASTDEPLOY_FILENAME "FastDeploy-Windows")
set(FASTDEPLOY_CHECKSUM "0a0700d4e8923bcd4c387a658e5e9a689ed9e0d114c260b11d082a2176c233d4")
elseif(APPLE)
if (CURRENT_OSX_ARCH STREQUAL "arm64")
set(FASTDEPLOY_FILENAME "FastDeploy-macOS-arm64")
set(FASTDEPLOY_CHECKSUM "28a771814d197ba8056f1fcb7cc0671facec90a8733a0dac2cf0b68a8cc36d24")
else()
set(FASTDEPLOY_FILENAME "FastDeploy-macOS-x86_64")
set(FASTDEPLOY_CHECKSUM "76e97c7e944a18eb160646fa32ac0a7e24c87751b2b127dc33454f993f6d4b97")
endif()
else()
set(FASTDEPLOY_FILENAME "FastDeploy-Linux")
set(FASTDEPLOY_CHECKSUM "4d106e5499e9b5b29426667617215ac7e4e70d2353af10caccdfdf6c1f1534a7")
endif(WIN32)
set(FASTDEPLOY_URL ${FASTDEPLOY_URL_PREFIX}/${FASTDEPLOY_TAG}/${FASTDEPLOY_FILENAME}${COMPRESSED_SUFFIX})
if (FASTDEPLOY_DIRECTORY)
set(FastDeploy_DIR ${FASTDEPLOY_DIRECTORY})
find_package(FastDeploy REQUIRED PATHS ${FastDeploy_DIR})
include_directories(${FastDeploy_INCLUDE_DIRS})
list(APPEND DEPEND_LIBS ${FastDeploy_LIBS})
else ()
download_and_decompress(${FASTDEPLOY_URL}
${CMAKE_CURRENT_BINARY_DIR}/${FASTDEPLOY_FILENAME}${COMPRESSED_SUFFIX}
${FASTDEPLOY_CHECKSUM}
${THIRD_PARTY_PATH}/install/)
set(FASTDEPLOY_FILENAME fastdeploy)
set(FastDeploy_DIR ${THIRD_PARTY_PATH}/install/${FASTDEPLOY_FILENAME})
find_package(FastDeploy REQUIRED PATHS ${FastDeploy_DIR} NO_DEFAULT_PATH)
include_directories(${FastDeploy_INCLUDE_DIRS})
list(APPEND DEPEND_LIBS ${FastDeploy_LIBS})
endif (FASTDEPLOY_DIRECTORY)
if (INSTALL_THIRD_LIBS)
install(DIRECTORY ${FastDeploy_DIR}/lib/ DESTINATION . USE_SOURCE_PERMISSIONS)
install(DIRECTORY ${ORT_LIB_PATH}/ DESTINATION . USE_SOURCE_PERMISSIONS)
install(DIRECTORY ${FastDeploy_DIR}/third_libs/install/paddle2onnx/lib/
DESTINATION . USE_SOURCE_PERMISSIONS)
endif (INSTALL_THIRD_LIBS)

View File

@@ -15,13 +15,13 @@ if (BUILD_XCFRAMEWORK)
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libonnxruntime.1.14.1.dylib" -output ONNXRuntime.xcframework
)
add_custom_command(OUTPUT MaaDerpLearning.xcframework
COMMAND rm -rf MaaDerpLearning.xcframework
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libMaaDerpLearning.dylib" -output MaaDerpLearning.xcframework
add_custom_command(OUTPUT fastdeploy_ppocr.xcframework
COMMAND rm -rf fastdeploy_ppocr.xcframework
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libfastdeploy_ppocr.dylib" -output fastdeploy_ppocr.xcframework
)
add_custom_target(MaaXCFramework ALL
DEPENDS MaaCore MaaCore.xcframework OpenCV.xcframework ONNXRuntime.xcframework MaaDerpLearning.xcframework
DEPENDS MaaCore MaaCore.xcframework OpenCV.xcframework ONNXRuntime.xcframework fastdeploy_ppocr.xcframework
)
endif (BUILD_XCFRAMEWORK)

8
docs/.vuepress/client.ts Normal file
View File

@@ -0,0 +1,8 @@
import { defineClientConfig } from "vuepress/client";
import ImageGrid from "../components/ImageGrid.vue";
export default defineClientConfig({
enhance: ({ app }) => {
app.component("ImageGrid", ImageGrid);
},
});

View File

@@ -1,5 +1,6 @@
import { defineUserConfig } from "vuepress";
import { viteBundler } from "@vuepress/bundler-vite";
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
import Theme from "./theme";
export default defineUserConfig({
@@ -10,25 +11,25 @@ export default defineUserConfig({
port: 3001,
locales: {
"/": {
"/zh-cn/": {
lang: "zh-CN",
description: "开发者文档",
description: "文档",
},
"/zh-tw/": {
lang: "zh-TW",
description: "開發者文件",
description: "文件",
},
"/en-us/": {
lang: "en-US",
title: "Documents",
description: "Documentation",
},
"/ja-jp/": {
lang: "ja-JP",
description: "ドキュメン",
description: "ドキュメンテーション",
},
"/ko-kr/": {
lang: "ko-KR",
description: "문서",
description: "선적 서류 비치",
},
},
@@ -40,7 +41,11 @@ export default defineUserConfig({
theme: Theme,
plugins: [],
plugins: [
googleAnalyticsPlugin({
id: "G-FJQDKG394Z",
}),
],
head: [
["link", { rel: "preconnect", href: "https://fonts.googleapis.com" }],
@@ -51,21 +56,21 @@ export default defineUserConfig({
[
"link",
{
href: "https://fonts.googleapis.com/css?family=Noto+Sans+SC:300,400,500,700,900&display=swap",
href: "https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100..900&display=swap",
rel: "stylesheet",
},
],
[
"link",
{
href: "https://fonts.googleapis.com/css2?family=Noto+Serif+SC:400;500;700&display=swap",
href: "https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200..900&display=swap",
rel: "stylesheet",
},
],
[
"link",
{
href: "https://fonts.googleapis.com/css2?family=Jetbrains+Mono:wght@300,400,500,700;700&display=swap",
href: "https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap",
rel: "stylesheet",
},
],

View File

@@ -9,17 +9,17 @@ export const enusNavbar = navbar([
{
text: "User Manual",
icon: "mdi:user",
link: "/en-us/1.1-USER_MANUAL",
link: "/en-us/manual/",
},
{
text: "Development Docs",
icon: "ph:code-bold",
link: "/en-us/2.1-LINUX_TUTORIAL",
link: "/en-us/develop/",
},
{
text: "Protocol Docs",
icon: "basil:document-solid",
link: "/en-us/3.1-INTEGRATION",
link: "/en-us/protocol/",
},
{
text: "MAA Website",

View File

@@ -2,24 +2,24 @@ import { navbar } from "vuepress-theme-hope";
export const jajpNavbar = navbar([
{
text: "主页",
text: "ホームページ",
icon: "ic:round-home",
link: "/ja-jp/",
},
{
text: "使用説明",
icon: "mdi:user",
link: "/ja-jp/1.1-詳細説明",
link: "/ja-jp/manual/",
},
{
text: "開発関連",
icon: "ph:code-bold",
link: "/ja-jp/2.1-Linuxチュートリアル",
link: "/ja-jp/develop/",
},
{
text: "プロトコルドキュメント",
icon: "basil:document-solid",
link: "/ja-jp/3.1-統合ドキュメント",
link: "/ja-jp/protocol/",
},
{
text: "MAA 公式サイト",

View File

@@ -2,24 +2,24 @@ import { navbar } from "vuepress-theme-hope";
export const kokrNavbar = navbar([
{
text: "主页",
text: "홈페이지",
icon: "ic:round-home",
link: "/ko-kr/",
},
{
text: "사용자 설명서",
icon: "mdi:user",
link: "/ko-kr/1.1-사용자_설명서",
link: "/ko-kr/manual/",
},
{
text: "개발 관련",
text: "개발 문서",
icon: "ph:code-bold",
link: "/ko-kr/2.1-LINUX_튜토리얼",
link: "/ko-kr/develop/",
},
{
text: "프로토콜 문서",
icon: "basil:document-solid",
link: "/ko-kr/3.1-연동",
link: "/ko-kr/protocol/",
},
{
text: "MAA 공식 홈페이지",

View File

@@ -4,22 +4,22 @@ export const zhcnNavbar = navbar([
{
text: "主页",
icon: "ic:round-home",
link: "/",
link: "/zh-cn/",
},
{
text: "用户手册",
icon: "mdi:user",
link: "/用户手册",
link: "/zh-cn/manual/",
},
{
text: "开发文档",
icon: "ph:code-bold",
link: "/开发文档",
link: "/zh-cn/develop/",
},
{
text: "协议文档",
icon: "basil:document-solid",
link: "/协议文档",
link: "/zh-cn/protocol/",
},
{
text: "MAA 官网",

View File

@@ -9,17 +9,17 @@ export const zhtwNavbar = navbar([
{
text: "用戶說明書",
icon: "mdi:user",
link: "/zh-tw/1.1-詳細介紹",
link: "/zh-tw/manual/",
},
{
text: "開發文件",
icon: "ph:code-bold",
link: "/zh-tw/2.1-Linux編譯教學",
link: "/zh-tw/develop/",
},
{
text: "協議文件",
icon: "basil:document-solid",
link: "/zh-tw/3.1-集成文件",
link: "/zh-tw/protocol/",
},
{
text: "MAA 官網",

View File

@@ -41,43 +41,6 @@ export default {
}
}
},
'/zh-tw/': {
placeholder: '搜尋',
translations: {
button: {
buttonText: '搜尋',
},
modal: {
searchBox: {
resetButtonTitle: '清除查詢條件',
cancelButtonText: '取消',
},
startScreen: {
recentSearchesTitle: '搜尋歷史',
noRecentSearchesText: '沒有搜尋歷史',
saveRecentSearchButtonTitle: '保存至搜尋歷史',
removeRecentSearchButtonTitle: '從搜尋歷史中移除',
favoriteSearchesTitle: '收藏',
removeFavoriteSearchButtonTitle: '從收藏中移除',
},
errorScreen: {
titleText: '無法獲取結果',
helpText: '你可能需要檢查你的網路連接',
},
footer: {
selectText: '選擇',
navigateText: '切換',
closeText: '關閉',
searchByText: '搜尋提供者',
},
noResultsScreen: {
noResultsText: '無法找到相關結果',
suggestedQueryText: '你可以嘗試查詢',
reportMissingResultsText: '你認為該查詢應該有結果?',
reportMissingResultsLinkText: '點擊反饋',
},
}
}
},
'/en-us/': {
placeholder: 'Search',
@@ -117,8 +80,4 @@ export default {
}
}
},
'/ja-jp/': {
placeholder: '検索する',
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -10,115 +10,23 @@ export const enusSidebar = sidebar({
{
text: "User Manual",
icon: "mdi:user",
prefix: "manual/",
collapsible: true,
children: [
{
text: "Introduction",
icon: "mdi:information-outline",
link: "/en-us/1.1-USER_MANUAL",
},
{
text: "FAQs",
icon: "ph:question-fill",
link: "/en-us/1.2-FAQ",
},
{
text: "Emulator Supports",
icon: "mingcute:laptop-fill",
collapsible: true,
children: [
{
text: "Windows",
icon: "ri:windows-fill",
link: "/en-us/1.3-EMULATOR_SUPPORTS",
},
{
text: "Mac",
icon: "basil:apple-solid",
link: "/en-us/1.4-EMULATOR_SUPPORTS_FOR_MAC",
},
{
text: "Linux",
icon: "teenyicons:linux-alt-solid",
link: "/en-us/1.5-EMULATOR_SUPPORTS_FOR_LINUX",
},
],
},
],
children: "structure",
},
{
text: "Development Docs",
icon: "ph:code-bold",
prefix: "develop/",
collapsible: true,
children: [
{
text: "Linux Compilation Tutorial",
icon: "teenyicons:linux-alt-solid",
link: "/en-us/2.1-LINUX_TUTORIAL",
},
{
text: "Development",
icon: "iconoir:developer",
link: "/en-us/2.2-DEVELOPMENT",
},
{
text: "IssueBot Usage",
icon: "bxs:bot",
link: "/en-us/2.3-ISSUE_BOT_USAGE",
},
{
text: "Web PR Tutorial",
icon: "mingcute:git-pull-request-fill",
link: "/en-us/2.4-PURE_WEB_PR_TUTORIAL",
},
{
text: "Overseas Clients Adaptation",
icon: "ri:earth-fill",
link: "/en-us/2.5-OVERSEAS_CLIENTS_ADAPTATION",
},
],
children: "structure",
},
{
text: "Protocol Docs",
icon: "basil:document-solid",
prefix: "protocol/",
collapsible: true,
children: [
{
text: "Integration",
icon: "bxs:book",
link: "/en-us/3.1-INTEGRATION",
},
{
text: "Callback Schema",
icon: "material-symbols:u-turn-left",
link: "/en-us/3.2-CALLBACK_SCHEMA",
},
{
text: "Copilot Schema",
icon: "ph:sword-bold",
link: "/en-us/3.3-COPILOT_SCHEMA",
},
{
text: "Task Schema",
icon: "material-symbols:task",
link: "/en-us/3.4-TASK_SCHEMA",
},
{
text: "Integrated Strategy Schema",
icon: "ri:game-fill",
link: "/en-us/3.5-INTEGRATED_STRATEGY_SCHEMA",
},
{
text: "Infrastructure Scheduling Schema",
icon: "material-symbols:view-quilt-rounded",
link: "/en-us/3.6-INFRASTRUCTURE_SCHEDULING_SCHEMA",
},
{
text: "Security Presence Schema",
icon: "game-icons:prisoner",
link: "/en-us/3.7-SECURITY_PRESENCE_SCHEMA",
},
],
children: "structure",
},
],
});

View File

@@ -10,98 +10,23 @@ export const jajpSidebar = sidebar({
{
text: "使用説明",
icon: "mdi:user",
prefix: "manual/",
collapsible: true,
children: [
{
text: "詳細説明",
icon: "mdi:information-outline",
link: "/ja-jp/1.1-詳細説明",
},
{
text: "よくある質問",
icon: "ph:question-fill",
link: "/ja-jp/1.2-よくある質問",
},
{
text: "エミュレータのサポート",
icon: "mingcute:laptop-fill",
link: "/ja-jp/1.3-エミュレータのサポート",
},
],
children: "structure",
},
{
text: "開発関連",
icon: "ph:code-bold",
prefix: "develop/",
collapsible: true,
children: [
{
text: "Linuxコンパイルチュートリアル",
icon: "teenyicons:linux-alt-solid",
link: "/ja-jp/2.1-Linuxチュートリアル",
},
{
text: "開発関連",
icon: "iconoir:developer",
link: "/ja-jp/2.2-プルリクエスト",
},
{
text: "IssueBotの使用方法",
icon: "bxs:bot",
link: "/ja-jp/2.3-IssueBotの使用方法",
},
{
text: "純WebサイトのPRチュートリアル",
icon: "mingcute:git-pull-request-fill",
link: "/ja-jp/2.4-純WebサイトのPRチュートリアル",
},
{
text: "グローバル版を含む海外クライアントの対応について",
icon: "ri:earth-fill",
link: "/ja-jp/2.5-OVERSEAS_CLIENTS_ADAPTATION",
},
],
children: "structure",
},
{
text: "プロトコルドキュメント",
icon: "basil:document-solid",
prefix: "protocol/",
collapsible: true,
children: [
{
text: "インテグレーション",
icon: "bxs:book",
link: "/ja-jp/3.1-統合ドキュメント",
},
{
text: "コールバック図解",
icon: "material-symbols:u-turn-left",
link: "/ja-jp/3.2-コールバックAPI",
},
{
text: "自動作戦図解",
icon: "ph:sword-bold",
link: "/ja-jp/3.3-自動作戦API",
},
{
text: "タスク図解",
icon: "material-symbols:task",
link: "/ja-jp/3.4-タスクAPI",
},
{
text: "統合戦略図解",
icon: "ri:game-fill",
link: "/ja-jp/3.5-統合戦略API",
},
{
text: "インフラスケジュール図解",
icon: "material-symbols:view-quilt-rounded",
link: "/ja-jp/3.6-インフラスケジュール設定",
},
{
text: "セキュリティプレゼンス図解",
icon: "game-icons:prisoner",
link: "/ja-jp/3.7-SECURITY_PRESENCE_SCHEMA",
},
],
children: "structure",
},
],
});

View File

@@ -10,115 +10,23 @@ export const kokrSidebar = sidebar({
{
text: "사용자 설명서",
icon: "mdi:user",
prefix: "manual/",
collapsible: true,
children: [
{
text: "기능",
icon: "mdi:information-outline",
link: "/ko-kr/1.1-사용자_설명서",
},
{
text: "자주 묻는 질문",
icon: "ph:question-fill",
link: "/ko-kr/1.2-FAQ",
},
{
text: "에뮬레이터 지원",
icon: "mingcute:laptop-fill",
collapsible: true,
children: [
{
text: "Windows",
icon: "ri:windows-fill",
link: "/ko-kr/1.3-에뮬레이터_지원",
},
{
text: "Mac",
icon: "basil:apple-solid",
link: "/ko-kr/1.4-Mac에뮬레이터_지원",
},
{
text: "Linux",
icon: "teenyicons:linux-alt-solid",
link: "/ko-kr/1.5-LINUX용_에뮬레이터 지원",
},
],
},
],
children: "structure",
},
{
text: "개발 관련",
icon: "ph:code-bold",
prefix: "develop/",
collapsible: true,
children: [
{
text: "리눅스 컴파일 튜토리얼",
icon: "teenyicons:linux-alt-solid",
link: "/ko-kr/2.1-LINUX_튜토리얼",
},
{
text: "개발 환경 구축하기",
icon: "iconoir:developer",
link: "/ko-kr/2.2-개발_환경_구축하기",
},
{
text: "Issue Bot 사용 방법",
icon: "bxs:bot",
link: "/ko-kr/2.3-Issue_Bot_사용방법",
},
{
text: "GitHub Pull Request 사용 가이드",
icon: "mingcute:git-pull-request-fill",
link: "/ko-kr/2.4-웹을_통한_풀리퀘스트_튜토리얼",
},
{
text: "해외 클라이언트 현지화",
icon: "ri:earth-fill",
link: "/ko-kr/2.5-해외_클라이언트_현지화",
},
],
children: "structure",
},
{
text: "프로토콜 문서",
icon: "basil:document-solid",
prefix: "protocol/",
collapsible: true,
children: [
{
text: "연동",
icon: "bxs:book",
link: "/ko-kr/3.1-연동",
},
{
text: "콜백 스키마",
icon: "material-symbols:u-turn-left",
link: "/ko-kr/3.2-콜백_스키마",
},
{
text: "전투 스키마",
icon: "ph:sword-bold",
link: "/ko-kr/3.3-전투_스키마",
},
{
text: "작업 스키마",
icon: "material-symbols:task",
link: "/ko-kr/3.4-작업_스키마",
},
{
text: "통합전략 스키마",
icon: "ri:game-fill",
link: "/ko-kr/3.5-통합전략_스키마",
},
{
text: "기반시설 예약 스키마",
icon: "material-symbols:view-quilt-rounded",
link: "/ko-kr/3.6-기반시설_예약_스키마",
},
{
text: "보안파견 스키마",
icon: "game-icons:prisoner",
link: "/ko-kr/3.7-보안파견_스키마",
},
],
children: "structure",
},
],
});

View File

@@ -1,53 +1,30 @@
import { sidebar } from "vuepress-theme-hope";
export const zhcnSidebar = sidebar({
"/": [
"/zh-cn/": [
{
text: "MAA",
icon: "ic:round-home",
link: "/",
link: "/zh-cn/",
},
{
text: "用户手册",
icon: "mdi:user",
prefix: "用户手册/",
prefix: "manual/",
collapsible: true,
children: [
{
text: "功能介绍",
icon: "mdi:information-outline",
link: "详细介绍",
},
{
text: "常见问题",
icon: "ph:question-fill",
link: "常见问题",
},
{
text: "模拟器和设备支持",
icon: "mingcute:laptop-fill",
prefix: "模拟器和设备支持/",
collapsible: true,
children: "structure",
},
{
text: "CLI使用指南",
icon: "material-symbols:terminal",
link: "CLI使用指南",
},
],
children: "structure",
},
{
text: "开发文档",
icon: "ph:code-bold",
prefix: "开发文档/",
prefix: "develop/",
collapsible: true,
children: "structure",
},
{
text: "协议文档",
icon: "basil:document-solid",
prefix: "协议文档/",
prefix: "protocol/",
collapsible: true,
children: "structure",
},

View File

@@ -10,120 +10,23 @@ export const zhtwSidebar = sidebar({
{
text: "用戶說明書",
icon: "mdi:user",
prefix: "manual/",
collapsible: true,
children: [
{
text: "功能介绍",
icon: "mdi:information-outline",
link: "/zh-tw/1.1-詳細介紹",
},
{
text: "常見問題",
icon: "ph:question-fill",
link: "/zh-tw/1.2-常見問題",
},
{
text: "模擬器支援",
icon: "mingcute:laptop-fill",
collapsible: true,
children: [
{
text: "Windows",
icon: "ri:windows-fill",
link: "/zh-tw/1.3-模擬器支援",
},
{
text: "Mac",
icon: "basil:apple-solid",
link: "/zh-tw/1.4-Mac模擬器支援",
},
{
text: "Linux",
icon: "teenyicons:linux-alt-solid",
link: "/zh-tw/1.5-Linux模擬器支援",
},
],
},
{
text: "CLI使用說明",
icon: "material-symbols:terminal",
link: "/zh-tw/1.6-CLI使用說明",
},
],
children: "structure",
},
{
text: "開發文件",
icon: "ph:code-bold",
prefix: "develop/",
collapsible: true,
children: [
{
text: "Linux編譯教學",
icon: "teenyicons:linux-alt-solid",
link: "/zh-tw/2.1-Linux編譯教學",
},
{
text: "開發相關",
icon: "iconoir:developer",
link: "/zh-tw/2.2-開發相關",
},
{
text: "IssueBot使用方法",
icon: "bxs:bot",
link: "/zh-tw/2.3-IssueBot使用方法",
},
{
text: "純網頁端PR教學",
icon: "mingcute:git-pull-request-fill",
link: "/zh-tw/2.4-純網頁端PR教學",
},
{
text: "外服適配教學",
icon: "ri:earth-fill",
link: "/zh-tw/2.5-外服適配教學",
},
],
children: "structure",
},
{
text: "協議文件",
icon: "basil:document-solid",
prefix: "protocol/",
collapsible: true,
children: [
{
text: "集成文件",
icon: "bxs:book",
link: "/zh-tw/3.1-集成文件",
},
{
text: "回呼訊息協議",
icon: "material-symbols:u-turn-left",
link: "/zh-tw/3.2-回呼訊息協議",
},
{
text: "戰鬥流程協議",
icon: "ph:sword-bold",
link: "/zh-tw/3.3-戰鬥流程協議",
},
{
text: "任務流程協議",
icon: "material-symbols:task",
link: "/zh-tw/3.4-任務流程協議",
},
{
text: "肉鴿輔助協議",
icon: "ri:game-fill",
link: "/zh-tw/3.5-肉鴿輔助協議",
},
{
text: "基建排班協議",
icon: "material-symbols:view-quilt-rounded",
link: "/zh-tw/3.6-基建排班協議",
},
{
text: "保全派駐協議",
icon: "game-icons:prisoner",
link: "/zh-tw/3.7-保全派駐協議",
},
],
children: "structure",
},
],
});

View File

@@ -1,16 +0,0 @@
.home {
.vp-hero-info-wrapper {
min-height: 600px;
}
}
.catalog-display-container {
overflow-x: visible;
overflow-y: auto;
max-height: 75vh;
margin: 0.5rem;
border-radius: 0.5rem;
overflow-wrap: break-word;
}

View File

@@ -11,12 +11,12 @@ export default hopeTheme({
docsDir: "/docs",
locales: {
"/": {
"/zh-cn/": {
navbar: zhcnNavbar,
sidebar: zhcnSidebar,
displayFooter: false,
metaLocales: {
editLink: "在Github上编辑此页面",
editLink: "在 Github 上编辑此页面",
},
},
"/zh-tw/": {
@@ -24,7 +24,7 @@ export default hopeTheme({
sidebar: zhtwSidebar,
displayFooter: false,
metaLocales: {
editLink: "在Github上編輯此頁面",
editLink: "在 Github 上編輯此頁面",
},
},
"/en-us/": {
@@ -40,7 +40,7 @@ export default hopeTheme({
sidebar: jajpSidebar,
displayFooter: false,
metaLocales: {
editLink: "このページをGithubで編集する",
editLink: "このページを Github で編集する",
},
},
"/ko-kr/": {
@@ -48,13 +48,11 @@ export default hopeTheme({
sidebar: kokrSidebar,
displayFooter: false,
metaLocales: {
editLink: "Github에서 이 페이지를 편집",
editLink: "Github 에서 이 페이지를 편집",
},
},
},
sidebarIcon: true,
plugins: {
activeHeaderLinks: false,
@@ -62,10 +60,10 @@ export default hopeTheme({
provider: "Giscus",
repo: "MaaAssistantArknights/maa-website",
repoId: "R_kgDOHY7Gyg",
category: "General",
categoryId: "DIC_kwDOHY7Gys4CYefe",
mapping: "title",
strict: false,
category: "Comments",
categoryId: "DIC_kwDOHY7Gys4CgoVH",
mapping: "pathname",
strict: true,
},
copyright: {
@@ -90,15 +88,89 @@ export default hopeTheme({
tabs: true,
tasklist: true,
vPre: true,
component: true,
},
prismjs: {
light: "one-dark",
dark: "nord",
shiki: {
themes: {
light: "light-plus",
dark: "nord",
}
},
sitemap: true,
notice: [
{
path: "/zh-tw/",
title: "翻译警告",
content: "MAA 的文檔以簡體中文為主,其他語言的文檔可能品質低或尚未翻譯,請諒解。",
fullscreen: true,
confirm: true,
showOnce: true,
actions: [
{
text: "我知道了",
type: "primary",
},
{ text: "前往簡體中文",
link: "/zh-cn/",
},
],
},
{
path: "/en-us/",
title: "Translation Warning",
content: "MAA's documents are mainly in Simplified Chinese. Documents in other languages may be of low quality or not yet translated. Please understand.",
fullscreen: true,
confirm: true,
showOnce: true,
actions: [
{
text: "Okay",
type: "primary",
},
{ text: "Take me to zh-CN",
link: "/zh-cn/",
},
],
},
{
path: "/ja-jp/",
title: "翻訳に関する警告",
content: "MAA のドキュメントは主に簡体字中国語で書かれており、他の言語のドキュメントは低品質であるか、翻訳されていない可能性がありますので、ご了承ください。",
fullscreen: true,
confirm: true,
showOnce: true,
actions: [
{
text: "OK",
type: "primary",
},
{ text: "中国語サイトへ行く",
link: "/zh-cn/",
},
],
},
{
path: "/ko-kr/",
title: "번역 경고",
content: "MAA의 문서는 주로 중국어 간체로 되어 있습니다. 다른 언어로 된 문서는 번역이 이상하거나, 번역이 되어있지 않을 수 있습니다.",
fullscreen: true,
confirm: true,
showOnce: true,
actions: [
{
text: "OK",
type: "primary",
},
{ text: "중국어 간체로 이동",
link: "/zh-cn/",
},
],
},
],
},
});

View File

@@ -58,3 +58,5 @@
<!-- markdownlint-disable-file -->

View File

@@ -0,0 +1,52 @@
<template>
<div>
<img v-for="src of displayImageList" class="image" :src="src" alt="" />
</div>
</template>
<script lang="ts">
import { PropType, defineComponent } from "vue";
import { withBase } from "vuepress/client";
export default defineComponent({
props: {
imageList: Array as PropType<
Array<{ light: string; dark: string } | string>
>,
},
computed: {
displayImageList() {
return this.imageList.map((item) => {
const src =
typeof item === "string"
? item
: this.$isDarkmode
? item.dark
: item.light;
return withBase(src);
});
},
},
});
</script>
<style scoped>
.image {
box-sizing: border-box;
width: 25%;
padding: 9px;
border-radius: 16px;
}
@media (max-width: 719px) {
.image {
width: 50%;
}
}
@media (max-width: 419px) {
.image {
width: 100%;
}
}
</style>

View File

@@ -1,253 +0,0 @@
# MAA User Manual
## Features
### Operations
- If the stage you need is not available in the selection, please choose "Current/Previous" in MAA and manually locate the stage in the game, making sure the screen stays on the stage detail page with the **Start** and **Delegate** buttons available.
- If you are not on this page, `Current/Previous` will automatically navigate to the last stage played according to the record in the lower right corner of the terminal homepage.
- You can also enable `Manually input stage name` in `Task Settings` - `Combat` - `Advanced` and enter the stage number manually. Currently supported stages include:
- All main theme stages, where `-NORMAL` or `-HARD` can be added at the end to switch between standard and challenge modes.
- LMD stages and Battle Record stages 5/6. The input should be `CE-6` or `LS-6` even if you have not unlocked it yet. In that case, the program will automatically switch to corresponding stage 5.
- Skill Summary, Shop Voucher, and Carbon Stages 5. The input also should be `CA-5`, `AP-5`, and `SK-5` respectively.
- Chip stages. The input should be complete with stage number, such as `PR-A-1`.
- Annihilation. The input should be `Annihilation`.
- Certain side story stages. This includes `OF-1`, `OF-F3` and `GT-5`.
- The last three stages of the current SS event. This is available after downloading updates automatically from the [API](https://ota.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) when the event is on. Prompt will be shown in the main page when this is available.
<!--For the re-engraved SS event, you can enter `SSReopen-XX` to clear XX-1 ~ XX-9 levels at one time. Such as `SSReopen-IC`.-->
- Fight options include `Use Sanity Potion`, `Use Originium`, `Perform Battles` and `Material`, you can specific any of them. The fight tasks stops once one of the specifications is met.
- `Use Sanity Potion` specifies the number of sanity potions to use at most. Multiple medicines may be used at a time.
- `Use Originium` specifies the number of Originium to use at most. It is used one at a time.
- `Perform Battles` specifies the number of battles to perform at most.
- `Material` specifies the number of materials to collect.
| Example | Use Sanity Potion | Use Originium | Perform Battles | Material | Result |
|:-------:|:-----------------:|:-------------:|:---------------:|:--------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| A | 999 | 10 | 1 | x | The AI will attempt to use sanity potions and/or originium until **one** full run is completed, satisfying the condition `Perform Battles: 1`. If there are not enough sanity potions, originium, or initial sanity to start, the AI will stop without starting the run. |
| B | x | x | 100 | x | The AI will attempt to complete 100 runs, but if all available sanity is used up (which may be less than 100 runs), and the conditions `Use Sanity Potion: No` and `Use Originium: No` are met, the AI will stop without completing the full 100 runs. |
| C | 1 | x | 100 | x | The AI will attempt to complete 100 runs, using at most one sanity potion. If the AI uses a sanity potion and runs out of sanity during the process, and the conditions `Use Sanity Potion: 1` and `Use Originium: No` are met, the AI will stop without completing the full 100 runs. |
| D | 999 | x | 100 | 3 Orirock| The AI will attempt to complete 100 runs, using up to 999 sanity potions. If during the process, the AI accumulates 3 Orirock cubes, satisfying the condition `Material: 3 Orirock`, the AI will stop without completing the full 100 runs. |
- Note that `Material` and `Stage` are independent options which means the program is not going to automatically navigate the the stage for the specified material. You still to mannually configure the stage option.
- `Delegate` will be automatically selected if not already in case you forget to do so.
- Material drops are automatically recognized and printed to the program log. The data also gets uploaded to [Penguin Stats](https://penguin-stats.io/). You can also manually set your Penguin Stats user ID in the settings.
- After disconnection or flashing at 4 am, it will automatically reconnect and continue to play the last stage selected in the game. If you need to cross the day, please check the last stage selection.
- A level up situation can be automatically handled as well as a failed delegation in which case this time of the operation will be given up.
### Infrastructure
#### Shifting Strategy
- Automatically calculate and choose the **optimal solution within a single facility**. Supports all general and special skill combinations. Supports recognition of Battle Record, Pure Gold, Originium Shard, Chip, etc. for different operators.
#### Morale Threshold for Working in Infrastructure
- Recognizes the percentage of the Morale bar. When Morale is below some threshold, the operator will be moved to the dormitory.
#### Note
- The shifting strategy is based on the optimal solution within a single facility instead of multiple facilities. Combination such as: `Shamare-Tequila`, `Vermeil-Scene` within a single facility can be recognized correctly; while combination like `Rosmontis`, `Pinus Sylvestris` among facilities is not supported yet.
- If `Usage of Drone` is selected with the option `Trading Post-LMD`, it will recognize `Shamare` and reserve it for her.
- Operators of corresponding fraction will be selected when only one Clue is needed Reception Room; otherwise general operators will be chosen.
- Reception Room will send out Clues only when your Clues are full. Three Clues will be send out at most. You can edit `SelectClue` - `maxTimes` field in `resource/tasks.json` to edit number of Clues sent if you want.
- If you do not want operators like `Irene` or someone else to be put into the dormitory when the training room is not in use, you can switch off `Working operator shall not be put into the dormitory` in the settings. Note that this may cause the operators with non-full fatigue not entering the dormitory as well.
- Due to the complexity of Control Center, only `Amiya`, `Swire`, `Kal'tsit`, `Team Rainbow` and other Morale+0.05 operators will be considered. To be improved in future.
- Some alternate operators may have conflicts in Infrastructure. Please notice if there is "Operator conflict" warnings on the UI, and double check the Infrastructure to shift manually (e.g. some facilities may not have any operator).
#### Custom infrastructure shift change (test function)
- The experts of Yituliu with a one-picture flow have helped to create a shift generator, which can be referenced in the documentation.
- Several sets of extremely efficient tasks are built-in under the MAA folder `/resource/custom_infrast/`, which can be used as a reference. (Fully upgraded operators at elite 2 level can try to use them directly.)
### Credit Store
- Automatically visit friends to obtain credit points.
- With the help of Warfarin's credit:
- Use a support operator to clear the `OF-1` stage in Heart of Surging Flame. If the stage is not unlocked, please do not select this option.
- You can modify the automatic combat flow of OF-1 by editing `resource\copilot\OF-1_credit_fight.json` (it is generally not recommended to modify).
- It does not take effect when the stage selection is set to `current/last`.
### Integrated Strategy (I.S.) Support
- Please select the theme you want to explore in the MAA `Task Settings` - `Auto I.S.`, otherwise there may be problems due to the default selection of the latest theme.
- Please pin the corresponding I.S. theme to the terminal in the game.
- If there is exploration of non-target themes (such as if you plan to use MAA to brush Mizuki, but there is still an unfinished exploration of Phantom), please end it manually.
- If MAA gets stuck/repeatedly enters and exits on the difficulty selection interface, please manually select the difficulty before starting this function.
- In the settings, you can choose the team, starting operator (only one operator name), etc.
- It supports automatic recognition of operators and proficiency, and automatically selects better operators and skills.
- It supports identifying store items and prioritizes purchasing more powerful collectibles.
- It supports reconnection after disconnection and supports continuing to return to brush after 4 a.m. update.
- If the scraping cannot be completed during the battle, all ground units will be automatically withdrawn after more than 5 minutes; if it exceeds 6 minutes, the current battle will be automatically abandoned without getting stuck.
- If the task gets stuck, it will automatically abandon the exploration and retry. However, if it often gets stuck in a certain place and then gives up, seriously affecting efficiency, please feel free to submit an issue for feedback~
### Share Your Tasks
- Welcome to share your tasks with [www.抄作业.com](https://www.抄作业.com), or [www.prts.plus](https://www.prts.plus)!
#### Load Tasks
- Please run it on the screen with `Start Operation` button.
- If you need to make your own build manually, turn off `auto build` to do so.
- Remember to like the tasks that you think helpful!
![image](https://user-images.githubusercontent.com/18511905/189662951-5f9d6d88-3c23-49b3-a58f-c35388b2d5d7.png)
#### Create Tasks
- A tool for creating tasks is provided in the directory of MAA. See also: [Copilot Schema](3.3-COPILOT_SCHEMA.md) for help.
- How to get map coordinates: start an operation after filling in `stage_name`. A file named `map.png` will be generated for your reference. Or you can refer to [PRTS.map](https://map.ark-nights.com/), with the `coordinates` set to `MAA` mode.
- Drill plan is recommended for testing.
- Welcome to share your tasks with [www.抄作业.com](https://www.抄作业.com), or [www.prts.plus](https://www.prts.plus)!
- It is recommended to write your own name, video walkthrough URL, or other things that you think helpful in the description.
### Task Video Recognition
- Drag and drop the video file to the `Copilot` section and click `Start` to initialize the video recognition.
- Only 16:9 aspect ratio videos with a resolution of 720p or higher are supported. The video content must not contain any black borders, distortion correction, emulator borders or other elements.
### Recruitment Recognition
- Auto-recruitment and recruitment recognition are two different features!
- Auto-recruitment supports using `Expedited Plan` to make it fully automated! Please enable `Auto use Expedited` in `Task Settings` - `Recruit` , and modify `Recruit max times`.
- Pop-up notification when 5★, 6★ operators are recruited.
- Auto-uploading recruitment data to [Penguin Stats](https://penguin-stats.io/) and [Yituliu](https://yituliu.site/) while auto-recruitment.
### Depot Recognition (test function)
- Please start with the `Upgrade materials` screen. Currently, exporting is only supported to [penguin-stats](https://penguin-stats.io/), [Arknights Toolbox](https://arkn.lolicon.app/#/material), and [Arknights | Planner](https://ark-nights.com/table). More useful features may be added in the future.
- Please feel free to contact us if you hope to integrate with our JSON schema.
## Setting Introduction
In addition to the `Settings` tab, there are also `Task Settings` in Windows MAA. Click the `gear` on the right side of the task list of `Farming` to switch between different task settings in the farming interface.
Note that clicking `General` `Advanced` will also switch `Task Settings`.
### Custom Connection
#### Obtain adb path
- Method 1: Download adb and set up connection manually
- (Only for Windows users) Download [adb](https://dl.google.com/android/repository/platform-tools-latest-windows.zip) and unzip it. It is recommended to unzip to the MAA directory.
- Go to the "Settings" - "Connection Settings" of the software, select the file path of `adb.exe`, fill in the adb address (IP + port need to be filled in, such as `127.0.0.1:5555`), and select the emulator type.
- Method 2: Find the adb execution port of the emulator and connect
- For emulators that come with adb, you can find the location of the adb executable file according to the [Confirm adb address section](1.2-FAQ.md#Method-1-Confirm-that-the-adb-and-connection-address-are-correct).
- Mac Android emulators are generally installed in the `/Application/` directory. Right-click on `[emulator name].app` and select "Show Package Contents". Find the adb executable file in the directory.
#### Get the port number
- Method 1: Use the adb command to view the running port directly
**Replace adb in the command below with the name of the found adb executable file**, and then execute:
```sh
# mac/linux/windows cmd
adb devices
# windows PowerShell
.\adb devices
```
After most emulator adb execution commands are run, they will be output in the following form, where `[ADBPORT]` is a specific number:
```sh
List of devices attached
127.0.0.1:[ADBPORT] device
# may be more output like the above one
```
Use `127.0.0.1:[ADBPORT]` as the connection address (replace `[ADBPORT]` with the actual number).
- Method 2: Use system command to check emulator debugging port
If the output of the adb command does not display the port information in the form of `127.0.0.1:[port]`, you can use the following method to check:
1. First, run the adb executable program once (need to start the adb daemon process), and run the Arknights emulator application.
2. Then use the system command to check the port information of the adb process.
Windows Command
You can use `win` + `R` to open the command line by entering `cmd`, and use the following command to check:
```sh
for /F "tokens=1,2" %A in ('"tasklist | findstr "adb""') do ( ^
netstat -ano | findstr "%B" |)
```
Mac / Linux Command
Enter the following command in the terminal after starting the emulator:
```sh
tmp=$(sudo ps aux | grep "[a]db" | awk '{print $2}') && \
sudo netstat -vanp tcp | grep -e "\b$tmp"
```
The output will be in the following format, where `[PID]` is the actual process number of the adb, `[ADBPORT]` is the remote connection port of the target emulator adb, and `[localport]` is the local address of the process, which does not need to be concerned (there will also be other irrelevant indicators in the Mac operation result):
```sh
> ( netstat -ano | findstr "[PID]" )
TCP 127.0.0.1:[localport] 127.0.0.1:0.0.0.0 LISTENING [PID]
TCP 127.0.0.1:[localport] 127.0.0.1:[ADBPORT] ESTABLISHED [PID]
# ...
# maybe more output like the above line
```
Use `127.0.0.1:[ADBPORT]` (replace `[ADBPORT]` with the actual number) in the results as the actual connection address of the emulator adb and fill it in `Settings` - `Connection Settings` - `Connection Address`.
### Automatically Start Multiple Emulators
- If you need to operate multiple emulators simultaneously, you can copy the MAA folder multiple times, and use **different MAAs**, **the same adb.exe**, and **different connection addresses** to connect.
- Taking `BlueStacks International Version` as an example, two ways to start multiple emulators are introduced.
- Perform multiple operations by attaching commands to `HD-Player.exe`.
1. Start the corresponding emulator separately.
2. Open the Task Manager, find the corresponding emulator process, go to the Details tab, right-click the column above, click `Select Columns`, and check `Command Line`.
3. In the newly added `Command Line` column, find the content after `"...\Bluestacks_nxt\HD-Player.exe"`.
4. Fill in the found content, similar to `--instance Nougat32`, in `Startup Settings` - `Additional Commands`.
Note: After the operation is completed, it is recommended to hide the `Command Line` column opened in `Step 2` to prevent freezing.
- Example:
```bash
Multi-instance 1:
Emulator Path: C:\Program Files\BlueStacks_nxt\HD-Player.exe
Additional Commands: --instance Nougat32 --cmd launchApp --package "com.hypergryph.arknights"
Multi-instance 2:
Emulator Path: C:\Program Files\BlueStacks_nxt\HD-Player.exe
Additional Commands: --instance Nougat32_1 --cmd launchApp --package "com.hypergryph.arknights.bilibili"
```
The `--cmd launchApp --package` part starts and automatically runs the specified package name application after startup, which can be changed as needed.
- Perform multi-instance operation by using the shortcut of emulators or apps.
1. Open the multi-instance manager and add the corresponding emulator's shortcut.
2. Fill in the path of the emulator shortcut in `Startup Settings` - `Emulator Path`.
Note: Some emulators support creating app shortcuts, which can directly launch the emulator and open Arknights with the app shortcut.
- Example:
```bash
Multi-instance 1:
Emulator Path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\BlueStacks\Multi-instance 1.lnk
Multi-instance 2:
Emulator Path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\BlueStacks\Multi-instance 2 - Arknights.lnk
```
If using `Emulator Path` for multi-instance operation, it is recommended to leave `Additional Commands` in `Startup Settings` empty.
### Pre/Post-Script
- Starting from v4.13.0, it is possible to set pre/post-script that automatically executes batch files before and after the task.
- You need to provide the path to the batch file, which should have a `.bat` extension.
## Miscellaneous
- Tasks order can be changed on the UI. So can the shifting order in the infrastructure.
- Almost all configuration changes will be saved automatically, except for options containing an *.
- All clicking event is randomized within a region, following Poisson distribution (higher probability at the center, lower probability around).
- Developed in C++, the core algorithm supports multi-level cache, in order to reduce CPU and memory usage as much as possible.
- Our software supports auto-update ✿✿ヽ(°▽°)ノ✿ Beta-testers can try beta versions, which updates faster and less buggy (maybe).
- If auto-update fails, you can download manually and put the ZIP file under the same directory. The update will start automatically.

View File

@@ -1,189 +0,0 @@
# Emulator Supports
## ✅ [Bluestacks-CN 5](https://www.bluestacks.cn/)
Fully compatible. Need to turn on `Settings` - `Engine Settings` - `Allow ADB connection`.
## ✅ [Bluestacks 5](https://www.bluestacks.com/) (Recommended👍)
Fully compatible. Need to turn on `Settings` - `Advanced` - `Android Debug Bridge`.
## ✅ [Bluestacks 5 Hyper-V Version](https://support.bluestacks.com/hc/en-us/articles/4415238471053-System-requirements-for-BlueStacks-5-on-Hyper-V-enabled-Windows-10-and-11-)
Compatible.
- Turn on `Settings` - `Advanced` - `Android Debug Bridge`.
- Bluestack Hyper-V port changes frequently. Here is a simple hack:
1. Find `bluestacks.conf` in the data location of the emulator. (Default is `C:\ProgramData\BlueStacks_nxt\bluestacks.conf`)
2. If you are using MAA for the first time, Launch it, which generates `gui.json`.
3. **Exit** MAA, **then** open the `gui.json`, and add a new field `Bluestacks.Config.Path`, with the value of the full path of `bluestacks.conf` (backslashes should be escaped like `\\`).
For example: (suppose the file is at `C:\ProgramData\BlueStacks_nxt\bluestacks.conf`)
```json
{
"Configurations": {
"Default": {
"Bluestacks.Config.Path":"C:\\ProgramData\\BlueStacks_nxt\\bluestacks.conf",
// ...
}
}
}
```
4. LinkStart!
- If you need to run multiple emulators (ignore this step if you do not need to do so), you can change the keywords for MAA to detect configuration files.
Add field `Bluestacks.Config.Keyword` following the steps above
Example:
```json
"Bluestacks.Config.Keyword":"bst.instance.Nougat64.status.adb_port",
```
## ✅ [Nox](https://en.bignox.com/)
Fully compatible.
## ✅ [Nox Android 9](https://en.bignox.com/)
Fully compatible.
## ⚠️ [MuMu](https://www.mumuglobal.com/)
Compatible but:
- Requires MAA to "Run as Administrator" to get ADB path and address (since MuMu runs as admin).
- You can also fill in the ADB path and address if you do not wish to run as admin.
- It is not recommended to use the default odd resolutions of MuMu, it is better to change to mainstream resolutions such as 1280x720, 1920x1080, 2560x1440, etc.
- MuMu uses the same adb port for multi-instance, so multi-instance is not supported.
## 🚫 MuMu Mobile Game Assistant
Incompatible. The ADB port is unavailable.
## ⚠️ [MuMu emulator X (Android 12)](https://www.mumuglobal.com/) (most smooth👍)
Compatible but:
- This emulator is still in the testing phase and it is uncertain whether unknown issues will occur.
- Requires MAA to "Run as Administrator" to get ADB path and address (since MuMu runs as admin).
- You can also fill in the ADB path and address if you do not wish to run as admin.
- It is not recommended to use the default odd resolutions of MuMu, it is better to change to mainstream resolutions such as 1280x720, 1920x1080, 2560x1440, etc.
- MuMu uses the same adb port for multi-instance, so multi-instance is not supported.
## ⚠️ [LDPlayer](https://www.ldplayer.net/)
The recent official update has fixed some issues and provided corresponding support. After some time of testing, we have basically confirmed that it can be used normally.
While using it, please still pay attention to the following points, but overall, the user experience has been greatly improved.
- **For LDPlayer 9, it is recommended to use version 9.0.37 or above; for LDPlayer 5, it is recommended to use version 5.0.44 or above.**
- We cannot guarantee that the LDPlayer emulator can run perfectly on all computers, but we are working hard to optimize the adaptation.
- If you encounter any problems when using the LDPlayer emulator, please update to the latest version of the emulator and try to solve the problem by yourself first. If you encounter difficulties, please feel free to provide feedback, and we will try our best to provide support.
- Note: We welcome feedback on issues related to the LDPlayer emulator, and will try to solve them. We would be very grateful if you could provide relevant code or contributions.
## ✅ [Memu](https://www.memuplay.com)
Compatible, but there are fewer tests and there may be unknown issues
## 🚫 Tencent Mobile Game Assistant
Incompatible. The ADB port is unavailable.
## 🚫 [Google Play Games Beta](https://developer.android.com/games/playgames/pg-emulator?hl=zh-cn#installing-game-consumer)
Incompatible. The ADB port of [the consumer client](https://developer.android.com/games/playgames/pg-emulator?hl=zh-cn#installing-game-consumer)is unavailable.
## ⚠️ [Win11 WSA](https://docs.microsoft.com/en-us/windows/android/wsa/)
Partially compatible.
- Need to connect with [Custom Connection](#%EF%B8%8F-custom-connection).
- For WSA 2204 or higher (version is in the `About` window of system settings), try `General Configuration` to connect.
- For WSA 2203 or older (version is in the top of the system settings window), try `Legacy WSA` to connect.
- Since WSA does not support changing resolution, please resize the window manually because this program supports 720p or higher `16:9` resolution better. (Or you can simply maximize the window with `F11` if your monitor is 16:9.)
- Please ensure that your emulator is at the top of other windows in most of the time and there are no other android applications running. Otherwise the game may pause or the recognition may fail.
- Sometimes the screenshot of WSA may be blank, causing recognition failure. So it is not recommended to use WSA.
## ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
Compatible.
### ⚙️ Non-`16:9` devices like smartphones or tablets
You may need to change the resolution manually since MAA supports only `16:9` resolution.
1. Turn on USB debugging mode and connect your device to the computer with a cable, or debug with ADB remotely.
2. Run `Command Prompt (CMD)`, check the device address and connect.
- Use the following command to check device ID if you are using USB cable to connect:
```bash
adb devices # Checks the connection status of the current device, with the first column to be the device ID
```
After successful connection, you will see the following messages:
```bash
C:\Users\username>adb devices
List of devices attached
VFNDU1682100xxxx device # The data before "device" is the device ID
```
- If you are using remote ADB connection: go to `Settings -> WLAN -> View` to find the corresponding IP address, and the port will usually be 5555 or 5037.
```bash
adb connect <IP Address + Port> # E.g. 192.168.0.10:5555
```
- If it prompts `'adb' is not recognized as an internal or external command`, it is because the environment variable is not configured correctly. You need to give the full path of ADB to run it. For example:
```bash
D:\adb_unzip_path\adb.exe devices # Or you can simply drag the adb.exe to CMD window and type [SPACE] devices
```
It is suggested that you configure the environment variable for ADB if you need to run it frequently. Please refer to the articles on the Internet about how to configure it for help.
3. Enter the command prompt to proceed
```bash
adb -s <Device ID or IP + Port> shell # Enters the command prompt of the device
wm size # Checks the resolution of the current device
wm size 720x1280 # Changes the resolution to 720p
```
4. Fill in the ADB path and the address of your smartphone (device ID or IP + port) in MAA
5. Set the `Special-shaped screen adaptation` to 0 (off) in the game settings.
Otherwise, your phone UI and click response may be dislocated if you change the resolution with ADB later.
6. Use MAA (≧∇≦)ノ
7. Before exiting MAA, reset the resolution of your phone.
```bash
wm size reset # Resets resolution
```
#### Using `Starts/End with Script` Options
After MAA version 4.13.0, you're able to utilize `Starts/End with Script` options to apply resolution changes on startup and revert the changes on finishing.
Create two script files: `startup.bat` & `finish.bat` in appropriate path and edit them using your favored text editor.
In `startup.bat`:
```bash
adb shell wm size 1080x1920
::If long-time operation is required, add the following line to save the power and protect your screen.
adb shell settings put system screen_brightness 1
```
In `finish.bat`:
```bash
adb shell wm size reset
::Add the following line to brighten your screen
adb shell settings put system screen_brightness 20
::Add the following line to lock (Command may differ in different device, test it first)
adb shell input keyevent 26
```
Then go to `Settings` - `Connection Settings` and add the paths of files above to `Starts with Script` & `End with Script` options, the script will be executed at corresponding timing.

View File

@@ -1,343 +0,0 @@
---
icon: material-symbols:terminal
---
# User Guide for CLI
## Feature
- Define tasks by TOML, YAML or JSON file, then run it by `maa run <task>`;
- Install and update `MaaCore` and resources with `maa install` and `maa update`;
- Update self with `maa self update`;
## Installation
### Appimage
The CLI is the default interface of MAA on Linux. You can use the CLI directly by download the latest Appimage.
### Package manager
#### macOS
Install with [Homebrew](https://brew.sh/):
```bash
brew install MaaAssistantArknights/tap/maa-cli
```
#### Linux
ArchLinux user can install [AUR package](https://aur.archlinux.org/packages/maa-cli/):
```bash
yay -S maa-cli
```
For LinuxBrew user, you can install with [LinuxBrew](https://docs.brew.sh/Homebrew-on-Linux):
```bash
brew install MaaAssistantArknights/tap/maa-cli
```
### Prebuilt binary
You can install CLI by download prebuilt binary from
[`maa-cli` release page](https://github.com/MaaAssistantArknights/maa-cli/releases/latest) and extract it to your favorite location. The filename for different platform is:
<table>
<thead>
<tr>
<th>Operation System</th>
<th>Architecture</th>
<th>Filename</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan=2>Linux</td>
<td>x86_64</td>
<td>maa_cli-x86_64-unknown-linux-gnu.tar.gz</td>
</tr>
<tr>
<td>aarch64</td>
<td>maa_cli-aarch64-unknown-linux-gnu.tar.gz</td>
</tr>
<tr>
<td rowspan=2>macOS</td>
<td>x86_64</td>
<td rowspan=2>
maa_cli-universal-apple-darwin.zip
</td>
</tr>
<tr>
<td>aaarch64</td>
</tr>
<tr>
<td rowspan=2>Windows</td>
<td>x86_64</td>
<td>maa_cli-x86_64-pc-windows-msvc.zip</td>
</tr>
</tbody>
</table>
### Build from source
You can also build from source by yourself with `cargo`:
```bash
cargo install --git https://github.com/MaaAssistantArknights/maa-cli.git --bin maa --locked
```
### Dependencies
#### MaaCore
`maa-cli` only provides a interface for MaaCore, it needs `MaaCore` and resources to run tasks, which can be installed by `maa install`:
```bash
maa install
```
## Usage
### Commands
The main feature of `maa-cli` is to run tasks, you can run a task by `maa run <task>`. Here `<task>` is the name of a task, you can list all available tasks by `maa list`.
More details can be found by `maa help`.
## Configurations
### Configuration directory
All configurations of `maa-cli` is located in a specific configuration directory, which can be get by `maa dir config`.
The configuration directory can be changed by environment variable `MAA_CONFIG_DIR`. In below examples, we will use `$MAA_CONFIG_DIR` to represent the configuration directory.
All configuration files can be written in TOML, YAML or JSON format. In below examples, we will use TOML format and `.toml` as file extension. But you can mix these three formats as long as the file extension is correct.
### Define tasks
A `maa-cli` task should be defined in a single file, which should be located in `$MAA_CONFIG_DIR/tasks` directory.
#### Basic structure
A `maa-cli` task is a sequence of `MAA` tasks, each `MAA` task is defined by `type` and `params` fields:
```toml
[[tasks]]
type = "StartUp" # the type of maa task
params = { client_type = "Official", start_game_enabled = true } # the params of given task
```
See documentation of [MAA](https://maa.plus/docs/en-us/3.1-INTEGRATION.html#asstappendtask) for all available task types and params.
#### Task variants and conditions
In some case, you may want to run a task with different params in different conditions. You can define multiple variants for a task, and use `condition` field to determine whether the variant should be used. For example, you may want to use different infrast plan in different time period of a day:
```toml
[[tasks]]
type = "Infrast"
[tasks.params]
mode = 10000
facility = ["Trade", "Reception", "Mfg", "Control", "Power", "Office", "Dorm"]
dorm_trust_enabled = true
filename = "normal.json" # the filename of custom infrast plan
# use plan 1 before 12:00:00, use plan 2 between 12:00:00 and 18:00:00, use plan 0 after 18:00:00
[[tasks.variants]]
condition = { type = "Time", end = "12:00:00" } # if start is not defined, it will be 00:00:00
params = { plan_index = 1 }
[[tasks.variants]]
condition = { type = "Time", start = "12:00:00", end = "18:00:00" }
params = { plan_index = 2 }
[[tasks.variants]]
condition = { type = "Time", start = "18:00:00" } # if end is not defined, it will be 23:59:59
params = { plan_index = 0 }
```
The `condition` field is used to determine whether the variant should be used,
and the `params` field of matched variant will be merged into the params of the task.
**Note**: If the `filename` field is a relative path, it will be relative to `$MAA_CONFIG_DIR/infrast`. Besides, the custom infrast plan file will not be read by `maa-cli` but `MaaCore`. So the format of the file must be `JSON` and time period defined in the file will not be used to select the corresponding sub-plan. So you must specify the `plan_index` field in the params of the task to use the correct infrast plan in the corresponding time period. This will ensure that the correct infrast plan is used in the appropriate time period.
Besides of `Time` condition, there are also `DateTime`, `Weakday`, and `Combined` conditions. `DateTime` condition is used to specify a specific datetime period, `Weekday` condition is used to specify some days in a week, `Combined` condition is used to specify a combination of multiple conditions.
```toml
[[tasks]]
type = "Fight"
# fight SL-8 on summer event
[[tasks.variants]]
params = { stage = "SL-8" }
condition = { type = "DateTime", start = "2023-08-01T16:00:00", end = "2023-08-21T03:59:59" }
# fight CE-6 on Tue, Thu, Sat if not on summer event
[[tasks.variants]]
condition = { type = "Weekday", weekdays = ["Tue", "Thu", "Sat"] }
params = { stage = "CE-6" }
# fight 1-7 otherwise
[[tasks.variants]]
params = { stage = "1-7" }
```
With default strategy, if multiple variants are matched, only the first one will be used. And if the condition is not given, the variant will always be matched. So you can put a variant without condition at the end of variants.
The strategy of matching variants can be changed by `strategy` field:
```toml
[[tasks]]
type = "Fight"
strategy = "merge" # or "first" (default)
# use all expiring medicine on Sunday night
[[tasks.variants]]
params = { expiring_medicine = 1000 }
[tasks.variants.condition]
type = "Combined"
conditions = [
{ type = "Time", start = "18:00:00" },
{ type = "Weekday", weekdays = ["Sun"] },
]
# fight 1-7 by default
[[tasks.variants]]
params = { stage = "1-7" }
# fight CE-6 on Tue, Thu, Sat if not on summer event
[[tasks.variants]]
condition = { type = "Weekday", weekdays = ["Tue", "Thu", "Sat"] }
params = { stage = "CE-6" }
# fight SL-8 on summer event
[[tasks.variants]]
params = { stage = "SL-8" }
condition = { type = "DateTime", start = "2023-08-01T16:00:00", end = "2023-08-21T03:59:59" }
```
The outcome stage of this example should be identical to the previous one, but expiring medicine will be used on Sunday night additionally.
With the `merge` strategy, if multiple variants are matched, the params of all matched variants will be merged. If multiple variants have the same param, the last one will be used.
If no variant is matched, the task will not be executed, which is useful when you want to only run a task in some conditions:
```toml
# Mall after 18:00
[[tasks]]
type = "Mall"
[[tasks.variants]]
condition = { type = "Time", start = "18:00:00" }
```
#### User input
In some case, you may want to input some value at runtime, instead of hard code it in the task file. Such as the stage to fight, the item to buy, etc. You can specify the value as `Input` or `Select` type:
```toml
[[tasks]]
type = "Fight"
# Select a stage to fight
[[tasks.variants]]
condition = { type = "DateTime", start = "2023-08-01T16:00:00", end = "2023-08-21T03:59:59" }
# Set the stage to a `Select` type with alternatives and description
[tasks.variants.params.stage]
alternatives = ["SL-6", "SL-7", "SL-8"] # the alternatives of stage, at least one alternative should be given
description = "a stage to fight in summer event" # description of the input, optional
# Task without input
[[tasks.variants]]
condition = { type = "Weekday", weekdays = ["Tue", "Thu", "Sat"] }
params = { stage = "CE-6" }
# Input a stage to fight
[[tasks.variants]]
# Set the stage to a `Input` type with default value and description
[tasks.variants.params.stage]
default = "1-7" # default value of stage, optional (if not given, user can input empty value to re-prompt)
description = "a stage to fight" # description of the input, optional
```
For `Input` type, a prompt will be shown to ask user to input a value. If the default value is given, it will be used if user input empty value, otherwise it will re-prompt. For `Select` type, a prompt will be shown to ask user to select a value from alternatives (by index). If user input is not a valid index, it will re-prompt. The promote and input can be disabled by `--batch` option, which is useful for running tasks in Schedule.
### `MaaCore` related configurations
The related configurations of `MaaCore` is located in `$MAA_CONFIG_DIR/asst.toml`. The current available configurations are:
```toml
user_resource = true
resources = ["platform_diff/iOS"]
[connection]
type = "ADB"
adb_path = "adb"
device = "emulator-5554"
config = "CompatMac"
[static_options]
cpu_ocr = false
gpu_ocr = 1
[instance_options]
touch_mode = "MAATouch"
deployment_with_pause = false
adb_lite_enabled = false
kill_adb_on_exit = false
```
The feild `user_resource` is used to specify whether load user resource, which is a boolean value. If it is `true`, additional resources in `$MAA_CONFIG_DIR/resource` directory will be loaded at last (after all other resources). This is identical to the `--user-resource` command line option. See `maa help run` for more information.
The `resources` field is used to specify additional resources, which is a list of resource directories (if relative path is given, it will be relative to `$(maa dir resource)/resource` directory):
The `connection` section is used to specify how to connect to the game. Currently, there are two types of connection: `ADB` and `PlayTools`.
If you use `ADB`, you should set `adb_path` and `device` fields:
```toml
[connection]
type = "ADB"
adb_path = "adb" # the path of adb executable
device = "emulator-5554" # the serial of your android device
config = "General" # the config of maa
```
If you use `PlayTools`, you should set `address` which is the address of MaaTools set in PlayCover, more details can be found at
[here](https://maa.plus/docs/en-us/1.4-EMULATOR_SUPPORTS_FOR_MAC.html#✅-playcover-the-software-runs-most-fluently-for-its-nativity-🚀):
```toml
[connection]
type = "PlayTools"
address = "localhost:1717" # the address of MaaTools
config = "CompatMac" # the same as above
```
Both `ADB` and `PlayTools` share the `config` field, which is a parameter of `connect` function of maa.It's default value is `CompatMac` on macOS, `CompatPOSIXShell` on Linux and `General` on other platforms. More optional configs can be found in `config.json` in resource directory.
The `instance_options` section is used to configure maa [instance options](https://maa.plus/docs/en-us/3.1-INTEGRATION.html#asstsetinstanceoption):
```toml
[instance_options]
touch_mode = "ADB" # touch mode to use, can be "ADB", "MiniTouch", "MAATouch" or "MacPlayTools" (only for PlayCover)
deployment_with_pause = false # whether pause the game when deployment
adb_lite_enabled = false # whether use adb-lite
kill_adb_on_exit = false # whether kill adb when exit
```
Note: If you connect to the game with `PlayCover`, the `touch_mode` will be ignored and `MacPlayTools` will be used.
### `maa-cli` related configurations
The `maa-cli` related configurations should be located in `$MAA_CONFIG_DIR/cli.toml`. Currently, it only contains one section: `core`:
```toml
[core]
channel = "beta"
[core.components]
resource = false
```
The `channel` field is used to specify the channel of `MaaCore` to install, which can be `stable`, `beta` or `alpha`. The components of `MaaCore` to install can be specified by `components` field, which is a table of boolean values. Currently, only `resource` component is supported.

View File

@@ -1,291 +0,0 @@
# Task Schema
Usage of `resource/tasks.json` and description of each field
## Overview
```json
{
"TaskName" : { // Task name
"baseTask": "xxx", // use xxx task as a template to generate tasks, see Base Task in the special task type below for details
"algorithm": "MatchTemplate", // Optional, indicating the type of recognition algorithm
// defaults to MatchTemplate when not filled in
// - JustReturn: Execute the action directly without recognition
// - MatchTemplate: match the image
// - OcrDetect: text recognition
// - Hash: Hash calculation
"action": "ClickSelf", // Optional, indicates the action after recognition
// defaults to DoNothing if not filled in
// - ClickSelf: Click on the recognized location (a random point within the recognized target range)
// - ClickRand: Click on a random position in the whole screen
// - ClickRect: Click on the specified area, corresponds to the specificRect field, not recommended to use this option
// - DoNothing: Do nothing
// - Stop: Stop the current task
// - Swipe: slide, corresponds to the specificRect and rectMove fields
"sub": [ "SubTaskName1", "SubTaskName2" ],
// Optional, subtasks. Will execute each subtask in turn after the current task is executed
// Optional, sub-tasks and then sub-tasks. But be careful not to write a dead loop
"subErrorIgnored": true, // Optional, if or not to ignore subtask errors.
// default false if not filled
// If false, if a subtask has an error, it will not continue to execute subsequent tasks (equivalent to this task having an error)
// When true, it has no effect on whether a subtask has an error or not
"next": [ "OtherTaskName1", "OtherTaskName2" ],
// Optional, indicating the next task to be executed after the current task and the sub task are executed
// will be identified from front to back, and the first matching one will be executed
// default stop after the current task is executed
// For the same task, the second time will not be recognized after the first recognition.
// "next": [ "A", "B", "A", "A" ] -> "next": [ "A", "B" ]
// Do not allow JustReturn type tasks to be located in a non-last item
"maxTimes": 10, // Optional, indicates the maximum number of times the task can be executed
// default infinite if not filled
// When the maximum number of times is reached, if the exceededNext field exists, the task will be executed as exceededNext; otherwise, the task will be stopped.
"exceededNext": [ "OtherTaskName1", "OtherTaskName2" ],
// Optional, indicates the task to be executed when the maximum number of executions is reached
// If not filled in, it will stop when the maximum number of executions is reached; if filled in, it will be executed here, not in next
"onErrorNext": [ "OtherTaskName1", "OtherTaskName2" ],
// Optional, indicating the subsequent tasks to be performed in case of execution errors
"preDelay": 1000, // Optional, indicates how long the action will be executed after it is recognized, in milliseconds; default 0 if not filled in
"postDelay": 1000, // Optional, indicates how long the action is delayed after execution before it is recognized next, in milliseconds; default 0 if not filled in
"roi": [ 0, 0, 1280, 720 ], // Optional, indicating the range of recognition, in the format [ x, y, width, height ]
// Auto-scaling to 1280 * 720; default when not filled [ 0, 0, 1280, 720 ]
// Fill in as much as possible, reducing the recognition range can reduce performance consumption and speed up recognition
"cache": true, // Optional, indicates whether the task uses caching or not, default is true;
// After the first recognition, only the first recognized position will be recognized forever, enable to save performance significantly
// but only for tasks where the location of the target to be recognized will not change at all, set to false if the location of the target to be recognized will change
"rectMove": [ 0, 0, 0, 0 ], // Optional, target movement after recognition, not recommended Auto-scaling with 1280 * 720 as base
// For example, if A is recognized, but the actual location to be clicked is somewhere in the 10 pixel 5 * 2 area below A.
// then you can fill in [ 0, 10, 5, 2 ], try to recognize the position to be clicked directly if you can, this option is not recommended
// Additional, valid and mandatory when action is Swipe, indicates the end of the slide.
"reduceOtherTimes": [ "OtherTaskName1", "OtherTaskName2" ],
// Optional, executes to reduce the execution count of other tasks.
// For example, if you take a sanity pill, it means that the last click on the blue start action button did not take effect, so the blue start action is -1
"specificRect": [ 100, 100, 50, 50 ],
// Valid and mandatory when action is ClickRect, indicates the specified click position (a random point in the range).
// Valid and mandatory when action is Swipe, it means the starting point of swipe.
// Auto-scaling with 1280 * 720 as base
"specialParams": [ int, ... ], // Parameters needed for some special recognizers
// extra, optional when action is Swipe, [0] for duration, [1] for whether to enable extra sliding
/* The following fields are only valid if algorithm is MatchTemplate */
"template": "xxx.png", // Optional, the name of the image file to be matched
// default "TaskName.png"
"templThreshold": 0.8, // Optional, threshold value for image template matching score, above which the image is considered recognized.
// default 0.8, you can check the actual score according to the log
"maskRange": [ 1, 255 ], // Optional, the grayscale mask range. For example, the part of the image that does not need to be recognized will be painted black (grayscale value of 0)
// Then set "maskRange" to [ 1, 255 ], to instantly ignore the blacked out parts when matching
/* The following fields are only valid if algorithm is OcrDetect */
"text": [ "接管作战", "代理指挥" ], // Required, the text content to be recognized, as long as any match is considered to be recognized
"ocrReplace": [ // Optional, replacement for commonly misidentified text (regular support)
[ "千员", "干员" ],
[ ".+击干员", "狙击干员" ]
],
"fullMatch": false, // optional, whether the text recognition needs to match all words (not multiple words), default is false
// false, as long as it is a substring: for example, text: [ "start" ], the actual recognition to "start action", also considered successful.
// if true, "start" must be recognized, not one more word
"isAscii": false, // optional, whether the text content to be recognized is ASCII characters
// default false if not filled
"withoutDet": false // Optional, whether to not use the detection model
// default false if not filled
/* The following fields are only valid when the algorithm is Hash */
// The algorithm is not mature, and is only used in some special cases, so it is not recommended for now
// Todo
}
}
```
## Special Task Type
### Template Task(`@` Type Task)
Template task and base task are collectively called **Template task**.
Allows a task "A" to be used as a template, and then "B@A" to represent the task generated by "A".
- If task "B@A" is not explicitly defined in `tasks.json`, then add `B@` prefix to the `sub`, `next`, `onErrorNext`, `exceededNext`, `reduceOtherTimes` fields (or `B` if the task name starts with `#`) and the rest of the parameters are the same as for task "A". That is, if task "A" has the following parameters.
```json
"A": {
"template": "A.png",
...,
"next": [ "N1", "N2" ]
}
```
is equivalent to defining both
```json
"B@A": {
"template": "A.png",
...,
"next": [ "B@N1", "B@N2" ]
}
```
- If task "B@A" is defined in `tasks.json`, then
1. if the `algorithm` field of `B@A` is different from that of `A`, the derived class parameters are not inherited (only the parameters defined by `TaskInfo` are inherited)
2. for image matching task, `template` is `B@A.png` if not explicitly defined (instead of inheriting the `template` name of "A"), otherwise any derived class parameters are inherited directly from "A" task if not explicitly defined
3. for the parameters defined in the `TaskInfo` base class (any type of task parameters, such as `algorithm`, `roi`, `next`, etc.), if not explicitly defined in "B@A", all parameters are inherited directly from the "A" task parameters, except for the five fields mentioned above, such as `sub`, which will be prefixed with "B@" when inherited
### Base Task
Base task and template task are collectively called **template task**.
A task with the field `baseTask` is a base task.
Base task takes precedence over template task. This means that `"B@A": { "baseTask": "C", ... }` has no relevance to task A.
Any parameter that is not explicitly defined uses the value of the `baseTask` parameter for the corresponding task without a prefix, except for `template` which remains `"taskName.png"` if it is not explicitly defined.
#### Multi-File Task
If a task defined in a later loaded task file (e.g. `tasks.json` for foreign services; hereinafter called File 2) also has a task of the same name defined in a earlier loaded task file (e.g. `tasks.json` for official services; hereinafter called File 1), then.
- if the task in File 2 does not have a `baseTask` field, then it inherits the fields of the task with the same name in File 1 directly.
- If the task in File 2 has a `baseTask` field, then it does not inherit the fields of the task with the same name in File 1, but overwrites them.
### Virtual Task
Virtual task is also called sharp task (`#` type task).
A task with `#` in its name is a virtual task. `#` can be followed by `next`, `back`, `self`, `sub`, `on_error_next`, `exceeded_next`, `reduce_other_times`。
| Virtual Task Type | Meaning | Simple example |
|:---------:|:---:|:--------:|
| self | Parent Task Name | `"A": {"next": "#self"}` in `"#self"` is interpreted as `"A"`<br>`"B": {"next": "A@B@C#self"}` in `"A@B@C#self"` is interpreted as `"B"`.<sup>1</sup> |
| back | # Preceding task name | `"A@B#back"` is interpreted as `"A@B"`<br>`"#back"` will be skipped if it appears directly |
| next, sub, etc. | # The field corresponding to the previous task name | Take `next` for example:<br>`"A#next"` is interpreted as `Task.get("A")->next`<br>`"#next"` will be skipped if it appears directly |
_Note<sup>1</sup>: `"XXX#self"` has the same meaning as `"#self"`._
#### Simple example
```json
{
"A": { "next": [ "N1", "N2" ] },
"C": { "next": [ "B@A#next" ] },
"Loading": {
"next": [ "#self", "#next", "#back" ]
},
"B": {
"next": [ "Other", "B@Loading" ]
}
}
```
Available.
```cpp
Task.get("C")->next = { "B@N1", "B@N2" };
Task.get("B@Loading")->next = { "B@Loading", "Other", "B" };
Task.get("Loading")->next = { "Loading" };
Task.get_raw("B@Loading")->next = { "B#self", "B#next", "B#back" };
```
#### Some uses
- When several tasks have `"next": [ "#back" ]`, `"Task1@Task2@Task3"` represents the sequential execution of `Task3`, `Task2`, `Task1`。
#### Other related
```json
{
"A": { "next": [ "N0" ] },
"B": { "next": [ "A#next" ] },
"C@A": { "next": [ "N1" ] }
}
```
In this case above, `"C@B" -> next` (i.e. `C@A#next`) is `["N1"]` instead of `["C@N0"]`.
## Runtime task modification
- `Task.lazy_parse()` loads the json task configuration file at runtime. The lazy_parse rules are the same as for [multi-file task](#multi-file task).
- `Task.set_task_base()` modifies the `baseTask` field of a task.
### Usage Example
Suppose you have the following task configuration file:
```json
{
"A": {
"baseTask": "A_default"
},
"A_default": {
"next": [ "xxx" ]
},
"A_mode1": {
"next": [ "yyy" ]
},
"A_mode2": {
"next": [ "zzz" ]
}
}
```
The following code enables changing task "A" based on the value of `mode`, and will also change other tasks that depend on task "A", e.g. "B@A":
```cpp
switch (mode) {
case 1:
Task.set_task_base("A", "A_mode1"); // This is basically the same as replacing A with the contents of A_mode1, as follows
break;
case 2:
Task.set_task_base("A", "A_mode2");
break;
default:
Task.set_task_base("A", "A_default");
break;
}
```
## Expression Calculation
| Symbol | Meaning | Example |
|:---------:|:---:|:--------:|
| `@` | Template task | `Fight@ReturnTo` |
| `#` (unary) | Virtual task | `#self` |
| `#` (binary) | Virtual task | `StartUpThemes#next` |
| `*` | Repeat tasks | `(ClickCornerAfterPRTS+ClickCorner)*5` |
| `+` | Task list merge | `A+B` |
| `^` | Task list difference (in the former but not in the latter, the order remains the same) | `(A+A+B+C)^(A+B+D)` (= `C`) |
The operators `@`, `#`, `*`, `+`, `^` have priority: `#` (unary) > `@` = `#` (binary) > `*` > `+` = `^`.
## Schema Check
This project configures a json schema check for `tasks.json`, the schema file is `docs/maa_tasks_schema.json`.
### Visual Studio
It is configured in `MaaCore.vcxporj` and works right out of the box. The hint effect is more obscure and some information is missing.
### Visual Studio Code
It is configured in `.vscode/settings.json`, open that **project folder** with vscode and you are ready to use it. The hint works better.

View File

@@ -0,0 +1,9 @@
---
title: Development Docs
icon: ph:code-bold
index: false
dir:
order: 2
---
<Catalog base='/en-us/develop/' />

View File

@@ -1,18 +1,31 @@
# Development
---
order: 1
icon: iconoir:developer
---
## Introduction to GitHub pull request flow
# Getting Started with Development
1. If you have forked this repository long time ago, please go to `Settings`, scroll down to the bottom, and click `Delete Repository`.
## Introduction to GitHub Pull Request flow
### I don't know programming but just want to modify some JSON files/documents, how can I do it?
Welcome to the [GitHub Pull Request Tutorial](./pr-tutorial.md) that anyone can understand (purely web-based on Github.com)
### I can program, but I've never used GitHub/C++/..., what can I do?
1. If you have forked this repository a long time ago, please go to `Settings`, scroll down to the bottom, and click `Delete Repository`.
2. Go to [MAA main repository](https://github.com/MaaAssistantArknights/MaaAssistantArknights) and click `Fork`, then `Create fork`.
3. Clone the `dev` branch of the (forked) repository to local:
3. Clone the `dev` branch of the (forked) repository to local with submodules:
```bash
git clone <link to your forked repo> -b dev
git clone --recurse-submodules <link to your forked repo> -b dev
```
If you are using a Git GUI such as Visual Studio that does not include `--recurse-submodules`, do `git submodule update --init` after cloning to clone the submodules.
4. Download pre-built third-party libraries
**Please install Python first if you don't have it.**
**A Python environment is required; please search for a Python installation tutorial if needed.**
```cmd
python maadeps-download.py
@@ -20,7 +33,7 @@
5. Configure development environment
1. Download and install `Visual Studio 2022 Community`. Select `Desktop development with C++` and `.NET Desktop Development`.
1. Download and install `Visual Studio 2022 Community`. During installation, select `Desktop development with C++` and `.NET Desktop Development`.
6. Double-click to open the file `MAA.sln`. Visual Studio will load the project automatically.
7. Run a build to test whether the development environment has been configured correctly. Choose `Release` & `x64`, right-click `MaaWpfGui` to set it as the startup project, and run it. If the build is successful, the `MaaWpfGui` window will appear. You can connect to the emulator in order to confirm again that the development environment has been configured correctly.
@@ -74,11 +87,17 @@ Note: operations regarding Git can be done by VS2022 instead of command line too
## Enable clang-format in Visual Studio
1. Download [clang-format.zip](https://github.com/MaaAssistantArknights/MaaAssistantArknights/files/12775054/clang-format.zip) or compile [zzyyyl/llvm-project](https://github.com/zzyyyl/llvm-project/tree/fix/clang-format). You will get a `clang-format.exe`.
2. Search `clang-format` in `Tools`-`Options`.
3. Click `Enable ClangFormat` and select `Use custom clang-format.exe file` to use the `clang-format.exe` you have got in Step 1.
1. Install clang-format version 17 or higher.
![Enable clang-format in Visual Studio](https://user-images.githubusercontent.com/74587068/188262146-bf36f10a-db94-4a3c-9802-88b703342fb6.png)
```bash
python -m pip install clang-format
```
2. Use tools like 'Everything' to locate the installation location of clang-format.exe. As a reference, if you are using Anaconda, clang-format.exe will be installed in YourAnacondaPath/Scripts/clang-format.exe.
3. In Visual Studio, search for 'clang-format' in Tools-Options.
4. Click `Enable ClangFormat support` and select `Use custom clang-format.exe file` and choose the `clang-format.exe` located in Step 2.
![Enable clang-format in Visual Studio](https://github.com/MaaAssistantArknights/MaaAssistantArknights/assets/18511905/23ab94dd-09da-4b88-8c62-6b5f9dfad1a2)
You are all set with the clang-format integrated in Visual Studio supporting c++20 features!
@@ -88,8 +107,8 @@ You can also format with `tools\ClangFormatter\clang-formatter.py` directly, by
## Develop in cloud using GitHub codespace
Create GitHub codespace with pre configured C++ dev envirinments:
Create GitHub codespace with pre-configured C++ dev environments:
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg?color=green)](https://codespaces.new/MaaAssistantArknights/MaaAssistantArknights)
Then follow the instructions in vscode or [Linux tutorial](./2.1-LINUX_TUTORIAL.md) to configure GCC 12 and the CMake project.
Then follow the instructions in vscode or [Linux tutorial](./linux-tutorial.md) to configure GCC 12 and the CMake project.

Some files were not shown because too many files have changed in this diff Show More