Decompiled source of Lower Teleporter Cooldown v1.0.0

BepInEx/Plugins/LowerTeleporterCooldown.dll

Decompiled 7 months 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 LowerTeleporterCooldown.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("LowerTeleporterCooldown")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LowerTeleporterCooldown")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("2b634b7b-5c13-48b9-9410-1223845bf778")]
[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 LowerTeleporterCooldown
{
	[BepInPlugin("someonehere.LowerTeleporterCooldown", "More Scrap Items", "1.0.0.0")]
	public class LowerTeleporterCooldownBase : BaseUnityPlugin
	{
		private const string modGUID = "someonehere.LowerTeleporterCooldown";

		private const string modName = "More Scrap Items";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("someonehere.LowerTeleporterCooldown");

		private static LowerTeleporterCooldownBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("someonehere.LowerTeleporterCooldown");
			mls.LogInfo((object)"LowerTeleporterCooldown is working.");
			harmony.PatchAll(typeof(LowerTeleporterCooldownBase));
			harmony.PatchAll(typeof(ShipTeleporterPatch));
		}
	}
}
namespace LowerTeleporterCooldown.Patches
{
	[HarmonyPatch(typeof(ShipTeleporter))]
	internal class ShipTeleporterPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void teleporterPatch(ref float ___cooldownAmount, ref bool ___isInverseTeleporter)
		{
			___cooldownAmount = 10f;
			if (___isInverseTeleporter)
			{
				___cooldownAmount = 25f;
			}
		}
	}
}