mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
perf: 干员因模组不可选中时, 加个输出 (#13230)
* perf: 干员因模组不可选中时, 加个输出 临时措施,总感觉还要改 * chore: Auto update by pre-commit hooks [skip changelog] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -481,8 +481,13 @@ bool asst::BattleFormationTask::select_opers_in_cur_page(std::vector<OperGroup>&
|
||||
ret = ProcessTask(*this, { "BattleQuickFormationModulePage" }).run();
|
||||
ret = ret && ProcessTask(*this, { "BattleQuickFormationModule-" + std::to_string(module) }).run();
|
||||
if (!ret) {
|
||||
LogError << __FUNCTION__ << "| Module " << std::to_string(module)
|
||||
<< "not found, please check the module number";
|
||||
LogWarn << __FUNCTION__ << "| Module " << std::to_string(module)
|
||||
<< "not found, please check the module number";
|
||||
|
||||
json::value info = basic_info_with_what("BattleFormationOperUnavailable");
|
||||
info["details"]["oper_name"] = name;
|
||||
info["details"]["requirement_type"] = "module";
|
||||
callback(AsstMsg::SubTaskExtraInfo, info);
|
||||
ctrler()->click(res.flag_rect); // 选择模组失败时反选干员
|
||||
sleep(delay);
|
||||
// 继续检查同组其他干员
|
||||
|
||||
@@ -1707,15 +1707,24 @@ namespace MaaWpfGui.Main
|
||||
break;
|
||||
|
||||
case "BattleFormationSelected":
|
||||
var oper_name = DataHelper.GetLocalizedCharacterName(subTaskDetails!["selected"]?.ToString());
|
||||
var group_name = subTaskDetails!["group_name"]?.ToString();
|
||||
if (group_name is not null && oper_name != group_name)
|
||||
{
|
||||
oper_name = $"{group_name} => {oper_name}";
|
||||
var oper_name = DataHelper.GetLocalizedCharacterName(subTaskDetails!["selected"]?.ToString());
|
||||
var group_name = subTaskDetails!["group_name"]?.ToString();
|
||||
if (group_name is not null && oper_name != group_name)
|
||||
{
|
||||
oper_name = $"{group_name} => {oper_name}";
|
||||
}
|
||||
|
||||
Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("BattleFormationSelected") + oper_name);
|
||||
break;
|
||||
}
|
||||
|
||||
Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("BattleFormationSelected") + oper_name);
|
||||
break;
|
||||
case "BattleFormationOperUnavailable":
|
||||
{
|
||||
var oper_name = DataHelper.GetLocalizedCharacterName(subTaskDetails!["oper_name"]?.ToString());
|
||||
Instances.CopilotViewModel.AddLog(string.Format(LocalizationHelper.GetString("BattleFormationOperUnavailable"), oper_name, subTaskDetails["requirement_type"]));
|
||||
break;
|
||||
}
|
||||
|
||||
case "CopilotAction":
|
||||
{
|
||||
|
||||
@@ -949,6 +949,7 @@ Right-click to clear inactive tasks</system:String>
|
||||
<system:String x:Key="Current">Current</system:String>
|
||||
<system:String x:Key="BattleFormation">Start formation</system:String>
|
||||
<system:String x:Key="BattleFormationSelected" xml:space="preserve">Selected: </system:String>
|
||||
<system:String x:Key="BattleFormationOperUnavailable" xml:space="preserve">Oper unavailable: {0}, Restriction: {1}</system:String>
|
||||
<system:String x:Key="CurrentSteps">Step: {0} {1}</system:String>
|
||||
<system:String x:Key="UnsupportedLevel">Unsupported stage, please check the stage name or go to 「{key=Settings} - {key=UpdateSettings} - {key=ResourceUpdate}」 and try updating the resource version!</system:String>
|
||||
<system:String x:Key="RecruitTagsDetected" xml:space="preserve">Identification results: </system:String>
|
||||
|
||||
@@ -953,6 +953,7 @@ C:\\leidian\\LDPlayer9
|
||||
<system:String x:Key="Current">現在</system:String>
|
||||
<system:String x:Key="BattleFormation">編成開始</system:String>
|
||||
<system:String x:Key="BattleFormationSelected" xml:space="preserve">オペレーターを選択: </system:String>
|
||||
<system:String x:Key="BattleFormationOperUnavailable" xml:space="preserve">オペレーターを利用不可: {0}、制限: {1}</system:String>
|
||||
<system:String x:Key="CurrentSteps">現在の手順: {0} {1}</system:String>
|
||||
<system:String x:Key="UnsupportedLevel">サポートされていないステージです。ステージ名を確認するか、「{key=Settings} - {key=UpdateSettings} - {key=ResourceUpdate}」 に移動してリソースバージョンを更新してみてください!</system:String>
|
||||
<system:String x:Key="RecruitTagsDetected" xml:space="preserve">認識結果: </system:String>
|
||||
|
||||
@@ -952,6 +952,7 @@ C:\\leidian\\LDPlayer9
|
||||
<system:String x:Key="Current">현재</system:String>
|
||||
<system:String x:Key="BattleFormation">편성 시작</system:String>
|
||||
<system:String x:Key="BattleFormationSelected" xml:space="preserve">오퍼레이터를 선택: </system:String>
|
||||
<system:String x:Key="BattleFormationOperUnavailable" xml:space="preserve">사용할 수 없는 운영자: {0}, 제한: {1}</system:String>
|
||||
<system:String x:Key="CurrentSteps">현재 단계: {0} {1}</system:String>
|
||||
<system:String x:Key="UnsupportedLevel">지원되지 않는 스테이지입니다. 스테이지 이름을 확인하거나 「{key=Settings} - {key=UpdateSettings} - {key=ResourceUpdate}」 로 이동하여 리소스 버전을 업데이트해 보세요!</system:String>
|
||||
<system:String x:Key="RecruitTagsDetected" xml:space="preserve">인식 결과: </system:String>
|
||||
|
||||
@@ -953,6 +953,7 @@ C:\\leidian\\LDPlayer9。\n
|
||||
<system:String x:Key="Current">当前</system:String>
|
||||
<system:String x:Key="BattleFormation">开始编队</system:String>
|
||||
<system:String x:Key="BattleFormationSelected" xml:space="preserve">选择干员: </system:String>
|
||||
<system:String x:Key="BattleFormationOperUnavailable" xml:space="preserve">干员不可用: {0}, 限制: {1}</system:String>
|
||||
<system:String x:Key="CurrentSteps">当前步骤: {0} {1}</system:String>
|
||||
<system:String x:Key="UnsupportedLevel">不支持的关卡,请检查关卡名或前往 「{key=Settings} - {key=UpdateSettings} - {key=ResourceUpdate}」 尝试更新资源版本!</system:String>
|
||||
<system:String x:Key="RecruitTagsDetected" xml:space="preserve">识别结果: </system:String>
|
||||
|
||||
@@ -950,6 +950,7 @@ C:\\leidian\\LDPlayer9。\n
|
||||
<system:String x:Key="Current">當前</system:String>
|
||||
<system:String x:Key="BattleFormation">開始編隊</system:String>
|
||||
<system:String x:Key="BattleFormationSelected" xml:space="preserve">選擇幹員: </system:String>
|
||||
<system:String x:Key="BattleFormationOperUnavailable" xml:space="preserve">幹員不可用: {0}, 限制: {1}</system:String>
|
||||
<system:String x:Key="CurrentSteps">當前步驟: {0} {1}</system:String>
|
||||
<system:String x:Key="UnsupportedLevel">不支援的關卡,請檢查關卡名稱或前往 「{key=Settings} - {key=UpdateSettings} - {key=ResourceUpdate}」,嘗試更新資源版本!</system:String>
|
||||
<system:String x:Key="RecruitTagsDetected" xml:space="preserve">辨識結果: </system:String>
|
||||
|
||||
Reference in New Issue
Block a user