瀏覽代碼

SongCore 3.x support.

Halsafar 4 年之前
父節點
當前提交
e9a86e0388

+ 2 - 1
SongBrowserPlugin/DataAccess/SongBrowserModel.cs

@@ -1,6 +1,7 @@
 using SongBrowser.DataAccess;
 using SongCore.Utilities;
 using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
@@ -33,7 +34,7 @@ namespace SongBrowser
 
         public static Func<IAnnotatedBeatmapLevelCollection, List<IPreviewBeatmapLevel>> CustomFilterHandler;
         public static Func<List<IPreviewBeatmapLevel>, List<IPreviewBeatmapLevel>> CustomSortHandler;
-        public static Action<Dictionary<string, CustomPreviewBeatmapLevel>> didFinishProcessingSongs;
+        public static Action<ConcurrentDictionary<string, CustomPreviewBeatmapLevel>> didFinishProcessingSongs;
 
         public bool SortWasMissingData { get; private set; } = false;
 

+ 2 - 1
SongBrowserPlugin/SongBrowserApplication.cs

@@ -2,6 +2,7 @@
 using SongBrowser.UI;
 using System;
 using System.Collections;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
 using UnityEngine;
@@ -100,7 +101,7 @@ namespace SongBrowser
         /// </summary>
         /// <param name="loader"></param>
         /// <param name="levels"></param>
-        private void OnSongLoaderLoadedSongs(SongCore.Loader loader, Dictionary<string, CustomPreviewBeatmapLevel> levels)
+        private void OnSongLoaderLoadedSongs(SongCore.Loader loader, ConcurrentDictionary<string, CustomPreviewBeatmapLevel> levels)
         {
             Logger.Trace("OnSongLoaderLoadedSongs-SongBrowserApplication()");
             try

+ 2 - 2
SongBrowserPlugin/UI/ProgressBar.cs

@@ -5,7 +5,7 @@ using UnityEngine;
 using UnityEngine.SceneManagement;
 using UnityEngine.UI;
 using SongCore.Utilities;
-
+using System.Collections.Concurrent;
 
 namespace SongBrowser.UI
 {
@@ -95,7 +95,7 @@ namespace SongBrowser.UI
             }
         }
 
-        private void SongBrowserFinishedProcessingSongs(Dictionary<string, CustomPreviewBeatmapLevel> arg2)
+        private void SongBrowserFinishedProcessingSongs(ConcurrentDictionary<string, CustomPreviewBeatmapLevel> arg2)
         {
             StopAllCoroutines();
             _showingMessage = false;

+ 2 - 2
SongBrowserPlugin/manifest.json

@@ -7,8 +7,8 @@
   "name": "Song Browser",
   "version": "6.1.0",
   "dependsOn": {
-    "SongCore": "^2.10.0.0",
-    "SongDataCore": "^1.3.4.0",
+    "SongCore": "^3.0.0",
+    "SongDataCore": "^1.3.4",
     "BSIPA": "^4.1.2"
   },
   "misc": {