diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index a5ad33a4..99654d18 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -429,7 +429,7 @@ class PlayState extends MusicBeatState private function generateSong(dataPath:String, ?songData:SwagSong):Void { if (songData == null) songData = SONG; - + Conductor.changeBPM(songData.bpm); curSong = songData.song; @@ -1011,15 +1011,10 @@ class PlayState extends MusicBeatState FlxG.switchState(new StoryMenuState()); - // if () - StoryMenuState.weekUnlocked[Std.int(Math.min(storyWeek + 1, StoryMenuState.weekUnlocked.length - 1))] = true; - if (SONG.validScore) { Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty); } - - FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked; FlxG.save.flush(); } else diff --git a/source/funkin/menus/StoryMenuState.hx b/source/funkin/menus/StoryMenuState.hx index 68945542..86af29ee 100644 --- a/source/funkin/menus/StoryMenuState.hx +++ b/source/funkin/menus/StoryMenuState.hx @@ -27,7 +27,7 @@ class StoryMenuState extends MusicBeatState { public override function create() { super.create(); - loadXML(); + loadXMLs(); persistentUpdate = persistentDraw = true; @@ -47,13 +47,27 @@ class StoryMenuState extends MusicBeatState { add(e); } - public function loadXML() { - + public function loadXMLs() { + loadXML(Paths.xml('weeks')); + } + + public function loadXML(xmlPath:String) { + // try { + + // } } } typedef WeekData = { - + var name:String; + var sprite:String; + var chars:Array; + var songs:Array; +} + +typedef WeekSong = { + var name:String; + var hide:Bool; } class MenuCharacter extends FlxSprite {