Decompiled source of ShorterCooldown v1.0.0

ShorterCooldown.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using ShorterCooldown.Patches;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FasterEntering")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FasterEntering")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("608edf64-6bf2-413a-ba66-45e880e958b0")]
[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 ShorterCooldown
{
	[BepInPlugin("Cribbe.ShorterCooldown", "ShorterCooldown", "1.0.0")]
	public class EnterModBase : BaseUnityPlugin
	{
		private const string modGUID = "Cribbe.ShorterCooldown";

		private const string modName = "ShorterCooldown";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Cribbe.ShorterCooldown");

		private static EnterModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Cribbe.ShorterCooldown");
			mls.LogInfo((object)"ShorterCooldown has started!");
			harmony.PatchAll(typeof(EnterModBase));
			harmony.PatchAll(typeof(ShipTeleporterPatch));
		}
	}
}
namespace ShorterCooldown.Patches
{
	[HarmonyPatch(typeof(ShipTeleporter))]
	internal class ShipTeleporterPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPrefix]
		private static void teleporterCooldownPatch(ref float ___cooldownTime)
		{
			if (___cooldownTime >= 10f)
			{
				___cooldownTime = 10f;
			}
		}
	}
}