mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
refactor.重构基建类,添加可用干员人数不足的回调
This commit is contained in:
@@ -2,24 +2,21 @@
|
||||
|
||||
#include "Controller.h"
|
||||
|
||||
const std::string asst::InfrastPowerTask::FacilityName = "Power";
|
||||
|
||||
bool asst::InfrastPowerTask::_run()
|
||||
{
|
||||
set_facility(FacilityName);
|
||||
m_all_available_opers.clear();
|
||||
|
||||
// 发电站只能造这一个
|
||||
set_product("Drone");
|
||||
|
||||
for (int i = 0; i != MaxNumOfFacility; ++i) {
|
||||
for (int i = 0; i != max_num_of_facility(); ++i) {
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
swipe_to_the_left_of_main_ui();
|
||||
|
||||
// 进不去说明设施数量不够
|
||||
if (!enter_facility(FacilityName, i)) {
|
||||
if (!enter_facility(i)) {
|
||||
break;
|
||||
}
|
||||
if (!enter_oper_list_page()) {
|
||||
|
||||
Reference in New Issue
Block a user