fix error (getWeeks() is from patch-4)
This commit is contained in:
parent
cccd2a4ddd
commit
6ebdcd4ff7
@ -2581,14 +2581,7 @@ class PlayState extends MusicBeatState
|
|||||||
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
|
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(storyWeek < StoryMenuState.getWeeks().length - 1 && FlxG.save.data.weekUnlocked == storyWeek)
|
StoryMenuState.unlockNextWeek(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
|
else
|
||||||
{
|
{
|
||||||
|
@ -410,4 +410,27 @@ class StoryMenuState extends MusicBeatState
|
|||||||
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function unlockNextWeek(week:Int):Void
|
||||||
|
{
|
||||||
|
// TODO: get the weekData from class (but making it static makes it weird)
|
||||||
|
var weekData:Array<Dynamic> = [
|
||||||
|
['Tutorial'],
|
||||||
|
['Bopeebo', 'Fresh', 'Dad Battle'],
|
||||||
|
['Spookeez', 'South', "Monster"],
|
||||||
|
['Pico', 'Philly Nice', "Blammed"],
|
||||||
|
['Satin Panties', "High", "Milf"],
|
||||||
|
['Cocoa', 'Eggnog', 'Winter Horrorland'],
|
||||||
|
['Senpai', 'Roses', 'Thorns']
|
||||||
|
];
|
||||||
|
|
||||||
|
if(week < weekData.length - 1 && FlxG.save.data.weekUnlocked == week)
|
||||||
|
{
|
||||||
|
weekUnlocked.push(true);
|
||||||
|
trace('Week ' + week + ' beat (Week ' + (week + 1) + ' unlocked)');
|
||||||
|
}
|
||||||
|
|
||||||
|
FlxG.save.data.weekUnlocked = weekUnlocked.length - 1;
|
||||||
|
FlxG.save.flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user