mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
MOD默认启用更改为关闭
This commit is contained in:
parent
4438a902a2
commit
1453df3bf7
@ -79,7 +79,7 @@ namespace VPet_Simulator.Windows
|
||||
else
|
||||
ItemID = 0;
|
||||
CacheDate = modlps.GetDateTime("cachedate", DateTime.MinValue);
|
||||
if (IsBanMOD(mw))
|
||||
if (!IsOnMOD(mw))
|
||||
{
|
||||
Content = "该模组已停用";
|
||||
return;
|
||||
@ -202,7 +202,7 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool IsBanMOD(MainWindow mw) => mw.Set.IsBanMod(Name);
|
||||
public bool IsOnMOD(MainWindow mw) => mw.Set.IsOnMod(Name);
|
||||
public bool IsPassMOD(MainWindow mw) => mw.Set.IsPassMOD(Name);
|
||||
|
||||
public void WriteFile()
|
||||
@ -220,9 +220,11 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
public static class ExtensionSetting
|
||||
{
|
||||
public static bool IsBanMod(this Setting t, string ModName)
|
||||
public static bool IsOnMod(this Setting t, string ModName)
|
||||
{
|
||||
var line = t.FindLine("banmod");
|
||||
if (ModName == "Core")
|
||||
return true;
|
||||
var line = t.FindLine("onmod");
|
||||
if (line == null)
|
||||
return false;
|
||||
return line.Find(ModName.ToLower()) != null;
|
||||
@ -242,15 +244,15 @@ namespace VPet_Simulator.Windows
|
||||
line.SetBool(ModName, true);
|
||||
return true;
|
||||
}
|
||||
public static void BanMod(this Setting t, string ModName)
|
||||
public static void OnMod(this Setting t, string ModName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(ModName))
|
||||
return;
|
||||
t.FindorAddLine("banmod").AddorReplaceSub(new Sub(ModName.ToLower()));
|
||||
t.FindorAddLine("onmod").AddorReplaceSub(new Sub(ModName.ToLower()));
|
||||
}
|
||||
public static void BanModRemove(this Setting t, string ModName)
|
||||
public static void OnModRemove(this Setting t, string ModName)
|
||||
{
|
||||
t.FindorAddLine("banmod").Remove(ModName.ToLower());
|
||||
t.FindorAddLine("onmod").Remove(ModName.ToLower());
|
||||
}
|
||||
public static void PassMod(this Setting t, string ModName)
|
||||
{
|
||||
|
@ -384,11 +384,11 @@ namespace VPet_Simulator.Windows
|
||||
Main.Say("欢迎使用虚拟桌宠模拟器\n这是个中期的测试版,若有bug请多多包涵\n欢迎加群虚拟主播模拟器430081239或在菜单栏-管理-反馈中提交bug或建议", GraphCore.Helper.SayType.Shining);
|
||||
});
|
||||
}
|
||||
else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 6, 23))
|
||||
else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 6, 26))
|
||||
{
|
||||
if (Set["SingleTips"].GetDateTime("update") > new DateTime(2023, 6, 21)) // 上次更新日期时间
|
||||
if (Set["SingleTips"].GetDateTime("update") > new DateTime(2023, 6, 23)) // 上次更新日期时间
|
||||
notifyIcon.ShowBalloonTip(10, "更新通知 06/23", //本次更新内容
|
||||
"修复空存档储存出错的bug", ToolTipIcon.Info);
|
||||
"MOD现已从默认启用变为默认关闭\n如需使用EdgeTTS或者DEMO时钟,请在设置中启用MOD\n互动将会提示获得的心情和消耗的体力数量", ToolTipIcon.Info);
|
||||
else// 累计更新内容
|
||||
notifyIcon.ShowBalloonTip(10, "更新通知 06/23",
|
||||
"现已支持数据计算,桌宠现在需要进行吃饭喝水等\n更新了新的状态动画文件\n新增自动备份存档功能\n数据计算数据相关优化", ToolTipIcon.Info);
|
||||
|
@ -152,7 +152,7 @@ namespace VPet_Simulator.Windows
|
||||
ListBoxItem moditem = (ListBoxItem)ListMod.Items[ListMod.Items.Add(new ListBoxItem())];
|
||||
moditem.Padding = new Thickness(5, 0, 5, 0);
|
||||
moditem.Content = mod.Name;
|
||||
if (mod.IsBanMOD(mw))
|
||||
if (!mod.IsOnMOD(mw))
|
||||
{
|
||||
moditem.Foreground = new SolidColorBrush(Color.FromRgb(100, 100, 100));
|
||||
}
|
||||
@ -203,7 +203,7 @@ namespace VPet_Simulator.Windows
|
||||
runMODGameVer.Foreground = new SolidColorBrush(Color.FromRgb(190, 0, 0));
|
||||
}
|
||||
}
|
||||
if (mod.IsBanMOD(mw))
|
||||
if (!mod.IsOnMOD(mw))
|
||||
{
|
||||
LabelModName.Foreground = new SolidColorBrush(Color.FromRgb(100, 100, 100));
|
||||
ButtonEnable.Foreground = Function.ResourcesBrush(Function.BrushType.DARKPrimaryDarker);
|
||||
@ -348,7 +348,7 @@ namespace VPet_Simulator.Windows
|
||||
|
||||
private void ButtonEnable_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
mw.Set.BanModRemove(mod.Name);
|
||||
mw.Set.OnMod(mod.Name);
|
||||
ShowMod((string)LabelModName.Content);
|
||||
ButtonRestart.Visibility = Visibility.Visible;
|
||||
//int seleid = ListMod.SelectedIndex();
|
||||
@ -362,7 +362,7 @@ namespace VPet_Simulator.Windows
|
||||
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法停用", "停用失败");
|
||||
return;
|
||||
}
|
||||
mw.Set.BanMod(mod.Name);
|
||||
mw.Set.OnModRemove(mod.Name);
|
||||
ShowMod((string)((ListBoxItem)ListMod.SelectedItem).Content);
|
||||
ButtonRestart.Visibility = System.Windows.Visibility.Visible;
|
||||
ShowModList();
|
||||
|
Loading…
Reference in New Issue
Block a user