diff --git a/TODO b/TODO index 10ef4d8d..60f6764f 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,8 @@ +[NEXT UPDATE] +- Main Menu Addons + [HIGH PRIORITY] - Localization Support -- Note Color Presets (WIP) - Backport stuff from FNF 0.3.X [LOW PRIORITY] diff --git a/source/meta/data/ClientPrefs.hx b/source/meta/data/ClientPrefs.hx index 0628a89f..6c504c3b 100644 --- a/source/meta/data/ClientPrefs.hx +++ b/source/meta/data/ClientPrefs.hx @@ -40,6 +40,7 @@ class ClientPrefs { public static var language:String = 'en'; public static var displayMilliseconds:Bool = true; public static var weekendScore:Bool = false; + public static var resultsScreen:Bool = true; public static var gameplaySettings:Map = [ 'scrollspeed' => 1.0, 'scrolltype' => 'multiplicative', @@ -150,6 +151,7 @@ class ClientPrefs { FlxG.save.data.language = language; FlxG.save.data.displayMilliseconds = displayMilliseconds; FlxG.save.data.weekendScore = weekendScore; + FlxG.save.data.resultsScreen = resultsScreen; FlxG.save.flush(); @@ -312,6 +314,8 @@ class ClientPrefs { displayMilliseconds = FlxG.save.data.displayMilliseconds; if(FlxG.save.data.weekendScore != null) weekendScore = FlxG.save.data.weekendScore; + if(FlxG.save.data.resultsScreen != null) + resultsScreen = FlxG.save.data.resultsScreen; var save:FlxSave = new FlxSave(); save.bind('controls_v2', 'ninjamuffin99'); diff --git a/source/meta/data/options/OptionsSubState.hx b/source/meta/data/options/OptionsSubState.hx index c7f5912b..0643d8bd 100644 --- a/source/meta/data/options/OptionsSubState.hx +++ b/source/meta/data/options/OptionsSubState.hx @@ -725,6 +725,13 @@ class GameplaySubState extends BaseOptionsMenu false); addOption(option); + var option:Option = new Option('Results Screen', + 'If checked, displays your stats after finishing a song/week.', + 'resultsScreen', + 'bool', + true); + addOption(option); + var option:Option = new Option('Sick! Hit Window', 'Changes the amount of time you have\nfor hitting a "Sick!" in milliseconds.', 'sickWindow', diff --git a/source/meta/state/PlayState.hx b/source/meta/state/PlayState.hx index 06f2cb08..ab59f15a 100644 --- a/source/meta/state/PlayState.hx +++ b/source/meta/state/PlayState.hx @@ -4703,11 +4703,15 @@ class PlayState extends MusicBeatState cancelMusicFadeTween(); - new FlxTimer().start(0.5, function(tmr:FlxTimer) { - persistentUpdate = true; - openSubState(new ResultsSubState(campaignSicks, campaignGoods, campaignBads, campaignShits, campaignScore, campaignMisses, - Highscore.floorDecimal(ratingPercent * 100, 2), ratingName, ratingFC)); - }); + if (ClientPrefs.resultsScreen) { + new FlxTimer().start(0.5, function(tmr:FlxTimer) { + persistentUpdate = true; + openSubState(new ResultsSubState(campaignSicks, campaignGoods, campaignBads, campaignShits, campaignScore, campaignMisses, + Highscore.floorDecimal(ratingPercent * 100, 2), ratingName, ratingFC)); + }); + } + else + MusicBeatState.switchState(new StoryMenuState()); if(!ClientPrefs.getGameplaySetting('practice', false) && !ClientPrefs.getGameplaySetting('botplay', false)) { StoryMenuState.weekCompleted.set(WeekData.weeksList[storyWeek], true); @@ -4763,12 +4767,16 @@ class PlayState extends MusicBeatState Mods.loadTheFirstEnabledMod(); cancelMusicFadeTween(); - - new FlxTimer().start(0.5, function(tmr:FlxTimer) { - persistentUpdate = true; - openSubState(new ResultsSubState(sicks, goods, bads, shits, songScore, songMisses, - Highscore.floorDecimal(ratingPercent * 100, 2), ratingName, ratingFC)); - }); + + if (ClientPrefs.resultsScreen) { + new FlxTimer().start(0.5, function(tmr:FlxTimer) { + persistentUpdate = true; + openSubState(new ResultsSubState(sicks, goods, bads, shits, songScore, songMisses, + Highscore.floorDecimal(ratingPercent * 100, 2), ratingName, ratingFC)); + }); + } + else + MusicBeatState.switchState(new FreeplayState()); changedDifficulty = false; } @@ -5860,11 +5868,13 @@ class PlayState extends MusicBeatState } override function destroy() { + #if LUA_ALLOWED for (lua in luaArray) { lua.call('onDestroy', []); lua.stop(); } luaArray = []; + #end #if HSCRIPT_ALLOWED for (i in hscriptMap.keys()) {