更新进入制造站的processtask
@@ -278,11 +278,27 @@ bool asst::Assistance::start_infrast()
|
||||
DebugTraceInfo("Get opers info error");
|
||||
return false;
|
||||
}
|
||||
auto task_ptr = std::make_shared<InfrastStationTask>(task_callback, (void*)this);
|
||||
task_ptr->set_facility("Manufacturing");
|
||||
task_ptr->set_task_chain("Infrast");
|
||||
task_ptr->set_all_opers_info(std::move(ret.value()));
|
||||
m_tasks_queue.emplace(task_ptr);
|
||||
/* 基建任务整体流程:
|
||||
1. 从任意界面进入基建,使用ProcessTask
|
||||
2. 一键收获贸易站、制造站、干员信赖,使用ProcessTask
|
||||
1) 如果收获了,使用基建全缩放到最小的模板匹配
|
||||
2) 如果没收获,使用基建默认大小的模板匹配
|
||||
3. 进入宿舍,把心情低于阈值的、心情没满但不在工作的,都换下去,TODO
|
||||
4. 根据用户设置,按顺序进入指定基建,使用ProcessTask
|
||||
5. 按顺序对不同的基建设施进行换班,使用InfrastStationTask
|
||||
6. 会客室线索处理,TODO
|
||||
*/
|
||||
constexpr static const char* InfrastTaskCahin = "Infrast";
|
||||
|
||||
// 从进入制造站,到进入干员选择界面清空选择
|
||||
append_match_task(InfrastTaskCahin, { "Manufacturing" });
|
||||
|
||||
// 识别并选择最优解干员组合
|
||||
//auto task_ptr = std::make_shared<InfrastStationTask>(task_callback, (void*)this);
|
||||
//task_ptr->set_facility("Manufacturing");
|
||||
//task_ptr->set_task_chain(InfrastTaskCahin);
|
||||
//task_ptr->set_all_opers_info(std::move(ret.value()));
|
||||
//m_tasks_queue.emplace(task_ptr);
|
||||
|
||||
m_thread_idle = false;
|
||||
m_condvar.notify_one();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace asst {
|
||||
bool start_open_recruit(const std::vector<int>& required_level, bool set_time = true);
|
||||
// 开始干员识别任务
|
||||
bool start_to_identify_opers();
|
||||
// 开始基建换班任务
|
||||
// 开始全自动基建任务
|
||||
bool start_infrast();
|
||||
|
||||
// 开始匹配任务,调试用
|
||||
@@ -59,7 +59,7 @@ namespace asst {
|
||||
static void msg_proc(Assistance* p_this);
|
||||
static void task_callback(AsstMsg msg, const json::value& detail, void* custom_arg);
|
||||
|
||||
void append_match_task(const std::string& task_chain, const std::vector<std::string>& tasks, int retry_times = INT_MAX);
|
||||
void append_match_task(const std::string& task_chain, const std::vector<std::string>& tasks, int retry_times = ProcessTaskRetryTimesDefault);
|
||||
void append_task(const json::value& detail);
|
||||
void append_callback(AsstMsg msg, json::value detail);
|
||||
void clear_exec_times();
|
||||
|
||||
@@ -444,6 +444,42 @@
|
||||
"next": [
|
||||
"Stop"
|
||||
]
|
||||
},
|
||||
"Manufacturing": {
|
||||
"template": "Manufacturing.png",
|
||||
"type": "clickSelf",
|
||||
"rearDelay": 1000,
|
||||
"next": [
|
||||
"ManufacturingLeftBottom"
|
||||
]
|
||||
},
|
||||
"ManufacturingLeftBottom": {
|
||||
"Doc": "制造站点进去之后,左下角那个“中级作战记录 制造中”",
|
||||
"algorithm": "justreturn",
|
||||
"type": "clickRect",
|
||||
"specificArea": [
|
||||
1,
|
||||
535,
|
||||
525,
|
||||
180
|
||||
],
|
||||
"next": [
|
||||
"AddOperator"
|
||||
]
|
||||
},
|
||||
"AddOperator": {
|
||||
"template": "AddOperator.png",
|
||||
"type": "clickSelf",
|
||||
"next": [
|
||||
"ClearSelection"
|
||||
]
|
||||
},
|
||||
"ClearSelection": {
|
||||
"template": "ClearSelection.png",
|
||||
"type": "clickSelf",
|
||||
"next": [
|
||||
"Stop"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
resource/template/AddOperator.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
resource/template/ClearSelection.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
resource/template/Dorm.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
resource/template/Dormitory.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
resource/template/Manufacturing.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
resource/template/Power.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
resource/template/Trade.png
Normal file
|
After Width: | Height: | Size: 22 KiB |