mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
feat: 自动编队允许指定助战单位 (#10820)
* feat: 自动编队自动借助战 Revertd78fc68fix: 招募助战后继续(缺少点击快速招募) i18n: 翻译 style: clang-format fix: basetask template fix: werror perf: 注释、format i18n: en perf: 完成功能实现,复用task,进行gui输出 perf: 更改默认状态 feat: BattleFormationTask Revert05baeb4(Back to739aa03) * fix: 缺干员回到主界面的时候应该点确认而不是返回 * feat: 助战干员职业选择栏模版 * refactor: UseSupportUnitTaskPlugin * chore: Auto update by pre-commit hooks [skip changelog] * perf: 默认值适配国服 * chore: Auto update by pre-commit hooks [skip changelog] * feat: try_find_and_apply_support_unit * chore: Auto update by pre-commit hooks [skip changelog] * fix: 大概可以用了 * fix: 补充 struct 的构造函数 * chore: Auto update by pre-commit hooks [skip changelog] * fix: 添加默认构造函数 * chore: Auto update by pre-commit hooks [skip changelog] * fix: 改改类型 * fix: callback[what] 纠正 * perf: roi及初始化优化 * perf: 简化中英文查找 * perf: rename func * perf: click roi * fix: 在点击助战干员的行动后添加 LoadingText * fix: 打点 Log * fix: remove unused function --------- Co-authored-by: Weiyou Wang <44151844+Alan-Charred@users.noreply.github.com> Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
This commit is contained in:
@@ -64,6 +64,8 @@ bool asst::CopilotTask::set_params(const json::value& params)
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
using SupportUnitUsage = BattleFormationTask::SupportUnitUsage;
|
||||
|
||||
if (m_running) {
|
||||
return false;
|
||||
}
|
||||
@@ -85,6 +87,8 @@ bool asst::CopilotTask::set_params(const json::value& params)
|
||||
int select_formation = params.get("select_formation", 0); // 选择第几个编队,0为不选择
|
||||
bool add_trust = params.get("add_trust", false); // 是否自动补信赖
|
||||
bool add_user_additional = params.contains("user_additional"); // 是否自动补用户自定义干员
|
||||
auto support_unit_usage = static_cast<SupportUnitUsage>(
|
||||
params.get("support_unit_usage", static_cast<int>(SupportUnitUsage::WhenNeeded))); // 助战干员使用模式
|
||||
std::string support_unit_name = params.get("support_unit_name", std::string());
|
||||
|
||||
if (params.contains("add_user_additional")) {
|
||||
@@ -145,7 +149,8 @@ bool asst::CopilotTask::set_params(const json::value& params)
|
||||
m_formation_task_ptr->set_enable(with_formation && navigate_name.find("TR") == std::string::npos);
|
||||
m_formation_task_ptr->set_select_formation(select_formation);
|
||||
m_formation_task_ptr->set_add_trust(add_trust);
|
||||
m_formation_task_ptr->set_support_unit_name(std::move(support_unit_name));
|
||||
m_formation_task_ptr->set_support_unit_usage(support_unit_usage);
|
||||
m_formation_task_ptr->set_specific_support_unit(support_unit_name);
|
||||
|
||||
if (auto opt = params.find<json::array>("user_additional"); add_user_additional && opt) {
|
||||
std::vector<std::pair<std::string, int>> user_additional;
|
||||
|
||||
Reference in New Issue
Block a user