Decompiled source of Intro Skip v2.0.0

IntroSkip.dll

Decompiled 2 weeks ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ProjectM.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("CrimsonMods, iZastic")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Skips the intro when the game starts")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0+Branch.master.Sha.e2d6b12813c61a8620d7301e8264d4abd19c5f93.e2d6b12813c61a8620d7301e8264d4abd19c5f93")]
[assembly: AssemblyProduct("IntroSkip")]
[assembly: AssemblyTitle("IntroSkip")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.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 IntroSkip
{
	[BepInPlugin("IntroSkip", "IntroSkip", "2.0.0")]
	public class IntroSkipPlugin : BasePlugin
	{
		private static ManualLogSource Logger;

		private Harmony harmony;

		public override void Load()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			Logger = ((BasePlugin)this).Log;
			harmony = Harmony.CreateAndPatchAll(typeof(IntroSkipPlugin), (string)null);
			ManualLogSource log = ((BasePlugin)this).Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(18, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("IntroSkip");
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is loaded!");
			}
			log.LogInfo(val);
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(StartGameLoadMenuView), "Update")]
		private static void UpdatePrefix(StartGameLoadMenuView __instance)
		{
			if (__instance.VideoPlayer.isPlaying)
			{
				__instance.VideoPlayer.Stop();
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "IntroSkip";

		public const string PLUGIN_NAME = "IntroSkip";

		public const string PLUGIN_VERSION = "2.0.0";
	}
}