mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 10:57:45 +08:00
feat: 支持多图单阈值的写法
This commit is contained in:
@@ -4706,11 +4706,7 @@
|
||||
"TaskSami.png"
|
||||
],
|
||||
"cache": false,
|
||||
"templThreshold": [
|
||||
0.7,
|
||||
0.7,
|
||||
0.7
|
||||
],
|
||||
"templThreshold": 0.7,
|
||||
"action": "ClickSelf",
|
||||
"roi": [
|
||||
700,
|
||||
@@ -4909,11 +4905,7 @@
|
||||
"FriendsSami.png"
|
||||
],
|
||||
"cache": false,
|
||||
"templThreshold": [
|
||||
0.7,
|
||||
0.7,
|
||||
0.7
|
||||
],
|
||||
"templThreshold": 0.7,
|
||||
"action": "ClickSelf",
|
||||
"roi": [
|
||||
250,
|
||||
|
||||
@@ -776,7 +776,9 @@ asst::TaskData::taskptr_t asst::TaskData::generate_match_task_info(std::string_v
|
||||
default_ptr->templ_thresholds.back());
|
||||
}
|
||||
else if (threshold_opt->is_number()) {
|
||||
match_task_info_ptr->templ_thresholds = { threshold_opt->as_double() };
|
||||
// 单个数值时,所有模板都使用这个阈值
|
||||
match_task_info_ptr->templ_thresholds.resize(match_task_info_ptr->templ_names.size(),
|
||||
threshold_opt->as_double());
|
||||
}
|
||||
else if (threshold_opt->is_array()) {
|
||||
ranges::copy(threshold_opt->as_array() | views::transform(&ranges::range_value_t<json::array>::as_double),
|
||||
|
||||
Reference in New Issue
Block a user