Added automatically start game patch
This commit is contained in:
parent
066998aa39
commit
fafe244e21
31
TakoTako/Patches/AutomaticallyStartGamePatch.cs
Normal file
31
TakoTako/Patches/AutomaticallyStartGamePatch.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using HarmonyLib;
|
||||
using Il2CppMicrosoft.Xbox;
|
||||
|
||||
namespace TakoTako.Patches;
|
||||
|
||||
[HarmonyPatch]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class AutomaticallyStartGamePatch
|
||||
{
|
||||
/// <summary>
|
||||
/// Simply load the next scene, I don't think this scene does anything specific?
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(GameTitleManager), nameof(GameTitleManager.updateTitleMain))]
|
||||
[HarmonyPrefix]
|
||||
private static bool updateTitleMain_Prefix(GameTitleManager __instance)
|
||||
{
|
||||
if (GdkHelpers.Helpers.IsInvited() && GameTitleManager.m_loadState == GameTitleManager.LoadState.LoadCompleted)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
else
|
||||
{
|
||||
TaikoSingletonMonoBehaviour<CommonObjects>.Instance.MySoundManager.CommonSePlay("don", false);
|
||||
__instance.switchNextEULAState();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ namespace TakoTako
|
||||
#endif
|
||||
{
|
||||
public ConfigEntry<bool> ConfigSkipSplashScreen;
|
||||
public ConfigEntry<bool> ConfigAutomaticallyStartGame;
|
||||
public ConfigEntry<bool> ConfigDisableScreenChangeOnFocus;
|
||||
public ConfigEntry<bool> ConfigFixSignInScreen;
|
||||
public ConfigEntry<bool> ConfigEnableCustomSongs;
|
||||
@ -107,6 +108,11 @@ namespace TakoTako
|
||||
true,
|
||||
"When true this will skip the intro");
|
||||
|
||||
ConfigAutomaticallyStartGame = Config.Bind("General",
|
||||
"AutomaticallyStartGame",
|
||||
true,
|
||||
"When true this will continue on the main menu");
|
||||
|
||||
ConfigSkipDLCCheck = Config.Bind("General",
|
||||
"SkipDLCCheck",
|
||||
true,
|
||||
@ -135,6 +141,9 @@ namespace TakoTako
|
||||
|
||||
if (ConfigSkipSplashScreen.Value)
|
||||
_harmony.PatchAll(typeof(SkipSplashScreenPatch));
|
||||
|
||||
if (ConfigAutomaticallyStartGame.Value)
|
||||
_harmony.PatchAll(typeof(AutomaticallyStartGamePatch));
|
||||
|
||||
if (ConfigFixSignInScreen.Value)
|
||||
_harmony.PatchAll(typeof(SignInPatch));
|
||||
|
Loading…
Reference in New Issue
Block a user