diff --git a/source/Alphabet.hx b/source/Alphabet.hx index 9824e2f35..07f35313e 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -77,7 +77,8 @@ class Alphabet extends FlxSpriteGroup lastWasSpace = true; } - if (AlphaCharacter.alphabet.contains(character.toLowerCase())) + if (AlphaCharacter.alphabet.indexOf(character.toLowerCase()) != -1) + //if (AlphaCharacter.alphabet.contains(character.toLowerCase())) { if (lastSprite != null) { @@ -144,9 +145,16 @@ class Alphabet extends FlxSpriteGroup lastWasSpace = true; } + #if (haxe >= "4.0.0") var isNumber:Bool = AlphaCharacter.numbers.contains(splitWords[loopNum]); var isSymbol:Bool = AlphaCharacter.symbols.contains(splitWords[loopNum]); - if (AlphaCharacter.alphabet.contains(splitWords[loopNum].toLowerCase()) || isNumber || isSymbol) + #else + var isNumber:Bool = AlphaCharacter.numbers.indexOf(splitWords[loopNum]) != -1; + var isSymbol:Bool = AlphaCharacter.symbols.indexOf(splitWords[loopNum]) != -1; + #end + + 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/PlayState.hx b/source/PlayState.hx index 9bc96a88d..43ba3d3c5 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -820,7 +820,9 @@ class PlayState extends MusicBeatState { trace('SONG DONE' + isStoryMode); + #if !switch NGio.postScore(songScore, SONG.song); + #end if (isStoryMode) { @@ -834,7 +836,9 @@ class PlayState extends MusicBeatState StoryMenuState.weekUnlocked[1] = true; + #if !switch NGio.unlockMedal(60961); + #end FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked; FlxG.save.flush(); diff --git a/source/PlayerSettings.hx b/source/PlayerSettings.hx index fa034581d..b275b9b51 100644 --- a/source/PlayerSettings.hx +++ b/source/PlayerSettings.hx @@ -14,12 +14,21 @@ class PlayerSettings static public var player1(default, null):PlayerSettings; static public var player2(default, null):PlayerSettings; + #if (haxe >= "4.0.0") static public final onAvatarAdd = new FlxTypedSignalVoid>(); static public final onAvatarRemove = new FlxTypedSignalVoid>(); + #else + static public var onAvatarAdd = new FlxTypedSignalVoid>(); + static public var onAvatarRemove = new FlxTypedSignalVoid>(); + #end public var id(default, null):Int; + #if (haxe >= "4.0.0") public final controls:Controls; + #else + public var controls:Controls; + #end // public var avatar:Player; // public var camera(get, never):PlayCamera; diff --git a/source/TitleState.hx b/source/TitleState.hx index 12faa41c1..3f8e0e6d9 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -54,7 +54,7 @@ class TitleState extends MusicBeatState super.create(); - #if (!debug && NG_LOGIN) + #if (!switch && !debug && NG_LOGIN) var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); #end @@ -197,7 +197,9 @@ class TitleState extends MusicBeatState if (pressedEnter && !transitioning && skippedIntro) { + #if !switch NGio.unlockMedal(60960); + #end titleText.animation.play('press'); FlxG.camera.flash(FlxColor.WHITE, 1);