diff --git a/Project.xml b/Project.xml index 24bf57393..d7c38fa32 100644 --- a/Project.xml +++ b/Project.xml @@ -96,7 +96,10 @@ + + + diff --git a/source/Alphabet.hx b/source/Alphabet.hx index 07f35313e..a5e1d9396 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -48,6 +48,7 @@ class Alphabet extends FlxSpriteGroup this.text = text; isBold = bold; + if (text != "") { if (typed) @@ -122,6 +123,7 @@ class Alphabet extends FlxSpriteGroup _finalText = text; doSplitWords(); + // trace(arrayShit); var loopNum:Int = 0; @@ -138,6 +140,7 @@ class Alphabet extends FlxSpriteGroup xPosResetted = true; xPos = 0; curRow += 1; + } if (splitWords[loopNum] == " ") @@ -155,6 +158,7 @@ class Alphabet extends FlxSpriteGroup if (AlphaCharacter.alphabet.indexOf(splitWords[loopNum].toLowerCase()) != -1 || isNumber || isSymbol) //if (AlphaCharacter.alphabet.contains(splitWords[loopNum].toLowerCase()) || isNumber || isSymbol) + { if (lastSprite != null && !xPosResetted) { diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 3ebeb10f9..070d55597 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -758,7 +758,7 @@ class ChartingState extends MusicBeatState function loadJson(song:String):Void { - PlayState.SONG = Song.loadFromJson(song); + PlayState.SONG = Song.loadFromJson(song.toLowerCase(), song.toLowerCase()); FlxG.resetState(); } diff --git a/source/PlayState.hx b/source/PlayState.hx index 43ba3d3c5..0163efc84 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -820,10 +820,12 @@ class PlayState extends MusicBeatState { trace('SONG DONE' + isStoryMode); + #if !switch NGio.postScore(songScore, SONG.song); #end + if (isStoryMode) { storyPlaylist.remove(storyPlaylist[0]); @@ -840,6 +842,7 @@ class PlayState extends MusicBeatState NGio.unlockMedal(60961); #end + FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked; FlxG.save.flush(); } diff --git a/source/Song.hx b/source/Song.hx index aa75d3951..8af708367 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -49,6 +49,7 @@ class Song public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong { + var rawJson = Assets.getText('assets/data/' + folder.toLowerCase() + '/' + jsonInput.toLowerCase() + '.json').trim(); while (!rawJson.endsWith("}")) diff --git a/source/TitleState.hx b/source/TitleState.hx index 3f8e0e6d9..172e8fed4 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -40,6 +40,9 @@ class TitleState extends MusicBeatState var curWacky:Array = []; + var wackyImage:FlxSprite; + + override public function create():Void { #if (!web) @@ -54,12 +57,16 @@ class TitleState extends MusicBeatState super.create(); + #if (!switch && !debug && NG_LOGIN) + var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); #end #if SKIP_TO_PLAYSTATE + FlxG.switchState(new StoryMenuState()); + #else startIntro(); #end @@ -197,9 +204,11 @@ class TitleState extends MusicBeatState if (pressedEnter && !transitioning && skippedIntro) { + #if !switch NGio.unlockMedal(60960); #end + titleText.animation.play('press'); FlxG.camera.flash(FlxColor.WHITE, 1);