diff --git a/Project.xml b/Project.xml index bac7decf54..1ced6c4921 100644 --- a/Project.xml +++ b/Project.xml @@ -53,7 +53,7 @@ - + diff --git a/assets/preload/data/characterList.txt b/assets/preload/data/characterList.txt index 006d8394ef..d9cdeb909b 100644 --- a/assets/preload/data/characterList.txt +++ b/assets/preload/data/characterList.txt @@ -17,4 +17,4 @@ senpai-angry spirit tankman bf-holding-gf -picoSpeaker \ No newline at end of file +picoSpeaker diff --git a/include/mods/data/test/events.txt b/include/mods/data/test/events.txt index c0bf93783a..b43f80e414 100644 --- a/include/mods/data/test/events.txt +++ b/include/mods/data/test/events.txt @@ -1,3 +1 @@ -150:setSongSpeed:3.5 -170:gfCheer -200:lightningStrike +150:setSongSpeed:2.8 diff --git a/include/mods/songs.txt b/include/mods/songs.txt deleted file mode 100644 index 2eb28ca6b3..0000000000 --- a/include/mods/songs.txt +++ /dev/null @@ -1 +0,0 @@ -Test:bf diff --git a/source/Character.hx b/source/Character.hx index e42f5f2676..f69f42b85e 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -1,9 +1,14 @@ package; +import openfl.display.Graphics; +import openfl.display.GraphicsPath; +import sys.io.File; +import sys.FileSystem; import flixel.FlxG; import flixel.FlxSprite; import flixel.animation.FlxBaseAnimation; import flixel.graphics.frames.FlxAtlasFrames; +import openfl.display.Graphics; using StringTools; diff --git a/source/ChartingState.hx b/source/ChartingState.hx index a703049d28..c23589b546 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -86,6 +86,8 @@ class ChartingState extends MusicBeatState var leftIcon:HealthIcon; var rightIcon:HealthIcon; + var stepText:FlxText; + override function create() { hitSound = new FlxSound(); @@ -152,6 +154,11 @@ class ChartingState extends MusicBeatState bpmTxt.scrollFactor.set(); add(bpmTxt); + // current step text + stepText = new FlxText(1000, 150, 0, "", 16); + stepText.scrollFactor.set(); + add(stepText); + strumLine = new FlxSprite(0, 50).makeGraphic(Std.int(FlxG.width / 2), 4); add(strumLine); @@ -514,6 +521,9 @@ class ChartingState extends MusicBeatState } } + // set step text to current step + stepText.text = "Step: " + curStep; + curStep = recalculateSteps(); Conductor.songPosition = FlxG.sound.music.time; diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index c0e75515ec..39adec0dad 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -69,7 +69,8 @@ class FreeplayState extends MusicBeatState for (song in FileSystem.readDirectory("mods/data/")) { var tempArray = song.split(':'); - addSong(tempArray[0], 69420, "none"); //if the week is 69420, its a mod. + + addSong(tempArray[0], 69420, "MOD"); //if the week is 69420, its a mod. } // LOAD MUSIC @@ -104,22 +105,15 @@ class FreeplayState extends MusicBeatState songText.targetY = i; grpSongs.add(songText); - var icon:HealthIcon = new HealthIcon(songs[i].songCharacter); - icon.sprTracker = songText; - - var array = CoolUtil.coolTextFile(Paths.txt('healthcolors')); - - /*for (i in 0...array.length) { - var eugh = array[i].split(':'); + if (songs[i].songCharacter.toLowerCase() != "mod"){ + var icon:HealthIcon = new HealthIcon(songs[i].songCharacter); + icon.sprTracker = songText; - if (songs[i].songCharacter.toLowerCase().startsWith(eugh[0])) { - colors.push(Std.parseInt(eugh[1])); - } - }*/ + iconArray.push(icon); + add(icon); + } - // using a FlxGroup is too much fuss! - iconArray.push(icon); - add(icon); + var array = CoolUtil.coolTextFile(Paths.txt('healthcolors')); updateColor(); @@ -264,6 +258,7 @@ class FreeplayState extends MusicBeatState if (songs[curSelected].week == 69420){ PlayState.SONG = Song.loadFromModJson(poop, songs[curSelected].songName.toLowerCase()); + PlayState.isMod = true; } else{ @@ -276,7 +271,7 @@ class FreeplayState extends MusicBeatState FlxG.sound.play(Paths.sound('GF_1', 'shared')); trace('Just because you heard the sound, doesn\'t mean you\'ve found the secret!'); } - + PlayState.isStoryMode = false; PlayState.storyDifficulty = curDifficulty; @@ -363,7 +358,8 @@ class FreeplayState extends MusicBeatState iconArray[i].alpha = 0.6; } - iconArray[curSelected].alpha = 1; + if (iconArray[curSelected] != null) + iconArray[curSelected].alpha = 1; for (item in grpSongs.members) { @@ -385,8 +381,13 @@ class FreeplayState extends MusicBeatState if (!bruh.startsWith('#')) { var eugh = bruh.split(':'); - if (songs[curSelected].songCharacter.toLowerCase().startsWith(eugh[0])) { - tcolor = new FlxColor(Std.parseInt(eugh[1])); + if (songs[curSelected].songCharacter.toLowerCase() != "mod"){ + if (songs[curSelected].songCharacter.toLowerCase().startsWith(eugh[0])) { + tcolor = new FlxColor(Std.parseInt(eugh[1])); + } + } + else{ + tcolor = new FlxColor(FlxColor.LIME); } } } diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index bfbabcafc2..75f7b6b76f 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -69,11 +69,18 @@ class GameOverSubstate extends MusicBeatSubstate { FlxG.sound.music.stop(); - if (PlayState.isStoryMode) + if (PlayState.isStoryMode){ + PlayState.secretMode = false; // reset secret mode + PlayState.isMod = false; + FlxG.switchState(new StoryMenuState()); - else - PlayState.secretMode = false; //disable this shit + } + else{ + PlayState.secretMode = false; // reset secret mode + PlayState.isMod = false; + FlxG.switchState(new FreeplayState()); + } } if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 5c610a7a28..5da468a387 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -35,7 +35,7 @@ class MainMenuState extends MusicBeatState var camFollow:FlxObject; //VERSION - public static var nightly:String = "PRE-RELEASE | Modding Update"; + public static var nightly:String = ""; public static var gameVer:String = "2.15.0"; override function create() diff --git a/source/PlayState.hx b/source/PlayState.hx index e086cdbd00..5b7366f567 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -133,6 +133,8 @@ class PlayState extends MusicBeatState var shits:Int = 0; var scoreTxt:FlxText; + var songScrollSpeed:Float = SONG.speed; + public static var campaignScore:Int = 0; var defaultCamZoom:Float = 1.05; @@ -161,6 +163,8 @@ class PlayState extends MusicBeatState public static var isMod:Bool = false; var events = []; + var alreadyLoaded:Bool = false; + public static var secretMode:Bool = false; override public function create() @@ -188,7 +192,7 @@ class PlayState extends MusicBeatState SONG = Song.loadFromJson('tutorial'); if (FlxG.save.data.downScroll == null) - FlxG.save.data.downScroll = !FlxG.save.data.downScroll; + FlxG.save.data.downScroll = false; Conductor.mapBPMChanges(SONG); Conductor.changeBPM(SONG.bpm); @@ -665,6 +669,9 @@ class PlayState extends MusicBeatState var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y); + var daCamY:Int = 0; + var daCamX:Int = 0; + switch (SONG.player2) { case 'gf': @@ -816,6 +823,9 @@ class PlayState extends MusicBeatState else if (FileSystem.exists(Paths.file("data/" + SONG.song.toLowerCase() + "/events.txt"))) events = CoolUtil.coolTextFile(Paths.file('data/' + SONG.song.toLowerCase() + '/events.txt')); + if (songScrollSpeed != PlayState.SONG.speed) + songScrollSpeed = PlayState.SONG.speed; + // add(strumLine); camFollow = new FlxObject(0, 0, 1, 1); @@ -1595,7 +1605,6 @@ class PlayState extends MusicBeatState super.update(elapsed); - scoreTxt.text = 'Score: $songScore | Misses: $misses | S/G/B/S: $sicks/$goods/$bads/$shits | Combo: $combo | ${calculateRating()}'; if (FlxG.keys.justPressed.ENTER && startedCountdown && canPause) @@ -1892,9 +1901,9 @@ class PlayState extends MusicBeatState } if (!FlxG.save.data.downScroll) - daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); + daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(songScrollSpeed, 2))); else - daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); + daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(songScrollSpeed, 2))); // i am so fucking sorry for this if condition if (FlxG.save.data.downScroll == false ? daNote.isSustainNote @@ -2078,7 +2087,7 @@ class PlayState extends MusicBeatState } // WIP interpolation shit? Need to fix the pause issue - // daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed)); + // daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * songScrollSpeed)); //-strumLine.y - 16 @@ -2856,8 +2865,8 @@ class PlayState extends MusicBeatState if (Std.parseInt(tempStep[0]) == curStep){ switch(tempStep[1].toLowerCase()){ case 'setsongspeed': - PlayState.SONG.speed = Std.parseFloat(tempStep[2]); - trace("SET SPEED TO " + PlayState.SONG.speed); + songScrollSpeed = Std.parseFloat(tempStep[2]); + trace("SET SPEED TO " + songScrollSpeed); case 'gfcheer': gf.playAnim('cheer', true); trace("GF CHEER"); diff --git a/source/TitleState.hx b/source/TitleState.hx index 2720cc6834..8274efba82 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -278,6 +278,13 @@ class TitleState extends MusicBeatState #end } + #if debug + if (controls.CHEAT){ + FlxG.save.erase(); + FlxG.resetState(); + } + #end + if (pressedEnter && !transitioning && skippedIntro) { titleText.animation.play('press');