From d36bd692d88a70dde867386f29497e012310fce6 Mon Sep 17 00:00:00 2001 From: "Rodney, An Imaginative Person" <59747809+RodneyAnImaginativePerson@users.noreply.github.com> Date: Fri, 31 May 2024 10:46:43 -0400 Subject: [PATCH] Why? (#289) it makes sense to, ya know- USE VARS FOR THE REASON THEY WERE MADE --- source/funkin/game/GameOverSubstate.hx | 2 +- source/funkin/menus/PauseSubState.hx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/funkin/game/GameOverSubstate.hx b/source/funkin/game/GameOverSubstate.hx index 4868b130..66b37968 100644 --- a/source/funkin/game/GameOverSubstate.hx +++ b/source/funkin/game/GameOverSubstate.hx @@ -108,7 +108,7 @@ class GameOverSubstate extends MusicBeatSubstate if (controls.BACK) { if (PlayState.chartingMode && Charter.undos.unsaved) - PlayState.instance.saveWarn(false); + game.saveWarn(false); else { PlayState.resetSongInfos(); if (Charter.instance != null) Charter.instance.__clearStatics(); diff --git a/source/funkin/menus/PauseSubState.hx b/source/funkin/menus/PauseSubState.hx index edc0cb61..2366990c 100644 --- a/source/funkin/menus/PauseSubState.hx +++ b/source/funkin/menus/PauseSubState.hx @@ -106,7 +106,7 @@ class PauseSubState extends MusicBeatSubstate pauseScript.call("postCreate"); - PlayState.instance.updateDiscordPresence(); + game.updateDiscordPresence(); } override function update(elapsed:Float) @@ -146,7 +146,7 @@ class PauseSubState extends MusicBeatSubstate close(); case "Restart Song": parentDisabler.reset(); - PlayState.instance.registerSmoothTransition(); + game.registerSmoothTransition(); FlxG.resetState(); case "Change Controls": persistentDraw = false; @@ -157,7 +157,7 @@ class PauseSubState extends MusicBeatSubstate FlxG.switchState(new funkin.editors.charter.Charter(PlayState.SONG.meta.name, PlayState.difficulty, false)); case "Exit to menu": if (PlayState.chartingMode && Charter.undos.unsaved) - PlayState.instance.saveWarn(false); + game.saveWarn(false); else { PlayState.resetSongInfos(); if (Charter.instance != null) Charter.instance.__clearStatics();