diff --git a/source/funkin/editors/EditorPicker.hx b/source/funkin/editors/EditorPicker.hx index 772d51dc..f42dbf5a 100644 --- a/source/funkin/editors/EditorPicker.hx +++ b/source/funkin/editors/EditorPicker.hx @@ -98,8 +98,8 @@ class EditorPicker extends MusicBeatSubstate { selected = true; CoolUtil.playMenuSFX(CONFIRM); - FlxTransitionableState.skipNextTransIn = true; - FlxTransitionableState.skipNextTransOut = true; + MusicBeatState.skipTransIn = true; + MusicBeatState.skipTransOut = true; FlxG.sound.music.fadeOut(0.7, 0, function(n) { FlxG.sound.music.stop(); diff --git a/source/funkin/game/GameOverSubstate.hx b/source/funkin/game/GameOverSubstate.hx index 1a8428bc..3c26bcbf 100644 --- a/source/funkin/game/GameOverSubstate.hx +++ b/source/funkin/game/GameOverSubstate.hx @@ -119,7 +119,7 @@ class GameOverSubstate extends MusicBeatSubstate { FlxG.camera.fade(FlxColor.BLACK, fadeOutTime, false, function() { - FlxTransitionableState.skipNextTransOut = true; + MusicBeatState.skipTransOut = true; FlxG.switchState(new PlayState()); }); }); diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index c183654b..54e90819 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -640,7 +640,7 @@ class PlayState extends MusicBeatState if (smoothTransitionData != null && smoothTransitionData.stage == curStage) { FlxG.camera.scroll.set(smoothTransitionData.camX, smoothTransitionData.camY); FlxG.camera.zoom = smoothTransitionData.camZoom; - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; camFollow.setPosition(smoothTransitionData.camFollowX, smoothTransitionData.camFollowY); } else { FlxG.camera.focusOn(camFollow.getPosition()); @@ -742,19 +742,19 @@ class PlayState extends MusicBeatState callback(); })); } else if (Assets.exists(dialogue)) { - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; openSubState(new DialogueCutscene(dialogue, function() { callback(); })); } else if (Assets.exists(videoCutsceneAlt)) { - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; persistentUpdate = false; openSubState(new VideoCutscene(videoCutsceneAlt, function() { callback(); })); persistentDraw = false; } else if (Assets.exists(videoCutscene)) { - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; persistentUpdate = false; openSubState(new VideoCutscene(videoCutscene, function() { callback(); @@ -933,7 +933,7 @@ class PlayState extends MusicBeatState var event = scripts.event("onSubstateOpen", EventManager.get(StateEvent).recycle(SubState)); if (!postCreated) - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; if (event.cancelled) return; @@ -1296,8 +1296,8 @@ class PlayState extends MusicBeatState camFollowY: camFollow.y, camZoom: FlxG.camera.zoom }; - FlxTransitionableState.skipNextTransIn = true; - FlxTransitionableState.skipNextTransOut = true; + MusicBeatState.skipTransIn = true; + MusicBeatState.skipTransOut = true; } var __funcsToExec:ArrayVoid> = []; diff --git a/source/funkin/menus/BetaWarningState.hx b/source/funkin/menus/BetaWarningState.hx index 299030ba..8a1f1d7e 100644 --- a/source/funkin/menus/BetaWarningState.hx +++ b/source/funkin/menus/BetaWarningState.hx @@ -50,7 +50,7 @@ class BetaWarningState extends MusicBeatState { } private function goToTitle() { - FlxTransitionableState.skipNextTransIn = FlxTransitionableState.skipNextTransOut = true; + MusicBeatState.skipTransIn = MusicBeatState.skipTransOut = true; FlxG.switchState(new TitleState()); } } \ No newline at end of file diff --git a/source/funkin/menus/TitleState.hx b/source/funkin/menus/TitleState.hx index f29fb946..748f957f 100644 --- a/source/funkin/menus/TitleState.hx +++ b/source/funkin/menus/TitleState.hx @@ -46,7 +46,7 @@ class TitleState extends MusicBeatState { curWacky = FlxG.random.getObject(getIntroTextShit()); - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; super.create(); diff --git a/source/funkin/menus/credits/CreditsCodename.hx b/source/funkin/menus/credits/CreditsCodename.hx index f6f07be1..ade9cc16 100644 --- a/source/funkin/menus/credits/CreditsCodename.hx +++ b/source/funkin/menus/credits/CreditsCodename.hx @@ -128,7 +128,7 @@ class CreditsCodename extends OptionsScreen { } public override function exit() { - FlxTransitionableState.skipNextTransOut = true; + MusicBeatState.skipTransOut = true; FlxG.switchState(new CreditsMain()); } } \ No newline at end of file diff --git a/source/funkin/menus/credits/CreditsMain.hx b/source/funkin/menus/credits/CreditsMain.hx index fb8166d9..6c628b80 100644 --- a/source/funkin/menus/credits/CreditsMain.hx +++ b/source/funkin/menus/credits/CreditsMain.hx @@ -9,7 +9,7 @@ class CreditsMain extends OptionsScreen { options = [ // TODO: Custom Credits new TextOption("Codename Engine", "Select this to see all of the contributors of the engine!", function() { - FlxTransitionableState.skipNextTransIn = FlxTransitionableState.skipNextTransOut = true; + MusicBeatState.skipTransIn = MusicBeatState.skipTransOut = true; FlxG.switchState(new CreditsCodename()); }), new TextOption("Friday Night Funkin'", "Select this to open the itch.io page of the original game to donate!", function() { diff --git a/source/funkin/options/keybinds/KeybindsOptions.hx b/source/funkin/options/keybinds/KeybindsOptions.hx index a7e6284a..b0a0fc4c 100644 --- a/source/funkin/options/keybinds/KeybindsOptions.hx +++ b/source/funkin/options/keybinds/KeybindsOptions.hx @@ -197,7 +197,7 @@ class KeybindsOptions extends MusicBeatSubstate { changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0)); if (controls.BACK) { - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; if (isSubState) close(); else diff --git a/source/funkin/system/MusicBeatState.hx b/source/funkin/system/MusicBeatState.hx index b5af40b5..eb37e2ec 100644 --- a/source/funkin/system/MusicBeatState.hx +++ b/source/funkin/system/MusicBeatState.hx @@ -93,8 +93,8 @@ class MusicBeatState extends FlxState implements IBeatReceiver public var scriptName:String = null; - public var skipTransOut:Bool = true; - public var skipTransIn:Bool = true; + public static var skipTransOut:Bool = false; + public static var skipTransIn:Bool = false; inline function get_controls():Controls return PlayerSettings.solo.controls; @@ -153,7 +153,10 @@ class MusicBeatState extends FlxState implements IBeatReceiver super.createPost(); persistentUpdate = true; call("postCreate"); - openSubState(new MusicBeatTransition(null)); + if (!skipTransOut) + openSubState(new MusicBeatTransition(null)); + skipTransIn = false; + skipTransOut = false; } public function call(name:String, ?args:Array, ?defaultVal:Dynamic):Dynamic { // calls the function on the assigned script @@ -244,6 +247,8 @@ class MusicBeatState extends FlxState implements IBeatReceiver if (e.cancelled) return false; + if (skipTransOut) + return true; if (subState is MusicBeatTransition && cast(subState, MusicBeatTransition).newState != null) return true; openSubState(new MusicBeatTransition(nextState)); diff --git a/source/funkin/system/MusicBeatTransition.hx b/source/funkin/system/MusicBeatTransition.hx index 5286edb7..748e924f 100644 --- a/source/funkin/system/MusicBeatTransition.hx +++ b/source/funkin/system/MusicBeatTransition.hx @@ -61,7 +61,7 @@ class MusicBeatTransition extends MusicBeatSubstate { return; } - if (!parent.persistentUpdate && controls.ACCEPT) { + if (!parent.persistentUpdate && FlxG.keys.pressed.SHIFT) { // skip if (newState != null) { nextFrameSkip = true; diff --git a/source/funkin/system/updating/UpdateAvailableScreen.hx b/source/funkin/system/updating/UpdateAvailableScreen.hx index 8039cd71..d6a66c7a 100644 --- a/source/funkin/system/updating/UpdateAvailableScreen.hx +++ b/source/funkin/system/updating/UpdateAvailableScreen.hx @@ -31,7 +31,7 @@ class UpdateAvailableScreen extends MusicBeatState { public override function create() { super.create(); - FlxTransitionableState.skipNextTransIn = true; + MusicBeatState.skipTransIn = true; FlxG.mouse.visible = true; FlxG.camera.flash(0xFF000000, 0.25);