From fcfc7950a1669da4d77fd972bdd2077c074e0d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=8D=9A=7ENex?= <87421482+NexIsDumb@users.noreply.github.com> Date: Sun, 11 May 2025 02:26:11 +0200 Subject: [PATCH] making the endingSong bool actually work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit that variable has been there for 3 years btw😭 --- source/funkin/backend/assets/ModsFolderLibrary.hx | 5 +---- source/funkin/game/PlayState.hx | 1 + source/funkin/menus/StoryMenuState.hx | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/source/funkin/backend/assets/ModsFolderLibrary.hx b/source/funkin/backend/assets/ModsFolderLibrary.hx index ed608bda..0f71db77 100644 --- a/source/funkin/backend/assets/ModsFolderLibrary.hx +++ b/source/funkin/backend/assets/ModsFolderLibrary.hx @@ -26,10 +26,7 @@ class ModsFolderLibrary extends AssetLibrary implements IModsAssetLibrary { this.folderPath = folderPath; this.libName = libName; this.prefix = 'assets/$libName/'; - if(modName == null) - this.modName = libName; - else - this.modName = modName; + this.modName = modName == null ? libName : modName; super(); } diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index c81602c8..8c8f5f8a 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1515,6 +1515,7 @@ class PlayState extends MusicBeatState */ public function endSong():Void { + endingSong = true; scripts.call("onSongEnd"); canPause = false; inst.volume = 0; diff --git a/source/funkin/menus/StoryMenuState.hx b/source/funkin/menus/StoryMenuState.hx index 65428e07..915ddaec 100644 --- a/source/funkin/menus/StoryMenuState.hx +++ b/source/funkin/menus/StoryMenuState.hx @@ -272,8 +272,7 @@ class MenuCharacterSprite extends FlxSprite public var oldChar:WeekData.WeekCharacter = null; public function changeCharacter(data:WeekData.WeekCharacter) { - visible = (data != null && data.xml != null); - if (!visible) return; + if (!(visible = (data != null && data.xml != null))) return; if (oldChar != (oldChar = data)) { CoolUtil.loadAnimatedGraphic(this, data.spritePath); @@ -342,7 +341,7 @@ class StoryWeeklist { public function getWeeksFromSource(source:funkin.backend.assets.AssetsLibraryList.AssetSource, useTxt:Bool = true, loadCharactersData:Bool = true) { var path:String = Paths.txt('weeks/weeks'); var weeksFound:Array = useTxt && Paths.assetsTree.existsSpecific(path, "TEXT", source) ? CoolUtil.coolTextFile(path) : - [for(c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)]; + [for (c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)]; if (weeksFound.length > 0) { for (w in weeksFound) {