Decompiled source of SkipIntro v1.1.2

SkipIntro.dll

Decompiled 3 months ago
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using CG.GameLoopStateMachine;
using CG.GameLoopStateMachine.GameStates;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ToolClasses;
using VoidManager;
using VoidManager.MPModChecks;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyFileVersion("1.1.2.61803")]
[assembly: AssemblyInformationalVersion("1.1.2+f16b432625")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("HobosInSpace")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyDescription("Skips the intro cinematic")]
[assembly: AssemblyProduct("SkipIntro")]
[assembly: AssemblyTitle("SkipIntro")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/bls220/VoidCrew_SkipIntro")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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;
		}
	}
}
[GeneratedCode("Nerdbank.GitVersioning.Tasks", "3.6.141.978")]
[ExcludeFromCodeCoverage]
internal static class ThisAssembly
{
	internal const string AssemblyConfiguration = "Release";

	internal const string AssemblyFileVersion = "1.1.2.61803";

	internal const string AssemblyInformationalVersion = "1.1.2+f16b432625";

	internal const string AssemblyName = "SkipIntro";

	internal const string AssemblyTitle = "SkipIntro";

	internal const string AssemblyVersion = "1.1.0.0";

	internal static readonly DateTime GitCommitDate = new DateTime(638611710990000000L, DateTimeKind.Utc);

	internal const string GitCommitId = "f16b4326252118f28ebf4a9365ba2fbec71011bb";

	internal const bool IsPrerelease = false;

	internal const bool IsPublicRelease = true;

	internal const string PluginAuthors = "SubHobo";

	internal const string PluginDescription = "Skips the intro cinematic";

	internal const string PluginGUID = "SkipIntro";

	internal const string PluginTitle = "SkipIntro";

	internal const string RootNamespace = "SkipIntro";
}
namespace SkipIntro
{
	[HarmonyPatch(typeof(IntroScreenKeyInputListener))]
	internal static class IntroScreenKeyInputListenerPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("Update")]
		private static void Awake_Postfix()
		{
			IState currentState = ((AbstractStateMachine<GameStateMachine>)(object)Singleton<GameStateMachine>.Instance).CurrentState;
			IState obj = ((currentState is GSIntro) ? currentState : null);
			if (obj != null)
			{
				((GSIntro)obj).EndIntro();
			}
		}
	}
	[HarmonyPatch(typeof(MainMenuTimelineController))]
	internal static class MainMenuTimelineControllerPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch("Update")]
		private static void Update_Prefix(ref bool ____skipIntro)
		{
			____skipIntro = true;
		}
	}
	[BepInPlugin("SkipIntro", "SkipIntro", "1.1.2.61803")]
	[BepInProcess("Void Crew.exe")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private static readonly Harmony _harmony = new Harmony("SkipIntro");

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogDebug((object)"Plugin SkipIntro is loading!");
			_harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin SkipIntro is loaded!");
		}
	}
	public class VoidManagerPlugin : VoidPlugin
	{
		public override MultiplayerType MPType => (MultiplayerType)8;

		public override string Author => "SubHobo";

		public override string Description => "Skips the intro cinematic";
	}
}