diff --git a/src/MeoAssistance/InfrastPowerTask.cpp b/src/MeoAssistance/InfrastPowerTask.cpp index 87b8ad0805..fe85c5295e 100644 --- a/src/MeoAssistance/InfrastPowerTask.cpp +++ b/src/MeoAssistance/InfrastPowerTask.cpp @@ -16,9 +16,8 @@ bool asst::InfrastPowerTask::run() // 发电站只能造这一个 set_product("Drone"); - swipe_to_the_left_of_main_ui(); - - for (int i = 0; i != 3; ++i) { + for (int i = 0; i != MaxNumOfFacility; ++i) { + swipe_to_the_left_of_main_ui(); enter_facility(FacilityName, i); if (!enter_oper_list_page()) { diff --git a/src/MeoAssistance/InfrastPowerTask.h b/src/MeoAssistance/InfrastPowerTask.h index 232056bc02..c3835af2d1 100644 --- a/src/MeoAssistance/InfrastPowerTask.h +++ b/src/MeoAssistance/InfrastPowerTask.h @@ -11,6 +11,7 @@ namespace asst { const static std::string FacilityName; const static int MaxNumOfOpers = 1; + const static int MaxNumOfFacility = 3; private: }; }