From 38103cf74b4e268f2c0eee26e5a205a0ba9c6d56 Mon Sep 17 00:00:00 2001 From: SpunBlue <86245524+SpunBlue@users.noreply.github.com> Date: Sat, 6 Aug 2022 06:35:15 -0400 Subject: [PATCH] 4.0.0 pre=release time --- source/ChartingState.hx | 46 +++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 4f03b299f6..bfa0d96a22 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -295,12 +295,46 @@ class ChartingState extends MusicBeatState stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; - var dadCharacters:Array = CoolUtil.coolTextFile(Paths.txt('dadList')); - var bfCharacters:Array = CoolUtil.coolTextFile(Paths.txt('bfList')); - var gfCharacters:Array = CoolUtil.coolTextFile(Paths.txt('gfList')); + var dadCharacters:Array; + var bfCharacters:Array; + var gfCharacters:Array; - var stagelist:Array = CoolUtil.coolTextFile(Paths.txt('stageList')); - var noteskins:Array = CoolUtil.coolTextFile(Paths.txt('noteskinList')); + var stagelist:Array; + var noteskins:Array; + + if (SLModding.curLoaded != '' || SLModding.curLoaded != null){ + var tempChararcters = File.getContent(Paths.txt('dadList')) + File.getContent(Paths.txt('bfList')) + File.getContent(Paths.txt('gfList')); + + for (character in FileSystem.readDirectory("mods/" + SLModding.curLoaded + "/images/characters/")){ + tempChararcters += character + "\n"; + } + tempChararcters = tempChararcters.substring(0, tempChararcters.length - 1); + + var allCharacters:Array = tempChararcters.split('\n'); + + dadCharacters = allCharacters; + bfCharacters = allCharacters; + gfCharacters = allCharacters; + + var tempStageList = File.getContent(Paths.txt('stageList')); + + for (stage in FileSystem.readDirectory("mods/" + SLModding.curLoaded + "/images/stages/")){ + tempStageList += stage + "\n"; + } + tempStageList = tempStageList.substring(0, tempStageList.length - 1); + + stagelist = tempStageList.split('\n'); + + noteskins = CoolUtil.coolTextFile(Paths.txt('noteskinList')); + } + else{ + dadCharacters= CoolUtil.coolTextFile(Paths.txt('dadList')); + bfCharacters = CoolUtil.coolTextFile(Paths.txt('bfList')); + gfCharacters = CoolUtil.coolTextFile(Paths.txt('gfList')); + + stagelist = CoolUtil.coolTextFile(Paths.txt('stageList')); + noteskins = CoolUtil.coolTextFile(Paths.txt('noteskinList')); + } var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(bfCharacters, true), function(character:String) { @@ -473,7 +507,7 @@ class ChartingState extends MusicBeatState FlxG.sound.list.add(vocals); FlxG.sound.music.pause(); - vocals.pause();//a + vocals.pause(); FlxG.sound.music.onComplete = function() {