mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
权限修改和结构修改
This commit is contained in:
parent
2a5903a965
commit
b9ce792a6c
@ -14,7 +14,7 @@ using VPet_Simulator.Windows.Interface;
|
|||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows
|
||||||
{
|
{
|
||||||
public class CoreMOD
|
internal class CoreMOD
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自动启用MOD名称
|
/// 自动启用MOD名称
|
||||||
@ -422,7 +422,7 @@ namespace VPet_Simulator.Windows
|
|||||||
save.Health += food.Health * buff;
|
save.Health += food.Health * buff;
|
||||||
save.Likability += food.Likability * buff;
|
save.Likability += food.Likability * buff;
|
||||||
}
|
}
|
||||||
public static bool IsOnMod(this Setting t, string ModName)
|
internal static bool IsOnMod(this Setting t, string ModName)
|
||||||
{
|
{
|
||||||
if (CoreMOD.OnModDefList.Contains(ModName))
|
if (CoreMOD.OnModDefList.Contains(ModName))
|
||||||
return true;
|
return true;
|
||||||
@ -431,14 +431,14 @@ namespace VPet_Simulator.Windows
|
|||||||
return false;
|
return false;
|
||||||
return line.Find(ModName.ToLower()) != null;
|
return line.Find(ModName.ToLower()) != null;
|
||||||
}
|
}
|
||||||
public static bool IsPassMOD(this Setting t, string ModName)
|
internal static bool IsPassMOD(this Setting t, string ModName)
|
||||||
{
|
{
|
||||||
var line = t.FindLine("passmod");
|
var line = t.FindLine("passmod");
|
||||||
if (line == null)
|
if (line == null)
|
||||||
return false;
|
return false;
|
||||||
return line.Find(ModName.ToLower()) != null;
|
return line.Find(ModName.ToLower()) != null;
|
||||||
}
|
}
|
||||||
public static bool IsMSGMOD(this Setting t, string ModName)
|
internal static bool IsMSGMOD(this Setting t, string ModName)
|
||||||
{
|
{
|
||||||
var line = t.FindorAddLine("msgmod");
|
var line = t.FindorAddLine("msgmod");
|
||||||
if (line.GetBool(ModName))
|
if (line.GetBool(ModName))
|
||||||
@ -446,21 +446,21 @@ namespace VPet_Simulator.Windows
|
|||||||
line.SetBool(ModName, true);
|
line.SetBool(ModName, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public static void OnMod(this Setting t, string ModName)
|
internal static void OnMod(this Setting t, string ModName)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(ModName))
|
if (string.IsNullOrWhiteSpace(ModName))
|
||||||
return;
|
return;
|
||||||
t.FindorAddLine("onmod").AddorReplaceSub(new Sub(ModName.ToLower()));
|
t.FindorAddLine("onmod").AddorReplaceSub(new Sub(ModName.ToLower()));
|
||||||
}
|
}
|
||||||
public static void OnModRemove(this Setting t, string ModName)
|
internal static void OnModRemove(this Setting t, string ModName)
|
||||||
{
|
{
|
||||||
t.FindorAddLine("onmod").Remove(ModName.ToLower());
|
t.FindorAddLine("onmod").Remove(ModName.ToLower());
|
||||||
}
|
}
|
||||||
public static void PassMod(this Setting t, string ModName)
|
internal static void PassMod(this Setting t, string ModName)
|
||||||
{
|
{
|
||||||
t.FindorAddLine("passmod").AddorReplaceSub(new Sub(ModName.ToLower()));
|
t.FindorAddLine("passmod").AddorReplaceSub(new Sub(ModName.ToLower()));
|
||||||
}
|
}
|
||||||
public static void PassModRemove(this Setting t, string ModName)
|
internal static void PassModRemove(this Setting t, string ModName)
|
||||||
{
|
{
|
||||||
t.FindorAddLine("passmod").Remove(ModName.ToLower());
|
t.FindorAddLine("passmod").Remove(ModName.ToLower());
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ namespace VPet_Simulator.Windows
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 游戏设置
|
/// 游戏设置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Setting : LPS_D, ISetting
|
internal class Setting : LPS_D, ISetting
|
||||||
{
|
{
|
||||||
MainWindow mw;
|
MainWindow mw;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -40,56 +40,7 @@ namespace VPet_Simulator.Windows
|
|||||||
{
|
{
|
||||||
public partial class MainWindow : IMainWindow
|
public partial class MainWindow : IMainWindow
|
||||||
{
|
{
|
||||||
public readonly string ModPath = ExtensionValue.BaseDirectory + @"\mod";
|
|
||||||
public bool IsSteamUser { get; }
|
|
||||||
public LPS_D Args { get; }
|
|
||||||
public string PrefixSave { get; } = "";
|
|
||||||
private string prefixsavetrans = null;
|
|
||||||
public string PrefixSaveTrans
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (prefixsavetrans == null)
|
|
||||||
{
|
|
||||||
if (PrefixSave == "")
|
|
||||||
prefixsavetrans = "";
|
|
||||||
else
|
|
||||||
prefixsavetrans = '-' + PrefixSave.TrimStart('-').Translate();
|
|
||||||
}
|
|
||||||
return prefixsavetrans;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public Setting Set { get; set; }
|
|
||||||
ISetting IMainWindow.Set => Set;
|
|
||||||
|
|
||||||
public List<PetLoader> Pets { get; set; } = new List<PetLoader>();
|
|
||||||
public List<CoreMOD> CoreMODs = new List<CoreMOD>();
|
|
||||||
public GameCore Core { get; set; } = new GameCore();
|
|
||||||
public List<Window> Windows { get; set; } = new List<Window>();
|
|
||||||
public Main Main { get; set; }
|
|
||||||
public UIElement TalkBox;
|
|
||||||
public winGameSetting winSetting { get; set; }
|
|
||||||
public winBetterBuy winBetterBuy { get; set; }
|
|
||||||
|
|
||||||
public winWorkMenu winWorkMenu { get; set; }
|
|
||||||
//public ChatGPTClient CGPTClient;
|
|
||||||
public ImageResources ImageSources { get; set; } = new ImageResources();
|
|
||||||
/// <summary>
|
|
||||||
/// 所有三方插件
|
|
||||||
/// </summary>
|
|
||||||
public List<MainPlugin> Plugins { get; } = new List<MainPlugin>();
|
|
||||||
/// <summary>
|
|
||||||
/// 所有字体(位置)
|
|
||||||
/// </summary>
|
|
||||||
public List<IFont> Fonts { get; } = new List<IFont>();
|
|
||||||
/// <summary>
|
|
||||||
/// 所有主题
|
|
||||||
/// </summary>
|
|
||||||
public List<Theme> Themes = new List<Theme>();
|
|
||||||
/// <summary>
|
|
||||||
/// 当前启用主题
|
|
||||||
/// </summary>
|
|
||||||
public Theme Theme = null;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载主题
|
/// 加载主题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -157,25 +108,7 @@ namespace VPet_Simulator.Windows
|
|||||||
Panuon.WPF.UI.GlobalSettings.Setting.FontFamily = font;
|
Panuon.WPF.UI.GlobalSettings.Setting.FontFamily = font;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Food> Foods { get; } = new List<Food>();
|
|
||||||
/// <summary>
|
|
||||||
/// 版本号
|
|
||||||
/// </summary>
|
|
||||||
public int version { get; } = 11001;
|
|
||||||
/// <summary>
|
|
||||||
/// 版本号
|
|
||||||
/// </summary>
|
|
||||||
public string Version => $"{version / 10000}.{version % 10000 / 100}.{version % 100:00}";
|
|
||||||
|
|
||||||
public List<LowText> LowFoodText { get; set; } = new List<LowText>();
|
|
||||||
|
|
||||||
public List<LowText> LowDrinkText { get; set; } = new List<LowText>();
|
|
||||||
|
|
||||||
public List<SelectText> SelectTexts { get; set; } = new List<SelectText>();
|
|
||||||
|
|
||||||
public List<ClickText> ClickTexts { get; set; } = new List<ClickText>();
|
|
||||||
|
|
||||||
public GameSave_v2 GameSavesData { get; set; }
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获得自动点击的文本
|
/// 获得自动点击的文本
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
87
VPet-Simulator.Windows/MainWindow_Property.cs
Normal file
87
VPet-Simulator.Windows/MainWindow_Property.cs
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
using LinePutScript.Dictionary;
|
||||||
|
using LinePutScript.Localization.WPF;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using VPet_Simulator.Core;
|
||||||
|
using VPet_Simulator.Windows.Interface;
|
||||||
|
|
||||||
|
namespace VPet_Simulator.Windows;
|
||||||
|
|
||||||
|
public partial class MainWindow
|
||||||
|
{//主窗口部分数据
|
||||||
|
|
||||||
|
public List<Food> Foods { get; } = new List<Food>();
|
||||||
|
/// <summary>
|
||||||
|
/// 版本号
|
||||||
|
/// </summary>
|
||||||
|
public int version { get; } = 11002;
|
||||||
|
/// <summary>
|
||||||
|
/// 版本号
|
||||||
|
/// </summary>
|
||||||
|
public string Version => $"{version / 10000}.{version % 10000 / 100}.{version % 100:00}";
|
||||||
|
|
||||||
|
public List<LowText> LowFoodText { get; set; } = new List<LowText>();
|
||||||
|
|
||||||
|
public List<LowText> LowDrinkText { get; set; } = new List<LowText>();
|
||||||
|
|
||||||
|
public List<SelectText> SelectTexts { get; set; } = new List<SelectText>();
|
||||||
|
|
||||||
|
public List<ClickText> ClickTexts { get; set; } = new List<ClickText>();
|
||||||
|
|
||||||
|
public GameSave_v2 GameSavesData { get; set; }
|
||||||
|
|
||||||
|
public readonly string ModPath = ExtensionValue.BaseDirectory + @"\mod";
|
||||||
|
public bool IsSteamUser { get; }
|
||||||
|
public LPS_D Args { get; }
|
||||||
|
public string PrefixSave { get; } = "";
|
||||||
|
private string prefixsavetrans = null;
|
||||||
|
public string PrefixSaveTrans
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (prefixsavetrans == null)
|
||||||
|
{
|
||||||
|
if (PrefixSave == "")
|
||||||
|
prefixsavetrans = "";
|
||||||
|
else
|
||||||
|
prefixsavetrans = '-' + PrefixSave.TrimStart('-').Translate();
|
||||||
|
}
|
||||||
|
return prefixsavetrans;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
internal Setting Set { get; set; }
|
||||||
|
ISetting IMainWindow.Set => Set;
|
||||||
|
|
||||||
|
public List<PetLoader> Pets { get; set; } = new List<PetLoader>();
|
||||||
|
internal List<CoreMOD> CoreMODs = new List<CoreMOD>();
|
||||||
|
public GameCore Core { get; set; } = new GameCore();
|
||||||
|
public List<Window> Windows { get; set; } = new List<Window>();
|
||||||
|
public Main Main { get; set; }
|
||||||
|
public UIElement TalkBox;
|
||||||
|
public winGameSetting winSetting { get; set; }
|
||||||
|
public winBetterBuy winBetterBuy { get; set; }
|
||||||
|
|
||||||
|
public winWorkMenu winWorkMenu { get; set; }
|
||||||
|
//public ChatGPTClient CGPTClient;
|
||||||
|
public ImageResources ImageSources { get; set; } = new ImageResources();
|
||||||
|
/// <summary>
|
||||||
|
/// 所有三方插件
|
||||||
|
/// </summary>
|
||||||
|
public List<MainPlugin> Plugins { get; } = new List<MainPlugin>();
|
||||||
|
/// <summary>
|
||||||
|
/// 所有字体(位置)
|
||||||
|
/// </summary>
|
||||||
|
public List<IFont> Fonts { get; } = new List<IFont>();
|
||||||
|
/// <summary>
|
||||||
|
/// 所有主题
|
||||||
|
/// </summary>
|
||||||
|
public List<Theme> Themes = new List<Theme>();
|
||||||
|
/// <summary>
|
||||||
|
/// 当前启用主题
|
||||||
|
/// </summary>
|
||||||
|
public Theme Theme = null;
|
||||||
|
}
|
@ -218,7 +218,7 @@ public partial class MPFriends : WindowX, IMPFriend
|
|||||||
wmp.SendMessageALL(msg);
|
wmp.SendMessageALL(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MPMOD> MPMODs = new List<MPMOD>();
|
internal List<MPMOD> MPMODs = new List<MPMOD>();
|
||||||
public Main Main { get; set; }
|
public Main Main { get; set; }
|
||||||
|
|
||||||
public ulong LobbyID => lb.Id;
|
public ulong LobbyID => lb.Id;
|
||||||
|
@ -9,7 +9,7 @@ using VPet_Simulator.Core;
|
|||||||
using VPet_Simulator.Windows.Interface;
|
using VPet_Simulator.Windows.Interface;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows;
|
namespace VPet_Simulator.Windows;
|
||||||
public class MPMOD
|
internal class MPMOD
|
||||||
{
|
{
|
||||||
public static void LoadImage(MPFriends mw, DirectoryInfo di, string pre = "")
|
public static void LoadImage(MPFriends mw, DirectoryInfo di, string pre = "")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user