- 启动时报错的问题
This commit is contained in:
Hakoyu 2024-04-21 00:44:37 +08:00
parent 7a2fa5c261
commit 51fc7c1c78
4 changed files with 15 additions and 9 deletions

View File

@ -40,9 +40,12 @@ public class ModMaker : MainPlugin
Application.Current.Resources.MergedDictionaries.Add(ModMakerInfo.NativeStyles);
}
public I18nResource<string, string> I18nResource { get; } =
new() { FillDefaultValueForNewCulture = true, DefaultValue = string.Empty };
public override void Setting()
{
if (Maker == null)
if (Maker is null)
{
// 载入ModMaker资源
Maker = new ModMakerWindow();
@ -52,7 +55,7 @@ public class ModMaker : MainPlugin
foreach (var pet in MW.Pets)
ModMakerInfo.MainPets.TryAdd(
pet.Name,
new(pet, true) { I18nResource = ModInfoModel.Current.I18nResource }
new(pet, true) { I18nResource = I18nResource }
);
//Maker.ModMaker = this;
Maker.Show();

View File

@ -31,7 +31,7 @@ public static class ModMakerInfo
/// <summary>
/// 游戏版本
/// </summary>
public static int GameVersion { get; set; } = 100;
public static int GameVersion { get; set; } = 11000;
/// <summary>
/// 本体的宠物

View File

@ -515,7 +515,6 @@ public class AnimeTypeModel : ObservableObjectX
/// 保存为 <see cref="GraphInfo.GraphType.Raised_Dynamic"/> 或 <see cref="GraphInfo.GraphType.Raised_Static"/> 样式
/// </summary>
/// <param name="path">路径</param>
/// <param name="animeTypeModel">模型</param>
void SaveRaised(string path)
{
var animePath = Path.Combine(path, "Raise");
@ -530,7 +529,6 @@ public class AnimeTypeModel : ObservableObjectX
/// 保存为 <see cref="GraphInfo.GraphType.Switch_Up"/> 或 <see cref="GraphInfo.GraphType.Switch_Down"/> 或 <see cref="GraphInfo.GraphType.Switch_Thirsty"/> 或 <see cref="GraphInfo.GraphType.Switch_Hunger"/>
/// </summary>
/// <param name="path">路径</param>
/// <param name="animeTypeModel">模型</param>
void SaveSwitch(string path)
{
var animePath = Path.Combine(path, "Switch");
@ -543,7 +541,6 @@ public class AnimeTypeModel : ObservableObjectX
/// 保存成默认样式
/// </summary>
/// <param name="path"></param>
/// <param name="animeTypeModel"></param>
void SaveDefault(string path)
{
var animePath = Path.Combine(path, GraphType.ToString());
@ -555,7 +552,6 @@ public class AnimeTypeModel : ObservableObjectX
/// 保存成多类型样式
/// </summary>
/// <param name="path"></param>
/// <param name="animeTypeModel"></param>
void SaveMultiType(string path)
{
var animePath = Path.Combine(path, GraphType.ToString());
@ -567,7 +563,6 @@ public class AnimeTypeModel : ObservableObjectX
/// 保存为 Happy/A/0 的路径样式
/// </summary>
/// <param name="path"></param>
/// <param name="animeTypeModel"></param>
void SaveWithModeType(string path)
{
if (HappyAnimes.Count > 0)
@ -628,7 +623,6 @@ public class AnimeTypeModel : ObservableObjectX
/// 保存为 Happy/0 的路径样式
/// </summary>
/// <param name="animePath"></param>
/// <param name="animeType"></param>
void SaveWithAnimeType(string animePath)
{
if (HappyAnimes.Count > 0)

View File

@ -13,6 +13,15 @@
<ImplicitUsings>enable</ImplicitUsings>
<Configurations>Debug;Release;Test</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\food.png" />
</ItemGroup>