Decompiled source of UnlimitedJumpStartCable v1.0.0

JumpStartUnlimitedCable.dll

Decompiled a day ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using PluginConfig.API;
using PluginConfig.API.Decorators;
using PluginConfig.API.Fields;
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("JumpStartUnlimitedCable")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JumpStartUnlimitedCable")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("96cf7d3b-7751-4a10-a90e-45f7a159f0bf")]
[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")]
[BepInPlugin("ultrakill.jumpstart.unlimitedcable", "Unlimited JumpStart Cable", "2.0.0")]
public class Plugin : BaseUnityPlugin
{
	public static BoolField InfiniteLength;

	public static BoolField IgnoreWalls;

	public static ManualLogSource Log;

	private void Awake()
	{
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Expected O, but got Unknown
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Expected O, but got Unknown
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Expected O, but got Unknown
		Log = ((BaseUnityPlugin)this).Logger;
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Unlimited JumpStart Cable loaded");
		PluginConfigurator val = PluginConfigurator.Create("Unlimited JumpStart Cable", "ultrakill.jumpstart.unlimitedcable");
		string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "icon.png");
		val.SetIconWithURL("file://" + text);
		new ConfigHeader(val.rootPanel, "JumpStart Cable Settings", 24);
		InfiniteLength = new BoolField(val.rootPanel, "Infinite Cable Length", "infinite_length", true);
		IgnoreWalls = new BoolField(val.rootPanel, "Ignore Walls", "ignore_walls", true);
		Harmony val2 = new Harmony("ultrakill.jumpstart.unlimitedcable");
		val2.PatchAll();
	}
}
[HarmonyPatch(typeof(Zapper), "Update")]
public static class ZapperUpdatePatch
{
	private static void Prefix(Zapper __instance)
	{
		if (!((Object)(object)__instance == (Object)null) && Plugin.InfiniteLength.value)
		{
			__instance.maxDistance = 999999f;
		}
	}
}
[HarmonyPatch(typeof(Zapper), "CheckLineOfSight")]
public static class CheckLineOfSightPatch
{
	private static bool Prefix(ref bool __result)
	{
		if (!Plugin.IgnoreWalls.value)
		{
			return true;
		}
		__result = true;
		return false;
	}
}