更新进入制造站的processtask

This commit is contained in:
MistEO
2021-08-29 23:00:56 +08:00
parent 67cec03cc9
commit ade54aa2fa
10 changed files with 59 additions and 7 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -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"
]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
resource/template/Dorm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
resource/template/Power.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
resource/template/Trade.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB