mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
Merge pull request #2231 from fearlessxjdx/dev
perf: 加快相邻排班变化不大时的干员选取速度
This commit is contained in:
@@ -158,6 +158,7 @@ void asst::InfrastAbstractTask::await_swipe()
|
||||
sleep(extra_delay);
|
||||
}
|
||||
|
||||
/// @brief 按技能排序->清空干员->选择定制干员->按指定顺序排序
|
||||
bool asst::InfrastAbstractTask::swipe_and_select_custom_opers(bool is_dorm_order)
|
||||
{
|
||||
LogTraceFunction;
|
||||
@@ -175,6 +176,8 @@ bool asst::InfrastAbstractTask::swipe_and_select_custom_opers(bool is_dorm_order
|
||||
ProcessTask(*this, { "InfrastOperListTabSkillUnClicked", "Stop" }).run();
|
||||
}
|
||||
|
||||
click_clear_button(); //先排序后清空,加速干员变化不大时的选择速度
|
||||
|
||||
std::vector<std::string> opers_order = room_config.names;
|
||||
opers_order.insert(opers_order.end(), room_config.candidates.cbegin(), room_config.candidates.cend());
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ bool asst::InfrastControlTask::_run()
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
click_clear_button();
|
||||
|
||||
if (is_use_custom_opers()) {
|
||||
bool name_select_ret = swipe_and_select_custom_opers();
|
||||
@@ -36,6 +35,8 @@ bool asst::InfrastControlTask::_run()
|
||||
}
|
||||
}
|
||||
|
||||
click_clear_button();
|
||||
|
||||
if (!opers_detect_with_swipe()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -41,11 +41,12 @@ bool asst::InfrastDormTask::_run()
|
||||
return false;
|
||||
}
|
||||
|
||||
click_clear_button();
|
||||
|
||||
if (is_use_custom_opers()) {
|
||||
swipe_and_select_custom_opers(true);
|
||||
}
|
||||
else {
|
||||
click_clear_button(); //宿舍若未指定干员,则清空后按照原约定逻辑选择干员
|
||||
}
|
||||
|
||||
Log.trace("m_dorm_notstationed_enabled:", m_dorm_notstationed_enabled);
|
||||
if (m_dorm_notstationed_enabled && !m_if_filter_notstationed_haspressed) {
|
||||
|
||||
@@ -163,7 +163,6 @@ bool asst::InfrastProductionTask::shift_facility_list()
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
click_clear_button();
|
||||
|
||||
if (is_use_custom_opers()) {
|
||||
bool name_select_ret = swipe_and_select_custom_opers();
|
||||
@@ -176,6 +175,8 @@ bool asst::InfrastProductionTask::shift_facility_list()
|
||||
}
|
||||
}
|
||||
|
||||
click_clear_button();
|
||||
|
||||
if (m_all_available_opers.empty()) {
|
||||
if (!opers_detect_with_swipe()) {
|
||||
return false;
|
||||
|
||||
@@ -184,7 +184,6 @@ bool asst::InfrastReceptionTask::shift()
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
click_clear_button();
|
||||
|
||||
if (is_use_custom_opers()) {
|
||||
bool name_select_ret = swipe_and_select_custom_opers();
|
||||
@@ -197,6 +196,8 @@ bool asst::InfrastReceptionTask::shift()
|
||||
}
|
||||
}
|
||||
|
||||
click_clear_button();
|
||||
|
||||
if (!opers_detect_with_swipe()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user