mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
完成进入最上方宿舍的功能,重构宿舍部分逻辑
This commit is contained in:
@@ -41,8 +41,7 @@ bool asst::InfrastStationTask::run()
|
||||
facility_number_rect.emplace_back(Rect()); // 假装给01 push一个,后面循环好写=。=
|
||||
|
||||
for (const std::string& key : facility_number_key) {
|
||||
Rect temp_rect;
|
||||
auto&& [algorithm, value] = m_identify_ptr->find_image(image, key, &temp_rect);
|
||||
auto&& [algorithm, value, temp_rect] = m_identify_ptr->find_image(image, key);
|
||||
if (value >= Configer::TemplThresholdDefault) {
|
||||
facility_number_rect.emplace_back(temp_rect);
|
||||
}
|
||||
@@ -58,15 +57,14 @@ bool asst::InfrastStationTask::run()
|
||||
image = get_format_image();
|
||||
}
|
||||
// 如果当前界面没有添加干员的按钮,那就不换班
|
||||
Rect add_rect;
|
||||
auto&& [algorithm, value] = m_identify_ptr->find_image(image, "AddOperator", &add_rect);
|
||||
auto&& [algorithm, value, add_rect] = m_identify_ptr->find_image(image, "AddOperator");
|
||||
if (value < Configer::TemplThresholdDefault) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 识别当前正在造什么
|
||||
for (const auto& [key, useless_value] : InfrastConfiger::get_instance().m_infrast_combs) {
|
||||
auto&& [algorithm, value] = m_identify_ptr->find_image(image, key, nullptr);
|
||||
auto&& [algorithm, value, useless_rect] = m_identify_ptr->find_image(image, key);
|
||||
if (value >= Configer::TemplThresholdDefault) {
|
||||
m_facility = key;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user