From 4ae869f17c28a0f70d5fadae37e4378841f5c3e2 Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:05:44 +0100 Subject: [PATCH] its me the great papyrus --- source/funkin/game/PlayState.hx | 7 +------ source/funkin/menus/StoryMenuState.hx | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 10 deletions(-) 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 {