From 96c8429a16ad4f7990b50b3ae2dfdbea339100d3 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 28 Apr 2025 12:17:13 -0400 Subject: [PATCH] Shuffle playlist order (#612) ## Description: ## Please complete the following: - [x] I have added screenshots for all UI updates - [ ] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: fake.neo Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com> --- src/server/MapPlaylist.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/MapPlaylist.ts b/src/server/MapPlaylist.ts index 6a46c9ff2..09f3dbbf5 100644 --- a/src/server/MapPlaylist.ts +++ b/src/server/MapPlaylist.ts @@ -58,9 +58,9 @@ export class MapPlaylist { count--; } }); - while (!this.allNonConsecutive(mapsPlaylist)) { + do { random.shuffleArray(mapsPlaylist); - } + } while (!this.allNonConsecutive(mapsPlaylist)); } // Specifically controls how the playlists rotate.