feat: 新增是否进行线索交流选项 (#13368)

* feat: 新增是否进行线索交流选项

* chore: Auto update by pre-commit hooks [skip changelog]

* docs: 文档添加参数

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Lemon-miaow
2025-08-02 20:32:33 +08:00
committed by GitHub
parent d339731987
commit 2aa63c77e6
14 changed files with 58 additions and 12 deletions

View File

@@ -83,8 +83,22 @@ bool asst::InfrastReceptionTask::get_friend_clue()
bool asst::InfrastReceptionTask::get_self_clue()
{
ProcessTask task_temp(*this, { "InfrastClueSelfNew", "InfrastClueSelfMaybeFull", "ReceptionFlag" });
return task_temp.set_retry_times(ProcessTask::RetryTimesDefault).run();
auto run_with_retries = [&](const std::vector<std::string>& tasks) {
ProcessTask task(*this, tasks);
task.set_retry_times(ProcessTask::RetryTimesDefault);
return task.run();
};
run_with_retries({ "InfrastClueSelfNew", "InfrastClueSelfMaybeFull", "ReceptionFlag" });
if (!ProcessTask(*this, { "InfrastClueSelfFull" }).set_retry_times(0).run()) {
return run_with_retries({ "CloseCluePage", "ReceptionFlag" });
}
if (m_enable_clue_exchange) {
return run_with_retries({ "CloseCluePageThenSendClue" });
}
return run_with_retries({ "CloseCluePage", "ReceptionFlag" });
}
bool asst::InfrastReceptionTask::use_clue()
@@ -95,10 +109,14 @@ bool asst::InfrastReceptionTask::use_clue()
proc_clue_vacancy();
sleep(1000);
if (unlock_clue_exchange()) {
if (m_enable_clue_exchange && unlock_clue_exchange()) {
proc_clue_vacancy();
}
if (!m_enable_clue_exchange) {
return true;
}
cv::Mat image = ctrler()->get_image();
// 所有的空位分析一次,看看还缺哪些线索