mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
feat: 适配编组、干员识别、公招
This commit is contained in:
@@ -971,7 +971,8 @@ namespace MaaWpfGui.Main
|
||||
var missingOpers = details["details"]?["opers"]?.ToObject<List<List<string>>>();
|
||||
if (missingOpers is not null)
|
||||
{
|
||||
var missingOpersStr = "[" + string.Join("]; [", missingOpers.Select(opers => string.Join(", ", opers))) + "]";
|
||||
var missingOpersStr = "[" + string.Join("]; [", missingOpers.Select(opers =>
|
||||
string.Join(", ", opers.Select(oper => DataHelper.GetLocalizedCharacterName(oper))))) + "]";
|
||||
Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("MissingOperators") + missingOpersStr, UiLogColor.Error);
|
||||
}
|
||||
else
|
||||
@@ -1393,11 +1394,12 @@ namespace MaaWpfGui.Main
|
||||
}
|
||||
|
||||
case "BattleFormation":
|
||||
Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("BattleFormation") + "\n" + JsonConvert.SerializeObject(subTaskDetails!["formation"]));
|
||||
Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("BattleFormation") + "\n[" +
|
||||
string.Join(", ", subTaskDetails!["formation"]?.ToObject<List<string>>().Select(oper => DataHelper.GetLocalizedCharacterName(oper))) + "]");
|
||||
break;
|
||||
|
||||
case "BattleFormationSelected":
|
||||
Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("BattleFormationSelected") + subTaskDetails!["selected"]);
|
||||
Instances.CopilotViewModel.AddLog(LocalizationHelper.GetString("BattleFormationSelected") + DataHelper.GetLocalizedCharacterName(subTaskDetails!["selected"]?.ToString()));
|
||||
break;
|
||||
|
||||
case "CopilotAction":
|
||||
|
||||
@@ -316,8 +316,8 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
foreach (var oper in (JArray?)combs["opers"] ?? [])
|
||||
{
|
||||
int operLevel = (int)oper["level"];
|
||||
string operId = oper["id"]?.ToString();
|
||||
string operName = oper["name"]?.ToString();
|
||||
var operId = oper["id"]?.ToString();
|
||||
var operName = DataHelper.GetLocalizedCharacterName(oper["name"]?.ToString());
|
||||
|
||||
string potential = string.Empty;
|
||||
|
||||
@@ -617,7 +617,16 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
List<Tuple<string, int>> operHave = [];
|
||||
List<Tuple<string, int>> operNotHave = [];
|
||||
|
||||
string localizedName = ConfigurationHelper.GetValue(ConfigurationKeys.Localization, string.Empty) switch
|
||||
string localizedName = ConfigurationHelper.GetValue(ConfigurationKeys.OperNameLanguage, string.Empty) == "OperNameLanguageClient" ?
|
||||
ConfigurationHelper.GetValue(ConfigurationKeys.ClientType, string.Empty) switch
|
||||
{
|
||||
"Official" => "name",
|
||||
"Bilibili" => "name",
|
||||
"YoStarJP" => "name_jp",
|
||||
"YoStarKR" => "name_kr",
|
||||
"txwy" => "name_tw",
|
||||
_ => "name_en",
|
||||
} : ConfigurationHelper.GetValue(ConfigurationKeys.Localization, string.Empty) switch
|
||||
{
|
||||
"zh-cn" => "name",
|
||||
"ja-jp" => "name_jp",
|
||||
|
||||
Reference in New Issue
Block a user