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 LethalCompanyInputUtils.Api;
using UnityEngine;
using UnityEngine.InputSystem;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DropAllYourItems")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DropAllYourItems")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4f9f75b3-730c-4734-815e-424ff1761a19")]
[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 DropAllYourItems;
[BepInPlugin("DropAllYourItems", "Drop All Your Items", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Base : BaseUnityPlugin
{
public const string modGUID = "DropAllYourItems";
public const string modName = "Drop All Your Items";
public const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("DropAllYourItems");
internal static InputBindings bindingInstance = new InputBindings();
private static Base Instance;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
Logger.CreateLogSource("DropAllYourItems").LogInfo((object)"Drop All Your Items has successfully deployed");
harmony.PatchAll();
}
}
public class InputBindings : LcInputActions
{
public static InputBindings Instance = new InputBindings();
[InputAction(/*Could not decode attribute arguments.*/)]
public InputAction Drop_Key { get; set; }
}
[HarmonyPatch(typeof(PlayerControllerB))]
internal class MainPatch
{
public static PlayerControllerB instance;
[HarmonyPatch("Awake")]
[HarmonyPrefix]
private static void Awake(PlayerControllerB __instance)
{
instance = __instance;
InputBindings.Instance.Drop_Key.performed += OnKeyPressed;
}
public static void OnKeyPressed(CallbackContext x)
{
Drop();
}
public static void Drop()
{
instance.DropAllHeldItems(true, false);
}
}