@@ -112,8 +112,6 @@ class APGameState {
112112 public var ItemIndex : Int = - 1 ;
113113
114114 public function locationData (songName : String ): Array <Int > {
115- if (APInfo .unlockMethod != " Note Checks" )
116- return [];
117115 // trace("Starting locationData function with songName: " + songName);
118116 var matchingLocations : Array <Int > = [];
119117 var exactMatch : Int = - 1 ;
@@ -149,8 +147,6 @@ class APGameState {
149147 }
150148
151149 public function noteData (songName : String , modName : String , ? week : String ): Array <Int > {
152- if (APInfo .unlockMethod != " Song Completion" )
153- return [];
154150 // trace("Starting noteData function with songName: " + songName + " and modName: " + modName);
155151 var matchingNotes : Array <Int > = [];
156152 var reg = new EReg (" ^Note \\ d+: " + EReg .escape (songName + (modName != " " ? " (" + modName + " )" : " " )) + " $" , " " );
@@ -169,9 +165,9 @@ class APGameState {
169165
170166 // Fallback logic if no matches are found
171167 if (matchingNotes .length == 0 ) {
172- trace (" No matches found. Attempting fallback logic..." );
168+ // trace("No matches found. Attempting fallback logic...");
173169 for (song in WeekData .getCurrentWeek ().songs ) {
174- trace (" Checking song in current week: " + song [0 ]);
170+ // trace("Checking song in current week: " + song[0]);
175171 if ((cast song [0 ] : String ).toLowerCase ().trim () == songName .toLowerCase ().trim () ||
176172 (cast song [0 ] : String ).toLowerCase ().trim ().replace (" " , " -" ) == songName .toLowerCase ().trim ().replace (" " , " -" )) {
177173 var fallbackReg = new EReg (" ^Note \\ d+: " + EReg .escape (song [0 ] + (modName != " " ? " (" + modName + " )" : " " )) + " $" , " " );
@@ -189,22 +185,22 @@ class APGameState {
189185
190186 // Secondary fallback logic using JSON data
191187 if (matchingNotes .length == 0 ) {
192- trace (" No matches found in fallback logic. Attempting secondary fallback..." );
188+ // trace("No matches found in fallback logic. Attempting secondary fallback...");
193189 for (song in WeekData .getCurrentWeek ().songs ) {
194- trace (" Checking song in secondary fallback logic: " + song [0 ]);
190+ // trace("Checking song in secondary fallback logic: " + song[0]);
195191 var songPath = modName .trim () != " "
196192 ? " mods/" + modName + " /data/" + song [0 ] + " /" + song [0 ] + " -" + Difficulty .getString (PlayState .storyDifficulty ) + " .json"
197- : " assets/shared" + (song [0 ] + Difficulty .getFilePath ());
198- trace (" Constructed songPath: " + songPath );
193+ : " assets/shared/data/ " + (song [0 ] + Difficulty .getFilePath ());
194+ // trace("Constructed songPath: " + songPath);
199195
200196 var songJson : backend. Song . SwagSong = null ;
201197 var jsonStuff : Array <String > = modName .trim () != " "
202- ? Paths .crawlDirectoryOG (" mods/" + modName + " /data" , " .json" )
203- : Paths .crawlDirectoryOG (" assets/shared/data" , " .json" );
204- trace (" Retrieved JSON files: " + jsonStuff );
198+ ? Paths .crawlDirectory (" mods/" + modName + " /data" , " .json" )
199+ : Paths .crawlDirectory (" assets/shared/data" , " .json" );
200+ // trace("Retrieved JSON files: " + jsonStuff);
205201
206202 for (json in jsonStuff ) {
207- trace (" Checking JSON file: " + json );
203+ // trace("Checking JSON file: " + json);
208204 if (json .trim ().toLowerCase ().replace (" " , " -" ) == songPath .trim ().toLowerCase ().replace (" " , " -" )) {
209205 trace (" Match found for JSON file: " + json );
210206 songJson = backend. Song .parseJSON (File .getContent (json ));
@@ -555,6 +551,7 @@ class APGameState {
555551 itemName = item ;
556552 }
557553
554+ // var itemsWhitelist:
558555 var isSpecialItem = locationData (itemName ).concat (APEntryState .apGame .noteData (itemName , modName )).isEmpty ();
559556 if (isSpecialItem ) {
560557 specialItems .set (itemName , currentPackages [" Friday Night Funkin" ].item_name_to_id .get (item ));
0 commit comments