mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
refactor.重构基建类,添加可用干员人数不足的回调
This commit is contained in:
@@ -12,22 +12,27 @@ namespace asst
|
||||
InfrastAbstractTask(AsstCallback callback, void* callback_arg, std::string task_chain);
|
||||
|
||||
virtual ~InfrastAbstractTask() = default;
|
||||
virtual InfrastAbstractTask& set_work_mode(infrast::WorkMode work_mode) noexcept;
|
||||
virtual InfrastAbstractTask& set_mood_threshold(double mood_thres) noexcept;
|
||||
InfrastAbstractTask& set_work_mode(infrast::WorkMode work_mode) noexcept;
|
||||
InfrastAbstractTask& set_mood_threshold(double mood_thres) noexcept;
|
||||
|
||||
virtual json::value basic_info() const override;
|
||||
virtual std::string facility_name() const;
|
||||
virtual size_t max_num_of_facility() const noexcept { return 1ULL; }
|
||||
virtual size_t max_num_of_opers() const noexcept { return 1ULL; }
|
||||
|
||||
constexpr static int OperSelectRetryTimes = 3;
|
||||
protected:
|
||||
virtual bool on_run_fails() override;
|
||||
|
||||
virtual bool enter_facility(const std::string& facility, int index = 0);
|
||||
virtual bool enter_oper_list_page(); // 从刚点进基建的界面,到干员列表页
|
||||
bool enter_facility(int index = 0);
|
||||
bool enter_oper_list_page(); // 从刚点进设施的界面,到干员列表页
|
||||
|
||||
virtual void swipe_to_the_left_of_operlist(int loop_times = 1); // 滑动到干员列表的最左侧
|
||||
virtual void swipe_to_the_left_of_main_ui(); // 滑动基建的主界面到最左侧
|
||||
virtual void swipe_to_the_right_of_main_ui(); // 滑动基建的主界面到最右侧
|
||||
virtual void swipe_of_operlist(bool reverse = false);
|
||||
virtual void async_swipe_of_operlist(bool reverse = false);
|
||||
virtual void await_swipe();
|
||||
void swipe_to_the_left_of_operlist(int loop_times = 1); // 滑动到干员列表的最左侧
|
||||
void swipe_to_the_left_of_main_ui(); // 滑动基建的主界面到最左侧
|
||||
void swipe_to_the_right_of_main_ui(); // 滑动基建的主界面到最右侧
|
||||
void swipe_of_operlist(bool reverse = false);
|
||||
void async_swipe_of_operlist(bool reverse = false);
|
||||
void await_swipe();
|
||||
|
||||
virtual bool click_bottomleft_tab(); // 点击进入设施后,左下角的tab(我也不知道这玩意该叫啥)
|
||||
virtual bool click_clear_button(); // 点击干员选择页面的“清空选择”按钮
|
||||
@@ -37,8 +42,9 @@ namespace asst
|
||||
infrast::WorkMode m_work_mode = infrast::WorkMode::Gentle;
|
||||
std::string m_work_mode_name = "Gentle";
|
||||
double m_mood_threshold = 0;
|
||||
int m_cur_facility_index = 0;
|
||||
|
||||
static int m_face_hash_thres;
|
||||
static int m_name_hash_thres;
|
||||
int m_face_hash_thres = 0;
|
||||
int m_name_hash_thres = 0;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user