feat.优化激进模式中,对单干员设施的操作逻辑

This commit is contained in:
MistEO
2021-11-23 22:34:26 +08:00
parent 69ebe73a39
commit e6791499f8
4 changed files with 16 additions and 8 deletions

View File

@@ -51,8 +51,8 @@ bool asst::InfrastOfficeTask::run()
need_shift = true;
// TODO这里有个bug全部干员中的selected和当前的不一定是同一个页面
// 不过目前没影响反正滑动到最前面了selected的一定是在最前面
ctrler.click(find_iter->rect);
sleep(300);
//ctrler.click(find_iter->rect);
//sleep(300);
break;
case infrast::WorkMode::Extreme: // TODO
break;

View File

@@ -62,8 +62,8 @@ bool asst::InfrastPowerTask::run()
need_shift = true;
// TODO这里有个bug全部干员中的selected和当前的不一定是同一个页面
// 不过目前没影响反正滑动到最前面了selected的一定是在最前面
ctrler.click(find_iter->rect);
sleep(300);
//ctrler.click(find_iter->rect);
//sleep(300);
break;
case infrast::WorkMode::Extreme: // TODO
break;

View File

@@ -489,11 +489,19 @@ bool asst::InfrastProductionTask::opers_choose()
++opt_iter;
continue;
}
// 这种情况可能是需要选择两个同样的技能,上一次循环选了一个,但是没有把滑出当前页面,本次又识别到了这个已选择的人
if (find_iter->selected == true) {
cur_all_opers.erase(find_iter);
continue;
auto& facility_info = resource.infrast().get_facility_info(m_facility);
int cur_max_num_of_opers = facility_info.max_num_of_opers - m_cur_num_of_lokced_opers;
if (cur_max_num_of_opers != 1) {
cur_all_opers.erase(find_iter);
continue;
}
// 但是如果当前设施只有一个位置,即不存在“上次循环”的情况,说明是清除干员按钮没点到
}
else {
ctrler.click(find_iter->rect);
}
ctrler.click(find_iter->rect);
{
auto avlb_iter = std::find_if(
m_all_available_opers.cbegin(), m_all_available_opers.cend(),

View File

@@ -212,8 +212,8 @@ bool asst::InfrastReceptionTask::shift()
if (need_exit()) {
return false;
}
swipe_to_the_left_of_operlist();
click_clear_button();
swipe_to_the_left_of_operlist();
if (!opers_detect_with_swipe()) {
return false;