fix(ModLoader): 不应当显示的加载器的进度也被计入到显示的总进度中

This commit is contained in:
Open-KFC
2025-04-13 06:24:31 +08:00
parent 16e09c792c
commit 2775ccc4fe
@@ -626,7 +626,7 @@ Restart:
Public Function LoaderTaskbarProgressGet() As Double Public Function LoaderTaskbarProgressGet() As Double
Try Try
If Not LoaderTaskbar.Any Then Return 1 If Not LoaderTaskbar.Any Then Return 1
Return MathClamp(LoaderTaskbar.Select(Function(e) e.Progress).Average(), 0, 1) Return MathClamp(LoaderTaskbar.Where(Function(lb As LoaderBase) lb.Show).Select(Function(lb As LoaderBase) lb.Progress).Average(), 0, 1)
Catch ex As Exception Catch ex As Exception
Log(ex, "获取任务栏进度出错", LogLevel.Feedback) Log(ex, "获取任务栏进度出错", LogLevel.Feedback)
Return 0.5 Return 0.5