Skip to content

Commit e02dae3

Browse files
committed
Update APFreeplayManager.hx
1 parent 0793e94 commit e02dae3

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

source/managers/APFreeplayManager.hx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,17 @@ class APFreeplayManager extends FreeplayManager {
366366
songsHidden = archipelago.APItem.unknownSongs;
367367

368368
// Check all current allowed songs and make sure there's no duplicates.
369-
if (curUnlocked != null)
370-
curUnlocked = curUnlocked.arrayRemoveDuplicates();
369+
if (curUnlocked != null) {
370+
var seen = new Map<String, Bool>();
371+
curUnlocked = curUnlocked.filter(function(songObj) {
372+
var key = songObj.song + "|" + songObj.mod;
373+
if (!seen.exists(key)) {
374+
seen.set(key, true);
375+
return true;
376+
}
377+
return false;
378+
});
379+
}
371380

372381
for (i in 0...WeekData.weeksList.length) {
373382
if(weekIsLocked(WeekData.weeksList[i]) && !APEntryState.inArchipelagoMode) continue;

0 commit comments

Comments
 (0)