perf: 肉鸽为识别错误的事件也添加 callback (#11946)

* perf: 为识别错误的事件也添加 callback

* perf: log.error、修改what内容

* i18n: KR translation

* i18n: JP translation

---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: ManicSteiner <manicsteiner@outlook.com>
This commit is contained in:
晓丶梦丶仁
2025-02-17 21:20:38 +08:00
committed by GitHub
parent d9c32d5b1e
commit dd71224d63
7 changed files with 13 additions and 2 deletions

View File

@@ -50,12 +50,14 @@ bool asst::RoguelikeStageEncounterTaskPlugin::_run()
name_analyzer.set_task_info(event_name_task_ptr);
name_analyzer.set_required(event_names);
if (!name_analyzer.analyze()) {
Log.info("Unknown Event");
Log.error("Unknown Event");
auto info = basic_info_with_what("EncounterOcrError");
callback(AsstMsg::SubTaskExtraInfo, info);
return true;
}
const auto& result_vec = name_analyzer.get_result();
if (result_vec.empty()) {
Log.info("Unknown Event");
Log.error("Unknown Event");
return true;
}
std::string text = result_vec.front().text;

View File

@@ -1494,6 +1494,10 @@ namespace MaaWpfGui.Main
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("RoguelikeEvent") + $" {subTaskDetails!["name"]}", UiLogColor.EventIS);
break;
case "EncounterOcrError":
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("EncounterOcrError"), UiLogColor.Error);
break;
case "FoldartalGainOcrNextLevel":
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("FoldartalGainOcrNextLevel") + $" {subTaskDetails!["foldartal"]}");
break;

View File

@@ -792,6 +792,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
<system:String x:Key="EmergencyDps">Node: Emergency Operation</system:String>
<system:String x:Key="DreadfulFoe">Node: Dreadful Foe</system:String>
<system:String x:Key="RoguelikeEvent">Event:</system:String>
<system:String x:Key="EncounterOcrError">Event Name OCR Failed</system:String>
<system:String x:Key="FoldartalGainOcrNextLevel">Foldartal Foresee:</system:String>
<system:String x:Key="RoguelikeInvestment">Invested {1}(+{0}), deposit: {2}</system:String>
<system:String x:Key="RoguelikeSettlement">Roguelike Settlement: {0}\nExplore: {1} Floor {2} Step\nCombat: {3} / {4} Emergency / {5} BOSS\nRecruit: {6}\nCollectibles: {7}\nDifficulty: {8}\nScore: {9} Exp: {10} Skill: {11}</system:String>

View File

@@ -795,6 +795,7 @@ C:\\leidian\\LDPlayer9
<system:String x:Key="EmergencyDps">ステージ: 緊急作戦</system:String>
<system:String x:Key="DreadfulFoe">ステージ: 悪路凶敵</system:String>
<system:String x:Key="RoguelikeEvent">イベント:</system:String>
<system:String x:Key="EncounterOcrError">イベント名認識失敗</system:String>
<system:String x:Key="FoldartalGainOcrNextLevel">予見啓示板:</system:String>
<system:String x:Key="RoguelikeInvestment">投資しました: {1}(+{0})、貯蓄: {2}</system:String>
<system:String x:Key="RoguelikeSettlement">ローグライクスコア: {0}\n探索: {1} 階層 {2} ステップ\n戦闘: {3} / {4} 緊急 / {5} BOSS\n人材招集数: {6}\nアイテム入手数: {7}\n難度: {8}\nスコア: {9}\n経験値: {10}, スキル: {11}</system:String>

View File

@@ -795,6 +795,7 @@ C:\\leidian\\LDPlayer9
<system:String x:Key="EmergencyDps">노드: 긴급 작전</system:String>
<system:String x:Key="DreadfulFoe">노드: 험난한 길</system:String>
<system:String x:Key="RoguelikeEvent">이벤트:</system:String>
<system:String x:Key="EncounterOcrError">이벤트명 인식 오류</system:String>
<system:String x:Key="FoldartalGainOcrNextLevel">암호판:</system:String>
<system:String x:Key="RoguelikeInvestment">각뿔 투자: {1}(+{0}), 예금: {2}</system:String>
<system:String x:Key="RoguelikeSettlement">로그라이크 종착점: {0}\n클리어 : {1} 구역 {2} 노드\n전투 횟수: {3} 일반 / {4} 정예 / {5} 리더\n모집 횟수 : {6} 회\n수집: {7}\n난이도: {8}\n점수: {9}\n경험치: {10}, 스킬: {11}</system:String>

View File

@@ -794,6 +794,7 @@ C:\\leidian\\LDPlayer9。\n
<system:String x:Key="EmergencyDps">关卡: 紧急作战</system:String>
<system:String x:Key="DreadfulFoe">关卡: 险路恶敌</system:String>
<system:String x:Key="RoguelikeEvent">事件:</system:String>
<system:String x:Key="EncounterOcrError">事件名识别错误</system:String>
<system:String x:Key="FoldartalGainOcrNextLevel">预见:</system:String>
<system:String x:Key="RoguelikeInvestment">已投资 {1}(+{0}), 存款: {2}</system:String>
<system:String x:Key="RoguelikeSettlement">肉鸽结算: {0} (n{8})\n探索: {1} 层 {2} 步\n战斗: {3}/ {4}紧急/ {5}BOSS\n招募: {6} 收藏品: {7}\n得分: {9}\nExp: {10} Skill: {11}</system:String>

View File

@@ -794,6 +794,7 @@ C:\\leidian\\LDPlayer9。\n
<system:String x:Key="EmergencyDps">關卡: 緊急作戰</system:String>
<system:String x:Key="DreadfulFoe">關卡: 險路惡敵</system:String>
<system:String x:Key="RoguelikeEvent">事件:</system:String>
<system:String x:Key="EncounterOcrError">事件名識別錯誤</system:String>
<system:String x:Key="FoldartalGainOcrNextLevel">預見:</system:String>
<system:String x:Key="RoguelikeInvestment">已投資 {1}(+{0}), 存款: {2}</system:String>
<system:String x:Key="RoguelikeSettlement">肉鴿結算: {0}\n探索: {1} 层 {2} 步\n戰鬥: {3}/{4} 緊急/{5} BOSS\n招募: {6} 收藏品: {7}\n難度: {8} 得分: {9}\nExp: {10} Skill: {11}</system:String>