Decompiled source of TwoHandedStorage v1.0.0

TwoHandedStorage.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("TwoHandedStorage")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("TwoHandedStorage")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("TwoHandedStorage")]
[assembly: AssemblyTitle("TwoHandedStorage")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace TwoHandedStorage
{
	[BepInPlugin("viviko.TwoHandedStorage", "TwoHandedStorage", "1.0.0")]
	public class TwoHandedStorage : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(PlayerControllerB))]
		internal class PlayerControllerBPatch
		{
			[HarmonyPostfix]
			[HarmonyPatch("SetHoverTipAndCurrentInteractTrigger")]
			private static void SetHoverTipAndCurrentInteractTriggerPatch(ref InteractTrigger ___hoveringOverTrigger)
			{
				if (Object.op_Implicit((Object)(object)___hoveringOverTrigger))
				{
					___hoveringOverTrigger.twoHandedItemAllowed = true;
				}
			}
		}

		private const string modGUID = "viviko.TwoHandedStorage";

		private const string modName = "TwoHandedStorage";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("viviko.TwoHandedStorage");

		private static TwoHandedStorage Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("viviko.TwoHandedStorage");
			harmony.PatchAll();
			mls.LogInfo((object)"Plugin TwoHandedStorage is loaded!");
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "TwoHandedStorage";

		public const string PLUGIN_NAME = "TwoHandedStorage";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}