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 UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OneHandNeeded")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OneHandNeeded")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("bae26c84-1626-4982-b1ae-21a30ffed679")]
[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 OneHandNeeded;
[BepInPlugin("Swaggies.OneHandNeeded", "OneHandNeeded", "1.0.1")]
public class Plugin : BaseUnityPlugin
{
private const string _guid = "Swaggies.OneHandNeeded";
private const string _name = "OneHandNeeded";
private const string _ver = "1.0.1";
private readonly Harmony harmony = new Harmony("Swaggies.OneHandNeeded");
private static Plugin Instance;
private static ManualLogSource loggimino;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
loggimino = Logger.CreateLogSource("Swaggies.OneHandNeeded");
harmony.PatchAll(typeof(Plugin));
loggimino.LogInfo((object)"OneHandNeeded up and running.");
}
[HarmonyPatch(typeof(PlayerControllerB), "GrabObjectClientRpc")]
[HarmonyPrefix]
private static void PlayerPatch()
{
GrabbableObject[] array = Object.FindObjectsOfType<GrabbableObject>();
GrabbableObject[] array2 = array;
foreach (GrabbableObject val in array2)
{
val.itemProperties.twoHanded = false;
}
}
}