Decompiled source of Uninvertible Jetpack v0.0.2

uninvertible-jetpack.dll

Decompiled 10 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;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Uninvertible Jetpack")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Uninvertible Jetpack")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("71074648-83a4-43d4-b405-e664af578d66")]
[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 Uninvertible_Jetpack;

[HarmonyPatch(typeof(JetpackItem))]
internal class JetpackItemPatch
{
	[HarmonyPostfix]
	[HarmonyPatch("DiscardItem")]
	public static void DiscardItem(ref JetpackItem __instance)
	{
		((GrabbableObject)__instance).isBeingUsed = false;
	}

	[HarmonyPrefix]
	[HarmonyPatch("ItemActivate")]
	public static void ItemActivate(ref JetpackItem __instance, bool __0, bool __1)
	{
		((GrabbableObject)__instance).isBeingUsed = __1;
	}
}
[BepInPlugin("io.github.echoman-dev.uninvertible-jetpack", "Lethal Company Uninvertible Jetpacks", "0.0.2")]
[BepInProcess("Lethal Company.exe")]
public class Plugin : BaseUnityPlugin
{
	private const string modGUID = "io.github.echoman-dev.uninvertible-jetpack";

	private const string modName = "Lethal Company Uninvertible Jetpacks";

	private const string modVersion = "0.0.2";

	private readonly Harmony harmony = new Harmony("io.github.echoman-dev.uninvertible-jetpack");

	internal static ManualLogSource log;

	private void Awake()
	{
		log = ((BaseUnityPlugin)this).Logger;
		log.LogInfo((object)"Lethal Company Uninvertible Jetpacks v0.0.2 loaded.");
		harmony.PatchAll(Assembly.GetExecutingAssembly());
	}
}