From 911d1cf6d863c69abfb9b86b28a9d9ba02add027 Mon Sep 17 00:00:00 2001 From: ZouJin <zoujin.dev@exlb.org> Date: Mon, 11 Sep 2023 16:21:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=AE=A0=E7=89=A9=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=92=8C=E5=B7=A5=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/Function/CoreMOD.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs index c9dadb3..3864e82 100644 --- a/VPet-Simulator.Windows/Function/CoreMOD.cs +++ b/VPet-Simulator.Windows/Function/CoreMOD.cs @@ -111,8 +111,7 @@ namespace VPet_Simulator.Windows switch (di.Name.ToLower()) { case "pet": - //宠物模型 - Tag.Add("pet"); + //宠物模型 foreach (FileInfo fi in di.EnumerateFiles("*.lps")) { LpsDocument lps = new LpsDocument(File.ReadAllText(fi.FullName)); @@ -122,6 +121,7 @@ namespace VPet_Simulator.Windows var p = mw.Pets.FirstOrDefault(x => x.Name == name); if (p == null) { + Tag.Add("pet"); p = new PetLoader(lps, di); if (p.Config.Works.Count > 0) Tag.Add("work"); @@ -131,8 +131,11 @@ namespace VPet_Simulator.Windows { if (lps.FindAllLine("work").Length >= 0) { - + Tag.Add("work"); } + var dis = new DirectoryInfo(di.FullName + "\\" + lps.First()["path"].Info); + if (dis.Exists && dis.GetDirectories().Length > 0) + Tag.Add("pet"); p.path.Add(di.FullName + "\\" + lps.First()["path"].Info); p.Config.Set(lps); }