using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Threading;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("SkipSplashScreen")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Skip DVloper screen")]
[assembly: AssemblyTitle("SkipSplashScreen")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace SkipSplashScreen
{
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "SkipSplashScreen";
public const string PLUGIN_NAME = "Skip DVloper screen";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace Granny2SkipSplash
{
[BepInPlugin("mirovl.granny2.skipsplash", "Granny 2 Skip Splash", "1.0.0")]
public class Plugin : BasePlugin
{
internal static ManualLogSource Log;
public override void Load()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
Log = ((BasePlugin)this).Log;
Log.LogInfo((object)"Granny 2 Skip Splash loaded!");
ManualLogSource log = Log;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(15, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Unity version: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(Application.unityVersion);
}
log.LogInfo(val);
StartDelayedSkipThread();
}
private static void StartDelayedSkipThread()
{
Thread thread = new Thread((ThreadStart)delegate
{
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
try
{
Log.LogInfo((object)"Skip thread started. Waiting 1500ms...");
Thread.Sleep(1500);
Log.LogInfo((object)"Trying to load Menu scene index 1...");
SceneManager.LoadScene(1, (LoadSceneMode)0);
Log.LogInfo((object)"SceneManager.LoadScene(1) called.");
}
catch (Exception ex)
{
ManualLogSource log = Log;
bool flag = default(bool);
BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(20, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Skip thread failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Exception>(ex);
}
log.LogError(val);
}
});
thread.IsBackground = true;
thread.Start();
}
}
}