File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,9 @@ class APGameState {
198198 trace (" Constructed songPath: " + songPath );
199199
200200 var songJson : backend. Song . SwagSong = null ;
201- var jsonStuff : Array <String > = Paths .crawlDirectoryOG (" mods/" + modName + " /data" , " .json" );
201+ var jsonStuff : Array <String > = modName .trim () != " "
202+ ? Paths .crawlDirectoryOG (" mods/" + modName + " /data" , " .json" )
203+ : Paths .crawlDirectoryOG (" assets/shared/data" , " .json" );
202204 trace (" Retrieved JSON files: " + jsonStuff );
203205
204206 for (json in jsonStuff ) {
@@ -238,17 +240,16 @@ class APGameState {
238240 public function checkGoal (songName : String , modName : String ): Bool {
239241 var info = info ();
240242 var locations = locationData (songName + (modName != " " ? " (" + modName + " )" : " " )).concat (noteData (songName , modName ));
241- var isGoal : Bool = true ;
242243 for (location in locations ) {
243244 if (info .missingLocations .contains (location )) {
244- isGoal = false ;
245- break ;
245+ return false ;
246246 }
247247 }
248- if (isGoal ) {
248+ if (states. FreeplayState . isVictorySong ( songName , modName ) ) {
249249 setGoal ();
250+ return true ;
250251 }
251- return isGoal ;
252+ return false ;
252253 }
253254
254255 public function setGoal (): Void {
You can’t perform that action at this time.
0 commit comments