1
0
mirror of synced 2024-11-27 15:30:49 +01:00

Added automatically start game patch

This commit is contained in:
Fluto 2022-08-20 14:36:10 +10:00
parent 066998aa39
commit fafe244e21
2 changed files with 40 additions and 0 deletions

View 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;
}
}

View File

@ -22,6 +22,7 @@ namespace TakoTako
#endif #endif
{ {
public ConfigEntry<bool> ConfigSkipSplashScreen; public ConfigEntry<bool> ConfigSkipSplashScreen;
public ConfigEntry<bool> ConfigAutomaticallyStartGame;
public ConfigEntry<bool> ConfigDisableScreenChangeOnFocus; public ConfigEntry<bool> ConfigDisableScreenChangeOnFocus;
public ConfigEntry<bool> ConfigFixSignInScreen; public ConfigEntry<bool> ConfigFixSignInScreen;
public ConfigEntry<bool> ConfigEnableCustomSongs; public ConfigEntry<bool> ConfigEnableCustomSongs;
@ -107,6 +108,11 @@ namespace TakoTako
true, true,
"When true this will skip the intro"); "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", ConfigSkipDLCCheck = Config.Bind("General",
"SkipDLCCheck", "SkipDLCCheck",
true, true,
@ -136,6 +142,9 @@ namespace TakoTako
if (ConfigSkipSplashScreen.Value) if (ConfigSkipSplashScreen.Value)
_harmony.PatchAll(typeof(SkipSplashScreenPatch)); _harmony.PatchAll(typeof(SkipSplashScreenPatch));
if (ConfigAutomaticallyStartGame.Value)
_harmony.PatchAll(typeof(AutomaticallyStartGamePatch));
if (ConfigFixSignInScreen.Value) if (ConfigFixSignInScreen.Value)
_harmony.PatchAll(typeof(SignInPatch)); _harmony.PatchAll(typeof(SignInPatch));