diff --git a/modinfo.json b/modinfo.json deleted file mode 100644 index 870ef0d..0000000 --- a/modinfo.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "HelloThere.VibeWorld", - "name": "Vibe World", - "version": "1.4.2", - "target_game_version": "v1.9.06", - "authors": "HelloThere", - "description": "Makes it so Rain World's music plays continuously, and adds configurable playlist functionality.", - "checksum_override_version": true -} \ No newline at end of file diff --git a/src/BaseMod.cs b/src/BaseMod.cs index 360d1f3..7b17b96 100644 --- a/src/BaseMod.cs +++ b/src/BaseMod.cs @@ -13,7 +13,7 @@ namespace VibeWorld { - [BepInPlugin("HelloThere.VibeWorld", "Vibe World", "1.4.2")] + [BepInPlugin("HelloThere.VibeWorld", "Vibe World", "1.5")] public class BaseMod : BaseUnityPlugin { public enum SongMode @@ -125,7 +125,7 @@ static void RawUpdatePatch(On.RainWorldGame.orig_RawUpdate orig, RainWorldGame i } //Playlist song selector code - if (musicPlayer != null && musicPlayer.song == null && instance.clock > 30) + if (musicPlayer != null && musicPlayer.song == null && instance.clock > 30 && instance.world.rainCycle.RainApproaching > 0.5f) { string[] thisRegionList; string newSong; @@ -198,7 +198,6 @@ static void GameCtorPatch(On.RainWorldGame.orig_ctor orig, RainWorldGame instanc continue; } string[] songList = File.ReadAllLines(file); - songList.OrderBy(c => Random.value); Debug.Log("VibeWorld: Adding: " + file + " songs to list..."); regionSongList.Add(file, songList); } @@ -208,7 +207,6 @@ static void GameCtorPatch(On.RainWorldGame.orig_ctor orig, RainWorldGame instanc Debug.Log("VibeWorld: General playlist not found! This may cause problems if you are using General Mode."); generalSongs = calmSongs; } - generalSongs.OrderBy(c => Random.value); filesChecked = true; } @@ -251,23 +249,9 @@ public static void AnalyzeRegionMusic(RainWorldGame game, SlugcatStats.Name slug } } } - //tbh i cant remember what this was supposed to accomplish, should clean it up - for (int i = 0; i < songList.Count; i++) - { - if (songList[i] == string.Empty) continue; - string[] checkArray = songList.ToArray(); - checkArray[i] = string.Empty; - for (int a = 0; a < checkArray.Length; a++) - { - if (songList[i] == checkArray[a]) - { - songList[a] = string.Empty; - } - } - } + //Clean up list, remove empty strings, remove duplicates songList.RemoveAll(x => x == string.Empty); - intelligentSongs = songList.ToArray(); - intelligentSongs.OrderBy(c => Random.value); + intelligentSongs = songList.Distinct().ToArray(); } } diff --git a/thumbnail.png b/thumbnail.png deleted file mode 100644 index 1153a27..0000000 Binary files a/thumbnail.png and /dev/null differ