Skip to content

Commit fcfc795

Browse files
committed
making the endingSong bool actually work
that variable has been there for 3 years btw😭
1 parent f59864d commit fcfc795

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

source/funkin/backend/assets/ModsFolderLibrary.hx

+1-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ class ModsFolderLibrary extends AssetLibrary implements IModsAssetLibrary {
2626
this.folderPath = folderPath;
2727
this.libName = libName;
2828
this.prefix = 'assets/$libName/';
29-
if(modName == null)
30-
this.modName = libName;
31-
else
32-
this.modName = modName;
29+
this.modName = modName == null ? libName : modName;
3330
super();
3431
}
3532

source/funkin/game/PlayState.hx

+1
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ class PlayState extends MusicBeatState
15151515
*/
15161516
public function endSong():Void
15171517
{
1518+
endingSong = true;
15181519
scripts.call("onSongEnd");
15191520
canPause = false;
15201521
inst.volume = 0;

source/funkin/menus/StoryMenuState.hx

+2-3
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ class MenuCharacterSprite extends FlxSprite
272272
public var oldChar:WeekData.WeekCharacter = null;
273273

274274
public function changeCharacter(data:WeekData.WeekCharacter) {
275-
visible = (data != null && data.xml != null);
276-
if (!visible) return;
275+
if (!(visible = (data != null && data.xml != null))) return;
277276

278277
if (oldChar != (oldChar = data)) {
279278
CoolUtil.loadAnimatedGraphic(this, data.spritePath);
@@ -342,7 +341,7 @@ class StoryWeeklist {
342341
public function getWeeksFromSource(source:funkin.backend.assets.AssetsLibraryList.AssetSource, useTxt:Bool = true, loadCharactersData:Bool = true) {
343342
var path:String = Paths.txt('weeks/weeks');
344343
var weeksFound:Array<String> = useTxt && Paths.assetsTree.existsSpecific(path, "TEXT", source) ? CoolUtil.coolTextFile(path) :
345-
[for(c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)];
344+
[for (c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)];
346345

347346
if (weeksFound.length > 0) {
348347
for (w in weeksFound) {

0 commit comments

Comments
 (0)