mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
对重复名称MOD进行去重
This commit is contained in:
parent
0ebd1285ae
commit
435b17e2d1
@ -9,6 +9,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Xml.Linq;
|
||||||
using VPet_Simulator.Core;
|
using VPet_Simulator.Core;
|
||||||
using VPet_Simulator.Windows.Interface;
|
using VPet_Simulator.Windows.Interface;
|
||||||
|
|
||||||
@ -104,6 +105,13 @@ namespace VPet_Simulator.Windows
|
|||||||
LocalizeCore.AddCulture(line.info, ls);
|
LocalizeCore.AddCulture(line.info, ls);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mw.CoreMODs.FirstOrDefault(x=>x.Name == Name) != null)
|
||||||
|
{
|
||||||
|
Name += $"({"MOD名称重复".Translate()})";
|
||||||
|
ErrorMessage = "MOD名称重复".Translate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!IsOnMOD(mw))
|
if (!IsOnMOD(mw))
|
||||||
{
|
{
|
||||||
Tag.Add("该模组已停用");
|
Tag.Add("该模组已停用");
|
||||||
|
@ -1205,6 +1205,7 @@ namespace VPet_Simulator.Windows
|
|||||||
public async void GameLoad(List<DirectoryInfo> Path)
|
public async void GameLoad(List<DirectoryInfo> Path)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Path = Path.Distinct().ToList();
|
||||||
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading MOD"));
|
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading MOD"));
|
||||||
//加载mod
|
//加载mod
|
||||||
foreach (DirectoryInfo di in Path)
|
foreach (DirectoryInfo di in Path)
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
MOD名称重复#MOD name duplicated:|
|
@ -0,0 +1 @@
|
|||||||
|
MOD名称重复#MOD名称重复:|
|
@ -0,0 +1 @@
|
|||||||
|
MOD名称重复#MOD名稱重複:|
|
Loading…
Reference in New Issue
Block a user