@@ -2,7 +2,6 @@ package archipelago;
22
33import yutautil .AprilFools ;
44import haxe .DynamicAccess ;
5- import states .FreeplayState ;
65import yutautil .MemoryHelper ;
76import flixel .FlxState ;
87import archipelago .Client ;
@@ -489,7 +488,7 @@ class APGameState
489488 return false ;
490489 }
491490 }
492- if (states. FreeplayState .isVictorySong (songName , modName ))
491+ if (FreeplayManager .isVictorySong (songName , modName ))
493492 {
494493 setGoal ();
495494 return true ;
@@ -623,23 +622,23 @@ class APGameState
623622 message = " Hint: " + receivingPlayerName + " will find " + itemName + " in " + findingPlayerName + " 's World at " + locationName ;
624623 }
625624
626- if (FreeplayState .hintTable .exists (locationName ))
625+ if (FreeplayManager .hintTable .exists (locationName ))
627626 {
628- FreeplayState .hintTable .set (locationName , FreeplayState .hintTable .get (locationName ) + " \n " + message );
627+ FreeplayManager .hintTable .set (locationName , FreeplayManager .hintTable .get (locationName ) + " \n " + message );
629628 }
630629 else
631630 {
632- FreeplayState .hintTable .set (locationName , message );
631+ FreeplayManager .hintTable .set (locationName , message );
633632 }
634633 }
635634 }
636635 }
637- for (hint in FreeplayState .hintTable .keys ())
636+ for (hint in FreeplayManager .hintTable .keys ())
638637 {
639- var message = FreeplayState .hintTable .get (hint );
638+ var message = FreeplayManager .hintTable .get (hint );
640639 trace (" Hint: " + hint + " - " + message );
641640 var hintSong = getSongAndMod (hint );
642- FreeplayState .curHinted .push ({song : hintSong .song , mod : hintSong .mod != null ? hintSong .mod : " " });
641+ FreeplayManager .curHinted .push ({song : hintSong .song , mod : hintSong .mod != null ? hintSong .mod : " " });
643642 trace (hintSong );
644643 }
645644 }
@@ -911,7 +910,7 @@ class APGameState
911910 var tickets = 0 ;
912911 var nonSongs : Map <String , Int > = [];
913912 var nonSongsNames : Array <String > = [];
914- states. FreeplayState .curMissing = [];
913+ FreeplayManager .curMissing = [];
915914
916915 for (songName in song )
917916 {
@@ -936,7 +935,7 @@ class APGameState
936935 data .mod = " " ;
937936 }
938937 var isUnlocked = false ;
939- for (unlocked in states. FreeplayState .curUnlocked )
938+ for (unlocked in FreeplayManager .curUnlocked )
940939 {
941940 if (unlocked .song == data .song && unlocked .mod == data .mod )
942941 {
@@ -951,12 +950,12 @@ class APGameState
951950 {
952951 if (! isSync )
953952 ArchPopup .startPopupSong (data .song , ' archColor' );
954- states. FreeplayState .curUnlocked .push ({song : data .song , mod : data .mod });
953+ FreeplayManager .curUnlocked .push ({song : data .song , mod : data .mod });
955954 }
956955 }
957956
958957 // Check special items and remove any matching items with no mod
959- states. FreeplayState . curUnlocked = states. FreeplayState .curUnlocked .filter (unlocked ->
958+ FreeplayManager . curUnlocked = FreeplayManager .curUnlocked .filter (unlocked ->
960959 ! (APItems .exists (unlocked .song ) && unlocked .mod .trim () == " " )
961960 );
962961 }
@@ -1050,8 +1049,7 @@ class APGameState
10501049 info ().casualSync = false ;
10511050 try
10521051 {
1053- if (states. FreeplayState .instance != null )
1054- states. FreeplayState .instance .reloadSongs (true );
1052+ FreeplayManager .reloadFreeplay (true );
10551053 }
10561054 catch (e : Dynamic )
10571055 {
@@ -1146,7 +1144,7 @@ class APGameState
11461144
11471145 function checkIfLocked (song : String , mod : String ): Bool
11481146 {
1149- return ! (states. FreeplayState .curUnlocked .contains (APEntryState .apGame .getSongAndMod (song + mod )));
1147+ return ! (FreeplayManager .curUnlocked .contains (APEntryState .apGame .getSongAndMod (song + mod )));
11501148 }
11511149
11521150 function validateMods ()
0 commit comments