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 @@ -194,7 +194,9 @@ class APGameState {
194194 trace (" Constructed songPath: " + songPath );
195195
196196 var songJson : backend. Song . SwagSong = null ;
197- var jsonStuff : Array <String > = Paths .crawlDirectoryOG (" mods/" + modName + " /data" , " .json" );
197+ var jsonStuff : Array <String > = modName .trim () != " "
198+ ? Paths .crawlDirectoryOG (" mods/" + modName + " /data" , " .json" )
199+ : Paths .crawlDirectoryOG (" assets/shared/data" , " .json" );
198200 trace (" Retrieved JSON files: " + jsonStuff );
199201
200202 for (json in jsonStuff ) {
@@ -234,17 +236,16 @@ class APGameState {
234236 public function checkGoal (songName : String , modName : String ): Bool {
235237 var info = info ();
236238 var locations = locationData (songName + (modName != " " ? " (" + modName + " )" : " " )).concat (noteData (songName , modName ));
237- var isGoal : Bool = true ;
238239 for (location in locations ) {
239240 if (info .missingLocations .contains (location )) {
240- isGoal = false ;
241- break ;
241+ return false ;
242242 }
243243 }
244- if (isGoal ) {
244+ if (states. FreeplayState . isVictorySong ( songName , modName ) ) {
245245 setGoal ();
246+ return true ;
246247 }
247- return isGoal ;
248+ return false ;
248249 }
249250
250251 public function setGoal (): Void {
You can’t perform that action at this time.
0 commit comments