Files
MaaAssistantArknights/src/MeoAssistant/InfrastControlTask.cpp

52 lines
1.1 KiB
C++

#include "InfrastControlTask.h"
bool asst::InfrastControlTask::_run()
{
m_all_available_opers.clear();
// 控制中枢只能造这一个
set_product("MoodAddition");
if (!enter_facility()) {
return false;
}
if (!enter_oper_list_page()) {
return false;
}
for (int i = 0; i <= OperSelectRetryTimes; ++i) {
if (need_exit()) {
return false;
}
click_clear_button();
if (is_use_custom_config()) {
bool name_select_ret = swipe_and_select_custom_opers();
if (name_select_ret) {
break;
}
else {
swipe_to_the_left_of_operlist();
continue;
}
}
if (!opers_detect_with_swipe()) {
return false;
}
swipe_to_the_left_of_operlist();
optimal_calc();
if (!opers_choose()) {
m_all_available_opers.clear();
swipe_to_the_left_of_operlist();
continue;
}
break;
}
click_confirm_button();
click_return_button();
return true;
}