mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
perf: 优化自动战斗部署栏识别条件,保全增加节能模式 (#8044)
* perf: 优化保全部署栏识别条件,增加节能模式 * fix: equal error * chore: 跳过update改为sleep * perf: 优化保全逻辑 * chore: 仅在开局识别干员部署费用
This commit is contained in:
@@ -98,7 +98,14 @@ bool asst::BattleHelper::update_deployment(bool init, const cv::Mat& reusable)
|
||||
}
|
||||
|
||||
BattlefieldMatcher oper_analyzer(image);
|
||||
oper_analyzer.set_object_of_interest({ .deployment = true });
|
||||
|
||||
// 保全要识别开局费用,先用init判断了,之后别的地方要用的话再做cache
|
||||
if (init) {
|
||||
oper_analyzer.set_object_of_interest({ .deployment = true, .oper_cost = true });
|
||||
}
|
||||
else {
|
||||
oper_analyzer.set_object_of_interest({ .deployment = true });
|
||||
}
|
||||
auto oper_result_opt = oper_analyzer.analyze();
|
||||
if (!oper_result_opt) {
|
||||
check_in_battle(image);
|
||||
|
||||
Reference in New Issue
Block a user