// Consolidated decompiled source — Azumatt-ClickToEquip v1.0.0 // Generated by Hexium's decompiled-source browser. Best-effort concatenation of every type in this // version's manifest — decompiler output isn't guaranteed to compile as-is. using System; using System.Runtime.CompilerServices; using BepInEx; using BepInEx.Logging; using HarmonyLib; using System.Linq; using UnityEngine; using UnityEngine.EventSystems; // ---- ClickToEquip.dll :: Microsoft.CodeAnalysis.EmbeddedAttribute ---- namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } // ---- ClickToEquip.dll :: ClickToEquip.ClickToEquipPlugin ---- namespace ClickToEquip { [BepInPlugin("Azumatt.ClickToEquip", "ClickToEquip", "1.0.0")] public class ClickToEquipPlugin : BaseUnityPlugin { internal const string ModName = "ClickToEquip"; internal const string ModVersion = "1.0.0"; internal const string Author = "Azumatt"; private const string ModGUID = "Azumatt.ClickToEquip"; private readonly Harmony _harmony = new Harmony("Azumatt.ClickToEquip"); public static readonly ManualLogSource ClickToEquipLogger = BepInEx.Logging.Logger.CreateLogSource("ClickToEquip"); private void Awake() { _harmony.PatchAll(); } } } // ---- ClickToEquip.dll :: ClickToEquip.UIInventoryRightClickOnBackpackSlotPatch ---- namespace ClickToEquip { [HarmonyPatch(typeof(UIInventory), "RightClickOnBackpackSlot")] internal static class UIInventoryRightClickOnBackpackSlotPatch { private static void Prefix(UIInventory __instance, PointerEventData eventData, Item itemInSlot) { if (!(Object)(object)itemInSlot) { return; } foreach (UIEquipmentSlot item in __instance._equipmentSlots.Where((UIEquipmentSlot x) => x.equipmentSlotType == itemInSlot.equipmentSlotType)) { ((UIItemSlot)item).TryDropItem(itemInSlot); __instance.Refresh(); } } } }