Decompiled source of TLTwoHand v1.0.0

TLTwoHand.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 GameNetcodeStuff;
using HarmonyLib;
using TLTwoHand.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("TLTwoHand")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TLTwoHand")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e646b46a-055a-41e7-a29f-7b4467cc8066")]
[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 TLTwoHand
{
	[BepInPlugin("TL.TLTwoHand", "TLTwoHand", "1.0.0.0")]
	public class TLModBase : BaseUnityPlugin
	{
		private const string modGUID = "TL.TLTwoHand";

		private const string modName = "TLTwoHand";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("TL.TLTwoHand");

		private static TLModBase instance;

		internal ManualLogSource nls;

		private void Awake()
		{
			if ((Object)(object)instance == (Object)null)
			{
				instance = this;
			}
			nls = Logger.CreateLogSource("TL.TLTwoHand");
			harmony.PatchAll(typeof(TLModBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace TLTwoHand.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void TwoItemPatch(ref bool ___twoHanded)
		{
			___twoHanded = false;
		}
	}
}