-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a Quick Restart and Quick exit to Select Song patch as well as a patch to load saves offline. and of course, credit to Lukino for that offline saving patch.
- Loading branch information
Showing
4 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using HarmonyLib; | ||
|
||
namespace TaikoModStuff | ||
{ | ||
[HarmonyPatch] | ||
public class OfflineSaveLoad | ||
{ | ||
[HarmonyPatch(typeof(GameTitleManager), "Start")] | ||
[HarmonyPostfix] | ||
private static void BootManager_Postfix(GameTitleManager __instance) | ||
{ | ||
TaikoSingletonMonoBehaviour<CommonObjects>.Instance.MyDataManager.PlayData.LoadData("x_game_save_default_container", "save_data_blob"); | ||
TaikoSingletonMonoBehaviour<CommonObjects>.Instance.MyDataManager.PlayData.LoadData("x_game_save_default_container", "system_data_blob"); | ||
TaikoSingletonMonoBehaviour<CommonObjects>.Instance.MySceneManager.ChangeScene("SongSelect", false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
using BepInEx; | ||
using HarmonyLib; | ||
|
||
namespace TaikoModStuff | ||
{ | ||
[HarmonyPatch] | ||
public class QuickQuitSong | ||
{ | ||
[HarmonyPatch(typeof(EnsoGameManager), "ProcExecPause")] | ||
[HarmonyPrefix] | ||
static void customProcExecPause() | ||
{ | ||
bool keyDown = Input.GetKeyDown(KeyCode.Escape); | ||
if (keyDown) | ||
{ | ||
TaikoSingletonMonoBehaviour<CommonObjects>.Instance.MySceneManager.ChangeRelayScene("SongSelect", true); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
using BepInEx; | ||
using HarmonyLib; | ||
|
||
namespace TaikoModStuff | ||
{ | ||
[HarmonyPatch] | ||
public class QuickRestart | ||
{ | ||
[HarmonyPatch(typeof(EnsoGameManager), "ProcExecPause")] | ||
[HarmonyPrefix] | ||
static void customProcExecPause() | ||
{ | ||
bool keyDown = Input.GetKeyDown(KeyCode.Backspace); | ||
if (keyDown) | ||
{ | ||
//TaikoSingletonMonoBehaviour<EnsoGameManager>.Instance.Invoke("RestartPlay", 1); | ||
TaikoSingletonMonoBehaviour<CommonObjects>.Instance.MySceneManager.ChangeRelayScene("Enso", true); | ||
} | ||
} | ||
} | ||
} |