Decompiled source of Skip Logos v1.3.1

plugins/SkipLogos.dll

Decompiled 6 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("SkipLogos")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkipLogos")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8c0a3b85-185f-43ed-8ba6-bb81bfeb2285")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SkipLogos;

[BepInPlugin("com.outward.stian.skiplogos", "Skip Logos", "1.3")]
public class SkipLogos : BaseUnityPlugin
{
	[HarmonyPatch(typeof(StartupVideo), "Awake")]
	private class StartupVideo_Awake
	{
		[HarmonyPrefix]
		public static void Patch(StartupVideo __instance)
		{
			StartupVideo.HasPlayedOnce = true;
			fieldStartupVideoDone.SetValue(__instance, true);
		}
	}

	[HarmonyPatch(typeof(StartupVideo), "Start")]
	private class StartupVideo_Start
	{
		[HarmonyPrefix]
		public static void Patch(StartupVideo __instance)
		{
			StartupVideo.HasPlayedOnce = true;
			fieldStartupVideoDone.SetValue(__instance, true);
		}
	}

	private const string ID = "com.outward.stian.skiplogos";

	private const string NAME = "Skip Logos";

	private const string VERSION = "1.3";

	private static FieldInfo fieldStartupVideoDone;

	internal void Awake()
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		typeof(StartupVideo).GetField("m_done", AccessTools.all);
		new Harmony("com.outward.stian.skiplogos").PatchAll(Assembly.GetExecutingAssembly());
	}
}