From 6b64500fc7728ec4a708cc4e31ff5addff331932 Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Thu, 8 Jun 2023 13:53:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=87=AA=E5=8A=A8=E5=85=AC=E6=8B=9B/?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E6=8B=9B=E5=8B=9F=E5=8A=9F=E8=83=BD=E6=94=AF?= =?UTF-8?q?=E6=8C=813=E6=98=9F=E4=BD=BF=E7=94=A81:00=E6=8B=9B=E5=8B=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Constants/ConfigurationKeys.cs | 2 ++ src/MaaWpfGui/Main/AsstProxy.cs | 29 ++++++++++++++++--- src/MaaWpfGui/Res/Localizations/en-us.xaml | 26 ++++++++++------- src/MaaWpfGui/Res/Localizations/ja-jp.xaml | 10 +++++-- src/MaaWpfGui/Res/Localizations/ko-kr.xaml | 8 +++-- src/MaaWpfGui/Res/Localizations/zh-cn.xaml | 8 +++-- src/MaaWpfGui/Res/Localizations/zh-tw.xaml | 8 +++-- .../ViewModels/UI/RecognizerViewModel.cs | 25 ++++++++++++++++ .../ViewModels/UI/SettingsViewModel.cs | 25 ++++++++++++++++ .../ViewModels/UI/TaskQueueViewModel.cs | 5 ++-- src/MaaWpfGui/Views/UI/RecognizerView.xaml | 16 +++++++--- .../AutoRecruitSettingsUserControl.xaml | 7 +++++ 12 files changed, 138 insertions(+), 31 deletions(-) diff --git a/src/MaaWpfGui/Constants/ConfigurationKeys.cs b/src/MaaWpfGui/Constants/ConfigurationKeys.cs index 0c1b5e3917..c9901c5d2c 100644 --- a/src/MaaWpfGui/Constants/ConfigurationKeys.cs +++ b/src/MaaWpfGui/Constants/ConfigurationKeys.cs @@ -79,6 +79,7 @@ namespace MaaWpfGui.Constants public const string ChooseLevel6 = "Recruit.ChooseLevel6"; public const string AutoSetTime = "Recruit.AutoSetTime"; public const string Level3UseShortTime = "Recruit.IsLevel3UseShortTime"; + public const string Level3UseShortTime2 = "Recruit.IsLevel3UseShortTime2"; public const string RecruitmentShowPotential = "Recruit.ShowPotential"; public const string DormThreshold = "Infrast.DormThreshold"; @@ -117,6 +118,7 @@ namespace MaaWpfGui.Constants public const string RecruitMaxTimes = "AutoRecruit.MaxTimes"; public const string RefreshLevel3 = "AutoRecruit.RefreshLevel3"; public const string IsLevel3UseShortTime = "AutoRecruit.IsLevel3UseShortTime"; + public const string IsLevel3UseShortTime2 = "AutoRecruit.IsLevel3UseShortTime2"; public const string NotChooseLevel1 = "AutoRecruit.NotChooseLevel1"; public const string RecruitChooseLevel3 = "AutoRecruit.ChooseLevel3"; public const string RecruitChooseLevel4 = "AutoRecruit.ChooseLevel4"; diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 731b1112ff..cafc67f263 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -1375,8 +1375,10 @@ namespace MaaWpfGui.Main /// 是否使用加急许可。 /// 是否在识别到小车词条时跳过。 /// 三星Tag是否使用短时间(7:40) + /// 三星Tag是否使用短时间(1:00) /// 是否成功。 - public bool AsstAppendRecruit(int max_times, int[] select_level, int[] confirm_level, bool need_refresh, bool use_expedited, bool skip_robot, bool is_level3_use_short_time) + public bool AsstAppendRecruit(int max_times, int[] select_level, int[] confirm_level, bool need_refresh, bool use_expedited, + bool skip_robot, bool is_level3_use_short_time, bool is_level3_use_short_time2 = false) { var task_params = new JObject { @@ -1396,6 +1398,13 @@ namespace MaaWpfGui.Main ["3"] = 460, // 7:40 }; } + else if (is_level3_use_short_time2) + { + task_params["recruitment_time"] = new JObject + { + ["3"] = 60, // 1:00 + }; + } task_params["report_to_penguin"] = true; task_params["report_to_yituliu"] = true; @@ -1588,9 +1597,21 @@ namespace MaaWpfGui.Main ["report_to_penguin"] = true, ["report_to_yituliu"] = true, }; - task_params["recruitment_time"] = Instances.RecognizerViewModel.IsLevel3UseShortTime ? - new JObject { { "3", 460 } } : - new JObject { { "3", 540 } }; + int recruitmentTime; + if (Instances.RecognizerViewModel.IsLevel3UseShortTime) + { + recruitmentTime = 460; + } + else if (Instances.RecognizerViewModel.IsLevel3UseShortTime2) + { + recruitmentTime = 60; + } + else + { + recruitmentTime = 540; + } + + task_params["recruitment_time"] = new JObject { { "3", recruitmentTime } }; task_params["penguin_id"] = Instances.SettingsViewModel.PenguinId; task_params["yituliu_id"] = Instances.SettingsViewModel.PenguinId; // 一图流说随便传个uuid就行,让client自己生成,所以先直接嫖一下企鹅的( task_params["server"] = Instances.SettingsViewModel.ServerType; diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml index 7bfe3b454f..ca3285ed2d 100644 --- a/src/MaaWpfGui/Res/Localizations/en-us.xaml +++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml @@ -1,4 +1,7 @@ - + Settings General @@ -80,7 +83,7 @@ Starting Roles Starting Oper (single, CN name only) Only supports the CN name of a single oper, default if not filled. - Select "Starting Oper" from support unit list + Select "Starting Oper" from support unit list Enable nonfirend support Deployment with Pause (Works for IS, Copilot and SSS) (Beta function, Not recommended yet) Use ADB Lite (Experimental) @@ -233,7 +236,7 @@ Please do not check it when the stage OF-1 is not unlocked. Variable function button Manual entry of level names Support most main stage names + stage names from the original list (e.g. 4-10, AP-5, H10-1-Hard, etc.) -At the end of the level, enter "Normal/Hard" to switch between Normal and Tough difficulty +At the end of the level, enter "Normal/Hard" to switch between Normal and Tough difficulty Auto detect connection The checkbox will be automatically unchecked after each detect is completed, and can be checked again if you need to re-detect Re-detect every times @@ -347,7 +350,7 @@ At the end of the level, enter "Normal/Hard" to switch between Normal and Tough Tip: This recognition is independent from main tab (Farming); need open up in game recruit tag selection screen then begin ~ Auto setting time Show Potential - Please use the "Operator" to get information. + Please use the "Operator" to get information. Auto select 3 ★ Tags Auto select 4 ★ Tags Auto select 5 ★ Tags @@ -373,7 +376,7 @@ At the end of the level, enter "Normal/Hard" to switch between Normal and Tough Video Start to identify Open Directory - For video recognition, please open the "Copilot" page and drag the strategy video into it. + For video recognition, please open the "Copilot" page and drag the strategy video into it. The video resolution is required to be 16:9, and there are no interference factors such as black borders, emulator borders, and special-shaped screen corrections. @@ -415,17 +418,17 @@ The video resolution is required to be 16:9, and there are no interference facto Thanks for the likes!\nThe comment section is already open on the web page, please feel free to leave your comment! Auto squad LoopTimes - The operator of "special focus" cannot be identified at this time + The operator of "special focus" cannot be identified at this time Start Video Link Tips: \n\n - 1. Please use this function only when "Start" is visible in game.\n\n - 2. You need turn off the "Auto squad" if using friend support unit, then start with your support unit selected.\n\n - 3. For Paradox Simulation, you need to turn off "Auto squad" and select the skill before, then start in game "start" screen.\n\n + 1. Please use this function only when "Start" is visible in game.\n\n + 2. You need turn off the "Auto squad" if using friend support unit, then start with your support unit selected.\n\n + 3. For Paradox Simulation, you need to turn off "Auto squad" and select the skill before, then start in game "start" screen.\n\n 4. For SSS, There are multiple built-in files under the resource/copilot folder.\n - Please start on the "Start Deployment" screen after manual formation (can be used with "Loop times")\n\n + Please start on the "Start Deployment" screen after manual formation (can be used with "Loop times")\n\n 5. Video recognition is now supported, please drag the guide video to use. \n The video resolution is required to be 16:9, and there are no distracting elements such as black borders, emulator borders, and special-shaped screen corrections.\n\n @@ -551,6 +554,7 @@ The video resolution is required to be 16:9, and there are no interference facto Auto refresh 3 ★ Tags Auto use Expedited* Set 7:40 instead of 9:00 of 3 ★ Tags + Set 1:00 instead of 9:00 of 3 ★ Tags No interference with other stars Recruit max times Manually confirm Robot @@ -561,7 +565,7 @@ The video resolution is required to be 16:9, and there are no interference facto If checked, 1 ★ recruit will be skipped. If not checked, 1 ★ entry with be ignored. - Dear doctor, ever heard of the new listings of "isopropyl alcohol" in Ms. Closure's store? let's check it out? + Dear doctor, ever heard of the new listings of "isopropyl alcohol" in Ms. Closure's store? let's check it out? Ugh……Ehem Ah, doctor. Why do you sway, so much in your movement today? I can not drink…drink so much next time…… diff --git a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml index ed146f7d56..9a2d68194e 100644 --- a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml +++ b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml @@ -1,4 +1,7 @@ - + 設定 一般設定 @@ -80,7 +83,7 @@ 最初の職業 最初のオペレーター(一人だけ、中国名のみを入力可能) 一人のオペレーターの中国名のみをサポートします。入力されていない場合はデフォルトになります。 - "最初のオペレーター"をサポートから選択 + "最初のオペレーター"をサポートから選択 フレンド以外のサポートの使用を許可 統合戦略/保全駐在でポーズトリックを使用します(ベータ機能のため非推奨です) 軽量ADBを使用(実験機能) @@ -228,7 +231,7 @@ スタート画面に表示する便利ボタン ステージ名を入力する (テスト機能)ステージ名と番号(例: 4-10、AP-5、H10-1-Hardなど) -の両方がサポートされています。レベルの最後に"Normal/Hard"を入力することで、標準から強襲/厄難に難易度を切り替えることができます +の両方がサポートされています。レベルの最後に"Normal/Hard"を入力することで、標準から強襲/厄難に難易度を切り替えることができます 接続自動認識 このチェックボックスは、検出が完了するたびに自動的にチェックが外れますが、再検出が必要な場合は再度チェックを入れることができます 毎回再検出する @@ -544,6 +547,7 @@ 星3タグを自動的に更新する 緊急招集票を自動的に使用* 星3タグを7:40に設定する + 星3タグを1:00に設定する 他のレアリティには影響しない 1回の実行あたりの求人の最大回数 ロボットを手動的に確認する diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml index 425ad52faf..38c5cf7e93 100644 --- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml +++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml @@ -1,4 +1,7 @@ - + 설정 일반 설정 @@ -228,7 +231,7 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요. 메인 화면 버튼의 기능 스테이지 코드 수동 입력 대부분의 메인 스테이지와 원래 목록(예: 4-10, AP-5, H10-1-Hard)에 있는 스테이지 이름을 지원합니다. - 레벨 끝에서 "Normal / Hard"를 입력하여 일반 및 터프 난이도 간 전환 + 레벨 끝에서 "Normal / Hard"를 입력하여 일반 및 터프 난이도 간 전환 연결 자동 감지 이 체크박스는 감지가 끝나면 자동으로 체크가 해제됩니다. 다시 감지하려면 다시 체크해주세요 매번 재감지 @@ -545,6 +548,7 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요. ★3 태그를 자동 새로고침하기 즉시 완료 허가증을 자동 사용* ★3 태그 9:00 대신 7:40 설정 + ★3 태그 9:00 대신 1:00 설정 다른 등급에는 적용되지 않습니다 시행 시의 최대 모집횟수 로봇 수동 모집 diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml index d380e02b49..157bd23c7a 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml @@ -1,4 +1,7 @@ - + 设置 常规设置 @@ -233,7 +236,7 @@ 主界面可选择按钮功能 手动输入关卡名 支持大部分主线关卡名与原列表的关卡名(如4-10、AP-5、H10-1-Hard) -可在关卡结尾输入"Normal/Hard"表示需要切换标准与磨难难度 +可在关卡结尾输入"Normal/Hard"表示需要切换标准与磨难难度 自动检测连接 每次检测完成后会自动取消勾选,若需要重新检测可再次勾选,若反复连接失败可勾选始终自动检测连接 每次重新检测 @@ -551,6 +554,7 @@ 自动刷新 3 星 Tags 自动使用加急许可* 3 星设置 7:40 而非 9:00 + 3 星设置 1:00 而非 9:00 不影响其他星级 Tags 每次执行时最大招募次数 手动确认“支援机械” diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml index 4430c07baa..fef7ac6cb9 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml @@ -1,4 +1,7 @@ - + 設定 常規設定 @@ -228,7 +231,7 @@ 主介面可選擇按鈕功能 手動輸入關卡代名 支持大部分主線關卡名與原列表的關卡名(如:4-10、AP-5、H10-1-Hard) -可在關卡結尾輸入 "Normal/Hard" 表示需要切換標準與磨難難度 +可在關卡結尾輸入 "Normal/Hard" 表示需要切換標準與磨難難度 自動檢測連接 每次檢測完成後會自動取消勾選,若需要重新檢測可再次勾選 每次重新檢測 @@ -545,6 +548,7 @@ 自動刷新 3 星 Tags 自動使用加急許可* 3 星設定 7:40 而非 9:00 + 3 星設定 1:00 而非 9:00 不影響其他星級 Tags 每次執行時最大招募次數 手動確認“支援機械” diff --git a/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs b/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs index 161ff0c6f1..287592943f 100644 --- a/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs @@ -174,11 +174,36 @@ namespace MaaWpfGui.ViewModels.UI get => _isLevel3UseShortTime; set { + if (value) + { + IsLevel3UseShortTime2 = false; + } + SetAndNotify(ref _isLevel3UseShortTime, value); ConfigurationHelper.SetValue(ConfigurationKeys.Level3UseShortTime, value.ToString()); } } + private bool _isLevel3UseShortTime2 = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.Level3UseShortTime2, bool.FalseString)); + + /// + /// Gets or sets a value indicating whether to shorten the time for level 3. + /// + public bool IsLevel3UseShortTime2 + { + get => _isLevel3UseShortTime2; + set + { + if (value) + { + IsLevel3UseShortTime = false; + } + + SetAndNotify(ref _isLevel3UseShortTime2, value); + ConfigurationHelper.SetValue(ConfigurationKeys.Level3UseShortTime2, value.ToString()); + } + } + private bool _recruitCaught = false; /// diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index 0584746600..f2e251a8ec 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -1811,11 +1811,36 @@ namespace MaaWpfGui.ViewModels.UI get => _isLevel3UseShortTime; set { + if (value) + { + IsLevel3UseShortTime2 = false; + } + SetAndNotify(ref _isLevel3UseShortTime, value); ConfigurationHelper.SetValue(ConfigurationKeys.IsLevel3UseShortTime, value.ToString()); } } + private bool _isLevel3UseShortTime2 = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.IsLevel3UseShortTime2, bool.FalseString)); + + /// + /// Gets or sets a value indicating whether to shorten the time for level 3. + /// + public bool IsLevel3UseShortTime2 + { + get => _isLevel3UseShortTime2; + set + { + if (value) + { + IsLevel3UseShortTime = false; + } + + SetAndNotify(ref _isLevel3UseShortTime2, value); + ConfigurationHelper.SetValue(ConfigurationKeys.IsLevel3UseShortTime2, value.ToString()); + } + } + private bool _notChooseLevel1 = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.NotChooseLevel1, bool.TrueString)); /// diff --git a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs index f7fb871e95..3b0fcab311 100644 --- a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs @@ -1028,9 +1028,8 @@ namespace MaaWpfGui.ViewModels.UI } return Instances.AsstProxy.AsstAppendRecruit( - max_times, reqList.ToArray(), cfmList.ToArray(), - Instances.SettingsViewModel.RefreshLevel3, Instances.SettingsViewModel.UseExpedited, - Instances.SettingsViewModel.NotChooseLevel1, Instances.SettingsViewModel.IsLevel3UseShortTime); + max_times, reqList.ToArray(), cfmList.ToArray(), Instances.SettingsViewModel.RefreshLevel3, Instances.SettingsViewModel.UseExpedited, + Instances.SettingsViewModel.NotChooseLevel1, Instances.SettingsViewModel.IsLevel3UseShortTime, Instances.SettingsViewModel.IsLevel3UseShortTime2); } private bool AppendRoguelike() diff --git a/src/MaaWpfGui/Views/UI/RecognizerView.xaml b/src/MaaWpfGui/Views/UI/RecognizerView.xaml index c622457adf..c123a86b2e 100644 --- a/src/MaaWpfGui/Views/UI/RecognizerView.xaml +++ b/src/MaaWpfGui/Views/UI/RecognizerView.xaml @@ -69,6 +69,14 @@ ToolTip="{DynamicResource Level3UseShortTimeTip}"> + + + + + +