Skip to content

Commit 63a6438

Browse files
committed
Try fixing remaining MD compat issues
I really need to recode the unity search path stuff sometime with a better understanding of assetbundles. The idea was that I could load from the container path... I don't know why I had the StartsWith there before, my guess would be some stupid issue with OSX or something dumb
1 parent acc3ce2 commit 63a6438

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

CloneDash/Compatibility/MuseDash/MuseDashCompatibility.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,11 @@ public static void BuildDashStructures() {
434434
ConcurrentBag<MuseDashSong> workSongs = [];
435435
using (StaticSequentialProfiler.StartStackFrame("Parallel Process Dash Structures"))
436436
Parallel.ForEach(Albums, (album) => {
437-
var songs = Filesystem.ReadJSON<List<MuseDashSongInfoJSON>>("musedash", $"Assets/Static Resources/Data/Configs/others/{album.JsonName}");
438-
var songsEN = Filesystem.ReadJSON<__musedashSong[]>("musedash", $"Assets/Static Resources/Data/Configs/english/{album.JsonName}_English");
439-
Debug.Assert(songs.Count == songsEN.Length);
437+
// var songs_raw = filesystem.ReadAllText("musedash", $"Assets/Static Resources/Data/Configs/others/{album.JsonName}.json");
438+
// var songsEN_raw = filesystem.ReadAllText("musedash", $"Assets/Static Resources/Data/Configs/english/{album.JsonName}_English.json");
439+
var songs = Filesystem.ReadJSON<List<MuseDashSongInfoJSON>>("musedash", $"Assets/Static Resources/Data/Configs/others/{album.JsonName}.json");
440+
var songsEN = Filesystem.ReadJSON<__musedashSong[]>("musedash", $"Assets/Static Resources/Data/Configs/english/{album.JsonName}_English.json");
441+
// Debug.Assert(songs.Count == songsEN.Length);
440442
// if (songs.Count != songsEN.Length) {
441443
// Logs.Print($"inconsistency: {album.JsonName} songs length! songs ({songs.Count}) != songsEN ({songsEN.Length})");
442444
// for (int i = 0; i < songs.Count; i++) Logs.Print($" song #{i}: {songs[i].Name}");

CloneDash/Compatibility/Unity/UnitySearchPath.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,6 @@ public UnityFile GetBundleNameFromFullPath(string path) {
156156
if (LookupAbsFiles.TryGetValue(path, out var bundleInfo)) return bundleInfo;
157157
if (LookupAbsFolders.TryGetValue(path, out var folder)) return folder.Single();
158158

159-
// More expensive lookup method.
160-
// todo: cheapen this with local searching or something
161-
162-
var tryFind = LookupAbsFiles.FirstOrDefault(x => x.Key.StartsWith(path)).Value ?? LookupAbsFiles.FirstOrDefault(x => x.Key.EndsWith(path)).Value;
163-
if (tryFind == null) {
164-
var tryFind2 = LookupAbsFolders.FirstOrDefault(x => x.Key.StartsWith(path)).Value;
165-
if (tryFind2 != null)
166-
return tryFind2.Single();
167-
}
168-
else return tryFind;
169-
170159
throw new FileNotFoundException(path);
171160
}
172161

0 commit comments

Comments
 (0)