mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
perf: 自动编队编入助战后缺失干员查找
This commit is contained in:
@@ -137,10 +137,10 @@ bool asst::BattleFormationTask::_run()
|
||||
}
|
||||
|
||||
// 在尝试补齐编队后依然有缺失干员,自动编队失败
|
||||
bool has_missing = !m_used_support_unit && std::ranges::any_of(m_formation, [&](const auto& pair) {
|
||||
return std::ranges::any_of(pair.second /* role, groups */, [&](const OperGroup& group) {
|
||||
return !has_oper_selected(group.second);
|
||||
});
|
||||
bool has_missing = std::ranges::any_of(missing_groups, [&](const auto& pair) {
|
||||
// 缺失组未被助战补齐干员
|
||||
return std::ranges::find_if(*m_opers_in_formation, [&](const auto& p) { return p.second == pair.first; }) ==
|
||||
m_opers_in_formation->end();
|
||||
});
|
||||
if (has_missing) {
|
||||
report_missing_operators();
|
||||
@@ -292,7 +292,8 @@ bool asst::BattleFormationTask::add_formation(battle::Role role, const std::vect
|
||||
continue;
|
||||
}
|
||||
for (auto& oper : group->second) {
|
||||
if (oper.status == battle::OperStatus::Unchecked && !m_opers_in_formation->contains(oper.name)) {
|
||||
if (oper.status == battle::OperStatus::Unchecked &&
|
||||
!m_opers_in_formation->contains(oper.name)) {
|
||||
oper.status = battle::OperStatus::Missing;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,7 +850,7 @@ C:\\leidian\\LDPlayer9。\n
|
||||
<system:String x:Key="SupportUnitUsage">借助战</system:String>
|
||||
<system:String x:Key="SupportUnitUsage.Tip">缺一个还能用用,缺两个以上还是换份作业吧</system:String>
|
||||
<system:String x:Key="SupportUnitUsage.None">不借用</system:String>
|
||||
<system:String x:Key="SupportUnitUsage.WhenNeeded">仅用于补漏</system:String>
|
||||
<system:String x:Key="SupportUnitUsage.WhenNeeded">补漏</system:String>
|
||||
<system:String x:Key="SupportUnitUsage.Random">随机</system:String>
|
||||
<system:String x:Key="AddTrust">补充低信赖{key=Operator}</system:String>
|
||||
<system:String x:Key="Copilot.IgnoreRequirements">忽略{key=Operator}属性要求</system:String>
|
||||
|
||||
Reference in New Issue
Block a user