fix.修复异格导致基建卡住的问题、修复识别错误导致设施从头开始换班的问题

https://github.com/MistEO/MeoAssistantArknights/issues/132
https://github.com/MistEO/MeoAssistantArknights/issues/129
This commit is contained in:
MistEO
2022-01-28 13:55:46 +08:00
parent 7e5e28be0a
commit 33c83d7ccd
5 changed files with 15 additions and 18 deletions

View File

@@ -151,7 +151,7 @@ bool asst::InfrastAbstractTask::click_confirm_button()
{
LogTraceFunction;
ProcessTask task(*this, { "InfrastConfirmButton" });
ProcessTask task(*this, { "InfrastDormConfirmButton" });
return task.run();
}

View File

@@ -95,10 +95,10 @@ bool asst::InfrastDormTask::opers_choose()
return true;
}
bool asst::InfrastDormTask::click_confirm_button()
{
LogTraceFunction;
ProcessTask task(*this, { "InfrastDormConfirmButton" });
return task.run();
}
//bool asst::InfrastDormTask::click_confirm_button()
//{
// LogTraceFunction;
//
// ProcessTask task(*this, { "InfrastDormConfirmButton" });
// return task.run();
//}

View File

@@ -13,7 +13,7 @@ namespace asst
private:
virtual bool _run() override;
virtual bool click_confirm_button() override;
//virtual bool click_confirm_button() override;
bool opers_choose();

View File

@@ -9,14 +9,14 @@ bool asst::InfrastPowerTask::_run()
// 发电站只能造这一个
set_product("Drone");
for (int i = 0; i != max_num_of_facilities(); ++i) {
for (; m_cur_facility_index != max_num_of_facilities(); ++m_cur_facility_index) {
if (need_exit()) {
return false;
}
swipe_to_the_left_of_main_ui();
// 进不去说明设施数量不够
if (!enter_facility(i)) {
if (!enter_facility(m_cur_facility_index)) {
break;
}
if (!enter_oper_list_page()) {

View File

@@ -45,18 +45,15 @@ bool asst::InfrastProductionTask::shift_facility_list()
MultiMatchImageAnalyzer locked_analyzer;
locked_analyzer.set_task_info("InfrastOperLocked" + facility_name());
int index = 0;
for (const Rect& tab : m_facility_list_tabs) {
m_cur_facility_index = index;
for (; m_cur_facility_index < m_facility_list_tabs.size(); ++m_cur_facility_index) {
Rect tab = m_facility_list_tabs.at(m_cur_facility_index);
if (need_exit()) {
return false;
}
if (index != 0) {
if (m_cur_facility_index != 0) {
callback(AsstMsg::SubTaskExtraInfo, basic_info_with_what("EnterFacility"));
}
++index;
Ctrler.click(tab);
sleep(tab_task_ptr->rear_delay);
@@ -625,4 +622,4 @@ bool asst::InfrastProductionTask::facility_list_detect()
}
return true;
}
}