@@ -82,6 +82,7 @@ class FreeplayState extends MusicBeatState
8282 var multiSongs : Array <String > = [];
8383
8484 public static var curUnlocked : Map <String , String > = new Map <String , String >();
85+ public static var curMissing : Map <String , String > = new Map <String , String >();
8586 public static var trueUnlocked : Array <String > = [];
8687 public static var doChange : Bool = false ;
8788 public static var multisong : Bool = false ;
@@ -520,6 +521,9 @@ class FreeplayState extends MusicBeatState
520521 leChars .push (leWeek .songs [j ][1 ]);
521522 }
522523
524+ trace (" CurUnlocked: " + curUnlocked );
525+ trace (" CurMissing: " + curMissing );
526+
523527 WeekData .setDirectoryFromWeek (leWeek );
524528 for (song in leWeek .songs )
525529 {
@@ -556,9 +560,9 @@ class FreeplayState extends MusicBeatState
556560 if (APEntryState .inArchipelagoMode )
557561 {
558562 var songNameThing : String = song [0 ];
559- for (songName in curUnlocked .keys ())
563+ for (songName in ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .keys ())
560564 {
561- if ((songNameThing .trim ().toLowerCase ().replace (' -' , ' ' ) == songName .trim ().toLowerCase ().replace (' -' , ' ' )) && leWeek .folder == curUnlocked .get (songName ))
565+ if ((songNameThing .trim ().toLowerCase ().replace (' -' , ' ' ) == songName .trim ().toLowerCase ().replace (' -' , ' ' )) && leWeek .folder == ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .get (songName ))
562566 addSong (song [0 ], i , song [1 ], FlxColor .fromRGB (colors [0 ], colors [1 ], colors [2 ]));
563567 }
564568 }
@@ -568,7 +572,7 @@ class FreeplayState extends MusicBeatState
568572 }
569573 else
570574 {
571- if (Std .string (song [0 ]).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()))
575+ if (Std .string (song [0 ]).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()))
572576 {
573577 var colors : Array <Int > = song [2 ];
574578 if (colors == null || colors .length < 3 )
@@ -594,9 +598,9 @@ class FreeplayState extends MusicBeatState
594598 if (APEntryState .inArchipelagoMode )
595599 {
596600 var songNameThing : String = song [0 ];
597- for (songName in curUnlocked .keys ())
601+ for (songName in ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .keys ())
598602 {
599- if ((songNameThing .trim ().toLowerCase ().replace (' -' , ' ' ) == songName .trim ().toLowerCase ().replace (' -' , ' ' )) && leWeek .folder == curUnlocked .get (songName ))
603+ if ((songNameThing .trim ().toLowerCase ().replace (' -' , ' ' ) == songName .trim ().toLowerCase ().replace (' -' , ' ' )) && leWeek .folder == ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .get (songName ))
600604 addSong (song [0 ], i , song [1 ], FlxColor .fromRGB (colors [0 ], colors [1 ], colors [2 ]));
601605 }
602606 }
@@ -612,22 +616,22 @@ class FreeplayState extends MusicBeatState
612616 {
613617 if (refresh )
614618 {
615- for (songName in curUnlocked .keys ()) {
616- if (songName .trim ().toLowerCase ().replace (' -' , ' ' ) == ' small argument' .trim ().toLowerCase ().replace (' -' , ' ' ) && curUnlocked .get (songName ) == ' ' )
619+ for (songName in ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .keys ()) {
620+ if (songName .trim ().toLowerCase ().replace (' -' , ' ' ) == ' small argument' .trim ().toLowerCase ().replace (' -' , ' ' ) && ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .get (songName ) == ' ' )
617621 addSong (' Small Argument' , 0 , " gfchibi" , FlxColor .fromRGB (235 , 100 , 161 ));
618- if (songName .trim ().toLowerCase ().replace (' -' , ' ' ) == ' beat battle' .trim ().toLowerCase ().replace (' -' , ' ' ) && curUnlocked .get (songName ) == ' ' )
622+ if (songName .trim ().toLowerCase ().replace (' -' , ' ' ) == ' beat battle' .trim ().toLowerCase ().replace (' -' , ' ' ) && ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .get (songName ) == ' ' )
619623 addSong (' Beat Battle' , 0 , " gf" , FlxColor .fromRGB (165 , 0 , 77 ));
620- if (songName .trim ().toLowerCase ().replace (' -' , ' ' ) == ' beat battle 2' .trim ().toLowerCase ().replace (' -' , ' ' ) && curUnlocked .get (songName ) == ' ' )
624+ if (songName .trim ().toLowerCase ().replace (' -' , ' ' ) == ' beat battle 2' .trim ().toLowerCase ().replace (' -' , ' ' ) && ( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .get (songName ) == ' ' )
621625 addSong (' Beat Battle 2' , 0 , " gf" , FlxColor .fromRGB (165 , 0 , 77 ));
622626 }
623627 }
624628 else
625629 {
626- if (curUnlocked .exists (' Small Argument' .toLowerCase ()) && Std .string (' Small Argument' ).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()) && FlxG .save .data .gotIntoAnArgument && (CategoryState .loadWeekForce == " secrets" || CategoryState .loadWeekForce == " all" ))
630+ if (( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .exists (' Small Argument' .toLowerCase ()) && Std .string (' Small Argument' ).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()) && FlxG .save .data .gotIntoAnArgument && (CategoryState .loadWeekForce == " secrets" || CategoryState .loadWeekForce == " all" ))
627631 addSong (' Small Argument' , 0 , " gfchibi" , FlxColor .fromRGB (235 , 100 , 161 ));
628- if (curUnlocked .exists (' Beat Battle' .toLowerCase ()) && Std .string (' Beat Battle' ).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()) && FlxG .save .data .gotbeatbattle && (CategoryState .loadWeekForce == " secrets" || CategoryState .loadWeekForce == " all" ))
632+ if (( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .exists (' Beat Battle' .toLowerCase ()) && Std .string (' Beat Battle' ).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()) && FlxG .save .data .gotbeatbattle && (CategoryState .loadWeekForce == " secrets" || CategoryState .loadWeekForce == " all" ))
629633 addSong (' Beat Battle' , 0 , " gf" , FlxColor .fromRGB (165 , 0 , 77 ));
630- if (curUnlocked .exists (' Beat Battle 2' .toLowerCase ()) && Std .string (' Beat Battle 2' ).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()) && FlxG .save .data .gotbeatbattle2 && (CategoryState .loadWeekForce == " secrets" || CategoryState .loadWeekForce == " all" ))
634+ if (( CategoryState . loadWeekForce == " unplayed " ? curMissing : curUnlocked ) .exists (' Beat Battle 2' .toLowerCase ()) && Std .string (' Beat Battle 2' ).toLowerCase ().trim ().contains (searchBar .text .toLowerCase ().trim ()) && FlxG .save .data .gotbeatbattle2 && (CategoryState .loadWeekForce == " secrets" || CategoryState .loadWeekForce == " all" ))
631635 addSong (' Beat Battle 2' , 0 , " gf" , FlxColor .fromRGB (165 , 0 , 77 ));
632636 }
633637 }
0 commit comments