brought back the week locking

This commit is contained in:
Lucky56
2021-06-17 18:02:20 +02:00
parent 19134e6694
commit b6953ec111
6 changed files with 53 additions and 20 deletions

View File

@ -2576,16 +2576,19 @@ class PlayState extends MusicBeatState
}
#end
// if ()
StoryMenuState.weekUnlocked[Std.int(Math.min(storyWeek + 1, StoryMenuState.weekUnlocked.length - 1))] = true;
if (SONG.validScore)
{
NGio.unlockMedal(60961);
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
}
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
if(storyWeek < StoryMenuState.getWeeks().length - 1 && FlxG.save.data.weekUnlocked == storyWeek)
{
StoryMenuState.weekUnlocked.push(true);
trace('Week ' + storyWeek + ' beat (Week ' + (storyWeek + 1) + ' unlocked)');
}
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked.length - 1;
FlxG.save.flush();
}
else