diff --git a/art/BuildGameBotplay.bat b/art/BuildGameBotplay.bat deleted file mode 100644 index f15d335..0000000 --- a/art/BuildGameBotplay.bat +++ /dev/null @@ -1,3 +0,0 @@ -cd .. -lime build windows -release -botplay -pause \ No newline at end of file diff --git a/art/TestGameBotplay.bat b/art/TestGameBotplay.bat deleted file mode 100644 index 32b84d8..0000000 --- a/art/TestGameBotplay.bat +++ /dev/null @@ -1,3 +0,0 @@ -cd .. -lime test windows -debug -botplay -pause \ No newline at end of file diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 9db8f87..9464476 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -63,6 +63,8 @@ class OptionsMenu extends MusicBeatState + "\n" + (FlxG.save.data.donoteclick ? LanguageManager.getTextString('option_hitsound_on') : LanguageManager.getTextString('option_hitsound_off')) + "\n" + + (FlxG.save.data.botplay ? "Botplay On" : "Botplay Off") + + "\n" + (FlxG.save.data.noteCamera ? LanguageManager.getTextString('option_noteCamera_on') : LanguageManager.getTextString('option_noteCamera_off')) + "\n" + LanguageManager.getTextString('option_change_langauge') diff --git a/source/PlayState.hx b/source/PlayState.hx index 3a02ddf..7d94d6e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2321,49 +2321,50 @@ class PlayState extends MusicBeatState var controlArray:Array = [leftP, downP, upP, rightP]; var releaseArray:Array = [leftR, downR, upR, rightR]; - #if botplay - var BOTPLAY_pressed_anything = false; - - notes.forEachAlive(function(daNote:Note) + if (FlxG.save.data.botplay) { - if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit && daNote.finishedGenerating) + var BOTPLAY_pressed_anything = false; + + notes.forEachAlive(function(daNote:Note) { - if (daNote.strumTime <= Conductor.songPosition) + if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit && daNote.finishedGenerating) { - BOTPLAY_pressed_anything = true; - if (!daNote.isSustainNote) + if (daNote.strumTime <= Conductor.songPosition) { - controlArray[daNote.noteData % 4] = true; + BOTPLAY_pressed_anything = true; + if (!daNote.isSustainNote) + { + controlArray[daNote.noteData % 4] = true; + switch (daNote.noteData % 4) + { + case 0: + leftP = true; + case 1: + downP = true; + case 2: + upP = true; + case 3: + rightP = true; + } + } switch (daNote.noteData % 4) { case 0: - leftP = true; + left = true; case 1: - downP = true; + down = true; case 2: - upP = true; + up = true; case 3: - rightP = true; + right = true; } } - switch (daNote.noteData % 4) - { - case 0: - left = true; - case 1: - down = true; - case 2: - up = true; - case 3: - right = true; - } } - } - }); - if (!BOTPLAY_pressed_anything) - for (e in releaseArray) - e = [true]; - #end + }); + if (!BOTPLAY_pressed_anything) + for (e in releaseArray) + e = true; + } if ((upP || rightP || downP || leftP) && !boyfriend.stunned && generatedMusic) { diff --git a/source/SaveDataHandler.hx b/source/SaveDataHandler.hx index e4cfdef..a5947da 100644 --- a/source/SaveDataHandler.hx +++ b/source/SaveDataHandler.hx @@ -17,6 +17,9 @@ class SaveDataHandler if (FlxG.save.data.downscroll == null) FlxG.save.data.downscroll = false; + if (FlxG.save.data.botplay == null) + FlxG.save.data.botplay = false; + if (FlxG.save.data.freeplayCuts == null) FlxG.save.data.freeplayCuts = false;