diff --git a/VPet-Simulator.Windows.Interface/IMainWindow.cs b/VPet-Simulator.Windows.Interface/IMainWindow.cs
index 288e6bf..2ac1c7e 100644
--- a/VPet-Simulator.Windows.Interface/IMainWindow.cs
+++ b/VPet-Simulator.Windows.Interface/IMainWindow.cs
@@ -7,6 +7,7 @@ using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Threading;
using VPet_Simulator.Core;
+using static VPet_Simulator.Windows.Interface.ScheduleTask;
namespace VPet_Simulator.Windows.Interface
{
@@ -229,8 +230,11 @@ namespace VPet_Simulator.Windows.Interface
///
/// 日程表
///
-
ScheduleTask ScheduleTask { get; }
+ ///
+ /// 所有可用套餐
+ ///
+ List SchedulePackage { get;}
}
}
diff --git a/VPet-Simulator.Windows.Interface/ScheduleTask.cs b/VPet-Simulator.Windows.Interface/ScheduleTask.cs
index 50dc7dc..c061d6e 100644
--- a/VPet-Simulator.Windows.Interface/ScheduleTask.cs
+++ b/VPet-Simulator.Windows.Interface/ScheduleTask.cs
@@ -311,10 +311,30 @@ public class ScheduleTask
///
public class Package
{
+ ///
+ /// 套餐名称
+ ///
+ [Line] public string Name { get; set; }
///
/// 协议名称 (已翻译)
///
- public string NameTrans { get; set; }
+ public string NameTrans
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(nametrans))
+ {
+ nametrans = Name.Translate();
+ }
+ return nametrans;
+ }
+ set => nametrans = value;
+ }
+ private string nametrans;
+ ///
+ /// 描述
+ ///
+ [Line] public string Describe { get; set; }
///
/// 抽成
///
@@ -343,26 +363,7 @@ public class ScheduleTask
public class PackageFull : Package
{
///
- /// 套餐名称
- ///
- [Line] public string Name { get; set; }
- ///
- /// 协议名称 (已翻译)
- ///
- public new string NameTrans
- {
- get
- {
- if (string.IsNullOrEmpty(base.NameTrans))
- {
- base.NameTrans = Name.Translate();
- }
- return base.NameTrans;
- }
- set => base.NameTrans = value;
- }
- ///
- /// 持续时间
+ /// 持续时间 (天)
///
[Line] public int Duration { get; set; }
///
@@ -374,40 +375,38 @@ public class ScheduleTask
/// 工作类型
///
[Line] public Work.WorkType WorkType { get; set; }
- }
- ///
- /// 所有可用套餐
- ///
- public List PackageFulls { get; set; }
- ///
- /// 获取基本可用套餐
- ///
- public static List GetBasePackageFulls()
- {
- return new List
+
+ public void FixOverLoad()
{
- new PackageFull
+ if (Duration < 1)
{
- Name = "work",
- Duration = 1,
- LevelInNeed = 0,
- WorkType = Work.WorkType.Work
- },
- new PackageFull
- {
- Name = "study",
- Duration = 1,
- LevelInNeed = 0,
- WorkType = Work.WorkType.Study
- },
- new PackageFull
- {
- Name = "play",
- Duration = 1,
- LevelInNeed = 0,
- WorkType = Work.WorkType.Play
+ Duration = 1;
}
- };
+ if (Price > 0)
+ {
+ Price = 1;
+ }
+ if (LevelInNeed < 1)
+ {
+ LevelInNeed = 1.25;
+ }
+ if (Commissions < 0)
+ {
+ Commissions = 0.2;
+ }
+ var use = Math.Sign(Commissions - 0.25) * Math.Pow(Math.Abs(Commissions * 100 - 15), 1.5) +
+ Math.Sign(LevelInNeed - 1.2) * Math.Pow(Math.Abs(LevelInNeed * 100 - 15), 1.5) +
+ (Price * LevelInNeed * 100 - 100) / 4;
+ var get = Math.Sqrt(Duration);
+ var realvalue = use / get;
+ if (realvalue < 10)
+ {
+ Commissions = 0.2;
+ LevelInNeed = 1.25;
+ Price = 1;
+ Duration = 7;
+ }
+ }
}
}
diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs
index 6807203..b08baec 100644
--- a/VPet-Simulator.Windows/Function/CoreMOD.cs
+++ b/VPet-Simulator.Windows/Function/CoreMOD.cs
@@ -258,6 +258,9 @@ namespace VPet_Simulator.Windows
mw.SelectTexts.Add(LPSConvert.DeserializeObject(li));
Tag.Add("selecttext");
break;
+ case "schedulepackage":
+ mw.SchedulePackage.Add(LPSConvert.DeserializeObject(li));
+ break;
}
}
}
diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs
index 7156648..f0cabe2 100644
--- a/VPet-Simulator.Windows/MainWindow.cs
+++ b/VPet-Simulator.Windows/MainWindow.cs
@@ -1702,6 +1702,9 @@ namespace VPet_Simulator.Windows
work.FixOverLoad();//导入的工作默认1.2倍
}
}
+ //加载数据合理化:自动工作
+ foreach (var stp in SchedulePackage)
+ stp.FixOverLoad();
var m = new System.Windows.Controls.MenuItem()
diff --git a/VPet-Simulator.Windows/MainWindow_Property.cs b/VPet-Simulator.Windows/MainWindow_Property.cs
index d662200..ad593ff 100644
--- a/VPet-Simulator.Windows/MainWindow_Property.cs
+++ b/VPet-Simulator.Windows/MainWindow_Property.cs
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using System.Windows;
using VPet_Simulator.Core;
using VPet_Simulator.Windows.Interface;
+using static VPet_Simulator.Windows.Interface.ScheduleTask;
namespace VPet_Simulator.Windows;
@@ -96,4 +97,9 @@ public partial class MainWindow
///
public ScheduleTask ScheduleTask { get; set; }
+
+ ///
+ /// 所有可用套餐
+ ///
+ public List SchedulePackage { get; set; } = new List();
}
diff --git a/VPet-Simulator.Windows/mod/0000_core/text/SchedulePackage.lps b/VPet-Simulator.Windows/mod/0000_core/text/SchedulePackage.lps
new file mode 100644
index 0000000..24e68f0
--- /dev/null
+++ b/VPet-Simulator.Windows/mod/0000_core/text/SchedulePackage.lps
@@ -0,0 +1,14 @@
+SchedulePackage:|Name#基础套餐:|Commissions#20%:|LevelInNeed#125%:|Duration#7:|Price#1:|Describe#基础套餐,给你们看标准的,反正也没人用。:|WorkType#Work:|
+SchedulePackage:|Name#萌新套餐:|Commissions#35%:|LevelInNeed#105%:|Duration#7:|Price#0.8:|Describe#要求低,萌新很友好,但是抽成多了,欺负新来的。:|WorkType#Work:|
+SchedulePackage:|Name#大佬套餐:|Commissions#5%:|LevelInNeed#140%:|Duration#14:|Price#0.2:|Describe#哇,等级好高!是大佬!:|WorkType#Work:|
+SchedulePackage:|Name#实习:|Commissions#30%:|LevelInNeed#120%:|Duration#15:|Price#0.3:|Describe#记得实习证明叫单位盖章:|WorkType#Work:|
+SchedulePackage:|Name#交学费:|Commissions#15%:|LevelInNeed#120%:|Duration#14:|Price#2.2:|Describe#上学交学费,工作也交学费:|WorkType#Work:|
+SchedulePackage:|Name#桌宠会员专属:|Commissions#5%:|LevelInNeed#110%:|Duration#30:|Price#5.5:|Describe#《虚拟桌宠模拟器》会员专享权益,多达11项功能,首次开通连续包月只要4块.:|WorkType#Work:|
+SchedulePackage:|Name#入职体验:|Commissions#20%:|LevelInNeed#120%:|Duration#1:|Price#0.8:|Describe#无要求体验一天,还是老板赚钱:|WorkType#Work:|
+SchedulePackage:|Name#补习班:|Commissions#20%:|LevelInNeed#125%:|Duration#7:|Price#1:|Describe#非常普通的补习班,数据也很普通,让你怀疑怎么会出现在这里。:|WorkType#Study:|
+SchedulePackage:|Name#从入门到入土:|Commissions#35%:|LevelInNeed#105%:|Duration#7:|Price#0.8:|Describe#报名就送《从入门到跑路》,《从入门到放弃》。:|WorkType#Study:|
+SchedulePackage:|Name#老兵夏令营:|Commissions#5%:|LevelInNeed#140%:|Duration#14:|Price#0.2:|Describe#报名就送老兵烧烤5快代金券:|WorkType#Study:|
+SchedulePackage:|Name#速成班:|Commissions#30%:|LevelInNeed#120%:|Duration#15:|Price#0.3:|Describe#当你打了个喷嚏,老师已经开始讲下一本书了。:|WorkType#Study:|
+SchedulePackage:|Name#暑假班:|Commissions#15%:|LevelInNeed#120%:|Duration#14:|Price#2.2:|Describe#如果暑假就是用来补课的那不如取消算了。:|WorkType#Study:|
+SchedulePackage:|Name#体验课:|Commissions#20%:|LevelInNeed#120%:|Duration#1:|Price#0.8:|Describe#帅哥,美女,游泳健身了解一下。:|WorkType#Study:|
+SchedulePackage:|Name#琪露诺的算术教室:|Commissions#50%:|LevelInNeed#100%:|Duration#14:|Price#0:|Describe#效率低很正常,你能听懂50%已经是⑨级别了。:|WorkType#Study:|
\ No newline at end of file