From 18d837b23f0a54d20eebfbd05d6ddb2b3660b997 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 9 Jun 2023 07:06:46 +1000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug&=E6=9B=B4=E5=A5=BD?= =?UTF-8?q?=E4=B9=B0=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Display/MainLogic.cs | 4 +- VPet-Simulator.Core/Display/ToolBar.xaml.cs | 30 +++-- VPet-Simulator.Core/Display/WorkTimer.xaml.cs | 14 +- VPet-Simulator.Windows.Interface/Food.cs | 21 ++- .../WinDesign/winBetterBuy.xaml | 5 +- .../WinDesign/winBetterBuy.xaml.cs | 8 +- .../WinDesign/winGameSetting.xaml | 15 ++- .../mod/0000_core/food/food.lps | 126 +++++++++--------- .../{虾芝士焗虾.png => 芝士焗虾.png} | Bin .../PoorCondition/1/悲伤呼吸A_000_125.png | Bin 0 -> 199379 bytes .../PoorCondition/1/悲伤呼吸A_001_125.png | Bin 0 -> 211668 bytes .../PoorCondition/1/悲伤呼吸A_002_125.png | Bin 0 -> 214988 bytes .../PoorCondition/1/悲伤呼吸A_003_125.png | Bin 0 -> 213784 bytes .../PoorCondition/1/悲伤呼吸A_004_375.png | Bin 0 -> 217406 bytes .../1/悲伤呼吸循环_005_125.png | Bin 0 -> 213396 bytes .../1/悲伤呼吸循环_006_125.png | Bin 0 -> 210993 bytes .../1/悲伤呼吸循环_007_125.png | Bin 0 -> 207038 bytes .../1/悲伤呼吸循环_008_500.png | Bin 0 -> 200540 bytes .../1/悲伤呼吸循环_009_125.png | Bin 0 -> 208400 bytes .../1/悲伤呼吸循环_010_125.png | Bin 0 -> 211379 bytes .../1/悲伤呼吸循环_011_125.png | Bin 0 -> 214079 bytes .../1/悲伤呼吸循环_012_375.png | Bin 0 -> 217339 bytes .../PoorCondition/2/悲伤呼吸_000_125.png | Bin 0 -> 213396 bytes .../PoorCondition/2/悲伤呼吸_001_125.png | Bin 0 -> 210993 bytes .../PoorCondition/2/悲伤呼吸_002_125.png | Bin 0 -> 207038 bytes .../PoorCondition/2/悲伤呼吸_003_500.png | Bin 0 -> 200540 bytes .../PoorCondition/2/悲伤呼吸_004_125.png | Bin 0 -> 208400 bytes .../PoorCondition/2/悲伤呼吸_005_125.png | Bin 0 -> 211379 bytes .../PoorCondition/2/悲伤呼吸_006_125.png | Bin 0 -> 214079 bytes .../PoorCondition/2/悲伤呼吸_007_375.png | Bin 0 -> 217339 bytes .../{ => 2}/悲伤呼吸_008_750.png | Bin .../{ => 2}/悲伤呼吸_009_125.png | Bin .../{ => 2}/悲伤呼吸_010_125.png | Bin .../{ => 2}/悲伤呼吸_011_125.png | Bin .../{ => 2}/悲伤呼吸_012_250.png | Bin .../PoorCondition/3/C1.png_000_125.png | Bin 0 -> 217406 bytes .../PoorCondition/3/C2.png_001_125.png | Bin 0 -> 213784 bytes .../PoorCondition/3/C3.png_002_125.png | Bin 0 -> 214988 bytes .../PoorCondition/3/C4.png_003_125.png | Bin 0 -> 211668 bytes .../PoorCondition/3/C5.png_004_125.png | Bin 0 -> 199379 bytes .../Switch/Thirsty/口渴咳咳_000_125.png | Bin 226506 -> 0 bytes .../Switch/Thirsty/口渴咳咳_001_125.png | Bin 231225 -> 0 bytes .../Switch/Thirsty/口渴咳咳_002_125.png | Bin 203479 -> 0 bytes .../Switch/Thirsty/口渴咳咳_003_500.png | Bin 212132 -> 0 bytes .../Switch/Thirsty/口渴咳咳_004_125.png | Bin 210652 -> 0 bytes .../Switch/Thirsty/口渴咳咳_005_125.png | Bin 212132 -> 0 bytes .../Switch/Thirsty/口渴咳咳_006_375.png | Bin 210652 -> 0 bytes .../Switch/Thirsty/口渴咳咳_007_125.png | Bin 212132 -> 0 bytes .../Switch/Thirsty/口渴咳咳_008_750.png | Bin 210652 -> 0 bytes .../Switch/Thirsty/口渴咳咳_009_125.png | Bin 212132 -> 0 bytes .../Switch/Thirsty/口渴咳咳_010_125.png | Bin 203479 -> 0 bytes .../Switch/Thirsty/口渴咳咳_011_125.png | Bin 231225 -> 0 bytes .../Switch/Thirsty/口渴咳咳_012_250.png | Bin 226506 -> 0 bytes .../Thirsty}/悲伤呼吸_000_125.png | Bin .../Thirsty}/悲伤呼吸_001_125.png | Bin .../Thirsty}/悲伤呼吸_002_125.png | Bin .../Thirsty}/悲伤呼吸_003_500.png | Bin .../Thirsty}/悲伤呼吸_004_125.png | Bin .../Thirsty}/悲伤呼吸_005_125.png | Bin .../Thirsty}/悲伤呼吸_006_375.png | Bin .../Thirsty}/悲伤呼吸_007_125.png | Bin .../Switch/Thirsty/悲伤呼吸_008_750.png | Bin 0 -> 209750 bytes .../Switch/Thirsty/悲伤呼吸_009_125.png | Bin 0 -> 214864 bytes .../Switch/Thirsty/悲伤呼吸_010_125.png | Bin 0 -> 202872 bytes .../Switch/Thirsty/悲伤呼吸_011_125.png | Bin 0 -> 229567 bytes .../Switch/Thirsty/悲伤呼吸_012_250.png | Bin 0 -> 225183 bytes 66 files changed, 133 insertions(+), 90 deletions(-) rename VPet-Simulator.Windows/mod/0000_core/image/food/{虾芝士焗虾.png => 芝士焗虾.png} (100%) create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸A_000_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸A_001_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸A_002_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸A_003_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸A_004_375.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_005_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_006_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_007_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_008_500.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_009_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_010_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_011_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/1/悲伤呼吸循环_012_375.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_000_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_001_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_002_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_003_500.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_004_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_005_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_006_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/2/悲伤呼吸_007_375.png rename VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/{ => 2}/悲伤呼吸_008_750.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/{ => 2}/悲伤呼吸_009_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/{ => 2}/悲伤呼吸_010_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/{ => 2}/悲伤呼吸_011_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/{ => 2}/悲伤呼吸_012_250.png (100%) create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/3/C1.png_000_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/3/C2.png_001_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/3/C3.png_002_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/3/C4.png_003_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Default/PoorCondition/3/C5.png_004_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_000_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_001_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_002_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_003_500.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_004_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_005_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_006_375.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_007_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_008_750.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_009_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_010_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_011_125.png delete mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/口渴咳咳_012_250.png rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_000_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_001_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_002_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_003_500.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_004_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_005_125.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_006_375.png (100%) rename VPet-Simulator.Windows/mod/0000_core/pet/vup/{Default/PoorCondition => Switch/Thirsty}/悲伤呼吸_007_125.png (100%) create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/悲伤呼吸_008_750.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/悲伤呼吸_009_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/悲伤呼吸_010_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/悲伤呼吸_011_125.png create mode 100644 VPet-Simulator.Windows/mod/0000_core/pet/vup/Switch/Thirsty/悲伤呼吸_012_250.png diff --git a/VPet-Simulator.Core/Display/MainLogic.cs b/VPet-Simulator.Core/Display/MainLogic.cs index 847aba5..226a1a7 100644 --- a/VPet-Simulator.Core/Display/MainLogic.cs +++ b/VPet-Simulator.Core/Display/MainLogic.cs @@ -38,12 +38,12 @@ namespace VPet_Simulator.Core /// 说话 /// /// 说话内容 - public void Say(string text, GraphCore.Helper.SayType type = GraphCore.Helper.SayType.Shining) + public void Say(string text, GraphCore.Helper.SayType type = GraphCore.Helper.SayType.Shining, bool force = false) { Task.Run(() => { OnSay?.Invoke(text); - if (type != GraphCore.Helper.SayType.None && DisplayType == GraphCore.GraphType.Default) + if (force || type != GraphCore.Helper.SayType.None && DisplayType == GraphCore.GraphType.Default) Display(GraphCore.Helper.Convert(type, GraphCore.Helper.AnimatType.A_Start), () => { Dispatcher.Invoke(() => MsgBar.Show(Core.Save.Name, text, type)); diff --git a/VPet-Simulator.Core/Display/ToolBar.xaml.cs b/VPet-Simulator.Core/Display/ToolBar.xaml.cs index 5ca3e85..b91f5ab 100644 --- a/VPet-Simulator.Core/Display/ToolBar.xaml.cs +++ b/VPet-Simulator.Core/Display/ToolBar.xaml.cs @@ -59,10 +59,22 @@ namespace VPet_Simulator.Core pFeeling.Value = m.Core.Save.Feeling; pStrengthFood.Value = m.Core.Save.StrengthFood; pStrengthDrink.Value = m.Core.Save.StrengthDrink; - tStrength.Text = $"{m.Core.Save.ChangeStrength:f1}/t"; - tFeeling.Text = $"{m.Core.Save.ChangeFeeling:f1}/t"; - tStrengthDrink.Text = $"{m.Core.Save.ChangeStrengthDrink:f1}/t"; - tStrengthFood.Text = $"{m.Core.Save.ChangeStrengthFood:f1}/t"; + if (m.Core.Save.ChangeStrength < 1) + tStrength.Text = $"{m.Core.Save.ChangeStrength:f1}/t"; + else + tStrength.Text = $"{m.Core.Save.ChangeStrength:f2}/t"; + if (m.Core.Save.ChangeFeeling < 1) + tFeeling.Text = $"{m.Core.Save.ChangeFeeling:f1}/t"; + else + tFeeling.Text = $"{m.Core.Save.ChangeFeeling:f2}/t"; + if (m.Core.Save.ChangeStrengthDrink < 1) + tStrengthDrink.Text = $"{m.Core.Save.ChangeStrengthDrink:f1}/t"; + else + tStrengthDrink.Text = $"{m.Core.Save.ChangeStrengthDrink:f2}/t"; + if (m.Core.Save.ChangeStrengthFood < 1) + tStrengthFood.Text = $"{m.Core.Save.ChangeStrengthFood:f1}/t"; + else + tStrengthFood.Text = $"{m.Core.Save.ChangeStrengthFood:f2}/t"; } } @@ -178,33 +190,33 @@ namespace VPet_Simulator.Core private void PgbExperience_GeneratingPercentText(object sender, GeneratingPercentTextRoutedEventArgs e) { - e.Text = $"{e.Value} / {pExp.Maximum}"; + e.Text = $"{e.Value:f2} / {pExp.Maximum:f0}"; } private void PgbStrength_GeneratingPercentText(object sender, GeneratingPercentTextRoutedEventArgs e) { - e.Text = $"{e.Value} / 100"; + e.Text = $"{e.Value:f2} / 100"; } private void PgbSpirit_GeneratingPercentText(object sender, GeneratingPercentTextRoutedEventArgs e) { var progressBar = (ProgressBar)sender; progressBar.Foreground = GetForeground(e.Value); - e.Text = $"{e.Value} / 100"; + e.Text = $"{e.Value:f2} / 100"; } private void PgbHunger_GeneratingPercentText(object sender, GeneratingPercentTextRoutedEventArgs e) { var progressBar = (ProgressBar)sender; progressBar.Foreground = GetForeground(e.Value); - e.Text = $"{e.Value} / 100"; + e.Text = $"{e.Value:f2} / 100"; } private void PgbThirsty_GeneratingPercentText(object sender, GeneratingPercentTextRoutedEventArgs e) { var progressBar = (ProgressBar)sender; progressBar.Foreground = GetForeground(e.Value); - e.Text = $"{e.Value} / 100"; + e.Text = $"{e.Value:f2} / 100"; //if (e.Value <= 20) //{ // tHearth.Visibility = Visibility.Visible; diff --git a/VPet-Simulator.Core/Display/WorkTimer.xaml.cs b/VPet-Simulator.Core/Display/WorkTimer.xaml.cs index 657d338..165ae11 100644 --- a/VPet-Simulator.Core/Display/WorkTimer.xaml.cs +++ b/VPet-Simulator.Core/Display/WorkTimer.xaml.cs @@ -60,15 +60,18 @@ namespace VPet_Simulator.Core { case Main.WorkingState.Study: m.Core.Save.Money += GetCount * 0.2; - Stop(() => m.Say($"学习完成啦, 累计学会了 {(GetCount * 1.2):f2} EXP\n共计花费了{MaxTime}分钟")); + Stop(() => m.Say($"学习完成啦, 累计学会了 {(GetCount * 1.2):f2} 经验值\n共计花费了{MaxTime}分钟" + , GraphCore.Helper.SayType.Shining, true)); break; case Main.WorkingState.WorkONE: m.Core.Save.Money += GetCount * 0.15; - Stop(() => m.Say($"{m.Core.Graph.GraphConfig.Str[(gstr)"work1"]}完成啦, 累计赚了 {GetCount * 1.15:f2} 金钱\n共计花费了{MaxTime}分钟")); + Stop(() => m.Say($"{m.Core.Graph.GraphConfig.Str[(gstr)"work1"]}完成啦, 累计赚了 {GetCount * 1.15:f2} 金钱\n共计花费了{MaxTime}分钟" + , GraphCore.Helper.SayType.Shining, true)); break; case Main.WorkingState.WorkTWO: m.Core.Save.Money += GetCount * 0.25; - Stop(() => m.Say($"{m.Core.Graph.GraphConfig.Str[(gstr)"work2"]}完成啦, 累计赚了 {GetCount * 1.25:f2} 金钱\n共计花费了{MaxTime}分钟")); + Stop(() => m.Say($"{m.Core.Graph.GraphConfig.Str[(gstr)"work2"]}完成啦, 累计赚了 {GetCount * 1.25:f2} 金钱\n共计花费了{MaxTime}分钟" + , GraphCore.Helper.SayType.Shining, true)); break; } @@ -222,7 +225,10 @@ namespace VPet_Simulator.Core m.Display(GraphCore.GraphType.WorkTWO_C_End, then ?? m.DisplayNomal); break; default: - then?.Invoke(); + if (then == null) + m.DisplayNomal(); + else + then(); return; } } diff --git a/VPet-Simulator.Windows.Interface/Food.cs b/VPet-Simulator.Windows.Interface/Food.cs index a1e3eb5..dccc8b3 100644 --- a/VPet-Simulator.Windows.Interface/Food.cs +++ b/VPet-Simulator.Windows.Interface/Food.cs @@ -82,6 +82,7 @@ namespace VPet_Simulator.Windows.Interface /// [Line(ignoreCase: true)] public string Desc { get; set; } + private string desc = null; /// /// 描述(ToBetterBuy) /// @@ -89,8 +90,24 @@ namespace VPet_Simulator.Windows.Interface { get { - StringBuilder sb = new StringBuilder(Desc); - return sb.ToString(); + if(desc == null) + { + StringBuilder sb = new StringBuilder(); + if (Exp != 0) + sb.Append("经验值:\t").Append(Exp > 0 ? "+" : "").Append(Exp.ToString("f2")).AppendLine(); + if (StrengthFood != 0) sb.Append("饱腹度:\t").Append(StrengthFood > 0 ? "+" : "").Append(StrengthFood.ToString("f2")).Append("\t\t"); + if (StrengthDrink != 0) sb.Append("口渴度:\t").Append(StrengthDrink > 0 ? "+" : "").Append(StrengthDrink.ToString("f2")).AppendLine(); + if (Strength != 0) sb.Append("体力:\t").Append(Strength > 0 ? "+" : "").Append(Strength.ToString("f2")).Append("\t\t"); + if (Feeling != 0) + sb.Append("心情:\t").Append(Feeling > 0 ? "+" : "").Append(Feeling.ToString("f2")).AppendLine(); + if (Health != 0) + sb.Append("健康:\t").Append(Health > 0 ? "+" : "").Append(Health.ToString("f2")).Append("\t\t"); + if (Likability != 0) + sb.Append("好感度:\t").Append(Likability > 0 ? "+" : "").Append(Likability.ToString("f2")); + sb.AppendLine().Append(Desc); + desc = sb.ToString(); + } + return desc; } } /// diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml index 901cdfb..0ca0dd1 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml @@ -104,7 +104,7 @@ -->