From 3dc39a4eebcd4f33ebe52e4e855a0b12dd81c7fe Mon Sep 17 00:00:00 2001 From: bigqiao Date: Sat, 11 Feb 2023 15:13:04 +0800 Subject: [PATCH] =?UTF-8?q?GUI=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E9=99=90=E5=90=8348=E5=B0=8F=E6=97=B6=E5=86=85?= =?UTF-8?q?=E8=BF=87=E6=9C=9F=E7=9A=84=E7=90=86=E6=99=BA=E8=8D=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Main/AsstProxy.cs | 1 + src/MaaWpfGui/Main/SettingsViewModel.cs | 12 ++++++++++++ src/MaaWpfGui/Res/Localizations/zh-cn.xaml | 1 + .../UserControl/OtherCombatSettingsUserControl.xaml | 5 +++++ 4 files changed, 19 insertions(+) diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index f079d81f77..8870d4ff72 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -1206,6 +1206,7 @@ namespace MaaWpfGui task_params["client_type"] = settings.ClientType; task_params["penguin_id"] = settings.PenguinId; task_params["DrGrandet"] = settings.IsDrGrandet; + task_params["expiring_medicine"] = settings.UseExpiringMedicine ? 9999 : 0; task_params["server"] = settings.ServerType; return task_params; } diff --git a/src/MaaWpfGui/Main/SettingsViewModel.cs b/src/MaaWpfGui/Main/SettingsViewModel.cs index 1f66c85e5a..d9a737a35f 100644 --- a/src/MaaWpfGui/Main/SettingsViewModel.cs +++ b/src/MaaWpfGui/Main/SettingsViewModel.cs @@ -2250,6 +2250,18 @@ namespace MaaWpfGui } } + private bool _useExpiringMedicine = bool.Parse(ViewStatusStorage.Get("Fight.UseExpiringMedicine", bool.FalseString)); + + public bool UseExpiringMedicine + { + get => _useExpiringMedicine; + set + { + SetAndNotify(ref _useExpiringMedicine, value); + ViewStatusStorage.Set("Fight.UseExpiringMedicine", value.ToString()); + } + } + private bool _hideUnavailableStage = Convert.ToBoolean(ViewStatusStorage.Get("GUI.HideUnavailableStage", bool.TrueString)); /// diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml index f0b6de2821..c963a2ce5d 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml @@ -219,6 +219,7 @@ 重要信息弹出系统通知 使用备选关卡 使用剩余理智 + 无限吃48小时内过期的理智药 隐藏当日不开放关卡 主界面可选择按钮功能 手动输入关卡名 diff --git a/src/MaaWpfGui/Views/UserControl/OtherCombatSettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/OtherCombatSettingsUserControl.xaml index 2483ddcc21..e3f81cbf13 100644 --- a/src/MaaWpfGui/Views/UserControl/OtherCombatSettingsUserControl.xaml +++ b/src/MaaWpfGui/Views/UserControl/OtherCombatSettingsUserControl.xaml @@ -53,6 +53,11 @@ HorizontalAlignment="Left" Content="{DynamicResource UseRemainingSanityStage}" IsChecked="{Binding UseRemainingSanityStage}" /> +