Skip to content

Commit 422fbee

Browse files
HakoyuHakoyu
authored andcommitted
添加mods存在同Id模组的检测
1 parent fc7ec6c commit 422fbee

38 files changed

+165
-97
lines changed

App.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:I18n="clr-namespace:StarsectorTools.Langs"
66
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
7-
StartupUri="Views/MainWindow/MainWindow.xaml">
7+
StartupUri="Views/Main/MainWindow.xaml">
88
<Application.Resources>
99
<ResourceDictionary>
1010
<ResourceDictionary.MergedDictionaries>
@@ -55,6 +55,7 @@
5555
<Grid>
5656
<pu:StateControl
5757
HorizontalAlignment="Left"
58+
VerticalAlignment="Center"
5859
CurrentState="{Binding MessageBoxIcon}"
5960
FontFamily="/Panuon.WPF.UI;component/Resources/Fonts/#PanuonIcon"
6061
FontSize="64"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# StarsectorToolsChangeLog
22

3+
## 0.8.7.2
4+
5+
添加mods存在同Id模组的检测
6+
37
## 0.8.7.1
48

59
修复获取游戏版本失败时会判断游戏路径设置错误的问题

Langs/Pages/ModManager/ModManagerPageI18nRes.Designer.cs

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Langs/Pages/ModManager/ModManagerPageI18nRes.en-US.resx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,4 +571,16 @@ Submit the issue with its ID and the category it should be in</value>
571571
<data name="LastUpdateTime" xml:space="preserve">
572572
<value>Last update time</value>
573573
</data>
574+
<data name="ModIsContainsMessage" xml:space="preserve">
575+
<value>The same mod exists
576+
The game will only load the first mod with this Id in the correct order by folder name and ignore the following mod with the same Id
577+
Please check your mod, and remove any extra mod with the same ID
578+
First load location: {0}
579+
Reload location: {1}</value>
580+
</data>
581+
<data name="ModIsContains" xml:space="preserve">
582+
<value>The same mod exists
583+
First load location: {0}
584+
Reload location: {1}</value>
585+
</data>
574586
</root>

Langs/Pages/ModManager/ModManagerPageI18nRes.resx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,4 +571,16 @@
571571
<data name="LastUpdateTime" xml:space="preserve">
572572
<value>最后更新时间</value>
573573
</data>
574+
<data name="ModIsContainsMessage" xml:space="preserve">
575+
<value>存在相同的模组
576+
游戏只会加载按文件夹名称正序的首个为此Id的模组并忽视后面的同Id模组
577+
请检查你的模组, 并删除多余的同Id模组
578+
首次载入位置: {0}
579+
再次载入位置: {1}</value>
580+
</data>
581+
<data name="ModIsContains" xml:space="preserve">
582+
<value>存在相同的模组
583+
首次载入位置: {0}
584+
再次载入位置: {1}</value>
585+
</data>
574586
</root>

Libs/HKW/Libs/Logger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,15 @@ is string baseNamespace
301301
private static string GetDataTimeMessage()
302302
{
303303
string dateTime = GetDataTime();
304-
if (!string.IsNullOrWhiteSpace(dateTime))
304+
if (string.IsNullOrWhiteSpace(dateTime) is false)
305305
dateTime += " ";
306306
return dateTime;
307307
}
308308

309309
private static string GetThreadIdMessage()
310310
{
311311
string threadId = GetThreadId();
312-
if (!string.IsNullOrWhiteSpace(threadId))
312+
if (string.IsNullOrWhiteSpace(threadId) is false)
313313
threadId = $":{threadId}";
314314
return threadId;
315315
}

