using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using HarmonyLib;
using TFBGames.Systems;
using UnityModManagerNet;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SkipIntroMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkipIntroMod")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("91ceeaf0-e7a1-4dfc-9c7c-f156161764dc")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SkipIntroMod;
internal static class Main
{
private static bool Load(ModEntry modEntry)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected O, but got Unknown
try
{
Harmony val = new Harmony(modEntry.Info.Id);
Assembly executingAssembly = Assembly.GetExecutingAssembly();
val.PatchAll(executingAssembly);
}
catch (Exception ex)
{
modEntry.Logger.Log("Failed to Patch Harmony !\n" + ex.ToString());
}
return true;
}
}
[HarmonyPatch(typeof(Startup), "Update")]
internal static class SkipIntro_Patch
{
private static bool Prefix(Startup __instance)
{
if (!GameSystems.ResourceManager.HasAssetsToEnterScene("MainMenu"))
{
return false;
}
GameState.LoadLevel("MainMenu");
return false;
}
}