From 74f441b021f99f2a0a10dd46be3f60ff520eed35 Mon Sep 17 00:00:00 2001 From: xyonico Date: Thu, 19 Jul 2018 21:23:15 +0000 Subject: [PATCH] Now forcing the difficultyRank to match difficulty level. --- SongLoaderPlugin/Plugin.cs | 2 +- SongLoaderPlugin/SongLoader.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SongLoaderPlugin/Plugin.cs b/SongLoaderPlugin/Plugin.cs index 1cdaf0d..2ed53d7 100644 --- a/SongLoaderPlugin/Plugin.cs +++ b/SongLoaderPlugin/Plugin.cs @@ -12,7 +12,7 @@ public string Name public string Version { - get { return "v4.0"; } + get { return "v4.1"; } } public void OnApplicationStart() diff --git a/SongLoaderPlugin/SongLoader.cs b/SongLoaderPlugin/SongLoader.cs index a3b5157..574210c 100644 --- a/SongLoaderPlugin/SongLoader.cs +++ b/SongLoaderPlugin/SongLoader.cs @@ -569,10 +569,13 @@ private CustomSongInfo GetCustomSongInfo(string songPath) for (int i = 0; i < diffs.AsArray.Count; i++) { n = diffs[i]; + var difficulty = Utils.ToEnum(n["difficulty"], LevelDifficulty.Normal); + var difficultyRank = (int)difficulty; + diffLevels.Add(new CustomSongInfo.DifficultyLevel { difficulty = n["difficulty"], - difficultyRank = n["difficultyRank"].AsInt, + difficultyRank = difficultyRank, audioPath = n["audioPath"], jsonPath = n["jsonPath"] });