This commit is contained in:
ZouJin 2024-02-16 10:41:23 +08:00
commit 2e7c26dd14
3 changed files with 20 additions and 26 deletions

View File

@ -1,6 +1,7 @@
using LinePutScript;
using LinePutScript.Converter;
using LinePutScript.Dictionary;
using LinePutScript.Localization.WPF;
using System;
using System.Collections.Generic;
using System.IO;
@ -213,30 +214,23 @@ public class ModLoader
case "lang":
Tag.Add("lang");
langDirectory = di;
//foreach (FileInfo fi in di.EnumerateFiles("*.lps"))
//{
// //LocalizeCore.AddCulture(
// // fi.Id.Substring(0, fi.Id.Length - fi.Extension.Length),
// // new LPS_D(File.ReadAllText(fi.FullName))
// //);
//}
//foreach (DirectoryInfo dis in di.EnumerateDirectories())
//{
// foreach (FileInfo fi in dis.EnumerateFiles("*.lps"))
// {
// //LocalizeCore.AddCulture(
// // dis.Id,
// // new LPS_D(File.ReadAllText(fi.FullName))
// //);
// }
//}
//if (mw.Set.Language == "null")
//{
// LocalizeCore.LoadDefaultCulture();
//}
//else
// LocalizeCore.LoadCulture(mw.Set.Language);
foreach (FileInfo fi in di.EnumerateFiles("*.lps"))
{
LocalizeCore.AddCulture(
Path.GetFileNameWithoutExtension(fi.Name),
new LPS_D(File.ReadAllText(fi.FullName))
);
}
foreach (DirectoryInfo dis in di.EnumerateDirectories())
{
foreach (FileInfo fi in dis.EnumerateFiles("*.lps"))
{
LocalizeCore.AddCulture(
dis.Name,
new LPS_D(File.ReadAllText(fi.FullName))
);
}
}
break;
}
}

View File

@ -50,7 +50,7 @@ public class ModMaker : MainPlugin
ModMakerInfo.GameVersion = MW.version;
// 载入本体宠物
foreach (var pet in MW.Pets)
ModMakerInfo.MainPets.Add(pet.Name, new(pet, true));
ModMakerInfo.MainPets.TryAdd(pet.Name, new(pet, true));
//Maker.ModMaker = this;
Maker.Show();
Maker.Closed += Maker_Closed;

View File

@ -168,7 +168,7 @@
<ComboBox
x:Name="ComboBox_ModeType"
Grid.Column="1"
ItemsSource="{Binding Move.Value.DirectionTypes}"
ItemsSource="{Binding Move.Value.ModeTypes}"
SelectedIndex="0" />
<Button
Grid.Column="2"