mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复如果没有可以说的话会报错的问题
This commit is contained in:
parent
9cf2d47c97
commit
51e577e673
@ -556,17 +556,20 @@ namespace VPet_Simulator.Windows
|
|||||||
if (Core.Save.StrengthFood > sm * 0.60)
|
if (Core.Save.StrengthFood > sm * 0.60)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else if (Core.Save.StrengthFood > sm * 0.40)
|
else if (Core.Save.StrengthFood > sm * 0.40)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
||||||
return;
|
return;
|
||||||
@ -580,17 +583,20 @@ namespace VPet_Simulator.Windows
|
|||||||
if (Core.Save.StrengthDrink > sm * 0.60)
|
if (Core.Save.StrengthDrink > sm * 0.60)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else if (Core.Save.StrengthDrink > sm * 0.40)
|
else if (Core.Save.StrengthDrink > sm * 0.40)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
||||||
return;
|
return;
|
||||||
@ -607,17 +613,20 @@ namespace VPet_Simulator.Windows
|
|||||||
if (Core.Save.StrengthFood > sm * 0.40)
|
if (Core.Save.StrengthFood > sm * 0.40)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else if (Core.Save.StrengthFood > sm20)
|
else if (Core.Save.StrengthFood > sm20)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
||||||
return;
|
return;
|
||||||
@ -630,17 +639,20 @@ namespace VPet_Simulator.Windows
|
|||||||
if (Core.Save.StrengthDrink > sm * 0.40)
|
if (Core.Save.StrengthDrink > sm * 0.40)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else if (Core.Save.StrengthDrink > sm20)
|
else if (Core.Save.StrengthDrink > sm20)
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
if (txt.Count != 0)
|
||||||
|
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||||
}
|
}
|
||||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user