Libs/HKW/WPF/WindowAccent.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ internal enum WindowCompositionAttribute
9999
/// <summary>
100100
/// 设置高斯模糊
101101
/// </summary>
102-
/// <param name="window">主窗口(MainWindow)</param>
102+
/// <param name="window">主窗口(Main)</param>
103103
/// <param name="argb">背景颜色(ARGB)</param>
104104
public static void SetBlurBehind(Window window, uint argb)
105105
{
@@ -109,7 +109,7 @@ public static void SetBlurBehind(Window window, uint argb)
109109
/// <summary>
110110
/// 设置高斯模糊
111111
/// </summary>
112-
/// <param name="window">主窗口(MainWindow)</param>
112+
/// <param name="window">主窗口(Main)</param>
113113
/// <param name="color">背景颜色</param>
114114
public static void SetBlurBehind(Window window, Color color)
115115
{
@@ -119,7 +119,7 @@ public static void SetBlurBehind(Window window, Color color)
119119
/// <summary>
120120
/// 设置亚克力模糊
121121
/// </summary>
122-
/// <param name="window">主窗口(MainWindow)</param>
122+
/// <param name="window">主窗口(Main)</param>
123123
/// <param name="argb">背景颜色(ARGB)</param>
124124
public static void SetAcrylicBlurBehind(Window window, uint argb)
125125
{
@@ -129,7 +129,7 @@ public static void SetAcrylicBlurBehind(Window window, uint argb)
129129
/// <summary>
130130
/// 设置亚克力模糊
131131
/// </summary>
132-
/// <param name="window">主窗口(MainWindow)</param>
132+
/// <param name="window">主窗口(Main)</param>
133133
/// <param name="color">背景颜色</param>
134134
public static void SetAcrylicBlurBehind(Window window, Color color)
135135
{
@@ -139,7 +139,7 @@ public static void SetAcrylicBlurBehind(Window window, Color color)
139139
/// <summary>
140140
/// 设置窗口强调类型
141141
/// </summary>
142-
/// <param name="window">主窗口(MainWindow)</param>
142+
/// <param name="window">主窗口(Main)</param>
143143
/// <param name="state">强调状态</param>
144144
/// <param name="argb">背景颜色(ARGB)</param>
145145
public static void SetWindowAccent(Window window, AccentState state, uint argb)
@@ -150,7 +150,7 @@ public static void SetWindowAccent(Window window, AccentState state, uint argb)
150150
/// <summary>
151151
/// 设置窗口强调类型
152152
/// </summary>
153-
/// <param name="window">主窗口(MainWindow)</param>
153+
/// <param name="window">主窗口(Main)</param>
154154
/// <param name="state">强调状态</param>
155155
/// <param name="color">背景颜色</param>
156156
public static void SetWindowAccent(Window window, AccentState state, Color color)

Libs/Utils/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
using SharpCompress.Archives;
1515
using SharpCompress.Archives.Zip;
1616
using SharpCompress.Common;
17-
using StarsectorTools.ViewModels.MainWindow;
17+
using StarsectorTools.ViewModels.Main;
1818
using I18n = StarsectorTools.Langs.Libs.UtilsI18nRes;
1919

2020
namespace StarsectorTools.Libs.Utils;

StarsectorTools.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<NeutralLanguage>zh-CN</NeutralLanguage>
2626
<Title>$(AssemblyName)</Title>
2727
<Authors>HKW</Authors>
28-
<FileVersion>0.8.7.1</FileVersion>
29-
<AssemblyVersion>0.8.7.1</AssemblyVersion>
28+
<FileVersion>0.8.7.2</FileVersion>
29+
<AssemblyVersion>0.8.7.2</AssemblyVersion>
3030
<Copyright>Copyright ©2022-2023 HKW</Copyright>
3131
<RepositoryType>https://github.com/Hakoyu/StarsectorTools</RepositoryType>
3232
<IncludeSymbols>False</IncludeSymbols>

ViewModels/GameSettingsPage/GameSettingsPageVMController.cs renamed to ViewModels/GameSettings/GameSettingsPageVMController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using StarsectorTools.Libs.Utils;
1010
using I18nRes = StarsectorTools.Langs.Pages.GameSettings.GameSettingsPageI18nRes;
1111

12-
namespace StarsectorTools.ViewModels.GameSettingsPage;
12+
namespace StarsectorTools.ViewModels.GameSettings;
1313

1414
internal partial class GameSettingsPageViewModel
1515
{
@@ -34,7 +34,7 @@ private void GetGameKey()
3434
if (key != null)
3535
{
3636
var serialKey = key.GetValue("serial") as string;
37-
if (!string.IsNullOrWhiteSpace(serialKey))
37+
if (string.IsNullOrWhiteSpace(serialKey) is false)
3838
{
3939
_realGameKey = serialKey.Replace("/", "");
4040
GameKey = _hideGameKey = new string('*', 23);

0 commit comments

Comments
 (0)