songs from weeks that are locked are no longer shown in freeplay
This commit is contained in:
parent
354fa20a74
commit
daf05521bc
@ -44,7 +44,8 @@ class FreeplayState extends MusicBeatState
|
||||
for (i in 0...initSonglist.length)
|
||||
{
|
||||
var data:Array<String> = initSonglist[i].split(':');
|
||||
songs.push(new SongMetadata(data[0], Std.parseInt(data[2]), data[1]));
|
||||
if(Std.parseInt(data[2]) <= FlxG.save.data.weekUnlocked - 1)
|
||||
songs.push(new SongMetadata(data[0], Std.parseInt(data[2]), data[1]));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -413,7 +413,7 @@ class StoryMenuState extends MusicBeatState
|
||||
|
||||
public static function unlockNextWeek(week:Int):Void
|
||||
{
|
||||
// TODO: get the weekData from class (but making it static makes it weird)
|
||||
// TODO: get the weekData from class (but making it static makes it dissapear when beating the week)
|
||||
var weekData:Array<Dynamic> = [
|
||||
['Tutorial'],
|
||||
['Bopeebo', 'Fresh', 'Dad Battle'],
|
||||
@ -424,7 +424,7 @@ class StoryMenuState extends MusicBeatState
|
||||
['Senpai', 'Roses', 'Thorns']
|
||||
];
|
||||
|
||||
if(week < weekData.length - 1 && FlxG.save.data.weekUnlocked == week)
|
||||
if(week <= weekData.length - 1 && FlxG.save.data.weekUnlocked == week)
|
||||
{
|
||||
weekUnlocked.push(true);
|
||||
trace('Week ' + week + ' beat (Week ' + (week + 1) + ' unlocked)');
|
||||
|
Loading…
x
Reference in New Issue
Block a user