Decompiled source of Hard As Rocks v1.0.5

BetterRunning.dll

Decompiled a year 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 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("BetterRunning")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BetterRunning")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("B8BADF26-96F5-4A0D-BEC9-F35F650D1B3A")]
[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 BetterRunning;

[BepInPlugin("me.delusional.betterRunning", "BetterRunning", "1.0.0.0")]
public class MainClass : BaseUnityPlugin
{
	private class StaminaPatch
	{
		[HarmonyPatch(typeof(PlayerStatus), "Stamina")]
		[HarmonyPrefix]
		private static bool PrefixStamina(ref float ___staminaDrainRate, ref float ___staminaRegenRate, ref float ___jumpDrain)
		{
			___staminaDrainRate = 6f;
			___staminaRegenRate = 7.5f;
			___jumpDrain = 5f;
			return true;
		}
	}

	public static MainClass instance;

	public ManualLogSource log;

	public Harmony harmony;

	private void Awake()
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Expected O, but got Unknown
		if ((Object)(object)instance == (Object)null)
		{
			instance = this;
		}
		else
		{
			Object.Destroy((Object)(object)this);
		}
		log = ((BaseUnityPlugin)this).Logger;
		harmony = new Harmony("me.delusional.betterRunning");
		harmony.PatchAll(typeof(StaminaPatch));
		log.LogInfo((object)"Better Running loaded");
	}

	private void OnDestroy()
	{
		harmony.UnpatchSelf();
	}
}

FasterDays.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MuckMod.FasterDayCycle")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MuckMod.FasterDayCycle")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5f96b002-a362-42a2-8f86-02ded696c64e")]
[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 MuckMod.FasterDayCycle;

public class FasterDayCyclePatch
{
	private static float _dayMultiplier;

	private static PropertyInfo _totalTimeProp;

	[HarmonyPatch(typeof(GameLoop), "NewDay")]
	[HarmonyPostfix]
	private static void NewDayPostfix(ref GameLoop __instance)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		_dayMultiplier += (float)GameManager.gameSettings.difficulty / 10f;
		if (__instance.currentDay == 0)
		{
			_dayMultiplier = 0f;
		}
		Debug.Log((object)$"Day speed multiplier set to {_dayMultiplier}");
	}

	[HarmonyPatch(typeof(DayCycle), "Update")]
	[HarmonyPrefix]
	private static void DayCycleUpdatePrefix(ref DayCycle __instance)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Invalid comparison between Unknown and I4
		if ((int)GameManager.state == 1 && DayCycle.time <= 0.5f)
		{
			float num = 1f * __instance.timeSpeed / DayCycle.dayDuration * Time.deltaTime;
			num *= _dayMultiplier;
			DayCycle.time += num;
			DayCycle.time %= 1f;
			if (_totalTimeProp == null)
			{
				_totalTimeProp = typeof(DayCycle).GetProperty("totalTime");
			}
			_totalTimeProp.SetValue(__instance, (float)_totalTimeProp.GetValue(__instance) + num);
		}
	}
}
[BepInPlugin("dnmal.fasterDayCycle", "FasterDayCycle", "1.1.0")]
public class Main : BaseUnityPlugin
{
	public const string Id = "dnmal.fasterDayCycle";

	public static Main instance;

	public Harmony harmony;

	private void Awake()
	{
		if ((Object)(object)instance == (Object)null)
		{
			instance = this;
		}
		else
		{
			Object.Destroy((Object)(object)this);
		}
		Harmony.CreateAndPatchAll(typeof(FasterDayCyclePatch), (string)null);
	}

	private void OnDestroy()
	{
		harmony.UnpatchSelf();
	}
}

DoubledChestsCost.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DoubleChestsCosts")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DoubleChestsCosts")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("52b7f4b5-e002-450b-8c2a-85fd506cc9f7")]
[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 DoubledChestsCost;

[BepInPlugin("absolomb.DoubledChestsCost", "Doubled Chests Cost", "1.0.0")]
public class DoubledChestsCost : BaseUnityPlugin
{
	public const string pluginGuid = "absolomb.DoubledChestsCost";

	public const string pluginName = "Doubled Chests Cost";

	public const string pluginVersion = "1.0.0";

	public void Awake()
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Expected O, but got Unknown
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading Doubled Chests Cost");
		Harmony val = new Harmony("absolomb.DoubledChestsCost");
		MethodInfo methodInfo = AccessTools.Method(typeof(GameManager), "ChestPriceMultiplier", (Type[])null, (Type[])null);
		MethodInfo methodInfo2 = AccessTools.Method(typeof(GameManagerPatch), "ChestPriceMultiplier_Patch", (Type[])null, (Type[])null);
		val.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
	}
}
public class GameManagerPatch
{
	[HarmonyPatch(typeof(GameManager), "ChestPriceMultiplier")]
	private static float ChestPriceMultiplier_Patch(float price)
	{
		return 2f * price;
	}
}

SuperMuckApi.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using SuperMuckApi.Achievements;
using TMPro;
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("SuperMuckApi")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SuperMuckApi")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fb49945e-97eb-4c06-9cda-47837b300b35")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SuperMuckApi
{
	[BepInPlugin("Fano.SuperMuckApi", "SuperMuckApi", "1.0.0")]
	public class SuperMuckApi : BaseUnityPlugin
	{
		public void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			new Harmony("Fano.SuperMuckApi.Harmony").PatchAll();
		}
	}
}
namespace SuperMuckApi.Items
{
	public enum CraftingType
	{
		Handcrafting,
		WorkbenchNew,
		AnvilNew
	}
	public class ModdedCraftRequirement
	{
		public string name;

		public int amount;

		public ModdedCraftRequirement(string name, int amount)
		{
			this.name = name;
			this.amount = amount;
		}
	}
	public class ModdedItem : InventoryItem
	{
		public List<ModdedCraftRequirement> craftRequirement = new List<ModdedCraftRequirement>();

		public string StationCraft;

		public int tab = 0;

		public CraftingType craftingType;

		public void AddRequirement(params ModdedCraftRequirement[] requirements)
		{
			foreach (ModdedCraftRequirement item in requirements)
			{
				craftRequirement.Add(item);
			}
		}

		public ModdedItem()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			base.important = false;
			base.id = 0;
			base.name = "ModdedItem";
			base.description = "a Modded Item.";
			base.type = (ItemType)0;
			base.tier = 0;
			base.rotationOffset = new Vector3(0f, 0f, 0f);
			base.positionOffset = new Vector3(0f, 0f, 0f);
			base.scale = 1f;
			base.stackable = true;
			base.amount = 15;
			base.max = 69;
			base.resourceDamage = 1;
			base.attackDamage = 1;
			base.attackSpeed = 2f;
			base.attackRange = 0f;
			base.sharpness = 0f;
			base.craftable = true;
			base.unlockWithFirstRequirementOnly = false;
			base.requirements = (CraftRequirement[])(object)new CraftRequirement[0];
			base.craftAmount = 5;
			base.stationRequirement = (InventoryItem)(object)this;
			base.buildable = false;
			base.grid = false;
			base.buildRotation = new Vector3(0f, 0f, 0f);
			base.processable = false;
			base.processType = (ProcessType)0;
			base.processTime = 0f;
			base.heal = 0f;
			base.hunger = 0f;
			base.stamina = 0f;
			base.armor = 0;
			base.swingFx = false;
			base.tag = (ItemTag)0;
			base.rarity = (ItemRarity)0;
			base.attackTypes = (Weakness[])(object)new Weakness[0];
			craftingType = CraftingType.Handcrafting;
		}
	}
	[HarmonyPatch]
	public static class ModdedItemManager
	{
		public static readonly List<ModdedItem> ModdedItems = new List<ModdedItem>();

		public static InventoryItem RegisterItem(ModdedItem item)
		{
			ModdedItem moddedItem = ScriptableObject.CreateInstance<ModdedItem>();
			((InventoryItem)moddedItem).Copy((InventoryItem)(object)item, 1);
			moddedItem.craftRequirement = item.craftRequirement;
			moddedItem.craftingType = item.craftingType;
			moddedItem.tab = item.tab;
			((InventoryItem)moddedItem).id = ModdedItems.Count;
			ModdedItems.Add(moddedItem);
			return (InventoryItem)(object)moddedItem;
		}

		[HarmonyPatch(typeof(ItemManager), "InitAllItems")]
		[HarmonyPostfix]
		private static void InitAllItems()
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Expected O, but got Unknown
			foreach (ModdedItem moddedItem in ModdedItems)
			{
				((InventoryItem)moddedItem).id = ItemManager.Instance.allItems.Count;
				CraftRequirement[] array = (CraftRequirement[])(object)new CraftRequirement[moddedItem.craftRequirement.Count];
				int num = 0;
				foreach (ModdedCraftRequirement item in moddedItem.craftRequirement)
				{
					CraftRequirement val = new CraftRequirement
					{
						item = ItemManager.Instance.GetItemByName(item.name),
						amount = item.amount
					};
					array[num] = val;
					num++;
				}
				((InventoryItem)moddedItem).requirements = array;
				ItemManager.Instance.allItems.Add(((InventoryItem)moddedItem).id, (InventoryItem)(object)moddedItem);
			}
		}

		[HarmonyPatch(typeof(CraftingUI), "Awake")]
		[HarmonyPostfix]
		private static void CraftingPostfix(CraftingUI __instance)
		{
			foreach (ModdedItem moddedItem in ModdedItems)
			{
				if (!(moddedItem.craftingType.ToString() != ((Object)__instance).name) && ((InventoryItem)moddedItem).craftable)
				{
					InventoryItem[] items = __instance.tabs[moddedItem.tab].items;
					InventoryItem[] array = (InventoryItem[])(object)new InventoryItem[items.Length + 1];
					items.CopyTo(array, 0);
					array[items.Length] = ItemManager.Instance.allItems[((InventoryItem)moddedItem).id];
					__instance.tabs[moddedItem.tab].items = array;
				}
			}
		}

		[HarmonyPatch(typeof(InventoryUI), "AddItemToInventory")]
		[HarmonyPostfix]
		private static void AddItemToInventoryPostfix(InventoryItem item)
		{
			if ((Object)(object)item == (Object)null)
			{
				return;
			}
			foreach (ModdedItem moddedItem in ModdedItems)
			{
				if (!((InventoryItem)moddedItem).craftable)
				{
					continue;
				}
				foreach (ModdedCraftRequirement item2 in moddedItem.craftRequirement)
				{
					if (item2.name == item.name)
					{
						UiEvents.Instance.CheckProcessedItem(((InventoryItem)moddedItem).id);
					}
				}
			}
		}
	}
}
namespace SuperMuckApi.Commands
{
	[HarmonyPatch]
	public static class CommandManager
	{
		public delegate void Command(string[] Args);

		public static readonly List<string> CommandsList = new List<string>();

		private static Dictionary<string, Command> RegisteredCommands = new Dictionary<string, Command>();

		public static void RegisterCommand(string id, Command command)
		{
			RegisteredCommands.Add(id, command);
			CommandsList.Add(id);
		}

		[HarmonyPatch(typeof(ChatBox), "Awake")]
		[HarmonyPostfix]
		private static void Start(ChatBox __instance)
		{
			string[] commands = __instance.commands;
			foreach (string item in commands)
			{
				CommandsList.Add(item);
			}
		}

		[HarmonyPatch(typeof(PlayerMovement), "Jump")]
		[HarmonyPostfix]
		private static void Start(PlayerMovement __instance)
		{
			Console.WriteLine("JUMP");
			CustomAchievementManager.UnlockAchievement("Jump");
		}

		[HarmonyPatch(typeof(ChatBox), "ChatCommand")]
		[HarmonyPrefix]
		public static bool ChatCommand(string message)
		{
			Console.WriteLine(message);
			string text = message.Split(new char[1] { ' ' })[0].Substring(1);
			string[] args = message.Substring(1).Split(new char[1] { ' ' });
			foreach (string key in RegisteredCommands.Keys)
			{
				if (key == text)
				{
					RegisteredCommands[key](args);
				}
			}
			return true;
		}

		[HarmonyPatch(typeof(Commands), "PredictCommands")]
		[HarmonyPrefix]
		public static bool PreditCommands(Commands __instance, ref string ___suggestedText)
		{
			if (!ChatBox.Instance.typing)
			{
				if (((TMP_Text)__instance.suggestText).text != "")
				{
					___suggestedText = "";
					((TMP_Text)__instance.suggestText).text = "";
				}
				return false;
			}
			___suggestedText = "";
			string text = __instance.inputField.text;
			if (text.Length < 1)
			{
				return false;
			}
			string text2 = text.Split(new char[1] { ' ' }).Last();
			if (text2.Length < 1)
			{
				return false;
			}
			string text3 = text2[0].ToString() ?? "";
			string text4 = text2.Remove(0, 1);
			if (text3 == "/")
			{
				foreach (string commands in CommandsList)
				{
					if (commands.StartsWith(text4))
					{
						___suggestedText = text;
						int num = commands.Length - text4.Length;
						___suggestedText += commands.Substring(commands.Length - num);
						return false;
					}
				}
			}
			string[] array = text.Split();
			if (array.Length < 2)
			{
				return false;
			}
			int startIndex = text.IndexOf(" ", StringComparison.Ordinal) + 1;
			string text5 = text.Substring(startIndex);
			if (array[0] == "/kick")
			{
				foreach (Client value in Server.clients.Values)
				{
					if (value != null && value.player != null && value.player.username.ToLower().Contains(text5.ToLower()))
					{
						___suggestedText = array[0] + " ";
						___suggestedText += value.player.username;
						break;
					}
				}
			}
			return false;
		}
	}
}
namespace SuperMuckApi.Achievements
{
	public class Achievement
	{
		public string name = "Custom Achievement";

		public string description = "Custom Achievement Description.";

		public Sprite icon;

		public bool Unlocked = false;

		public Achievement(string name, string description, Sprite icon)
		{
			this.name = name;
			this.description = description;
			this.icon = icon;
		}
	}
	internal class AchievementAnimation : MonoBehaviour
	{
		private bool Retrocess = false;

		public void Awake()
		{
			Object.Destroy((Object)(object)((Component)this).gameObject, 3f);
		}

		public void Update()
		{
		}
	}
	public static class CustomAchievementManager
	{
		public static readonly Dictionary<string, Achievement> Achievements = new Dictionary<string, Achievement>();

		internal static void InitAchievementManager()
		{
			RegisterAchievement(new Achievement("Jump", "I can jump.", null));
			ResetAchievements();
		}

		public static void RegisterAchievement(Achievement achievement)
		{
			if (PlayerPrefs.HasKey(achievement.name))
			{
				achievement.Unlocked = ((PlayerPrefs.GetInt(achievement.name) != 0) ? true : false);
				Achievements.Add(achievement.name, achievement);
			}
			else
			{
				PlayerPrefs.SetInt(achievement.name, 0);
				Achievements.Add(achievement.name, achievement);
			}
		}

		public static bool UnlockAchievement(string name)
		{
			Console.WriteLine("A");
			if (!Achievements.ContainsKey(name) || (Object)(object)GameObject.Find("UI (1)") == (Object)null)
			{
				return false;
			}
			Console.WriteLine(Achievements[name].Unlocked);
			if (!Achievements[name].Unlocked)
			{
				Console.WriteLine("Unlocking");
				Achievements[name].Unlocked = true;
				PlayerPrefs.SetInt(name, 1);
				Console.WriteLine("Creating achievement alert");
				Console.WriteLine("Setting icon");
				if ((Object)(object)Achievements[name].icon != (Object)null)
				{
				}
				Console.WriteLine("Setting text");
				return true;
			}
			return false;
		}

		public static void ResetAchievements()
		{
			foreach (Achievement value in Achievements.Values)
			{
				value.Unlocked = false;
				PlayerPrefs.SetInt(value.name, 0);
			}
		}
	}
}

Better Item Pickup.dll

Decompiled a year ago
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Better_Item_Pickup")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Better_Item_Pickup")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a4a9bd62-94fd-4df0-a9a5-5c6eb06c9798")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Better_Item_Pickup
{
	[BepInPlugin("GoldenGuy1000.Better_Item_Pickup", "Better_Item_Pickup", "1.0.0.0")]
	public class Main : BaseUnityPlugin
	{
		public const string MODNAME = "Better_Item_Pickup";

		public const string AUTHOR = "GoldenGuy1000";

		public const string GUID = "GoldenGuy1000.Better_Item_Pickup";

		public const string VERSION = "1.0.0.0";

		internal readonly ManualLogSource log;

		internal readonly Harmony harmony;

		internal readonly Assembly assembly;

		public readonly string modFolder;

		public Main()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			log = ((BaseUnityPlugin)this).Logger;
			harmony = new Harmony("GoldenGuy1000.Better_Item_Pickup");
			assembly = Assembly.GetExecutingAssembly();
			modFolder = Path.GetDirectoryName(assembly.Location);
		}

		public void Start()
		{
			harmony.PatchAll(assembly);
		}
	}
}
namespace Better_Item_Pickup.Patches
{
	[HarmonyPatch(typeof(InventoryUI), "FillCellList")]
	public static class Patches
	{
		[HarmonyPrefix]
		public static bool hotbarFirst(InventoryUI __instance)
		{
			__instance.cells = new List<InventoryCell>();
			InventoryCell[] componentsInChildren = ((Component)__instance.hotkeysTransform).GetComponentsInChildren<InventoryCell>();
			foreach (InventoryCell item in componentsInChildren)
			{
				__instance.cells.Add(item);
			}
			componentsInChildren = ((Component)__instance.inventoryParent).GetComponentsInChildren<InventoryCell>();
			foreach (InventoryCell item2 in componentsInChildren)
			{
				__instance.cells.Add(item2);
			}
			return false;
		}
	}
}

DPSMeter.dll

Decompiled a year 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 HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DPSMeter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DPSMeter")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("0df5918f-f8b3-44b7-aeb2-4e5ea72e2b20")]
[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 DPSMeter;

internal class DPSMeter : MonoBehaviour
{
	public static DPSMeter instance;

	private const float highDamage = 1000f;

	private Gradient dpsColor;

	private float dps = 0f;

	private float combatTime = 0f;

	private float timeSinceCombat = 1000f;

	public TextMeshProUGUI text;

	public void AddDamage(int damage)
	{
		dps += damage;
		timeSinceCombat = 0f;
	}

	private void Awake()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Expected O, but got Unknown
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)instance))
		{
			Object.Destroy((Object)(object)this);
		}
		else
		{
			instance = this;
		}
		text = ((Component)this).gameObject.GetComponent<TextMeshProUGUI>();
		dpsColor = new Gradient();
		dpsColor.SetKeys((GradientColorKey[])(object)new GradientColorKey[4]
		{
			new GradientColorKey(Color.white, 0f),
			new GradientColorKey(Color.white, 0.3f),
			new GradientColorKey(Color.yellow, 0.7f),
			new GradientColorKey(Color.red, 1f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[2]
		{
			new GradientAlphaKey(1f, 0f),
			new GradientAlphaKey(1f, 1f)
		});
	}

	private void Update()
	{
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		timeSinceCombat += Time.deltaTime;
		if (timeSinceCombat > 10f)
		{
			combatTime = 0f;
			dps = 0f;
			((Behaviour)text).enabled = false;
		}
		else
		{
			combatTime += Time.deltaTime;
			((Behaviour)text).enabled = true;
			float num = dps / combatTime;
			((TMP_Text)text).text = "DPS: " + num.ToString("N0");
			((Graphic)text).color = dpsColor.Evaluate(num / 1000f);
		}
	}
}
[BepInPlugin("Isse.DPSMeter", "DPSMeter", "1.0.1.0")]
public class MainClass : BaseUnityPlugin
{
	public const string Name = "DPSMeter";

	public const string Author = "Isse";

	public const string Guid = "Isse.DPSMeter";

	public const string Version = "1.0.1.0";

	public static MainClass instance;

	public Harmony harmony;

	public ManualLogSource log;

	private void Awake()
	{
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Expected O, but got Unknown
		if (!Object.op_Implicit((Object)(object)instance))
		{
			instance = this;
		}
		else
		{
			Object.Destroy((Object)(object)this);
		}
		log = ((BaseUnityPlugin)this).Logger;
		harmony = new Harmony("Isse.DPSMeter");
		harmony.PatchAll();
	}
}
[HarmonyPatch(typeof(ClientSend))]
public class ClientSendPatch
{
	[HarmonyPatch("PlayerDamageMob")]
	[HarmonyPrefix]
	public static void Mob(ClientSend __instance, int damage)
	{
		if (Object.op_Implicit((Object)(object)DPSMeter.instance))
		{
			DPSMeter.instance.AddDamage(damage);
		}
	}

	[HarmonyPatch("PlayerHitObject")]
	[HarmonyPrefix]
	public static void Object(ClientSend __instance, int damage)
	{
		if (Object.op_Implicit((Object)(object)DPSMeter.instance))
		{
			DPSMeter.instance.AddDamage(damage);
		}
	}
}
[HarmonyPatch(typeof(StatusUI))]
public class StatusUIPatch
{
	[HarmonyPatch("Start")]
	[HarmonyPostfix]
	public static void Start(StatusUI __instance)
	{
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Object.Instantiate<GameObject>(((Component)__instance.hpText).gameObject, ((TMP_Text)__instance.hpText).transform.parent);
		((Object)val.gameObject).name = "DPSMeter";
		Transform transform = val.transform;
		transform.position += new Vector3(30f, 60f);
		val.AddComponent<DPSMeter>();
	}
}

ItemStatDisplay.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("ItemStatDisplay")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ItemStatDisplay")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("968239fc-af9c-4138-aa61-2e40984fc893")]
[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 ItemStatDisplay;

[BepInPlugin("Isse.ItemStatDisplay", "ItemStatDisplay", "1.1.0.0")]
public class MainClass : BaseUnityPlugin
{
	public const string Name = "ItemStatDisplay";

	public const string Author = "Isse";

	public const string Guid = "Isse.ItemStatDisplay";

	public const string Version = "1.1.0.0";

	public static MainClass instance;

	public Harmony harmony;

	public ManualLogSource log;

	public ConfigEntry<KeyCode> extraInfoKeybind;

	private void Awake()
	{
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Expected O, but got Unknown
		if (!Object.op_Implicit((Object)(object)instance))
		{
			instance = this;
		}
		else
		{
			Object.Destroy((Object)(object)this);
		}
		extraInfoKeybind = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keybinds", "ExtraInfoKey", (KeyCode)304, "Key to show even more extra info when hovering. (This is not implemented by the base mod)");
		log = ((BaseUnityPlugin)this).Logger;
		harmony = new Harmony("Isse.ItemStatDisplay");
		harmony.PatchAll(typeof(Helper));
		harmony.PatchAll(typeof(ExtraItemInfo));
		harmony.PatchAll(typeof(ExtraPowerupInfo));
	}

	private void Update()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		if (Input.GetKeyDown(extraInfoKeybind.Value))
		{
			ExtraPowerupInfo.showExtraInfo = true;
			if (Object.op_Implicit((Object)(object)ExtraPowerupInfo.current))
			{
				ExtraPowerupInfo.current.OnPointerEnter((PointerEventData)null);
			}
		}
		if (Input.GetKeyUp(extraInfoKeybind.Value))
		{
			ExtraPowerupInfo.showExtraInfo = false;
			if (Object.op_Implicit((Object)(object)ExtraPowerupInfo.current))
			{
				ExtraPowerupInfo.current.OnPointerEnter((PointerEventData)null);
			}
		}
	}

	private void RegisterPowerUp(Tuple<string, Func<int, bool, string>> def)
	{
		ExtraPowerupInfo.Add(def.Item1, def.Item2);
	}
}
public static class Helper
{
	public static float CD(int count, float scaleSpeed, float maxValue)
	{
		float num = 2.71828f;
		return (1f - Mathf.Pow(num, (0f - (float)count) * scaleSpeed)) * maxValue;
	}

	public static string Percent(float f)
	{
		return (f * 100f).ToString("N0") + "%";
	}
}
public static class ExtraItemInfo
{
	[HarmonyPatch(typeof(InventoryCell), "OnPointerEnter")]
	[HarmonyPostfix]
	private static void PostFix(InventoryCell __instance)
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Invalid comparison between Unknown and I4
		//IL_0268: Unknown result type (might be due to invalid IL or missing references)
		//IL_026e: Invalid comparison between Unknown and I4
		//IL_0384: Unknown result type (might be due to invalid IL or missing references)
		//IL_038a: Invalid comparison between Unknown and I4
		if (!Object.op_Implicit((Object)(object)__instance.currentItem))
		{
			return;
		}
		Vector2 dmgRange = Traverse.Create<PowerupCalculations>().Field<Vector2>("randomDamageRange").Value;
		if (Object.op_Implicit((Object)(object)__instance.currentItem.bowComponent) && (int)__instance.currentItem.type == 9)
		{
			if (__instance.currentItem.attackDamage != 1)
			{
				TextMeshProUGUI text = ItemInfo.Instance.text;
				((TMP_Text)text).text = ((TMP_Text)text).text + "\n x" + DmgRange(__instance.currentItem.attackDamage) + " damage to mobs";
			}
			TextMeshProUGUI text2 = ItemInfo.Instance.text;
			((TMP_Text)text2).text = ((TMP_Text)text2).text + "\n " + __instance.currentItem.attackSpeed + " attack speed";
			if (__instance.currentItem.bowComponent.nArrows > 1)
			{
				TextMeshProUGUI text3 = ItemInfo.Instance.text;
				((TMP_Text)text3).text = ((TMP_Text)text3).text + "\n fires " + __instance.currentItem.bowComponent.nArrows + " arrows";
			}
			TextMeshProUGUI text4 = ItemInfo.Instance.text;
			((TMP_Text)text4).text = ((TMP_Text)text4).text + "\n" + __instance.currentItem.bowComponent.projectileSpeed + " projectile speed";
		}
		else if (__instance.currentItem.attackDamage > 1)
		{
			TextMeshProUGUI text5 = ItemInfo.Instance.text;
			((TMP_Text)text5).text = ((TMP_Text)text5).text + "\n " + DmgRange(__instance.currentItem.attackDamage) + " damage to mobs";
			TextMeshProUGUI text6 = ItemInfo.Instance.text;
			((TMP_Text)text6).text = ((TMP_Text)text6).text + "\n " + __instance.currentItem.attackSpeed + " attack speed";
		}
		if (__instance.currentItem.attackRange > 1f)
		{
			TextMeshProUGUI text7 = ItemInfo.Instance.text;
			((TMP_Text)text7).text = ((TMP_Text)text7).text + "\n +" + __instance.currentItem.attackRange + " range";
		}
		if (__instance.currentItem.resourceDamage > 1)
		{
			TextMeshProUGUI text8 = ItemInfo.Instance.text;
			((TMP_Text)text8).text = ((TMP_Text)text8).text + "\n " + DmgRange(__instance.currentItem.resourceDamage) + " damage to " + (((int)__instance.currentItem.type == 2) ? "rocks" : "trees");
		}
		if (Object.op_Implicit((Object)(object)__instance.currentItem.fuel))
		{
			TextMeshProUGUI text8 = ItemInfo.Instance.text;
			((TMP_Text)text8).text = ((TMP_Text)text8).text + "\ncan smelt " + __instance.currentItem.fuel.maxUses + " item" + ((__instance.currentItem.fuel.maxUses > 1) ? "s" : "");
		}
		if (__instance.currentItem.processable)
		{
			TextMeshProUGUI text8 = ItemInfo.Instance.text;
			((TMP_Text)text8).text = ((TMP_Text)text8).text + "\nSmelts in " + __instance.currentItem.processTime + " second" + ((__instance.currentItem.processTime != 1f) ? "s" : "");
		}
		if ((int)__instance.currentItem.tag == 2)
		{
			if (__instance.currentItem.heal > 0f)
			{
				TextMeshProUGUI text9 = ItemInfo.Instance.text;
				((TMP_Text)text9).text = ((TMP_Text)text9).text + "\n +" + __instance.currentItem.heal + " health";
			}
			if (__instance.currentItem.stamina > 0f)
			{
				TextMeshProUGUI text10 = ItemInfo.Instance.text;
				((TMP_Text)text10).text = ((TMP_Text)text10).text + "\n +" + __instance.currentItem.stamina + " stamina";
			}
			if (__instance.currentItem.hunger > 0f)
			{
				TextMeshProUGUI text11 = ItemInfo.Instance.text;
				((TMP_Text)text11).text = ((TMP_Text)text11).text + "\n +" + __instance.currentItem.hunger + " hunger";
			}
		}
		string DmgRange(float dmg)
		{
			return dmg * dmgRange.x + "-" + dmg * dmgRange.y;
		}
	}
}
public static class ExtraPowerupInfo
{
	private static Dictionary<string, Func<int, bool, string>> infoFunctions;

	public static PowerupInfo current;

	public static bool showExtraInfo;

	static ExtraPowerupInfo()
	{
		infoFunctions = new Dictionary<string, Func<int, bool, string>>();
		AddDefault();
	}

	private static void AddDefault()
	{
		Add("Dumbbell", (int count, bool _) => "+" + Helper.Percent((float)count * 0.1f) + " strength");
		Add("Berserk", (int count, bool _) => "+" + Helper.Percent((float)count * 0.01f) + " strength per % of missing hp");
		Add("Peanut Butter", (int count, bool _) => "+" + Helper.Percent((float)count * 0.15f) + " stamina");
		Add("Adrenaline", (int count, bool _) => "Gain " + Helper.Percent(Helper.CD(count, 1f, 2f)) + " stamina, movementspeed and attackspeed for 5 seconds");
		Add("Sneaker", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.08f, 1.75f)) + " movement speed");
		Add("Sniper Scope", (int count, bool _) => Helper.Percent(Helper.CD(count, 0.14f, 0.15f)) + " chance to deal " + Helper.Percent(Helper.CD(count, 0.25f, 50f)) + " damage");
		Add("Blue Pill", (int count, bool _) => "+" + count * 10 + " shield");
		Add("Robin Hood Hat", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.06f, 2f)) + " faster bow draw speed, faster arrow speed and arrow damage");
		Add("Checkered Shirt", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.3f, 4f)) + " resource damage");
		Add("Dracula", (int count, bool _) => "Gain " + count + " max hp on kill, stacks up to " + count * 40 + " bonus max hp");
		Add("Piggybank", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.15f, 1.25f)) + " loot dropped from mobs and resources");
		Add("Knuts Hammer", (int count, bool _) => Helper.Percent(Helper.CD(count, 0.12f, 0.4f)) + " chance to summon lightning that deals +" + Helper.Percent(2f + Helper.CD(count, 0.12f, 1f)) + " of the damage dealt");
		Add("Crimson Dagger", (int count, bool _) => "Heal for " + Helper.Percent(Helper.CD(count, 0.1f, 0.5f)) + " of damage dealt");
		Add("Bulldozer", (int count, bool _) => Helper.Percent(Helper.CD(count, 0.15f, 1f)) + " chance to knock back target");
		Add("Jetpack", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.075f, 2.5f)) + " jump height");
		Add("Juice", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.3f, 1f)) + " attack speed for 2 seconds after a crit");
		Add("Spooo Bean", (int count, bool _) => Helper.Percent(1f - Helper.CD(count, 0.2f, 0.5f)) + " hunger drain");
		Add("Red Pill", (int count, bool _) => "+" + count * 10 + " max hp");
		Add("Broccoli", (int count, bool _) => 100 + count * 5 + "% healing");
		Add("Wings of Glory", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.45f, 2.5f)) + " damage while falling");
		Add("Janniks Frog", (int count, bool _) => count + " extra jumps");
		Add("Enforcer", (int count, bool _) => "+" + (5f * Helper.CD(count, 0.4f, 2f)).ToString("N1") + "% damage for each unit moved per second");
		Add("Danis Milk", (int count, bool _) => "+" + Helper.CD(count, 0.1f, 40f).ToString("N1") + " bonus armor");
		Add("Horseshoe", (int count, bool _) => "+" + Helper.Percent(Helper.CD(count, 0.08f, 0.9f)) + " crit chance");
		Add("Orange Juice", (int count, bool _) => Helper.Percent(1f + Helper.CD(count, 0.12f, 1f)) + " attack speed");
	}

	public static void Add(string name, Func<int, bool, string> function)
	{
		if (infoFunctions.ContainsKey(name))
		{
			MainClass.instance.log.LogMessage((object)("Override powerup: " + name));
			infoFunctions[name] = function;
		}
		else
		{
			MainClass.instance.log.LogMessage((object)("Add powerup: " + name));
			infoFunctions.Add(name, function);
		}
	}

	private static int Count(string name)
	{
		return Traverse.Create((object)PowerupInventory.Instance).Field<int[]>("powerups").Value[ItemManager.Instance.stringToPowerupId[name]];
	}

	private static string GetStatInfo(string name, bool extraInfo)
	{
		if (infoFunctions.TryGetValue(name, out var value))
		{
			return value(Count(name), extraInfo);
		}
		return "NOT IMPLEMENTED";
	}

	[HarmonyPatch(typeof(PowerupInfo), "OnPointerEnter")]
	[HarmonyPostfix]
	private static void OnPointerEnter(PowerupInfo __instance)
	{
		current = __instance;
		TextMeshProUGUI text = ItemInfo.Instance.text;
		((TMP_Text)text).text = ((TMP_Text)text).text + "</i></size>\n\n<size=60%>" + GetStatInfo(__instance.powerup.name, showExtraInfo);
	}

	[HarmonyPatch(typeof(PowerupInfo), "OnPointerExit")]
	[HarmonyPostfix]
	private static void OnPointerExit(PowerupInfo __instance)
	{
		current = null;
	}
}

NoEmptyChests.dll

Decompiled a year ago
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
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("NoEmptyChests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoEmptyChests")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("00835014-c827-4c4d-9307-602b32d5a4d8")]
[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 NoEmptyChests;

[BepInPlugin("Isse.NoEmptyChests", "NoEmptyChests", "1.0.0.0")]
public class MainClass : BaseUnityPlugin
{
	public const string Name = "NoEmptyChests";

	public const string Author = "Isse";

	public const string Guid = "Isse.NoEmptyChests";

	public const string Version = "1.0.0.0";

	public static MainClass instance;

	public Harmony harmony;

	public ManualLogSource log;

	private void Awake()
	{
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Expected O, but got Unknown
		if (!Object.op_Implicit((Object)(object)instance))
		{
			instance = this;
		}
		else
		{
			Object.Destroy((Object)(object)this);
		}
		log = ((BaseUnityPlugin)this).Logger;
		harmony = new Harmony("Isse.NoEmptyChests");
		harmony.PatchAll(typeof(ChestPatch));
	}
}
[HarmonyPatch(typeof(LootContainerInteract))]
public class ChestPatch
{
	[HarmonyPatch("OpenContainer")]
	[HarmonyPrefix]
	private static bool Open(LootContainerInteract __instance)
	{
		MainClass.instance.log.LogMessage((object)"OPENED CHEST!!!!");
		((MonoBehaviour)MainClass.instance).StartCoroutine(DestroyChest());
		return true;
		IEnumerator DestroyChest()
		{
			yield return (object)new WaitForSeconds(1f);
			while (((Component)__instance.animator).transform.position.y > 10f)
			{
				Transform transform = ((Component)__instance.animator).transform;
				transform.position += Vector3.down * Time.deltaTime;
				yield return null;
			}
			Object.Destroy((Object)(object)((Component)__instance.animator).gameObject);
		}
	}
}

FpsBooster.dll

Decompiled a year ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using MuckSettings;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("FpsBooster")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FpsBooster")]
[assembly: AssemblyTitle("FpsBooster")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace FpsBooster;

[BepInPlugin("KarmyDev.FpsBooster", "FpsBooster", "1.2.0")]
public class FpsBoosterMain : BaseUnityPlugin
{
	public const string Name = "FpsBooster";

	public const string Author = "KarmyDev";

	public const string Guid = "KarmyDev.FpsBooster";

	public const string Version = "1.2.0";

	internal readonly Harmony harmony;

	internal readonly Assembly assembly;

	public static ConfigFile config = new ConfigFile(Path.Combine(Paths.ConfigPath, "example.cfg"), true);

	public static ConfigEntry<int> renderDistance = config.Bind<int>("Render Distance", "renderDistance", 3000, "Sets how far will you see. 3000 is the default. 250 is best for potato pc.");

	public static ConfigEntry<bool> isPostProcessingEnabled = config.Bind<bool>("Enable Post Processing", "enablePostProcessing", true, "Enables complex rendering that may lower fps. Disable it if you have potato pc.");

	public static ConfigEntry<bool> areWorldMeshShadowsEnabled = config.Bind<bool>("Enable World Mesh Shadows", "enableWorldMeshShadows", true, "Enables the shadows on the world mesh.");

	public static ConfigEntry<bool> areLeafParticlesEnabled = config.Bind<bool>("Enable Leaf Particles", "enableLeafParticles", true, "Enables floating particles that may impact fps.");

	public FpsBoosterMain()
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Expected O, but got Unknown
		harmony = new Harmony("KarmyDev.FpsBooster");
		assembly = Assembly.GetExecutingAssembly();
		config.SaveOnConfigSet = true;
		renderDistance.SettingChanged += delegate
		{
			Patches.UpdateRenderDistanceSettings();
		};
		isPostProcessingEnabled.SettingChanged += delegate
		{
			Patches.UpdatePostProcessingSettings();
		};
		areWorldMeshShadowsEnabled.SettingChanged += delegate
		{
			Patches.UpdateWorldMeshShadowsSettings();
		};
		areLeafParticlesEnabled.SettingChanged += delegate
		{
			Patches.UpdateLeafParticlesSettings();
		};
		harmony.PatchAll(assembly);
	}
}
[HarmonyPatch]
internal class Patches
{
	public static Camera camRef;

	public static PostProcessLayer layerRef;

	public static GameObject leafParticlesRef;

	public static MeshRenderer worldMeshRef;

	[HarmonyPatch(typeof(Settings), "Graphics")]
	[HarmonyPrefix]
	private static void Graphics(Page page)
	{
		page.AddSliderSetting("Render Distance", FpsBoosterMain.renderDistance, 100, 3000);
		page.AddBoolSetting("Enable Post Processing", FpsBoosterMain.isPostProcessingEnabled);
		page.AddBoolSetting("Enable World Mesh Shadows", FpsBoosterMain.areWorldMeshShadowsEnabled);
		page.AddBoolSetting("Enable Leaf Particles", FpsBoosterMain.areLeafParticlesEnabled);
	}

	[HarmonyPatch(typeof(MoveCamera), "Start")]
	[HarmonyPostfix]
	private static void Start()
	{
		LoadCamera();
		ReloadSettings();
	}

	public static void LoadCamera()
	{
		camRef = MoveCamera.Instance.mainCam;
		if ((Object)(object)layerRef == (Object)null)
		{
			((Component)camRef).TryGetComponent<PostProcessLayer>(ref layerRef);
		}
		if ((Object)(object)leafParticlesRef == (Object)null)
		{
			leafParticlesRef = ((Component)((Component)PlayerMovement.Instance).transform.Find("LeafParticles")).gameObject;
		}
		if ((Object)(object)worldMeshRef == (Object)null)
		{
			worldMeshRef = ((Component)World.Instance).GetComponent<MeshRenderer>();
		}
	}

	public static void ReloadSettings()
	{
		if (!((Object)(object)camRef == (Object)null))
		{
			UpdateRenderDistanceSettings();
			UpdatePostProcessingSettings();
			UpdateLeafParticlesSettings();
			UpdateWorldMeshShadowsSettings();
		}
	}

	public static void UpdateWorldMeshShadowsSettings()
	{
		if (!((Object)(object)worldMeshRef == (Object)null))
		{
			((Renderer)worldMeshRef).shadowCastingMode = (ShadowCastingMode)(FpsBoosterMain.areWorldMeshShadowsEnabled.Value ? 1 : 0);
		}
	}

	public static void UpdateLeafParticlesSettings()
	{
		if (!((Object)(object)leafParticlesRef == (Object)null))
		{
			leafParticlesRef.SetActive(FpsBoosterMain.areLeafParticlesEnabled.Value);
		}
	}

	public static void UpdateRenderDistanceSettings()
	{
		if (!((Object)(object)camRef == (Object)null))
		{
			camRef.farClipPlane = FpsBoosterMain.renderDistance.Value;
		}
	}

	public static void UpdatePostProcessingSettings()
	{
		if (!((Object)(object)camRef == (Object)null))
		{
			if ((Object)(object)layerRef == (Object)null)
			{
				((Component)camRef).TryGetComponent<PostProcessLayer>(ref layerRef);
			}
			((Behaviour)layerRef).enabled = FpsBoosterMain.isPostProcessingEnabled.Value;
		}
	}
}

MuckArrows.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("MuckArrows")]
[assembly: AssemblyConfiguration("RELEASE")]
[assembly: AssemblyDescription("A plugin which adds various arrows, like Stone, Ruby, Chunkium, Obamium. Allows modifying arrow damage.")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyInformationalVersion("1.1.0")]
[assembly: AssemblyProduct("MuckArrows")]
[assembly: AssemblyTitle("MuckArrows")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	public static class Extensions
	{
		public static void LogItemCreated(this ManualLogSource log, InventoryItem item)
		{
			log.LogInfo((object)("Item \"" + item.name + "\" created, ID " + item.id));
		}

		public static ConfigEntry<int> BindMoreThanZero(this ConfigFile config, string section, string key, int defaultValue, string description)
		{
			ConfigEntry<int> val = config.Bind<int>(section, key, defaultValue, description);
			if (val.Value <= 0)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static ConfigEntry<float> BindMoreThanZero(this ConfigFile config, string section, string key, float defaultValue, string description)
		{
			ConfigEntry<float> val = config.Bind<float>(section, key, defaultValue, description);
			if (val.Value <= 0f)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static InventoryItem Clone(this InventoryItem i)
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			InventoryItem obj = ScriptableObject.CreateInstance<InventoryItem>();
			obj.amount = i.amount;
			obj.armor = i.armor;
			obj.armorComponent = i.armorComponent;
			obj.attackDamage = i.attackDamage;
			obj.attackRange = i.attackRange;
			obj.attackSpeed = i.attackSpeed;
			obj.attackTypes = i.attackTypes;
			obj.bowComponent = i.bowComponent;
			obj.buildRotation = i.buildRotation;
			obj.buildable = i.buildable;
			obj.craftAmount = i.craftAmount;
			obj.craftable = i.craftable;
			obj.description = i.description;
			obj.fuel = i.fuel;
			obj.grid = i.grid;
			obj.heal = i.heal;
			((Object)obj).hideFlags = ((Object)i).hideFlags;
			obj.hunger = i.hunger;
			obj.id = i.id;
			obj.important = i.important;
			obj.material = i.material;
			obj.max = i.max;
			obj.mesh = i.mesh;
			obj.name = i.name;
			obj.positionOffset = i.positionOffset;
			obj.prefab = i.prefab;
			obj.processTime = i.processTime;
			obj.processType = i.processType;
			obj.processable = i.processable;
			obj.processedItem = i.processedItem;
			obj.rarity = i.rarity;
			obj.requirements = i.requirements;
			obj.resourceDamage = i.resourceDamage;
			obj.rotationOffset = i.rotationOffset;
			obj.scale = i.scale;
			obj.sharpness = i.sharpness;
			obj.sprite = i.sprite;
			obj.stackable = i.stackable;
			obj.stamina = i.stamina;
			obj.stationRequirement = i.stationRequirement;
			obj.swingFx = i.swingFx;
			obj.tag = i.tag;
			obj.tier = i.tier;
			obj.type = i.type;
			obj.unlockWithFirstRequirementOnly = i.unlockWithFirstRequirementOnly;
			return obj;
		}
	}
}
namespace MuckArrows
{
	public class CreateRecipesPatch
	{
		public static InventoryItem[] ArrowRecipes = (InventoryItem[])(object)new InventoryItem[0];

		[HarmonyPatch(typeof(ItemManager), "InitAllItems")]
		[HarmonyPostfix]
		private static void ItemManager_InitAllItems()
		{
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Expected O, but got Unknown
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Expected O, but got Unknown
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Expected O, but got Unknown
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Expected O, but got Unknown
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Expected O, but got Unknown
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Expected O, but got Unknown
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Expected O, but got Unknown
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0283: Expected O, but got Unknown
			InventoryItem item = ItemManager.Instance.allItems[67];
			InventoryItem item2 = ItemManager.Instance.allItems[71];
			InventoryItem item3 = ItemManager.Instance.allItems[89];
			InventoryItem item4 = ItemManager.Instance.allItems[90];
			InventoryItem item5 = ItemManager.Instance.allItems[92];
			InventoryItem item6 = ItemManager.Instance.allItems[94];
			InventoryItem item7 = ItemManager.Instance.allItems[95];
			InventoryItem obj = ItemManager.Instance.allItems[131];
			InventoryItem val = ItemManager.Instance.allItems[133];
			InventoryItem obj2 = ItemManager.Instance.allItems[135];
			InventoryItem obj3 = ItemManager.Instance.allItems[136];
			val.attackDamage = Plugin.FlintArrowDamage;
			obj3.attackDamage = Plugin.SteelArrowDamage;
			obj2.attackDamage = Plugin.MithrilArrowDamage;
			obj.attackDamage = Plugin.AdamantiteArrowDamage;
			List<InventoryItem> list = new List<InventoryItem>();
			list.Add(NewArrow(val, "Stone Arrow", "blunt arrows for a long distance slapp", Plugin.StoneArrowDamage, 4, val.sprite, val.sprite.texture, Plugin.CanCraftStoneArrows, new CraftRequirement
			{
				amount = 2,
				item = item6
			}, new CraftRequirement
			{
				amount = 1,
				item = item4
			}));
			list.Add(NewArrow(val, "Obamium Arrow", "the 44th arrow ever invented", Plugin.ObamiumArrowDamage, 4, Resources.ObamiumArrowSprite, Resources.ObamiumArrowTexture, Plugin.CanCraftObamiumArrows, new CraftRequirement
			{
				amount = 2,
				item = item5
			}, new CraftRequirement
			{
				amount = 1,
				item = item2
			}));
			list.Add(NewArrow(val, "Ruby Arrow", "shooting your arrows with style", Plugin.RubyArrowDamage, 4, Resources.RubyArrowSprite, Resources.RubyArrowTexture, Plugin.CanCraftRubyArrows, new CraftRequirement
			{
				amount = 2,
				item = item5
			}, new CraftRequirement
			{
				amount = 1,
				item = item3
			}));
			list.Add(NewArrow(val, "Chunkium Arrow", "how do these even fly?", Plugin.ChunkiumArrowDamage, 4, Resources.ChunkiumArrowSprite, Resources.ChunkiumArrowTexture, Plugin.CanCraftChunkiumArrows, new CraftRequirement
			{
				amount = 2,
				item = item7
			}, new CraftRequirement
			{
				amount = 1,
				item = item
			}));
			List<InventoryItem> list2 = list;
			int num = ItemManager.Instance.allScriptableItems.Length;
			foreach (InventoryItem item8 in list2)
			{
				item8.id = num++;
				ItemManager.Instance.allItems.Add(item8.id, item8);
				Plugin.Log.LogItemCreated(item8);
			}
			ItemManager.Instance.allScriptableItems = ItemManager.Instance.allScriptableItems.Concat(list2).ToArray();
			ArrowRecipes = list2.ToArray();
		}

		private static InventoryItem NewArrow(InventoryItem baseArrow, string name, string description, int attackDamage, int amount, Sprite sprite, Texture2D texture, bool craftable, params CraftRequirement[] requirements)
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Expected O, but got Unknown
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			InventoryItem obj = ScriptableObject.CreateInstance<InventoryItem>();
			obj.amount = amount;
			obj.armor = baseArrow.armor;
			obj.armorComponent = baseArrow.armorComponent;
			obj.attackDamage = attackDamage;
			obj.attackRange = baseArrow.attackRange;
			obj.attackSpeed = baseArrow.attackSpeed;
			obj.attackTypes = baseArrow.attackTypes;
			obj.bowComponent = baseArrow.bowComponent;
			obj.buildRotation = baseArrow.buildRotation;
			obj.buildable = baseArrow.buildable;
			obj.craftAmount = baseArrow.craftAmount;
			obj.craftable = baseArrow.craftable;
			obj.description = description;
			obj.fuel = baseArrow.fuel;
			obj.grid = baseArrow.grid;
			obj.heal = baseArrow.heal;
			((Object)obj).hideFlags = ((Object)baseArrow).hideFlags;
			obj.hunger = baseArrow.hunger;
			obj.id = baseArrow.id;
			obj.important = baseArrow.important;
			obj.material = baseArrow.material;
			obj.max = baseArrow.max;
			obj.mesh = baseArrow.mesh;
			obj.name = name;
			obj.positionOffset = baseArrow.positionOffset;
			obj.prefab = baseArrow.prefab;
			obj.processTime = baseArrow.processTime;
			obj.processType = baseArrow.processType;
			obj.processable = baseArrow.processable;
			obj.processedItem = baseArrow.processedItem;
			obj.rarity = baseArrow.rarity;
			obj.requirements = (CraftRequirement[])(craftable ? ((Array)requirements) : ((Array)Array.Empty<CraftRequirement>()));
			obj.resourceDamage = baseArrow.resourceDamage;
			obj.rotationOffset = baseArrow.rotationOffset;
			obj.scale = baseArrow.scale;
			obj.sharpness = baseArrow.sharpness;
			obj.material = new Material(baseArrow.material)
			{
				mainTexture = (Texture)(object)texture,
				color = new Color(1f, 1f, 1f, 1f)
			};
			obj.sprite = sprite;
			obj.stackable = baseArrow.stackable;
			obj.stamina = baseArrow.stamina;
			obj.stationRequirement = baseArrow.stationRequirement;
			obj.swingFx = baseArrow.swingFx;
			obj.tag = baseArrow.tag;
			obj.tier = baseArrow.tier;
			obj.type = baseArrow.type;
			obj.unlockWithFirstRequirementOnly = baseArrow.unlockWithFirstRequirementOnly;
			return obj;
		}

		[HarmonyPatch(typeof(CraftingUI), "Awake")]
		[HarmonyPostfix]
		private static void CraftingUI_Awake(CraftingUI __instance)
		{
			if (((Object)__instance).name == "FletchingNew")
			{
				InventoryItem[] items = __instance.tabs[1].items;
				InventoryItem[] array = (InventoryItem[])(object)new InventoryItem[items.Length + ArrowRecipes.Length];
				items.CopyTo(array, 0);
				ArrowRecipes.CopyTo(array, items.Length);
				Array.Sort(array, (InventoryItem x, InventoryItem y) => x.attackDamage - y.attackDamage);
				__instance.tabs[1].items = array;
			}
		}
	}
	[BepInPlugin("MuckArrows.MichMcb", "Muck Arrows", "1.1.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log = null;

		public static bool CanCraftStoneArrows = true;

		public static bool CanCraftObamiumArrows = true;

		public static bool CanCraftRubyArrows = true;

		public static bool CanCraftChunkiumArrows = true;

		public static int FlintArrowDamage = 20;

		public static int SteelArrowDamage = 30;

		public static int MithrilArrowDamage = 40;

		public static int AdamantiteArrowDamage = 50;

		public static int FireArrowDamage = 100;

		public static int LightningArrowDamage = 100;

		public static int WaterArrowDamage = 100;

		public static int StoneArrowDamage = 5;

		public static int ChunkiumArrowDamage = 55;

		public static int ObamiumArrowDamage = 60;

		public static int RubyArrowDamage = 75;

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Config.SaveOnConfigSet = false;
			CanCraftStoneArrows = ((BaseUnityPlugin)this).Config.Bind<bool>("Main", "CanCraftStoneArrows", CanCraftStoneArrows, "If true, allows crafting (practically useless) stone arrows. Stone arrows can still exist in the game even if this setting is false, so toggling it will not cause any issues with saved games.").Value;
			CanCraftObamiumArrows = ((BaseUnityPlugin)this).Config.Bind<bool>("Main", "CanCraftObamiumArrows", CanCraftStoneArrows, "If true, allows crafting Obamium Arrows. As above, they always exist.").Value;
			CanCraftRubyArrows = ((BaseUnityPlugin)this).Config.Bind<bool>("Main", "CanCraftRubyArrows", CanCraftStoneArrows, "If true, allows crafting Ruby Arrows. As above, they always exist.").Value;
			CanCraftChunkiumArrows = ((BaseUnityPlugin)this).Config.Bind<bool>("Main", "CanCraftChunkiumArrows", CanCraftStoneArrows, "If true, allows crafting Chunkium Arrows. As above, they always exist.").Value;
			FlintArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "FlintArrowDamage", FlintArrowDamage, "The damage that Flint arrows deal. Vanilla: 20").Value;
			SteelArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "SteelArrowDamage", SteelArrowDamage, "The damage that Steel arrows deal. Vanilla: 30").Value;
			MithrilArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "MithrilArrowDamage", MithrilArrowDamage, "The damage that Mithril arrows deal. Vanilla: 40").Value;
			AdamantiteArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "AdamantiteArrowDamage", AdamantiteArrowDamage, "The damage that Adamantite arrows deal. Vanilla: 50").Value;
			FireArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "FireArrowDamage", FireArrowDamage, "The damage that Fire arrows deal. Vanilla: 100").Value;
			LightningArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "LightningArrowDamage", LightningArrowDamage, "The damage that Lightning arrows deal. Vanilla: 100").Value;
			WaterArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "WaterArrowDamage", WaterArrowDamage, "The damage that Water arrows deal. Vanilla: 100").Value;
			StoneArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "StoneArrowDamage", StoneArrowDamage, "The damage that Stone arrows deal. Vanilla: 5").Value;
			ChunkiumArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "ChunkiumArrowDamage", ChunkiumArrowDamage, "The damage that Chunkium arrows deal. Vanilla: 55").Value;
			ObamiumArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "ObamiumArrowDamage", ObamiumArrowDamage, "The damage that Obamium arrows deal. Vanilla: 60").Value;
			RubyArrowDamage = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Damage", "RubyArrowDamage", RubyArrowDamage, "The damage that Ruby arrows deal. Vanilla: 75").Value;
			((BaseUnityPlugin)this).Config.Save();
			Resources.Load();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"MuckArrows loaded!");
			Harmony.CreateAndPatchAll(typeof(CreateRecipesPatch), (string)null);
		}
	}
	public static class Resources
	{
		public static Texture2D ChunkiumArrowTexture;

		public static Sprite ChunkiumArrowSprite;

		public static Texture2D ObamiumArrowTexture;

		public static Sprite ObamiumArrowSprite;

		public static Texture2D RubyArrowTexture;

		public static Sprite RubyArrowSprite;

		public static void Load()
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MuckArrows.resources");
			AssetBundle obj = AssetBundle.LoadFromStream(stream);
			ChunkiumArrowTexture = obj.LoadAsset<Texture2D>("ChunkiumArrow.png");
			ChunkiumArrowSprite = obj.LoadAsset<Sprite>("ChunkiumArrow.png");
			ObamiumArrowTexture = obj.LoadAsset<Texture2D>("ObamiumArrow.png");
			ObamiumArrowSprite = obj.LoadAsset<Sprite>("ObamiumArrow.png");
			RubyArrowTexture = obj.LoadAsset<Texture2D>("RubyArrow.png");
			RubyArrowSprite = obj.LoadAsset<Sprite>("RubyArrow.png");
		}
	}
}

MuckCharcoal.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("MuckCharcoal")]
[assembly: AssemblyConfiguration("RELEASE")]
[assembly: AssemblyDescription("A simple plugin which adds Charcoal. Wood can be burned in a Furnace to produce Charcoal, which functions similarly to coal. The wood which can be turned into charcoal, how long it takes to create charcoal, and how many items charcoal smelts can be confiugred.")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0")]
[assembly: AssemblyProduct("MuckCharcoal")]
[assembly: AssemblyTitle("MuckCharcoal")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.2.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	public static class Extensions
	{
		public static void LogItemCreated(this ManualLogSource log, InventoryItem item)
		{
			log.LogInfo((object)("Item \"" + item.name + "\" created, ID " + item.id));
		}

		public static ConfigEntry<int> BindMoreThanZero(this ConfigFile config, string section, string key, int defaultValue, string description)
		{
			ConfigEntry<int> val = config.Bind<int>(section, key, defaultValue, description);
			if (val.Value <= 0)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static ConfigEntry<float> BindMoreThanZero(this ConfigFile config, string section, string key, float defaultValue, string description)
		{
			ConfigEntry<float> val = config.Bind<float>(section, key, defaultValue, description);
			if (val.Value <= 0f)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static InventoryItem Clone(this InventoryItem i)
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			InventoryItem obj = ScriptableObject.CreateInstance<InventoryItem>();
			obj.amount = i.amount;
			obj.armor = i.armor;
			obj.armorComponent = i.armorComponent;
			obj.attackDamage = i.attackDamage;
			obj.attackRange = i.attackRange;
			obj.attackSpeed = i.attackSpeed;
			obj.attackTypes = i.attackTypes;
			obj.bowComponent = i.bowComponent;
			obj.buildRotation = i.buildRotation;
			obj.buildable = i.buildable;
			obj.craftAmount = i.craftAmount;
			obj.craftable = i.craftable;
			obj.description = i.description;
			obj.fuel = i.fuel;
			obj.grid = i.grid;
			obj.heal = i.heal;
			((Object)obj).hideFlags = ((Object)i).hideFlags;
			obj.hunger = i.hunger;
			obj.id = i.id;
			obj.important = i.important;
			obj.material = i.material;
			obj.max = i.max;
			obj.mesh = i.mesh;
			obj.name = i.name;
			obj.positionOffset = i.positionOffset;
			obj.prefab = i.prefab;
			obj.processTime = i.processTime;
			obj.processType = i.processType;
			obj.processable = i.processable;
			obj.processedItem = i.processedItem;
			obj.rarity = i.rarity;
			obj.requirements = i.requirements;
			obj.resourceDamage = i.resourceDamage;
			obj.rotationOffset = i.rotationOffset;
			obj.scale = i.scale;
			obj.sharpness = i.sharpness;
			obj.sprite = i.sprite;
			obj.stackable = i.stackable;
			obj.stamina = i.stamina;
			obj.stationRequirement = i.stationRequirement;
			obj.swingFx = i.swingFx;
			obj.tag = i.tag;
			obj.tier = i.tier;
			obj.type = i.type;
			obj.unlockWithFirstRequirementOnly = i.unlockWithFirstRequirementOnly;
			return obj;
		}
	}
}
namespace MuckCharcoal
{
	public class CreateRecipesPatch
	{
		[HarmonyPatch(typeof(ItemManager), "InitAllItems")]
		[HarmonyPostfix]
		private static void AddCoalRecipes()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			InventoryItem val = ItemManager.Instance.allItems[2];
			InventoryItem val2 = ScriptableObject.CreateInstance<InventoryItem>();
			val2.important = val.important;
			val2.name = "Charcoal";
			val2.description = "crispy wood";
			val2.type = val.type;
			val2.tier = val.tier;
			val2.sprite = val.sprite;
			val2.material = val.material;
			val2.mesh = val.mesh;
			val2.rotationOffset = val.rotationOffset;
			val2.positionOffset = val.positionOffset;
			val2.scale = val.scale;
			val2.stackable = val.stackable;
			val2.amount = val.amount;
			val2.max = val.max;
			val2.resourceDamage = val.resourceDamage;
			val2.attackDamage = val.attackDamage;
			val2.attackSpeed = val.attackSpeed;
			val2.attackRange = val.attackRange;
			val2.sharpness = val.sharpness;
			val2.craftable = val.craftable;
			val2.unlockWithFirstRequirementOnly = val.unlockWithFirstRequirementOnly;
			val2.stationRequirement = val.stationRequirement;
			val2.buildable = val.buildable;
			val2.grid = val.grid;
			val2.prefab = val.prefab;
			val2.buildRotation = val.buildRotation;
			val2.processable = val.processable;
			val2.processType = val.processType;
			val2.processedItem = val.processedItem;
			val2.processTime = val.processTime;
			val2.heal = val.heal;
			val2.hunger = val.hunger;
			val2.stamina = val.stamina;
			val2.armor = val.armor;
			val2.swingFx = val.swingFx;
			val2.bowComponent = val.bowComponent;
			val2.armorComponent = val.armorComponent;
			val2.tag = val.tag;
			val2.rarity = val.rarity;
			val2.attackTypes = val.attackTypes;
			((Object)val2).hideFlags = ((Object)val).hideFlags;
			val2.craftAmount = 1;
			val2.requirements = val.requirements;
			val2.fuel = ScriptableObject.CreateInstance<ItemFuel>();
			val2.fuel.speedMultiplier = val.fuel.speedMultiplier;
			((Object)val2.fuel).hideFlags = ((Object)val.fuel).hideFlags;
			val2.fuel.maxUses = Plugin.MaxUses;
			val2.fuel.currentUses = Plugin.MaxUses;
			((Object)val2.fuel).name = val.name;
			val2.id = ItemManager.Instance.allScriptableItems.Length;
			ItemManager.Instance.allItems.Add(val2.id, val2);
			Plugin.Log.LogItemCreated(val2);
			ItemManager.Instance.allScriptableItems = ItemManager.Instance.allScriptableItems.Concat((IEnumerable<InventoryItem>)(object)new InventoryItem[1] { val2 }).ToArray();
			HashSet<string> hashSet = new HashSet<string>(Plugin.ProcessableItems);
			foreach (InventoryItem value in ItemManager.Instance.allItems.Values)
			{
				if (hashSet.Contains(value.name))
				{
					Plugin.Log.LogInfo((object)("Making item smeltable into charcoal: " + value.name));
					value.processable = true;
					value.processType = (ProcessType)0;
					value.processTime = Plugin.WoodProcessTime;
					value.processedItem = val2;
					hashSet.Remove(value.name);
				}
			}
			foreach (string item in hashSet)
			{
				Plugin.Log.LogError((object)("This item was not found: " + item));
			}
		}
	}
	[BepInPlugin("MuckCharcoal.MichMcb", "Muck Charcoal", "1.2.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log = null;

		public static int MaxUses = 3;

		public static int WoodProcessTime = 5;

		public static string ProcessableItemNames = "Wood,Birch Wood,Fir Wood,Oak Wood,Dark Oak Wood";

		public static string[] ProcessableItems = new string[0];

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Config.SaveOnConfigSet = false;
			MaxUses = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Main", "MaxUses", MaxUses, "The number of items that one piece of charcoal can smelt or cook").Value;
			WoodProcessTime = ((BaseUnityPlugin)this).Config.BindMoreThanZero("Main", "WoodProcessTime", WoodProcessTime, "The time, in seconds, it takes to burn one piece of wood and turn it into charcoal").Value;
			ProcessableItemNames = ((BaseUnityPlugin)this).Config.Bind<string>("Main", "ProcessableItemNames", ProcessableItemNames, "The comma-separated item names which can be processed in a furnace and turned into charcoal").Value;
			ProcessableItems = ProcessableItemNames.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"MuckCharcoal loaded!");
			((BaseUnityPlugin)this).Config.Save();
			Harmony.CreateAndPatchAll(typeof(CreateRecipesPatch), (string)null);
		}
	}
}

MuckDontDestroyNeighbours.dll

Decompiled a year ago
using System;
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.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("MuckDontDestroyNeighbours")]
[assembly: AssemblyConfiguration("RELEASE")]
[assembly: AssemblyDescription("With this plugin, when part of a structure is destroyed, no other parts will be destroyed. Perfect if monsters break your stairs and destroy your entire base and everything inside!")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MuckDontDestroyNeighbours")]
[assembly: AssemblyTitle("MuckDontDestroyNeighbours")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	public static class ConfigExtensions
	{
		public static int BindMoreThanZero(this ConfigFile config, string section, string key, int defaultValue, string description)
		{
			ConfigEntry<int> val = config.Bind<int>(section, key, defaultValue, description);
			if (val.Value <= 0)
			{
				val.Value = defaultValue;
			}
			return val.Value;
		}

		public static float BindMoreThanZero(this ConfigFile config, string section, string key, float defaultValue, string description)
		{
			ConfigEntry<float> val = config.Bind<float>(section, key, defaultValue, description);
			if (val.Value <= 0f)
			{
				val.Value = defaultValue;
			}
			return val.Value;
		}
	}
}
namespace MuckDontDestroyNeighbours
{
	public class Patch
	{
		[HarmonyPatch(typeof(BuildDestruction), "OnDestroy")]
		[HarmonyPrefix]
		public static bool OnDestroy(BuildDestruction __instance)
		{
			__instance.destroyed = true;
			return false;
		}
	}
	[BepInPlugin("MuckDontDestroyNeighbours.MichMcb", "Muck Don't Destroy Neighbours", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"MuckDontDestroyNeighbours loaded!");
			Harmony.CreateAndPatchAll(typeof(Patch), (string)null);
		}
	}
}

MuckFoods.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("MuckFoods")]
[assembly: AssemblyConfiguration("RELEASE")]
[assembly: AssemblyDescription("Adds a wide variety of foods which can be cooked by combining various existing ingredients in a Cauldron. This also decreases the effectiveness of some vanilla foods, to encourage combining many ingredients into one.")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion("1.4.0")]
[assembly: AssemblyProduct("MuckFoods")]
[assembly: AssemblyTitle("MuckFoods")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.4.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	public static class Extensions
	{
		public static void LogItemCreated(this ManualLogSource log, InventoryItem item)
		{
			log.LogInfo((object)("Item \"" + item.name + "\" created, ID " + item.id));
		}

		public static ConfigEntry<int> BindMoreThanZero(this ConfigFile config, string section, string key, int defaultValue, string description)
		{
			ConfigEntry<int> val = config.Bind<int>(section, key, defaultValue, description);
			if (val.Value <= 0)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static ConfigEntry<float> BindMoreThanZero(this ConfigFile config, string section, string key, float defaultValue, string description)
		{
			ConfigEntry<float> val = config.Bind<float>(section, key, defaultValue, description);
			if (val.Value <= 0f)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static ConfigEntry<float> BindNonNegative(this ConfigFile config, string section, string key, float defaultValue, string description)
		{
			ConfigEntry<float> val = config.Bind<float>(section, key, defaultValue, description);
			if (val.Value < 0f)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static InventoryItem Clone(this InventoryItem i)
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			InventoryItem obj = ScriptableObject.CreateInstance<InventoryItem>();
			obj.amount = i.amount;
			obj.armor = i.armor;
			obj.armorComponent = i.armorComponent;
			obj.attackDamage = i.attackDamage;
			obj.attackRange = i.attackRange;
			obj.attackSpeed = i.attackSpeed;
			obj.attackTypes = i.attackTypes;
			obj.bowComponent = i.bowComponent;
			obj.buildRotation = i.buildRotation;
			obj.buildable = i.buildable;
			obj.craftAmount = i.craftAmount;
			obj.craftable = i.craftable;
			obj.description = i.description;
			obj.fuel = i.fuel;
			obj.grid = i.grid;
			obj.heal = i.heal;
			((Object)obj).hideFlags = ((Object)i).hideFlags;
			obj.hunger = i.hunger;
			obj.id = i.id;
			obj.important = i.important;
			obj.material = i.material;
			obj.max = i.max;
			obj.mesh = i.mesh;
			obj.name = i.name;
			obj.positionOffset = i.positionOffset;
			obj.prefab = i.prefab;
			obj.processTime = i.processTime;
			obj.processType = i.processType;
			obj.processable = i.processable;
			obj.processedItem = i.processedItem;
			obj.rarity = i.rarity;
			obj.requirements = i.requirements;
			obj.resourceDamage = i.resourceDamage;
			obj.rotationOffset = i.rotationOffset;
			obj.scale = i.scale;
			obj.sharpness = i.sharpness;
			obj.sprite = i.sprite;
			obj.stackable = i.stackable;
			obj.stamina = i.stamina;
			obj.stationRequirement = i.stationRequirement;
			obj.swingFx = i.swingFx;
			obj.tag = i.tag;
			obj.tier = i.tier;
			obj.type = i.type;
			obj.unlockWithFirstRequirementOnly = i.unlockWithFirstRequirementOnly;
			return obj;
		}
	}
}
namespace MuckFoods
{
	public class CreateRecipesPatch
	{
		public static InventoryItem[] NewFoods = (InventoryItem[])(object)new InventoryItem[0];

		[HarmonyPatch(typeof(ItemManager), "InitAllItems")]
		[HarmonyPostfix]
		private static void InitializeFoods()
		{
			InventoryItem val = ItemManager.Instance.allItems[45];
			InventoryItem val2 = ItemManager.Instance.allItems[46];
			InventoryItem val3 = ItemManager.Instance.allItems[47];
			InventoryItem val4 = ItemManager.Instance.allItems[49];
			InventoryItem val5 = ItemManager.Instance.allItems[50];
			InventoryItem val6 = ItemManager.Instance.allItems[51];
			InventoryItem val7 = ItemManager.Instance.allItems[52];
			InventoryItem val8 = ItemManager.Instance.allItems[53];
			InventoryItem val9 = ItemManager.Instance.allItems[54];
			InventoryItem val10 = ItemManager.Instance.allItems[56];
			InventoryItem val11 = ItemManager.Instance.allItems[57];
			InventoryItem val12 = ItemManager.Instance.allItems[58];
			InventoryItem val13 = ItemManager.Instance.allItems[59];
			InventoryItem val14 = ItemManager.Instance.allItems[60];
			InventoryItem val15 = ItemManager.Instance.allItems[61];
			InventoryItem val16 = ItemManager.Instance.allItems[62];
			InventoryItem val17 = ItemManager.Instance.allItems[63];
			InventoryItem val18 = ItemManager.Instance.allItems[64];
			SetStats(val2, 0f, 0f, 0f);
			SetStats(val4, 0f, 0f, 0f);
			if (Plugin.RebalanceFoods)
			{
				SetStats(val, 4f, 4f, 4f);
				SetStats(val5, 6f, 6f, 3f);
				val6.heal = 10f;
				val7.hunger = 10f;
				val9.stamina = 10f;
				SetStats(val8, 10f, 10f, 10f);
				SetStats(val16, 25f, 10f, 10f);
				SetStats(val18, 10f, 25f, 10f);
				SetStats(val15, 10f, 10f, 25f);
				SetStats(val17, 30f, 30f, 30f);
				Restoration.FromIngredients(val5).Apply(val11);
				Restoration.FromIngredients(val11, val2).Apply(val14);
				Restoration.FromIngredients(val, val10, val2).Apply(val12);
				Restoration.FromIngredients(val11, val2, val10).Apply(val13);
			}
			InventoryItem val19 = CreateFood(val, Resources.AppleBakedSprite, "Baked Apple", "soft and sweet, but looks familiar somehow...", CraftRequirements(val), val);
			InventoryItem val20 = CreateFood(val6, Resources.ShroomRedToastySprite, "Toasted Gulpon Shroom", "nice and hot!", CraftRequirements(val6), val6);
			InventoryItem val21 = CreateFood(val7, Resources.ShroomYellowToastySprite, "Toasted Ligon Shroom", "tasty and filling", CraftRequirements(val7), val7);
			InventoryItem val22 = CreateFood(val9, Resources.ShroomPurpleToastySprite, "Toasted Sugon Shroom", "keeps you jumping at your best", CraftRequirements(val9), val9);
			InventoryItem val23 = CreateFood(val8, Resources.ShroomSusToastySprite, "Toasted Slurbon Shroom", "still kinda sus...", CraftRequirements(val8), val8);
			val19.processTime = val11.processTime;
			val20.processTime = val11.processTime;
			val21.processTime = val11.processTime;
			val22.processTime = val11.processTime;
			val23.processTime = val11.processTime;
			List<InventoryItem> list = new List<InventoryItem>();
			list.Add(val19);
			list.Add(val20);
			list.Add(val21);
			list.Add(val22);
			list.Add(val23);
			list.Add(CreateFood(val12, val12.sprite, "Pie Pie", "it's pie flavoured", CraftRequirements(val3, val2), val10, val2));
			list.Add(CreateFood(val10, Resources.FlaxseedBreadSprite, "Flaxseed Bread", "what else can you do with flax?", CraftRequirements(val3, val4), val10, val4));
			list.Add(CreateFood(val14, Resources.AppleMeatStewSprite, "Apple Meat Stew", "yummy", CraftRequirements(val, val5, val2), val, val11, val2));
			list.Add(CreateFood(val12, Resources.PieAppleMeatSprite, "Apple Meat Pie", "dessert and dinner in one", CraftRequirements(val, val5, val3, val2), val, val11, val10, val2));
			list.Add(CreateFood(val17, Resources.LessWeirdSoupSprite, "Less Weird Soup", "food for a fun guy", CraftRequirements(val6, val7, val9, val2), val6, val7, val9, val2));
			List<InventoryItem> list2 = list;
			(InventoryItem, string, string, InventoryItem)[] array = new(InventoryItem, string, string, InventoryItem)[4]
			{
				(val6, "Gulpon", "Red", val16),
				(val7, "Ligon", "Yellow", val18),
				(val9, "Sugon", "Purple", val15),
				(val8, "Slurbon", "Weird", val17)
			};
			DescrSprite[] array2 = new DescrSprite[4]
			{
				new DescrSprite("spicy pie", Resources.PieRedSprite),
				new DescrSprite("pie with shroom", Resources.PieYellowSprite),
				new DescrSprite("pie in the sky", Resources.PiePurpleSprite),
				new DescrSprite("mystery pie", Resources.PieSusSprite)
			};
			DescrSprite[] array3 = new DescrSprite[4]
			{
				new DescrSprite("pretty healthy", Resources.PieRedAppleSprite),
				new DescrSprite("pie with apple and shroom", Resources.PieYellowAppleSprite),
				new DescrSprite("pretty fast pie", Resources.PiePurpleAppleSprite),
				new DescrSprite("who needs meat anyway?", Resources.PieSusAppleSprite)
			};
			DescrSprite[] array4 = new DescrSprite[4]
			{
				new DescrSprite("don't die pie", Resources.PieRedMeatSprite),
				new DescrSprite("could feed an army (or just you)", Resources.PieYellowMeatSprite),
				new DescrSprite("fills you with energy", Resources.PiePurpleMeatSprite),
				new DescrSprite("sus, savoury, scrumptious", Resources.PieSusMeatSprite)
			};
			DescrSprite[] array5 = new DescrSprite[4]
			{
				new DescrSprite("red and vegan friendly", Resources.SoupRedAppleSprite),
				new DescrSprite("it's sweet and savoury", Resources.SoupYellowAppleSprite),
				new DescrSprite("better than nothing ig", Resources.SoupPurpleAppleSprite),
				new DescrSprite("lv 5 vegans only", Resources.SoupSusAppleSprite)
			};
			DescrSprite[] array6 = new DescrSprite[4]
			{
				new DescrSprite("savoury stew", Resources.SoupRedMeatSprite),
				new DescrSprite("tender meat and shroom", Resources.SoupYellowMeatSprite),
				new DescrSprite("tasty stew for when you're tired", Resources.SoupPurpleMeatSprite),
				new DescrSprite("i think the meat became rainbows", Resources.SoupSusMeatSprite)
			};
			DescrSprite[] array7 = new DescrSprite[4]
			{
				new DescrSprite("reddest food ever made", Resources.SoupRedAppleMeatSprite),
				new DescrSprite("a real hunter-gatherer's meal", Resources.SoupYellowAppleMeatSprite),
				new DescrSprite("keeps you going", Resources.SoupPurpleAppleMeatSprite),
				new DescrSprite("the heartiest stew in the land", Resources.SoupSusAppleMeatSprite)
			};
			int num = 0;
			(InventoryItem, string, string, InventoryItem)[] array8 = array;
			for (int i = 0; i < array8.Length; i++)
			{
				(InventoryItem, string, string, InventoryItem) tuple = array8[i];
				list2.Add(CreateFood(val12, array2[num].Sprite, tuple.Item2 + " Shroom Pie", array2[num].Descr, CraftRequirements(val3, tuple.Item1, val2), val10, tuple.Item4, val2));
				list2.Add(CreateFood(val12, array3[num].Sprite, "Apple and " + tuple.Item2 + " Shroom Pie", array3[num].Descr, CraftRequirements(val3, val, tuple.Item1, val2), val10, val, tuple.Item4, val2));
				list2.Add(CreateFood(val12, array4[num].Sprite, "Meat and " + tuple.Item2 + " Shroom Pie", array4[num].Descr, CraftRequirements(val3, val5, tuple.Item1, val2), val10, val11, tuple.Item4, val2));
				list2.Add(CreateFood(tuple.Item4, array5[num].Sprite, "Apple and " + tuple.Item2 + " Shroom Stew", array5[num].Descr, CraftRequirements(val, tuple.Item1, val2), val, tuple.Item4, val2));
				list2.Add(CreateFood(tuple.Item4, array6[num].Sprite, "Meat and " + tuple.Item2 + " Shroom Stew", array6[num].Descr, CraftRequirements(val5, tuple.Item1, val2), val11, tuple.Item4, val2));
				list2.Add(CreateFood(tuple.Item4, array7[num].Sprite, tuple.Item3 + " Gourmet Stew", array7[num].Descr, CraftRequirements(val5, val, tuple.Item1, val2), val11, val, tuple.Item4, val2));
				num++;
			}
			val12.sprite = Resources.PieAppleSprite;
			val13.sprite = Resources.PieMeatSprite;
			int num2 = ItemManager.Instance.allScriptableItems.Length;
			foreach (InventoryItem item in list2)
			{
				item.id = num2++;
				ItemManager.Instance.allItems.Add(item.id, item);
				Plugin.Log.LogItemCreated(item);
			}
			ItemManager.Instance.allScriptableItems = ItemManager.Instance.allScriptableItems.Concat(list2).ToArray();
			NewFoods = list2.ToArray();
		}

		[HarmonyPatch(typeof(CauldronUI), "Awake")]
		[HarmonyPostfix]
		private static void AddFoodsToCauldron()
		{
			CauldronUI.Instance.processableFood = CauldronUI.Instance.processableFood.Concat(NewFoods).ToArray();
		}

		private static InventoryItem CreateFood(InventoryItem baseItem, Sprite sprite, string name, string descr, CraftRequirement[] requirements, params InventoryItem[] restoresSumOf)
		{
			Plugin.Log.LogInfo((object)("Making: " + name));
			Restoration resto = Restoration.FromIngredients(restoresSumOf);
			InventoryItem val = Clone(baseItem, name, descr, sprite, requirements, resto);
			Plugin.Log.LogInfo((object)("Added food \"" + name + "\" which restores " + resto.Heal + " Health, " + resto.Hunger + " Hunger, " + resto.Stamina + " Stamina. Made from: " + string.Join(",", val.requirements.Select((CraftRequirement x) => x.item.name))));
			return val;
		}

		private static CraftRequirement[] CraftRequirements(params InventoryItem[] items)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			CraftRequirement[] array = (CraftRequirement[])(object)new CraftRequirement[items.Length];
			for (int i = 0; i < items.Length; i++)
			{
				array[i] = new CraftRequirement
				{
					item = items[i],
					amount = 1
				};
			}
			return array;
		}

		private static void SetStats(InventoryItem food, float heal, float hunger, float stamina)
		{
			food.heal = heal;
			food.hunger = hunger;
			food.stamina = stamina;
		}

		private static InventoryItem Clone(InventoryItem item, string name, string description, Sprite sprite, CraftRequirement[] requirements, Restoration resto)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			InventoryItem val = ScriptableObject.CreateInstance<InventoryItem>();
			val.material = item.material;
			val.sprite = sprite;
			val.name = name;
			val.description = description;
			val.requirements = requirements;
			resto.Apply(val);
			val.important = false;
			val.type = (ItemType)8;
			val.tier = item.tier;
			val.mesh = item.mesh;
			val.rotationOffset = item.rotationOffset;
			val.positionOffset = item.positionOffset;
			val.scale = item.scale;
			val.stackable = true;
			val.amount = 1;
			val.max = 69;
			val.resourceDamage = 1;
			val.attackDamage = 1;
			val.attackSpeed = 1f;
			val.attackRange = 0f;
			val.sharpness = 0f;
			val.craftable = false;
			val.unlockWithFirstRequirementOnly = item.unlockWithFirstRequirementOnly;
			val.stationRequirement = item.stationRequirement;
			val.buildable = false;
			val.grid = false;
			val.prefab = item.prefab;
			val.buildRotation = item.buildRotation;
			val.processable = false;
			val.processType = item.processType;
			val.processedItem = item.processedItem;
			val.processTime = 5f;
			val.armor = 0;
			val.swingFx = item.swingFx;
			val.bowComponent = item.bowComponent;
			val.armorComponent = item.armorComponent;
			val.fuel = item.fuel;
			val.tag = (ItemTag)2;
			val.rarity = item.rarity;
			val.attackTypes = item.attackTypes;
			((Object)val).hideFlags = ((Object)item).hideFlags;
			val.craftAmount = 1;
			return val;
		}
	}
	public sealed class DescrSprite
	{
		public string Descr { get; }

		public Sprite Sprite { get; }

		public DescrSprite(string descr, Sprite sprite)
		{
			Descr = descr;
			Sprite = sprite;
		}
	}
	[BepInPlugin("MuckFoods.MichMcb", "Muck Foods", "1.4.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log = null;

		public static bool RebalanceFoods = true;

		public static float CookHealthBonus = 5f;

		public static float CookHungerBonus = 5f;

		public static float CookStaminaBonus = 5f;

		public static float[] HealthBonus = new float[4];

		public static float[] HungerBonus = new float[4];

		public static float[] StaminaBonus = new float[4];

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Config.SaveOnConfigSet = false;
			RebalanceFoods = ((BaseUnityPlugin)this).Config.Bind<bool>("Main", "RebalanceFoods", RebalanceFoods, "If true, then vanilla foods' Health/Hunger/Stamina will be rebalanced. These foods will be affected:\nApple: 5/15/5 -> 4/4/4\nRaw Meat: 5/10/0 -> 6/6/3\nGulpon Shroom: 12 Health -> 10 Health\nLigon Shroom: 12 Hunger -> 10 Hunger\nSugon Shroom: 12 Stamina -> 10 Stamina\nSlurbon Shroon: 15/15/15 -> 10/10/10\nRed Soup: 30/10/10 -> 25/10/10\nYellow Soup: 10/50/10 -> 10/25/10\nPurple Soup: 10/10/40 -> 10/10/25\nWeird Soup: 40/40/40 -> 30/30/30Cooked Meat: 20/50/5 -> Depends on config\nMeat Soup: 30/50/20 -> Depends on config\nApple Pie: 30/60/20 -> Depends on config\nMeat Pie: 30/60/20 -> Depends on config").Value;
			CookHealthBonus = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "CookHealthBonus", CookHealthBonus, "The base bonus to health that foods gain when cooked. Additive with bonuses for multiple ingredients").Value;
			CookHungerBonus = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "CookHungerBonus", CookHungerBonus, "The base bonus to hunger that foods gain when cooked. Additive with bonuses for multiple ingredients").Value;
			CookStaminaBonus = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "CookStaminaBonus", CookStaminaBonus, "The base bonus to stamina that foods gain when cooked. Additive with bonuses for multiple ingredients").Value;
			HealthBonus[0] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "OneFoodHealthBonus", 0f, "The bonus to health that foods with 1 ingredient gain").Value;
			HungerBonus[0] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "OneFoodHungerBonus", 0f, "The bonus to hunger that foods with 1 ingredient gain").Value;
			StaminaBonus[0] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "OneFoodStaminaBonus", 0f, "The bonus to stamina that foods with 1 ingredient gain").Value;
			HealthBonus[1] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "TwoFoodHealthBonus", 3f, "The bonus to health that foods with 2 ingredients gain").Value;
			HungerBonus[1] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "TwoFoodHungerBonus", 3f, "The bonus to hunger that foods with 2 ingredients gain").Value;
			StaminaBonus[1] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "TwoFoodStaminaBonus", 3f, "The bonus to stamina that foods with 2 ingredients gain").Value;
			HealthBonus[2] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "ThreeFoodHealthBonus", 6f, "The bonus to health that foods with 3 ingredients gain").Value;
			HungerBonus[2] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "ThreeFoodHungerBonus", 6f, "The bonus to hunger that foods with 3 ingredients gain").Value;
			StaminaBonus[2] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "ThreeFoodStaminaBonus", 6f, "The bonus to stamina that foods with 3 ingredients gain").Value;
			HealthBonus[3] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "FourFoodHealthBonus", 10f, "The bonus to health that foods with 4 ingredients gain").Value;
			HungerBonus[3] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "FourFoodHungerBonus", 10f, "The bonus to hunger that foods with 4 ingredients gain").Value;
			StaminaBonus[3] = ((BaseUnityPlugin)this).Config.Bind<float>("Main", "FourFoodStaminaBonus", 10f, "The bonus to stamina that foods with 4 ingredients gain").Value;
			((BaseUnityPlugin)this).Config.Save();
			Resources.Load();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"MuckFoods loaded!");
			Harmony.CreateAndPatchAll(typeof(CreateRecipesPatch), (string)null);
		}
	}
	public static class Resources
	{
		public static Sprite AppleBakedSprite;

		public static Sprite AppleMeatStewSprite;

		public static Sprite FlaxseedBreadSprite;

		public static Sprite LessWeirdSoupSprite;

		public static Sprite PieAppleMeatSprite;

		public static Sprite PieAppleSprite;

		public static Sprite PieMeatSprite;

		public static Sprite PiePurpleAppleSprite;

		public static Sprite PiePurpleMeatSprite;

		public static Sprite PiePurpleSprite;

		public static Sprite PieRedAppleSprite;

		public static Sprite PieRedMeatSprite;

		public static Sprite PieRedSprite;

		public static Sprite PieSusAppleSprite;

		public static Sprite PieSusMeatSprite;

		public static Sprite PieSusSprite;

		public static Sprite PieYellowAppleSprite;

		public static Sprite PieYellowMeatSprite;

		public static Sprite PieYellowSprite;

		public static Sprite SoupPurpleAppleMeatSprite;

		public static Sprite SoupPurpleAppleSprite;

		public static Sprite SoupPurpleMeatSprite;

		public static Sprite SoupRedAppleMeatSprite;

		public static Sprite SoupRedAppleSprite;

		public static Sprite SoupRedMeatSprite;

		public static Sprite SoupSusAppleMeatSprite;

		public static Sprite SoupSusAppleSprite;

		public static Sprite SoupSusMeatSprite;

		public static Sprite SoupYellowAppleMeatSprite;

		public static Sprite SoupYellowAppleSprite;

		public static Sprite SoupYellowMeatSprite;

		public static Sprite ShroomRedToastySprite;

		public static Sprite ShroomYellowToastySprite;

		public static Sprite ShroomPurpleToastySprite;

		public static Sprite ShroomSusToastySprite;

		public static void Load()
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MuckFoods.resources");
			AssetBundle obj = AssetBundle.LoadFromStream(stream);
			AppleBakedSprite = obj.LoadAsset<Sprite>("AppleBaked.png");
			ShroomRedToastySprite = obj.LoadAsset<Sprite>("ShroomRedToasty.png");
			ShroomYellowToastySprite = obj.LoadAsset<Sprite>("ShroomYellowToasty.png");
			ShroomPurpleToastySprite = obj.LoadAsset<Sprite>("ShroomPurpleToasty.png");
			ShroomSusToastySprite = obj.LoadAsset<Sprite>("ShroomSusToasty.png");
			AppleMeatStewSprite = obj.LoadAsset<Sprite>("AppleMeatStew.png");
			FlaxseedBreadSprite = obj.LoadAsset<Sprite>("FlaxseedBread.png");
			LessWeirdSoupSprite = obj.LoadAsset<Sprite>("LessWeirdSoup.png");
			PieAppleMeatSprite = obj.LoadAsset<Sprite>("PieAppleMeat.png");
			PieAppleSprite = obj.LoadAsset<Sprite>("PieApple.png");
			PieMeatSprite = obj.LoadAsset<Sprite>("PieMeat.png");
			PiePurpleAppleSprite = obj.LoadAsset<Sprite>("PiePurpleApple.png");
			PiePurpleMeatSprite = obj.LoadAsset<Sprite>("PiePurpleMeat.png");
			PiePurpleSprite = obj.LoadAsset<Sprite>("PiePurple.png");
			PieRedAppleSprite = obj.LoadAsset<Sprite>("PieRedApple.png");
			PieRedMeatSprite = obj.LoadAsset<Sprite>("PieRedMeat.png");
			PieRedSprite = obj.LoadAsset<Sprite>("PieRed.png");
			PieSusAppleSprite = obj.LoadAsset<Sprite>("PieSusApple.png");
			PieSusMeatSprite = obj.LoadAsset<Sprite>("PieSusMeat.png");
			PieSusSprite = obj.LoadAsset<Sprite>("PieSus.png");
			PieYellowAppleSprite = obj.LoadAsset<Sprite>("PieYellowApple.png");
			PieYellowMeatSprite = obj.LoadAsset<Sprite>("PieYellowMeat.png");
			PieYellowSprite = obj.LoadAsset<Sprite>("PieYellow.png");
			SoupPurpleAppleMeatSprite = obj.LoadAsset<Sprite>("SoupPurpleAppleMeat.png");
			SoupPurpleAppleSprite = obj.LoadAsset<Sprite>("SoupPurpleApple.png");
			SoupPurpleMeatSprite = obj.LoadAsset<Sprite>("SoupPurpleMeat.png");
			SoupRedAppleMeatSprite = obj.LoadAsset<Sprite>("SoupRedAppleMeat.png");
			SoupRedAppleSprite = obj.LoadAsset<Sprite>("SoupRedApple.png");
			SoupRedMeatSprite = obj.LoadAsset<Sprite>("SoupRedMeat.png");
			SoupSusAppleMeatSprite = obj.LoadAsset<Sprite>("SoupSusAppleMeat.png");
			SoupSusAppleSprite = obj.LoadAsset<Sprite>("SoupSusApple.png");
			SoupSusMeatSprite = obj.LoadAsset<Sprite>("SoupSusMeat.png");
			SoupYellowAppleMeatSprite = obj.LoadAsset<Sprite>("SoupYellowAppleMeat.png");
			SoupYellowAppleSprite = obj.LoadAsset<Sprite>("SoupYellowApple.png");
			SoupYellowMeatSprite = obj.LoadAsset<Sprite>("SoupYellowMeat.png");
			Plugin.Log.LogInfo((object)"Assets loaded");
		}
	}
	public readonly struct Restoration
	{
		public float Heal { get; }

		public float Hunger { get; }

		public float Stamina { get; }

		public Restoration(float heal, float hunger, float stamina)
		{
			Heal = heal;
			Hunger = hunger;
			Stamina = stamina;
		}

		public void Apply(InventoryItem item)
		{
			item.heal = Math.Max(0f, Heal);
			item.hunger = Math.Max(0f, Hunger);
			item.stamina = Math.Max(0f, Stamina);
		}

		public static Restoration FromItem(InventoryItem item)
		{
			return new Restoration(item.heal, item.hunger, item.stamina);
		}

		public static Restoration FromFloats(float[] values)
		{
			float heal = ((values.Length != 0) ? values[0] : 0f);
			float hunger = ((values.Length > 1) ? values[1] : 0f);
			float stamina = ((values.Length > 2) ? values[2] : 0f);
			return new Restoration(heal, hunger, stamina);
		}

		public static Restoration FromIngredients(params InventoryItem[] items)
		{
			float num = Plugin.CookHealthBonus + Plugin.HealthBonus[items.Length - 1];
			float num2 = Plugin.CookHungerBonus + Plugin.HungerBonus[items.Length - 1];
			float num3 = Plugin.CookStaminaBonus + Plugin.StaminaBonus[items.Length - 1];
			foreach (InventoryItem val in items)
			{
				Plugin.Log.LogInfo((object)("Adding " + val.name + " ingredient value: " + val.heal + "/" + val.hunger + "/" + val.stamina));
				num += val.heal;
				num2 += val.hunger;
				num3 += val.stamina;
			}
			return new Restoration(num, num2, num3);
		}
	}
}

MuckRememberLobbySettings.dll

Decompiled a year ago
using System;
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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("MuckRememberLobbySettings")]
[assembly: AssemblyConfiguration("RELEASE")]
[assembly: AssemblyDescription("Remembers the settings you selected in the Lobby.")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyInformationalVersion("1.1.0")]
[assembly: AssemblyProduct("MuckRememberLobbySettings")]
[assembly: AssemblyTitle("MuckRememberLobbySettings")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	public static class Extensions
	{
		public static void LogItemCreated(this ManualLogSource log, InventoryItem item)
		{
			log.LogInfo((object)("Item \"" + item.name + "\" created, ID " + item.id));
		}

		public static ConfigEntry<int> BindMoreThanZero(this ConfigFile config, string section, string key, int defaultValue, string description)
		{
			ConfigEntry<int> val = config.Bind<int>(section, key, defaultValue, description);
			if (val.Value <= 0)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static ConfigEntry<float> BindMoreThanZero(this ConfigFile config, string section, string key, float defaultValue, string description)
		{
			ConfigEntry<float> val = config.Bind<float>(section, key, defaultValue, description);
			if (val.Value <= 0f)
			{
				val.Value = defaultValue;
			}
			return val;
		}

		public static InventoryItem Clone(this InventoryItem i)
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			InventoryItem obj = ScriptableObject.CreateInstance<InventoryItem>();
			obj.amount = i.amount;
			obj.armor = i.armor;
			obj.armorComponent = i.armorComponent;
			obj.attackDamage = i.attackDamage;
			obj.attackRange = i.attackRange;
			obj.attackSpeed = i.attackSpeed;
			obj.attackTypes = i.attackTypes;
			obj.bowComponent = i.bowComponent;
			obj.buildRotation = i.buildRotation;
			obj.buildable = i.buildable;
			obj.craftAmount = i.craftAmount;
			obj.craftable = i.craftable;
			obj.description = i.description;
			obj.fuel = i.fuel;
			obj.grid = i.grid;
			obj.heal = i.heal;
			((Object)obj).hideFlags = ((Object)i).hideFlags;
			obj.hunger = i.hunger;
			obj.id = i.id;
			obj.important = i.important;
			obj.material = i.material;
			obj.max = i.max;
			obj.mesh = i.mesh;
			obj.name = i.name;
			obj.positionOffset = i.positionOffset;
			obj.prefab = i.prefab;
			obj.processTime = i.processTime;
			obj.processType = i.processType;
			obj.processable = i.processable;
			obj.processedItem = i.processedItem;
			obj.rarity = i.rarity;
			obj.requirements = i.requirements;
			obj.resourceDamage = i.resourceDamage;
			obj.rotationOffset = i.rotationOffset;
			obj.scale = i.scale;
			obj.sharpness = i.sharpness;
			obj.sprite = i.sprite;
			obj.stackable = i.stackable;
			obj.stamina = i.stamina;
			obj.stationRequirement = i.stationRequirement;
			obj.swingFx = i.swingFx;
			obj.tag = i.tag;
			obj.tier = i.tier;
			obj.type = i.type;
			obj.unlockWithFirstRequirementOnly = i.unlockWithFirstRequirementOnly;
			return obj;
		}
	}
}
namespace MuckRememberLobbySettings
{
	[BepInPlugin("MuckRememberLobbySettings.MichMcb", "Muck Remember Lobby Settings", "1.1.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log;

		public static ConfigFile ConfigFile;

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Config.SaveOnConfigSet = false;
			ConfigFile = ((BaseUnityPlugin)this).Config;
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded MuckRememberLobbySettings!");
			Harmony.CreateAndPatchAll(typeof(SettingsPatch), (string)null);
		}
	}
	public class SettingsPatch
	{
		public static bool DoUpdates = false;

		public static UiSettings? Difficulty = null;

		public static UiSettings? FriendlyFire = null;

		public static UiSettings? Gamemode = null;

		public static TMP_InputField? Seed = null;

		public static MethodInfo UiSettings_UpdateSetting = typeof(UiSettings).GetMethod("UpdateSetting", BindingFlags.Instance | BindingFlags.NonPublic);

		public static ConfigEntry<int> BindSetting(UiSettings s)
		{
			ConfigEntry<int> val = Plugin.ConfigFile.Bind<int>("Main", ((Object)s).name, s.setting, "The last selected setting for " + ((Object)s).name);
			if (val.Value < 0)
			{
				val.Value = s.setting;
			}
			return val;
		}

		public static void UpdateSetting(UiSettings s, int value)
		{
			UiSettings_UpdateSetting.Invoke(s, new object[1] { value });
		}

		[HarmonyPatch(typeof(LobbySettings), "Start")]
		[HarmonyPostfix]
		private static void LobbySettingsStart(LobbySettings __instance)
		{
			DoUpdates = true;
			Seed = __instance.seed;
			Difficulty = __instance.difficultySetting;
			FriendlyFire = __instance.friendlyFireSetting;
			Gamemode = __instance.gamemodeSetting;
			if ((Object)(object)Difficulty != (Object)null)
			{
				int value = BindSetting(Difficulty).Value;
				UpdateSetting(Difficulty, value);
			}
			if ((Object)(object)FriendlyFire != (Object)null)
			{
				int value2 = BindSetting(FriendlyFire).Value;
				UpdateSetting(FriendlyFire, value2);
			}
			if ((Object)(object)Gamemode != (Object)null)
			{
				int value3 = BindSetting(Gamemode).Value;
				UpdateSetting(Gamemode, value3);
			}
			if (Seed != null)
			{
				string value4 = Plugin.ConfigFile.Bind<string>("Main", "seed", Seed.text, "The last seed entered").Value;
				Seed.text = value4;
			}
			Plugin.ConfigFile.Save();
		}

		[HarmonyPatch(typeof(MenuUI), "StartGame")]
		[HarmonyPostfix]
		private static void StartGame()
		{
			DoUpdates = false;
		}

		[HarmonyPatch(typeof(MenuUI), "LeaveGame")]
		[HarmonyPostfix]
		private static void LeaveGame()
		{
			DoUpdates = true;
		}

		[HarmonyPatch(typeof(UiSettings), "UpdateSetting")]
		[HarmonyPostfix]
		private static void UpdateUiSetting()
		{
			if (DoUpdates)
			{
				if ((Object)(object)Difficulty != (Object)null)
				{
					BindSetting(Difficulty).Value = Difficulty.setting;
				}
				if ((Object)(object)FriendlyFire != (Object)null)
				{
					BindSetting(FriendlyFire).Value = FriendlyFire.setting;
				}
				if ((Object)(object)Gamemode != (Object)null)
				{
					BindSetting(Gamemode).Value = Gamemode.setting;
				}
				if (Seed != null)
				{
					Plugin.ConfigFile.Bind<string>("Main", "seed", Seed.text, "The last selected setting for seed").Value = Seed.text;
				}
				Plugin.ConfigFile.Save();
			}
		}
	}
}

BetterControls.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using BetterControls.BuildManagerPatch;
using BetterControls.ChatBoxPatch;
using BetterControls.HotbarPatch;
using BetterControls.InventoryCellPatch;
using BetterControls.LobbyVisualPatch;
using BetterControls.PingControllerPatch;
using BetterControls.PlayerInputPatch;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using MuckSettings;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("Olivier Samson")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Mod that aims to expand the available controls and customize them, all for a smoother interaction with the game.")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.1")]
[assembly: AssemblyProduct("BetterControls")]
[assembly: AssemblyTitle("BetterControls")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace UnityEngine
{
	public static class ExtendCauldronUI
	{
		public static List<KeyValuePair<int, int>> GetAvailableCells(this CauldronUI cauldronUI, InventoryItem item)
		{
			List<KeyValuePair<int, int>> list = new List<KeyValuePair<int, int>>();
			InventoryCell val = null;
			int num = item.amount;
			InventoryCell[] synchedCells = cauldronUI.synchedCells;
			foreach (InventoryCell val2 in synchedCells)
			{
				if (!val2.IsItemCompatibleWithCell(item))
				{
					continue;
				}
				if ((Object)(object)val2.currentItem == (Object)null)
				{
					if ((Object)(object)val == (Object)null)
					{
						val = val2;
					}
				}
				else if (val2.currentItem.id == item.id && val2.currentItem.amount != val2.currentItem.max)
				{
					int num2 = val2.currentItem.max - val2.currentItem.amount;
					if (num2 >= num)
					{
						list.Add(new KeyValuePair<int, int>(val2.cellId, num));
						return list;
					}
					list.Add(new KeyValuePair<int, int>(val2.cellId, num2));
					num -= num2;
				}
			}
			if (num > 0 && (Object)(object)val != (Object)null)
			{
				list.Add(new KeyValuePair<int, int>(val.cellId, num));
			}
			return list;
		}

		public static void AddItemToCauldron(this CauldronUI cauldronUI, InventoryItem item)
		{
			if ((Object)(object)item == (Object)null)
			{
				return;
			}
			List<KeyValuePair<int, int>> availableCells = cauldronUI.GetAvailableCells(item);
			foreach (KeyValuePair<int, int> item2 in availableCells)
			{
				item.amount -= item2.Value;
				int num = item2.Value;
				if ((Object)(object)cauldronUI.synchedCells[item2.Key].currentItem != (Object)null)
				{
					num += cauldronUI.synchedCells[item2.Key].currentItem.amount;
				}
				InventoryItem val = ScriptableObject.CreateInstance<InventoryItem>();
				val.Copy(item, num);
				cauldronUI.synchedCells[item2.Key].currentItem = val;
				cauldronUI.synchedCells[item2.Key].UpdateCell();
				((MonoBehaviour)cauldronUI.synchedCells[item2.Key]).Invoke("GetReady", (float)(NetStatus.GetPing() * 3) * 0.01f);
				ClientSend.ChestUpdate(OtherInput.Instance.currentChest.id, item2.Key, val.id, val.amount);
			}
		}
	}
	public static class ExtendChestUI
	{
		public static List<KeyValuePair<int, int>> GetAvailableCells(this ChestUI chestUI, InventoryItem item)
		{
			List<KeyValuePair<int, int>> list = new List<KeyValuePair<int, int>>();
			InventoryCell val = null;
			int num = item.amount;
			InventoryCell[] cells = chestUI.cells;
			foreach (InventoryCell val2 in cells)
			{
				if (!val2.IsItemCompatibleWithCell(item))
				{
					continue;
				}
				if ((Object)(object)val2.currentItem == (Object)null)
				{
					if ((Object)(object)val == (Object)null)
					{
						val = val2;
					}
				}
				else if (val2.currentItem.id == item.id && val2.currentItem.amount != val2.currentItem.max)
				{
					int num2 = val2.currentItem.max - val2.currentItem.amount;
					if (num2 >= num)
					{
						list.Add(new KeyValuePair<int, int>(val2.cellId, num));
						return list;
					}
					list.Add(new KeyValuePair<int, int>(val2.cellId, num2));
					num -= num2;
				}
			}
			if (num > 0 && (Object)(object)val != (Object)null)
			{
				list.Add(new KeyValuePair<int, int>(val.cellId, num));
			}
			return list;
		}

		public static void AddItemToChest(this ChestUI chestUI, InventoryItem item)
		{
			if ((Object)(object)item == (Object)null)
			{
				return;
			}
			List<KeyValuePair<int, int>> availableCells = chestUI.GetAvailableCells(item);
			foreach (KeyValuePair<int, int> item2 in availableCells)
			{
				item.amount -= item2.Value;
				int num = item2.Value;
				if ((Object)(object)chestUI.cells[item2.Key].currentItem != (Object)null)
				{
					num += chestUI.cells[item2.Key].currentItem.amount;
				}
				InventoryItem val = ScriptableObject.CreateInstance<InventoryItem>();
				val.Copy(item, num);
				chestUI.cells[item2.Key].currentItem = val;
				chestUI.cells[item2.Key].UpdateCell();
				((MonoBehaviour)chestUI.cells[item2.Key]).Invoke("GetReady", (float)(NetStatus.GetPing() * 3) * 0.01f);
				ClientSend.ChestUpdate(OtherInput.Instance.currentChest.id, item2.Key, val.id, val.amount);
			}
		}
	}
	public static class ExtendFurnaceUI
	{
		public static List<KeyValuePair<int, int>> GetAvailableCells(this FurnaceUI furnaceUI, InventoryItem item)
		{
			List<KeyValuePair<int, int>> list = new List<KeyValuePair<int, int>>();
			InventoryCell val = null;
			int num = item.amount;
			InventoryCell[] synchedCells = furnaceUI.synchedCells;
			foreach (InventoryCell val2 in synchedCells)
			{
				if (!val2.IsItemCompatibleWithCell(item))
				{
					continue;
				}
				if ((Object)(object)val2.currentItem == (Object)null)
				{
					if ((Object)(object)val == (Object)null)
					{
						val = val2;
					}
				}
				else if (val2.currentItem.id == item.id && val2.currentItem.amount != val2.currentItem.max)
				{
					int num2 = val2.currentItem.max - val2.currentItem.amount;
					if (num2 >= num)
					{
						list.Add(new KeyValuePair<int, int>(val2.cellId, num));
						return list;
					}
					list.Add(new KeyValuePair<int, int>(val2.cellId, num2));
					num -= num2;
				}
			}
			if (num > 0 && (Object)(object)val != (Object)null)
			{
				list.Add(new KeyValuePair<int, int>(val.cellId, num));
			}
			return list;
		}

		public static void AddItemToFurnace(this FurnaceUI furnaceUI, InventoryItem item)
		{
			if ((Object)(object)item == (Object)null)
			{
				return;
			}
			List<KeyValuePair<int, int>> availableCells = furnaceUI.GetAvailableCells(item);
			foreach (KeyValuePair<int, int> item2 in availableCells)
			{
				item.amount -= item2.Value;
				int num = item2.Value;
				if ((Object)(object)furnaceUI.synchedCells[item2.Key].currentItem != (Object)null)
				{
					num += furnaceUI.synchedCells[item2.Key].currentItem.amount;
				}
				InventoryItem val = ScriptableObject.CreateInstance<InventoryItem>();
				val.Copy(item, num);
				furnaceUI.synchedCells[item2.Key].currentItem = val;
				furnaceUI.synchedCells[item2.Key].UpdateCell();
				((MonoBehaviour)furnaceUI.synchedCells[item2.Key]).Invoke("GetReady", (float)(NetStatus.GetPing() * 3) * 0.01f);
				ClientSend.ChestUpdate(OtherInput.Instance.currentChest.id, item2.Key, val.id, val.amount);
			}
		}
	}
	public static class ExtendHotbar
	{
		public class LastActiveValue
		{
			public int Value;
		}

		private static readonly ConditionalWeakTable<Hotbar, LastActiveValue> LastActive = new ConditionalWeakTable<Hotbar, LastActiveValue>();

		public static LastActiveValue GetLastActive(this Hotbar hotbar)
		{
			return LastActive.GetOrCreateValue(hotbar);
		}

		public static void SetLastActive(this Hotbar hotbar, int value)
		{
			LastActive.GetOrCreateValue(hotbar).Value = value;
		}
	}
	public static class ExtendInventoryCell
	{
		public static bool IsItemCompatibleWithCell(this InventoryCell inventoryCell, InventoryItem item)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			if (inventoryCell.tags.Length == 0)
			{
				return true;
			}
			ItemTag[] tags = inventoryCell.tags;
			foreach (ItemTag val in tags)
			{
				if (item.tag == val)
				{
					return true;
				}
			}
			return false;
		}

		public static void ShiftRightClick(this InventoryCell inventoryCell)
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Expected I4, but got Unknown
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Expected O, but got Unknown
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Expected O, but got Unknown
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Expected O, but got Unknown
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Invalid comparison between Unknown and I4
			if ((Object)(object)inventoryCell.currentItem == (Object)null)
			{
				return;
			}
			InventoryItem val;
			InventoryItem val2;
			if (inventoryCell.currentItem.amount > 1)
			{
				int num = inventoryCell.currentItem.amount / 2;
				int num2 = inventoryCell.currentItem.amount - num;
				val = ScriptableObject.CreateInstance<InventoryItem>();
				val.Copy(inventoryCell.currentItem, num);
				val2 = ScriptableObject.CreateInstance<InventoryItem>();
				val2.Copy(inventoryCell.currentItem, num2);
			}
			else
			{
				val = null;
				val2 = inventoryCell.currentItem;
			}
			CellType cellType = inventoryCell.cellType;
			CellType val3 = cellType;
			if ((int)val3 != 0)
			{
				if ((int)val3 == 2 && InventoryUI.Instance.CanPickup(inventoryCell.currentItem))
				{
					inventoryCell.currentItem = val;
					inventoryCell.UpdateCell();
					InventoryUI.Instance.AddItemToInventory(val2);
					int num3 = -1;
					int num4 = 0;
					if (Object.op_Implicit((Object)(object)inventoryCell.currentItem))
					{
						num3 = inventoryCell.currentItem.id;
						num4 = inventoryCell.currentItem.amount;
					}
					float num5 = 1f;
					((MonoBehaviour)inventoryCell).Invoke("GetReady", num5);
					ClientSend.ChestUpdate(OtherInput.Instance.currentChest.id, inventoryCell.cellId, num3, num4);
					AchievementManager.Instance.PickupItem(inventoryCell.currentItem);
				}
				return;
			}
			CraftingState craftingState = OtherInput.Instance.craftingState;
			CraftingState val4 = craftingState;
			switch (val4 - 3)
			{
			case 3:
				inventoryCell.currentItem = val;
				ExtendChestUI.AddItemToChest((ChestUI)OtherInput.Instance.chest, val2);
				if ((Object)(object)inventoryCell.currentItem != (Object)null)
				{
					InventoryItem currentItem2 = inventoryCell.currentItem;
					currentItem2.amount += val2.amount;
				}
				else if (val2.amount != 0)
				{
					inventoryCell.currentItem = val2;
				}
				inventoryCell.UpdateCell();
				break;
			case 0:
				inventoryCell.currentItem = val;
				ExtendCauldronUI.AddItemToCauldron((CauldronUI)OtherInput.Instance.cauldron, val2);
				if ((Object)(object)inventoryCell.currentItem != (Object)null)
				{
					InventoryItem currentItem3 = inventoryCell.currentItem;
					currentItem3.amount += val2.amount;
				}
				else if (val2.amount != 0)
				{
					inventoryCell.currentItem = val2;
				}
				inventoryCell.UpdateCell();
				break;
			case 2:
				inventoryCell.currentItem = val;
				ExtendFurnaceUI.AddItemToFurnace((FurnaceUI)OtherInput.Instance.furnace, val2);
				if ((Object)(object)inventoryCell.currentItem != (Object)null)
				{
					InventoryItem currentItem = inventoryCell.currentItem;
					currentItem.amount += val2.amount;
				}
				else if (val2.amount != 0)
				{
					inventoryCell.currentItem = val2;
				}
				inventoryCell.UpdateCell();
				break;
			case 1:
				break;
			}
		}
	}
}
namespace BetterControls
{
	public static class ControlsConfig
	{
		public static ConfigFile Config = new ConfigFile(Path.Combine(Paths.ConfigPath, "bettercontrols.cfg"), true);

		[HarmonyPatch(typeof(Settings), "Controls")]
		[HarmonyPrefix]
		private static void Controls(Page page)
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			page.AddControlSetting("Ping", NewInputs.Ping);
			page.AddControlSetting("Open Chat", NewInputs.Chat);
			if (((ConfigEntryBase)NewInputs.Rotate).DefaultValue == null)
			{
				((ConfigEntryBase)NewInputs.Rotate).BoxedValue = (object)(KeyCode)114;
			}
			page.AddControlSetting("Rotate Build", (KeyCode)((ConfigEntryBase)NewInputs.Rotate).BoxedValue, (Action<KeyCode>)delegate(KeyCode keyCode)
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				((ConfigEntryBase)NewInputs.Rotate).BoxedValue = keyCode;
				Scene activeScene = SceneManager.GetActiveScene();
				if (((Scene)(ref activeScene)).name == "GameAfterLobby")
				{
					TextMeshProUGUI component = ((Component)BuildManager.Instance.rotateText.transform.GetChild(0)).gameObject.GetComponent<TextMeshProUGUI>();
					((TMP_Text)component).SetText("Press " + ((object)(KeyCode)(ref keyCode)).ToString() + " to rotate build", true);
				}
			});
			page.AddControlSetting("Drop Item", NewInputs.Drop);
			page.AddControlSetting("Last Selected Hotbar Cell", NewInputs.Hotbar.LastSelected);
			for (int i = 0; i < NewInputs.Hotbar.Cells.Length; i++)
			{
				page.AddControlSetting($"Hotbar Cell {i + 1}", NewInputs.Hotbar.Cells[i]);
			}
		}
	}
	public static class NewInputs
	{
		public static class Hotbar
		{
			public static ConfigEntry<KeyCode> LastSelected = ControlsConfig.Config.Bind<KeyCode>("Hotbar", "lastSelected", (KeyCode)113, "Last selected hotbar cell.");

			public static ConfigEntry<KeyCode>[] Cells = new ConfigEntry<KeyCode>[7]
			{
				ControlsConfig.Config.Bind<KeyCode>("Hotbar", "cell1", (KeyCode)49, "Hotbar cell 1."),
				ControlsConfig.Config.Bind<KeyCode>("Hotbar", "cell2", (KeyCode)50, "Hotbar cell 2."),
				ControlsConfig.Config.Bind<KeyCode>("Hotbar", "cell3", (KeyCode)51, "Hotbar cell 3."),
				ControlsConfig.Config.Bind<KeyCode>("Hotbar", "cell4", (KeyCode)52, "Hotbar cell 4."),
				ControlsConfig.Config.Bind<KeyCode>("Hotbar", "cell5", (KeyCode)53, "Hotbar cell 5."),
				ControlsConfig.Config.Bind<KeyCode>("Hotbar", "cell6", (KeyCode)54, "Hotbar cell 6."),
				ControlsConfig.Config.Bind<KeyCode>("Hotbar", "cell7", (KeyCode)55, "Hotbar cell 7.")
			};
		}

		public static ConfigEntry<KeyCode> Ping = ControlsConfig.Config.Bind<KeyCode>("Ping", "ping", (KeyCode)325, "Player ping.");

		public static ConfigEntry<KeyCode> Chat = ControlsConfig.Config.Bind<KeyCode>("Chat", "openChat", (KeyCode)13, "Open chat.");

		public static ConfigEntry<KeyCode> Rotate = ControlsConfig.Config.Bind<KeyCode>("Build", "rotateBuild", (KeyCode)114, "Rotate build.");

		public static ConfigEntry<KeyCode> Drop = ControlsConfig.Config.Bind<KeyCode>("Drop", "dropItem", (KeyCode)103, "Drop item.");
	}
	public static class Globals
	{
		public const string PLUGIN_GUID = "muck.mrboxxy.bettercontrols";

		public const string PLUGIN_NAME = "BetterControls";

		public const string PLUGIN_VERSION = "1.1.1";
	}
	[BepInPlugin("muck.mrboxxy.bettercontrols", "BetterControls", "1.1.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log;

		public Harmony harmony;

		private void Awake()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			harmony = new Harmony("BetterControls");
			ControlsConfig.Config.SaveOnConfigSet = true;
			harmony.PatchAll(typeof(ControlsConfig));
			Log.LogInfo((object)"Patched MuckSettings.Settings.Controls()");
			harmony.PatchAll(typeof(BetterControls.PingControllerPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched PingController.Update()");
			harmony.PatchAll(typeof(BetterControls.ChatBoxPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched ChatBox.UserInput()");
			harmony.PatchAll(typeof(BetterControls.LobbyVisualPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched LobbyVisual.Awake()");
			harmony.PatchAll(typeof(UpdateTranspiler));
			harmony.PatchAll(typeof(BetterControls.HotbarPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched Hotbar.Update()");
			harmony.PatchAll(typeof(BetterControls.InventoryCellPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched InventoryCell.OnPointerDown()");
			Log.LogInfo((object)"Patched InventoryCell.ShiftClick()");
			harmony.PatchAll(typeof(MyInputTranspiler));
			harmony.PatchAll(typeof(BetterControls.PlayerInputPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched PlayerInput.MyInput()");
			harmony.PatchAll(typeof(BetterControls.BuildManagerPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched BuildManager.Awake()");
		}
	}
}
namespace BetterControls.PlayerInputPatch
{
	[HarmonyPatch(typeof(PlayerInput), "MyInput")]
	internal class MyInputTranspiler
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldc_I4_S, (object)null, (string)null)
			});
			val.SetInstruction(CodeInstructionExtensions.WithLabels(Transpilers.EmitDelegate<Func<KeyCode>>((Func<KeyCode>)(() => NewInputs.Rotate.Value)), (IEnumerable<Label>)val.Labels));
			return val.InstructionEnumeration();
		}
	}
	public static class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(PlayerInput), "MyInput")]
		[HarmonyPrefix]
		public static bool MyInputPrefix(PlayerInput __instance)
		{
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			if (OtherInput.Instance.OtherUiActive() && !Map.Instance.active)
			{
				AccessTools.Method(typeof(PlayerInput), "StopInput", (Type[])null, (Type[])null).Invoke(__instance, null);
				return false;
			}
			if (Input.GetKeyDown(NewInputs.Drop.Value))
			{
				if (((Component)InventoryUI.Instance).gameObject.activeInHierarchy)
				{
					if ((Object)(object)InventoryUI.Instance.currentMouseItem != (Object)null)
					{
						InventoryUI.Instance.DropItem((PointerEventData)null);
					}
				}
				else if ((Object)(object)Hotbar.Instance.currentItem != (Object)null)
				{
					InventoryUI.Instance.currentMouseItem = Hotbar.Instance.currentItem;
					InventoryUI.Instance.DropItem((PointerEventData)null);
					Hotbar.Instance.UseItem(Hotbar.Instance.currentItem.amount);
				}
			}
			return true;
		}
	}
}
namespace BetterControls.PingControllerPatch
{
	public class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(PingController), "Update")]
		[HarmonyPrefix]
		public static bool UpdatePrefix(PingController __instance)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if (!OtherInput.Instance.OtherUiActive() && Input.GetKeyDown(NewInputs.Ping.Value))
			{
				AccessTools.Method(typeof(PingController), "LocalPing", (Type[])null, (Type[])null).Invoke(__instance, null);
			}
			return false;
		}
	}
}
namespace BetterControls.LobbyVisualPatch
{
	public class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(LobbyVisuals), "OpenLobby")]
		[HarmonyPostfix]
		private static void AwakePostfix()
		{
			EscapeUI val = ((Component)LobbyVisuals.Instance).gameObject.AddComponent<EscapeUI>();
			MenuUI menuUi = LobbyVisuals.Instance.menuUi;
			val.backBtn = ((Component)menuUi.lobbyUi.transform.Find("LobbyDetails").Find("BackBtn")).GetComponent<Button>();
		}

		[HarmonyPatch(typeof(LobbyVisuals), "CloseLobby")]
		[HarmonyPostfix]
		private static void CloseLobbyPostfix()
		{
			Object.Destroy((Object)(object)((Component)LobbyVisuals.Instance).gameObject.GetComponent<EscapeUI>());
		}
	}
}
namespace BetterControls.InventoryCellPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(InventoryCell), "OnPointerDown")]
		[HarmonyPrefix]
		public static bool OnPointerDownPrefix(InventoryCell __instance, PointerEventData eventData, ref bool ___ready)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Invalid comparison between Unknown and I4
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Invalid comparison between Unknown and I4
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Invalid comparison between Unknown and I4
			if (!___ready)
			{
				return false;
			}
			if (Input.GetKey((KeyCode)304) && (int)eventData.button == 1 && (int)__instance.cellType != 1)
			{
				___ready = false;
				((MonoBehaviour)__instance).Invoke("GetReady", Time.deltaTime * 2f);
				__instance.ShiftRightClick();
				return false;
			}
			if (Input.GetKey(NewInputs.Drop.Value) && (Object)(object)__instance.currentItem != (Object)null)
			{
				___ready = false;
				((MonoBehaviour)__instance).Invoke("GetReady", Time.deltaTime * 2f);
				if ((int)eventData.button == 1)
				{
					InventoryItem val;
					InventoryItem val2;
					if (__instance.currentItem.amount > 1)
					{
						int num = __instance.currentItem.amount / 2;
						int num2 = __instance.currentItem.amount - num;
						val = ScriptableObject.CreateInstance<InventoryItem>();
						val.Copy(__instance.currentItem, num);
						val2 = ScriptableObject.CreateInstance<InventoryItem>();
						val2.Copy(__instance.currentItem, num2);
					}
					else
					{
						val = null;
						val2 = __instance.currentItem;
					}
					InventoryUI.Instance.currentMouseItem = val2;
					InventoryUI.Instance.DropItem((PointerEventData)null);
					__instance.currentItem = val;
					__instance.UpdateCell();
				}
				else
				{
					InventoryUI.Instance.currentMouseItem = __instance.currentItem;
					InventoryUI.Instance.DropItem((PointerEventData)null);
					__instance.RemoveItem();
				}
				if ((int)__instance.cellType == 2)
				{
					int num3 = -1;
					int num4 = 0;
					if (Object.op_Implicit((Object)(object)__instance.currentItem))
					{
						num3 = __instance.currentItem.id;
						num4 = __instance.currentItem.amount;
					}
					ClientSend.ChestUpdate(OtherInput.Instance.currentChest.id, __instance.cellId, num3, num4);
				}
				return false;
			}
			return true;
		}

		[HarmonyPatch(typeof(InventoryCell), "ShiftClick")]
		[HarmonyPrefix]
		public static bool ShiftClickPrefix(InventoryCell __instance)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Expected I4, but got Unknown
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Expected O, but got Unknown
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			if ((int)__instance.cellType == 0)
			{
				InventoryItem currentItem = null;
				InventoryItem currentItem2 = __instance.currentItem;
				CraftingState craftingState = OtherInput.Instance.craftingState;
				CraftingState val = craftingState;
				switch (val - 3)
				{
				case 3:
					__instance.currentItem = currentItem;
					ExtendChestUI.AddItemToChest((ChestUI)OtherInput.Instance.chest, currentItem2);
					if ((Object)(object)__instance.currentItem != (Object)null)
					{
						InventoryItem currentItem4 = __instance.currentItem;
						currentItem4.amount += currentItem2.amount;
					}
					else if (currentItem2.amount != 0)
					{
						__instance.currentItem = currentItem2;
					}
					__instance.UpdateCell();
					break;
				case 0:
					__instance.currentItem = currentItem;
					ExtendCauldronUI.AddItemToCauldron((CauldronUI)OtherInput.Instance.cauldron, currentItem2);
					if ((Object)(object)__instance.currentItem != (Object)null)
					{
						InventoryItem currentItem5 = __instance.currentItem;
						currentItem5.amount += currentItem2.amount;
					}
					else if (currentItem2.amount != 0)
					{
						__instance.currentItem = currentItem2;
					}
					__instance.UpdateCell();
					break;
				case 2:
					__instance.currentItem = currentItem;
					ExtendFurnaceUI.AddItemToFurnace((FurnaceUI)OtherInput.Instance.furnace, currentItem2);
					if ((Object)(object)__instance.currentItem != (Object)null)
					{
						InventoryItem currentItem3 = __instance.currentItem;
						currentItem3.amount += currentItem2.amount;
					}
					else if (currentItem2.amount != 0)
					{
						__instance.currentItem = currentItem2;
					}
					__instance.UpdateCell();
					break;
				}
				return false;
			}
			return true;
		}
	}
}
namespace BetterControls.HotbarPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(Hotbar), "Update")]
		[HarmonyPrefix]
		public static bool UpdatePrefix(ref Hotbar __instance, ref int ___currentActive, ref int __state)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			__state = ___currentActive;
			if (Input.GetKeyDown(NewInputs.Hotbar.LastSelected.Value))
			{
				___currentActive = __instance.GetLastActive().Value;
				__instance.UpdateHotbar();
				return false;
			}
			return true;
		}

		[HarmonyPatch(typeof(Hotbar), "Update")]
		[HarmonyPostfix]
		public static void UpdatePostfix(ref Hotbar __instance, ref int ___currentActive, ref int __state)
		{
			if (__state != ___currentActive)
			{
				__instance.SetLastActive(__state);
			}
		}
	}
	[HarmonyPatch(typeof(Hotbar), "Update")]
	internal class UpdateTranspiler
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null)
			});
			List<Label> list = CodeInstructionExtensions.ExtractLabels(val.InstructionAt(0));
			val = val.RemoveInstructions(5);
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { CodeInstructionExtensions.WithLabels(new CodeInstruction(OpCodes.Ldloc_1, (object)null), (IEnumerable<Label>)list) });
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<int, bool>>((Func<int, bool>)((int cellIndex) => Input.GetKeyDown(NewInputs.Hotbar.Cells[cellIndex - 1].Value))) });
			return val.InstructionEnumeration();
		}
	}
}
namespace BetterControls.ChatBoxPatch
{
	public class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(ChatBox), "UserInput")]
		[HarmonyPrefix]
		[HarmonyPriority(200)]
		public static bool UpdateMapPrefix(ChatBox __instance)
		{
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.typing)
			{
				if (!__instance.inputField.isFocused)
				{
					((Selectable)__instance.inputField).Select();
				}
				if (Input.GetKeyDown((KeyCode)13))
				{
					__instance.SendMessage(__instance.inputField.text);
				}
				else if (Input.GetKeyDown((KeyCode)27))
				{
					AccessTools.Method(typeof(ChatBox), "ClearMessage", (Type[])null, (Type[])null).Invoke(__instance, null);
					__instance.typing = false;
					((MonoBehaviour)__instance).CancelInvoke("HideChat");
					((MonoBehaviour)__instance).Invoke("HideChat", 5f);
				}
			}
			else if (Input.GetKeyDown(NewInputs.Chat.Value))
			{
				AccessTools.Method(typeof(ChatBox), "ShowChat", (Type[])null, (Type[])null).Invoke(__instance, null);
				((Selectable)__instance.inputField).interactable = true;
				((Selectable)__instance.inputField).Select();
				__instance.typing = true;
			}
			return false;
		}
	}
}
namespace BetterControls.BuildManagerPatch
{
	public static class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(BuildManager), "Awake")]
		[HarmonyPostfix]
		public static void AwakePostfix(BuildManager __instance)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			TextMeshProUGUI component = ((Component)__instance.rotateText.transform.GetChild(0)).gameObject.GetComponent<TextMeshProUGUI>();
			KeyCode value = NewInputs.Rotate.Value;
			((TMP_Text)component).SetText("Press " + ((object)(KeyCode)(ref value)).ToString() + " to rotate build", true);
		}
	}
}

BugFixes.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using BugFixes;
using BugFixes.AchievementManagerPatch;
using BugFixes.ContinousHitboxPatch;
using BugFixes.DetectInteractablesPatch;
using BugFixes.GameManagerPatch;
using BugFixes.GenerateCampPatch;
using BugFixes.GuardianSpawnerPatch;
using BugFixes.HitableMobPatch;
using BugFixes.InventoryUIPatch;
using BugFixes.LobbyVisualsPatch;
using BugFixes.MoveCameraPatch;
using BugFixes.ResourceGeneratorPatch;
using BugFixes.SpawnZoneGeneratorPatch;
using BugFixes.SpawnZonePatch;
using BugFixes.StructureSpawnerPatch;
using BugFixes.UiControllerPatch;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Steamworks;
using Steamworks.Data;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("Olivier Samson")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Mod that aims to add various bug fixes to the game.")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyInformationalVersion("1.6.0")]
[assembly: AssemblyProduct("BugFixes")]
[assembly: AssemblyTitle("BugFixes")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/oliviersamson/Muck-BugFixes")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.6.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BugFixes
{
	public static class Globals
	{
		public const string PLUGIN_GUID = "muck.mrboxxy.bugfixes";

		public const string PLUGIN_NAME = "BugFixes";

		public const string PLUGIN_VERSION = "1.6.0";
	}
	[BepInPlugin("muck.mrboxxy.bugfixes", "BugFixes", "1.6.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log;

		public Harmony harmony;

		private void Awake()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			harmony = new Harmony("BugFixes");
			harmony.PatchAll(typeof(BugFixes.GameManagerPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched GameManager.Start()");
			Log.LogInfo((object)"Patched GameManager.Awake()");
			harmony.PatchAll(typeof(SpawnObjects_GameObject));
			Log.LogInfo((object)"Patched GenerateCamp.SpawnObjects(GameObject, int, ConsistentRandom)");
			harmony.PatchAll(typeof(SpawnObjects_StructureSpawner));
			Log.LogInfo((object)"Patched GenerateCamp.SpawnObjects(StructureSpawner, int, ConsistentRandom)");
			harmony.PatchAll(typeof(BugFixes.StructureSpawnerPatch.Start));
			Log.LogInfo((object)"Patched StructureSpawner.Start()");
			harmony.PatchAll(typeof(BugFixes.ResourceGeneratorPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched ResourceGenerator.SpawnTree(Vector3 pos)");
			Log.LogInfo((object)"Patched ResourceGenerator.GenerateForest()");
			harmony.PatchAll(typeof(BugFixes.ContinousHitboxPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched ContinousHitbox.ResetHitbox()");
			harmony.PatchAll(typeof(BugFixes.SpawnZoneGeneratorPatch.Start));
			Log.LogInfo((object)"Patched SpawnZoneGenerator.Start()");
			harmony.PatchAll(typeof(FindRandomPosTranspiler));
			Log.LogInfo((object)"Patched SpawnZone.FindRandomPos()");
			harmony.PatchAll(typeof(BugFixes.HitableMobPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched HitableMob.OnKill()");
			harmony.PatchAll(typeof(BugFixes.InventoryUIPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched InventoryUI.Repair()");
			Log.LogInfo((object)"Patched InventoryUI.AddItemToInventory()");
			harmony.PatchAll(typeof(BugFixes.LobbyVisualsPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched LobbyVisuals.Awake()");
			harmony.PatchAll(typeof(StartTranspiler));
			Log.LogInfo((object)"Patched GuardianSpawner.Start()");
			harmony.PatchAll(typeof(BugFixes.UiControllerPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched UiController.Awake()");
			harmony.PatchAll(typeof(BugFixes.AchievementManagerPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched AchievementManager.Awake()");
			Log.LogInfo((object)"Patched AchievementManager.AddKill()");
			Log.LogInfo((object)"Patched AchievementManager.StartGame()");
			harmony.PatchAll(typeof(BugFixes.MoveCameraPatch.PrefixesAndPostfixes));
			Log.LogInfo((object)"Patched MoveCamera.SpectateCamera()");
			harmony.PatchAll(typeof(UpdateTranspiler));
			Log.LogInfo((object)"Patched DetectInteractables.Update()");
		}
	}
}
namespace BugFixes.UiControllerPatch
{
	public static class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(UiController), "Awake")]
		[HarmonyPostfix]
		public static void AwakePostfix(UiController __instance)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			Plugin.Log.LogDebug((object)"Adding back button callback on settings menu to set the pause UI active again");
			GameObject pauseUI = ((Component)((Component)__instance).transform.Find("PauseUI")).gameObject;
			Settings component = ((Component)((Component)__instance).transform.Find("Settings")).gameObject.GetComponent<Settings>();
			((UnityEvent)component.backBtn.onClick).AddListener((UnityAction)delegate
			{
				pauseUI.SetActive(true);
			});
			Transform val = ((Component)__instance).transform.Find("KeyListener");
			val.SetAsLastSibling();
		}
	}
}
namespace BugFixes.StructureSpawnerPatch
{
	[HarmonyPatch(typeof(StructureSpawner), "Start")]
	internal class Start
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Expected O, but got Unknown
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Expected O, but got Unknown
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Expected O, but got Unknown
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Br, (object)null, (string)null)
			});
			Label label = generator.DefineLabel();
			val.SetInstructionAndAdvance(CodeInstructionExtensions.WithLabels(val.InstructionAt(0), new Label[1] { label }));
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[3]
			{
				new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null)
			});
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloc_S, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_S, (object)6)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_S, (object)4)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<StructureSpawner, GameObject, RaycastHit, bool>>((Func<StructureSpawner, GameObject, RaycastHit, bool>)delegate(StructureSpawner instance, GameObject gameObject, RaycastHit initialHit)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0050: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_0060: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0136: Unknown result type (might be due to invalid IL or missing references)
				//IL_0137: Unknown result type (might be due to invalid IL or missing references)
				//IL_0139: Unknown result type (might be due to invalid IL or missing references)
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0146: Unknown result type (might be due to invalid IL or missing references)
				//IL_0151: Unknown result type (might be due to invalid IL or missing references)
				Transform transform = gameObject.transform;
				transform.rotation = Quaternion.LookRotation(((RaycastHit)(ref initialHit)).normal);
				Vector3 val2 = gameObject.transform.position + transform.forward * 108.7f;
				Bounds bounds = gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
				Vector3 extents = ((Bounds)(ref bounds)).extents;
				gameObject.SetActive(false);
				if (Physics.CheckBox(((RaycastHit)(ref initialHit)).point, extents, transform.rotation, ~((LayerMask)(ref instance.whatIsTerrain)).value))
				{
					Plugin.Log.LogDebug((object)$"{((Object)gameObject).name} is colliding with something at {((RaycastHit)(ref initialHit)).point}! Trying again...");
					Object.Destroy((Object)(object)gameObject);
					return true;
				}
				gameObject.SetActive(true);
				if (((Object)((RaycastHit)(ref initialHit)).collider).name.Contains("Clone"))
				{
					Plugin.Log.LogDebug((object)$"{((Object)gameObject).name} is colliding with something at {((RaycastHit)(ref initialHit)).point}! Trying again...");
					Object.Destroy((Object)(object)gameObject);
					return true;
				}
				bool result = false;
				if (((Object)gameObject).name.Contains("House"))
				{
					gameObject.SetActive(false);
					RaycastHit val3 = default(RaycastHit);
					if (Physics.BoxCast(val2, extents, -transform.forward, ref val3, transform.rotation, 200f, LayerMask.op_Implicit(instance.whatIsTerrain)) && ((RaycastHit)(ref val3)).distance < 102f)
					{
						Plugin.Log.LogDebug((object)(((Object)gameObject).name + " distance to ground is too short! Trying again..."));
						Object.Destroy((Object)(object)gameObject);
						result = true;
					}
					gameObject.SetActive(true);
				}
				return result;
			}) });
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Brtrue, (object)label)
			});
			return val.InstructionEnumeration();
		}
	}
}
namespace BugFixes.SpawnZonePatch
{
	[HarmonyPatch(typeof(SpawnZone), "FindRandomPos")]
	internal class FindRandomPosTranspiler
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Expected O, but got Unknown
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Expected O, but got Unknown
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Expected O, but got Unknown
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null)
			});
			Label label = generator.DefineLabel();
			val.SetInstructionAndAdvance(CodeInstructionExtensions.WithLabels(val.InstructionAt(0), new Label[1] { label }));
			val = val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloca_S, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ret, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_2, (object)null)
			});
			int failCount = 0;
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<SpawnZone, RaycastHit, bool>>((Func<SpawnZone, RaycastHit, bool>)delegate(SpawnZone instance, RaycastHit raycastHit)
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				if (!((Object)((RaycastHit)(ref raycastHit)).collider).name.Contains("Mesh") && failCount < 10)
				{
					Plugin.Log.LogDebug((object)$"Entity is not on ground at {((RaycastHit)(ref raycastHit)).point}! Trying again...");
					failCount++;
					return false;
				}
				failCount = 0;
				return true;
			}) });
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Brfalse, (object)label)
			});
			return val.InstructionEnumeration();
		}
	}
}
namespace BugFixes.SpawnZoneGeneratorPatch
{
	[HarmonyPatch(typeof(SpawnZoneGenerator<Type>), "Start")]
	internal class Start
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected O, but got Unknown
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[2]
			{
				new CodeMatch((OpCode?)OpCodes.Br, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null)
			});
			Label label = generator.DefineLabel();
			val.SetInstructionAndAdvance(CodeInstructionExtensions.WithLabels(val.InstructionAt(0), new Label[1] { label }));
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[2]
			{
				new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Stloc_S, (object)null, (string)null)
			});
			val = val.Advance(1);
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_S, (object)7)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<RaycastHit, bool>>((Func<RaycastHit, bool>)delegate(RaycastHit raycastHit)
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				if (!((Object)((RaycastHit)(ref raycastHit)).collider).name.Contains("Mesh"))
				{
					Plugin.Log.LogDebug((object)$"Spawn zone is not on ground at {((RaycastHit)(ref raycastHit)).point}! Trying again...");
					return false;
				}
				return true;
			}) });
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Brfalse, (object)label)
			});
			return val.InstructionEnumeration();
		}
	}
}
namespace BugFixes.ResourceGeneratorPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(ResourceGenerator), "GenerateForest")]
		[HarmonyPrefix]
		private static bool GenerateForestPrefix(ref ResourceGenerator __instance, int ___density, ConsistentRandom ___randomGen, ref int ___totalResources)
		{
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Expected O, but got Unknown
			int num = ((__instance.forceSeedOffset == -1) ? ResourceManager.GetNextGenOffset() : __instance.forceSeedOffset);
			float[,] array = __instance.mapGenerator.GeneratePerlinNoiseMap(GameManager.GetSeed());
			float[,] array2 = __instance.mapGenerator.GeneratePerlinNoiseMap(__instance.noiseData, GameManager.GetSeed() + num, __instance.useFalloffMap);
			__instance.width = array.GetLength(0);
			__instance.height = array.GetLength(1);
			float num2 = (float)(__instance.width - 1) / -2f;
			float num3 = (float)(__instance.height - 1) / 2f;
			__instance.resources = new List<GameObject>[__instance.drawChunks.nChunks];
			for (int i = 0; i < __instance.resources.Length; i++)
			{
				__instance.resources[i] = new List<GameObject>();
			}
			int num4 = 0;
			int num5 = 0;
			RaycastHit val2 = default(RaycastHit);
			while (num4 < __instance.minSpawnAmount && num5 < 100)
			{
				num5++;
				for (int j = 0; j < __instance.height; j += ___density)
				{
					for (int k = 0; k < __instance.width; k += ___density)
					{
						if (!(array[k, j] >= __instance.minSpawnHeight) || !(array[k, j] <= __instance.maxSpawnHeight))
						{
							continue;
						}
						float num6 = array2[k, j];
						if (!(num6 >= __instance.spawnThreshold))
						{
							continue;
						}
						num6 = (num6 - __instance.spawnThreshold) / (1f - __instance.spawnThreshold);
						float num7 = __instance.noiseDistribution.Evaluate((float)((Random)(object)___randomGen).NextDouble());
						if (!(num7 > 1f - num6))
						{
							continue;
						}
						int num8 = 0;
						while (num8 < 10)
						{
							Vector3 val = new Vector3(num2 + (float)k, 100f, num3 - (float)j) * __instance.worldScale;
							val += new Vector3((float)((Random)(object)___randomGen).Next(-__instance.randPos, __instance.randPos), 0f, (float)((Random)(object)___randomGen).Next(-__instance.randPos, __instance.randPos));
							if (!Physics.Raycast(val, Vector3.down, ref val2, 1200f))
							{
								continue;
							}
							if (((Object)((RaycastHit)(ref val2)).collider).name.Contains("Clone"))
							{
								num8++;
								continue;
							}
							val.y = ((RaycastHit)(ref val2)).point.y;
							int num9 = __instance.drawChunks.FindChunk(k, j);
							if (num9 >= __instance.drawChunks.nChunks)
							{
								num9 = __instance.drawChunks.nChunks - 1;
							}
							GameObject val3 = (GameObject)AccessTools.Method(typeof(ResourceGenerator), "SpawnTree", new Type[1] { typeof(Vector3) }, (Type[])null).Invoke(__instance, new object[1] { val });
							if ((Object)(object)val3 != (Object)null)
							{
								num4++;
								__instance.resources[num9].Add(val3);
								break;
							}
							num8++;
						}
					}
				}
			}
			___totalResources = num4;
			__instance.drawChunks.InitChunks(__instance.resources);
			for (int l = 0; l < __instance.drawChunks.chunks.Count(); l++)
			{
				AccessTools.Method(typeof(DrawChunks), "DrawChunk", new Type[3]
				{
					typeof(int),
					typeof(bool),
					typeof(int)
				}, (Type[])null).Invoke(__instance.drawChunks, new object[3] { l, true, 1 });
			}
			__instance.drawChunks.totalTrees = ___totalResources;
			return false;
		}

		[HarmonyPatch(typeof(ResourceGenerator), "SpawnTree")]
		[HarmonyPostfix]
		private static void SpawnTreePostfix(ref GameObject __result, ResourceGenerator __instance, Vector3 pos)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = default(Vector3);
			Bounds val2;
			MeshFilter val3 = default(MeshFilter);
			if (new List<string> { "Tree", "Birch", "Fir", "Oak" }.Any(((Object)__result).name.Contains))
			{
				val = __instance.GetTreeExtents(((Object)__result).name.Replace("(Clone)", ""));
			}
			else if (__result.CompareTag("Count") && !new List<string> { "Pickup", "Flint" }.Any(((Object)__result).name.Contains))
			{
				val2 = ((Renderer)__result.GetComponent<MeshRenderer>()).bounds;
				val = ((Bounds)(ref val2)).extents;
			}
			else if (__result.TryGetComponent<MeshFilter>(ref val3))
			{
				val2 = val3.sharedMesh.bounds;
				val = ((Bounds)(ref val2)).extents;
			}
			else
			{
				SkinnedMeshRenderer val4 = default(SkinnedMeshRenderer);
				if (!__result.TryGetComponent<SkinnedMeshRenderer>(ref val4))
				{
					Plugin.Log.LogDebug((object)"No mesh found for this object");
					return;
				}
				val2 = val4.localBounds;
				val = ((Bounds)(ref val2)).extents;
			}
			if (Physics.CheckBox(pos, val, __result.transform.rotation, -513))
			{
				Plugin.Log.LogDebug((object)$"{((Object)__result).name} is colliding with something at {pos}! Trying again...");
				Object.Destroy((Object)(object)__result);
				__result = null;
			}
		}
	}
}
namespace BugFixes.MoveCameraPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(MoveCamera), "SpectateCamera")]
		[HarmonyPrefix]
		private static bool SpectateCameraPrefix()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Invalid comparison between Unknown and I4
			if ((int)GameManager.state == 2)
			{
				return false;
			}
			return true;
		}

		[HarmonyPatch(typeof(MoveCamera), "FreeCam")]
		[HarmonyPrefix]
		private static bool FreeCamPrefix()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Invalid comparison between Unknown and I4
			if ((int)GameManager.state == 2)
			{
				return false;
			}
			return true;
		}
	}
}
namespace BugFixes.LobbyVisualsPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(LobbyVisuals), "Awake")]
		[HarmonyPostfix]
		private static void AwakePostfix()
		{
			GameObject val = GameObject.Find("LobbyID");
			Texture mainTexture = ((Graphic)val.GetComponent<RawImage>()).mainTexture;
			GameObject val2 = GameObject.Find("LobbySettings");
			val2.GetComponent<RawImage>().texture = mainTexture;
			Material[] array = Resources.FindObjectsOfTypeAll(typeof(Material)) as Material[];
			foreach (Material val3 in array)
			{
				string text = ((Object)val3).name.Replace(" (Instance)", "");
				if (text == "Skybox Cubemap Extended Day")
				{
					val3.SetFloat("_Exposure", 1f);
				}
			}
		}
	}
}
namespace BugFixes.InventoryUIPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(InventoryUI), "Repair")]
		[HarmonyPostfix]
		private static void RepairPostfix(InventoryUI __instance)
		{
			__instance.hotbar.UpdateHotbar();
		}

		[HarmonyPatch(typeof(InventoryUI), "AddItemToInventory")]
		[HarmonyPostfix]
		private static void AddItemToInventoryPostfix(InventoryItem item)
		{
			if (Object.op_Implicit((Object)(object)Boat.Instance))
			{
				Boat.Instance.CheckForMapUpdate(item.id);
			}
		}
	}
}
namespace BugFixes.HitableMobPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(HitableMob), "OnKill")]
		[HarmonyPrefix]
		private static void OnKillPrefix(HitableMob __instance)
		{
			WoodmanBehaviour val = default(WoodmanBehaviour);
			if (((Component)__instance).gameObject.TryGetComponent<WoodmanBehaviour>(ref val))
			{
				val.MakeAggressive(true);
				Plugin.Log.LogDebug((object)"Woodmen of this camp set to aggressive!");
			}
		}
	}
}
namespace BugFixes.GuardianSpawnerPatch
{
	[HarmonyPatch(typeof(GuardianSpawner), "Start")]
	internal class StartTranspiler
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Expected O, but got Unknown
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
			{
				new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null)
			});
			Label label = generator.DefineLabel();
			val.SetInstructionAndAdvance(CodeInstructionExtensions.WithLabels(val.InstructionAt(0), new Label[1] { label }));
			val = val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[2]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloca_S, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_S, (object)7)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<RaycastHit, bool>>((Func<RaycastHit, bool>)delegate(RaycastHit raycastHit)
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				if (!((Object)((RaycastHit)(ref raycastHit)).collider).name.Contains("Mesh"))
				{
					Plugin.Log.LogDebug((object)$"Guardian spawner is not on ground at {((RaycastHit)(ref raycastHit)).point}! Trying again...");
					return false;
				}
				return true;
			}) });
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Brfalse, (object)label)
			});
			return val.InstructionEnumeration();
		}
	}
}
namespace BugFixes.GenerateCampPatch
{
	[HarmonyPatch(typeof(GenerateCamp), "SpawnObjects", new Type[]
	{
		typeof(GameObject),
		typeof(int),
		typeof(ConsistentRandom)
	})]
	internal class SpawnObjects_GameObject
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Expected O, but got Unknown
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Expected O, but got Unknown
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Expected O, but got Unknown
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Expected O, but got Unknown
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Expected O, but got Unknown
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Expected O, but got Unknown
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Expected O, but got Unknown
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Expected O, but got Unknown
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Expected O, but got Unknown
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Br, (object)null, (string)null)
			});
			Label label = generator.DefineLabel();
			val.SetInstructionAndAdvance(CodeInstructionExtensions.WithLabels(val.InstructionAt(0), new Label[1] { label }));
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[2]
			{
				new CodeMatch((OpCode?)OpCodes.Ldarg_3, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_1, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<GameObject, float>>((Func<GameObject, float>)delegate(GameObject gameObject)
			{
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				Bounds bounds2 = gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
				float x = ((Bounds)(ref bounds2)).extents.x;
				bounds2 = gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
				return Math.Max(x, ((Bounds)(ref bounds2)).extents.z);
			}) });
			val = val.SetInstructionAndAdvance(Transpilers.EmitDelegate<Func<GenerateCamp, ConsistentRandom, float, RaycastHit>>((Func<GenerateCamp, ConsistentRandom, float, RaycastHit>)((GenerateCamp instance, ConsistentRandom rand, float sphereRadius) => instance.FindPos(rand, sphereRadius))));
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Brtrue, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<bool, GenerateCamp, bool>>((Func<bool, GenerateCamp, bool>)delegate(bool result, GenerateCamp instance)
			{
				if (result)
				{
					Plugin.Log.LogDebug((object)"Incorrect position found for an object! Trying again...");
					AccessTools.Field(typeof(GenerateCamp), "campRadius").SetValue(instance, (float)AccessTools.Field(typeof(GenerateCamp), "campRadius").GetValue(instance) + 1f);
				}
				return result;
			}) });
			val = val.SetOperandAndAdvance((object)label);
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[3]
			{
				new CodeMatch((OpCode?)OpCodes.Ldc_R4, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldc_I4_0, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null)
			});
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloc_3, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_3, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<GenerateCamp, GameObject, bool>>((Func<GenerateCamp, GameObject, bool>)delegate(GenerateCamp instance, GameObject gameObject)
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0046: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0060: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				//IL_0088: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				bool result2 = false;
				if (((Object)gameObject).name.Contains(((Object)instance.hut).name))
				{
					Vector3 val2 = gameObject.transform.position + gameObject.transform.up * 107f;
					Bounds bounds = gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
					Vector3 extents = ((Bounds)(ref bounds)).extents;
					Quaternion val3 = Quaternion.LookRotation(gameObject.transform.up);
					gameObject.SetActive(false);
					RaycastHit val4 = default(RaycastHit);
					if (Physics.BoxCast(val2, extents, -gameObject.transform.up, ref val4, val3, 200f, LayerMask.op_Implicit(instance.whatIsGround)) && ((RaycastHit)(ref val4)).distance < 102f)
					{
						Plugin.Log.LogDebug((object)(((Object)gameObject).name + " distance to ground is too short! Trying again..."));
						Object.Destroy((Object)(object)gameObject);
						AccessTools.Field(typeof(GenerateCamp), "campRadius").SetValue(instance, (float)AccessTools.Field(typeof(GenerateCamp), "campRadius").GetValue(instance) + 1f);
						result2 = true;
					}
					gameObject.SetActive(true);
				}
				return result2;
			}) });
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Brtrue, (object)label)
			});
			return val.InstructionEnumeration();
		}
	}
	[HarmonyPatch(typeof(GenerateCamp), "SpawnObjects", new Type[]
	{
		typeof(StructureSpawner),
		typeof(int),
		typeof(ConsistentRandom)
	})]
	internal class SpawnObjects_StructureSpawner
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Expected O, but got Unknown
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Expected O, but got Unknown
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Expected O, but got Unknown
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Expected O, but got Unknown
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Expected O, but got Unknown
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Expected O, but got Unknown
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Br, (object)null, (string)null)
			});
			Label label = generator.DefineLabel();
			val.SetInstructionAndAdvance(CodeInstructionExtensions.WithLabels(val.InstructionAt(0), new Label[1] { label }));
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[3]
			{
				new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldarg_3, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_2, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<GameObject, float>>((Func<GameObject, float>)delegate(GameObject gameObject)
			{
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				Bounds bounds2 = gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
				float x = ((Bounds)(ref bounds2)).extents.x;
				bounds2 = gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
				return Math.Max(x, ((Bounds)(ref bounds2)).extents.z);
			}) });
			val = val.SetInstructionAndAdvance(Transpilers.EmitDelegate<Func<GenerateCamp, ConsistentRandom, float, RaycastHit>>((Func<GenerateCamp, ConsistentRandom, float, RaycastHit>)((GenerateCamp instance, ConsistentRandom rand, float sphereRadius) => instance.FindPos(rand, sphereRadius))));
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Brtrue, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<bool, GenerateCamp, bool>>((Func<bool, GenerateCamp, bool>)delegate(bool result, GenerateCamp instance)
			{
				if (result)
				{
					Plugin.Log.LogDebug((object)"Incorrect position found for this object! Trying again...");
					AccessTools.Field(typeof(GenerateCamp), "campRadius").SetValue(instance, (float)AccessTools.Field(typeof(GenerateCamp), "campRadius").GetValue(instance) + 1f);
				}
				return result;
			}) });
			val = val.SetOperandAndAdvance((object)label);
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloc_S, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_S, (object)4)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<GenerateCamp, GameObject, bool>>((Func<GenerateCamp, GameObject, bool>)delegate(GenerateCamp instance, GameObject gameObject)
			{
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Unknown result type (might be due to invalid IL or missing references)
				//IL_007d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Unknown result type (might be due to invalid IL or missing references)
				//IL_0089: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				bool result2 = false;
				if (((Object)gameObject).name.Contains("House"))
				{
					Vector3 val2 = gameObject.transform.position + gameObject.transform.forward * 108.7f;
					Bounds bounds = gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
					Vector3 extents = ((Bounds)(ref bounds)).extents;
					Quaternion val3 = Quaternion.LookRotation(gameObject.transform.forward);
					gameObject.SetActive(false);
					RaycastHit val4 = default(RaycastHit);
					if (Physics.BoxCast(val2, extents, -gameObject.transform.forward, ref val4, val3, 200f, LayerMask.op_Implicit(instance.whatIsGround)) && ((RaycastHit)(ref val4)).distance < 102f)
					{
						Plugin.Log.LogDebug((object)(((Object)gameObject).name + " distance to ground is too short! Trying again..."));
						Object.Destroy((Object)(object)gameObject);
						AccessTools.Field(typeof(GenerateCamp), "campRadius").SetValue(instance, (float)AccessTools.Field(typeof(GenerateCamp), "campRadius").GetValue(instance) + 1f);
						result2 = true;
					}
					gameObject.SetActive(true);
				}
				return result2;
			}) });
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Brtrue, (object)label)
			});
			return val.InstructionEnumeration();
		}
	}
}
namespace BugFixes.GameManagerPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(GameManager), "Start")]
		[HarmonyPrefix]
		private static void StartPrefix()
		{
			Plugin.Log.LogDebug((object)"Setting seed for UnityEngine.Random");
			Random.InitState(GameManager.GetSeed());
		}

		[HarmonyPatch(typeof(GameManager), "Awake")]
		[HarmonyPostfix]
		private static void AwakePostfix(GameManager __instance)
		{
			((Component)__instance.gameoverUi.transform.Find("Overlay").Find("Stats")).GetComponent<LayoutElement>().minHeight = 580f;
		}
	}
}
namespace BugFixes.DetectInteractablesPatch
{
	[HarmonyPatch(typeof(DetectInteractables), "Update")]
	internal class UpdateTranspiler
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val = val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldc_R4, (object)null, (string)null)
			});
			val = val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<Vector3, Vector3>>((Func<Vector3, Vector3>)delegate(Vector3 pos)
			{
				//IL_001f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				Vector3 forward = ((Transform)AccessTools.Field(typeof(DetectInteractables), "playerCam").GetValue(DetectInteractables.Instance)).forward;
				return pos - 0.7f * forward;
			}) });
			val = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[2]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloca_S, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldc_R4, (object)null, (string)null)
			});
			val.Instruction.operand = 4.7f;
			return val.InstructionEnumeration();
		}
	}
}
namespace BugFixes.ContinousHitboxPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(ContinousHitbox), "ResetHitbox")]
		[HarmonyPrefix]
		private static bool ResetHitbox(ContinousHitbox __instance)
		{
			DestroyObject val = default(DestroyObject);
			if (((Component)((Component)__instance).transform.root).gameObject.TryGetComponent<DestroyObject>(ref val))
			{
				Plugin.Log.LogDebug((object)"Stopping ContinousHitbox because source is dead");
				Object.Destroy((Object)(object)__instance);
				return false;
			}
			return true;
		}
	}
}
namespace BugFixes.AchievementManagerPatch
{
	internal class PrefixesAndPostfixes
	{
		[HarmonyPatch(typeof(AchievementManager), "Awake")]
		[HarmonyPostfix]
		private static void AwakePostfix()
		{
			SteamUserStats.OnUserStatsReceived += AchievementManager.Instance.OnStatsReceived;
		}

		[HarmonyPatch(typeof(AchievementManager), "AddKill")]
		[HarmonyPostfix]
		private static void AddKillPostfix()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			if (SteamUserStats.GetStatInt("Buffkills") != 250)
			{
				return;
			}
			foreach (Achievement achievement in SteamUserStats.Achievements)
			{
				Achievement current = achievement;
				if (((Achievement)(ref current)).Name == "Underdog" && !((Achievement)(ref current)).State)
				{
					((Achievement)(ref current)).Trigger(true);
				}
			}
		}

		[HarmonyPatch(typeof(AchievementManager), "StartGame")]
		[HarmonyPostfix]
		private static void StartGamePostfix(AchievementManager __instance)
		{
			AchievementManager.Instance = Object.FindObjectOfType<AchievementManager>();
		}
	}
}
namespace UnityEngine
{
	public static class ExtendAchievementManager
	{
		public static void OnStatsReceived(this AchievementManager manager, SteamId id, Result result)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			if (!manager.CanUseAchievements() || SteamUserStats.GetStatInt("Buffkills") < 250)
			{
				return;
			}
			foreach (Achievement achievement in SteamUserStats.Achievements)
			{
				Achievement current = achievement;
				if (((Achievement)(ref current)).Name == "Underdog" && !((Achievement)(ref current)).State)
				{
					((Achievement)(ref current)).Trigger(true);
				}
			}
		}
	}
	public static class ExtendBoat
	{
		public static void CheckForMapUpdate(this Boat boat, int itemId)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)boat.status == 0)
			{
				if (itemId == boat.mapItem.id)
				{
					AccessTools.Method(typeof(Boat), "SendMarkShip", (Type[])null, (Type[])null).Invoke(boat, null);
				}
			}
			else if (!(bool)AccessTools.Field(typeof(Boat), "gemsDiscovered").GetValue(boat) && itemId == boat.gemMap.id)
			{
				AccessTools.Method(typeof(Boat), "SendMarkGems", (Type[])null, (Type[])null).Invoke(boat, null);
			}
		}
	}
	public static class GenerateCamp_Method_Extensions
	{
		public static RaycastHit FindPos(this GenerateCamp camp, ConsistentRandom rand, float radius)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Invalid comparison between Unknown and I4
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = ((Component)camp).transform.position + Vector3.up * 200f;
			Vector3 val2 = (Vector3)AccessTools.Method(typeof(GenerateCamp), "RandomSpherePos", new Type[1] { typeof(ConsistentRandom) }, (Type[])null).Invoke(camp, new object[1] { rand });
			float num = (float)AccessTools.Field(typeof(GenerateCamp), "campRadius").GetValue(camp);
			Vector3 val3 = val2 * num;
			RaycastHit result = default(RaycastHit);
			if (Physics.SphereCast(val + val3, 1f, Vector3.down, ref result, 400f, LayerMask.op_Implicit(camp.whatIsGround)))
			{
				if (((Object)((RaycastHit)(ref result)).collider).name.Contains("Clone"))
				{
					Plugin.Log.LogDebug((object)$"Object is colliding with {((Object)((RaycastHit)(ref result)).collider).name} at {((RaycastHit)(ref result)).point}!");
					result = default(RaycastHit);
				}
				else if ((int)WorldUtility.WorldHeightToBiome(((RaycastHit)(ref result)).point.y) == 0)
				{
					Plugin.Log.LogDebug((object)$"Hit water at {((RaycastHit)(ref result)).point}!");
					result = default(RaycastHit);
				}
				else if (Physics.CheckSphere(((RaycastHit)(ref result)).point, radius, ~((LayerMask)(ref camp.whatIsGround)).value))
				{
					Plugin.Log.LogDebug((object)$"Object is colliding with something at {((RaycastHit)(ref result)).point}!");
					result = default(RaycastHit);
				}
			}
			else
			{
				Plugin.Log.LogDebug((object)"No meshes were hit (not even the ground or water)!");
			}
			return result;
		}
	}
	public static class ExtendResourceGenerator
	{
		private static readonly Dictionary<string, Vector3> treesExtents = new Dictionary<string, Vector3>
		{
			{
				"Tree",
				new Vector3(0.5f, 5f, 0.5f)
			},
			{
				"Birch",
				new Vector3(0.4f, 5f, 0.4f)
			},
			{
				"Fir",
				new Vector3(0.8f, 5f, 0.8f)
			},
			{
				"Oak",
				new Vector3(1f, 5f, 1f)
			},
			{
				"DarkOak",
				new Vector3(1.2f, 5f, 1.2f)
			}
		};

		public static Vector3 GetTreeExtents(this ResourceGenerator resourceGenerator, string tree)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return treesExtents[tree];
		}
	}
}

BetterStats.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using TMPro;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("BetterStats")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BetterStatsMod")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a4e30370-1cdc-45e0-825e-eead174fc369")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.0.0")]
[module: UnverifiableCode]
namespace BetterStats
{
	[BepInPlugin("com.mxu.betterstats", "BetterStats", "1.1.0.0")]
	public class Main : BaseUnityPlugin
	{
		public const string MODNAME = "BetterStats";

		public const string AUTHOR = "";

		public const string GUID = "com.mxu.betterstats";

		public const string VERSION = "1.1.0.0";

		internal readonly ManualLogSource log;

		internal readonly Harmony harmony;

		internal readonly Assembly assembly;

		public readonly string modFolder;

		public Main()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			log = ((BaseUnityPlugin)this).Logger;
			harmony = new Harmony("com.mxu.betterstats");
			assembly = Assembly.GetExecutingAssembly();
			modFolder = Path.GetDirectoryName(assembly.Location);
		}

		public void Start()
		{
			harmony.PatchAll(assembly);
		}
	}
}
namespace BetterStats.Patches
{
	[HarmonyPatch(typeof(InventoryStats), "UpdateStats")]
	public static class Patches
	{
		[HarmonyPostfix]
		private static void SixtyNine(InventoryStats __instance)
		{
			int maxHp = PlayerStatus.Instance.maxHp;
			int maxShield = PlayerStatus.Instance.maxShield;
			double num = Math.Round(100f * PlayerStatus.Instance.GetArmorRatio() + PowerupInventory.Instance.GetDefenseMultiplier((int[])null), 2);
			double num2 = Math.Round(PowerupInventory.Instance.GetStrengthMultiplier((int[])null), 2);
			float num3 = (int)(100f * PowerupInventory.Instance.GetCritChance((int[])null));
			float num4 = (float)Math.Round(1f / Helper.GetAttackSpeed() / PowerupInventory.Instance.GetAttackSpeedMultiplier((int[])null), 2);
			double num5 = Math.Round(PowerupInventory.Instance.GetSpeedMultiplier((int[])null), 2);
			int num6 = __instance.FindMaxHit();
			double num7 = Math.Round(PowerupInventory.Instance.GetAttackSpeedMultiplier((int[])null), 1);
			((TMP_Text)__instance.text).text = "HP\nShield\nDMG Reduction\nStrength\nCritical\nAttack Speed\nAttack Speed Mult\nSpeed\nMax Hit";
			((TMP_Text)__instance.numbersText).text = string.Format("{0}\n{1}\n{2}%\n{3}x\n{4}%\n{5}s\n{8}x\n{6}x\n{7}", maxHp, maxShield, num, num2, num3, num4, num5, num6, num7);
		}
	}
	public static class Helper
	{
		public static float GetAttackSpeed()
		{
			InventoryItem currentItem = Hotbar.Instance.currentItem;
			if ((Object)(object)currentItem == (Object)null)
			{
				return 1f;
			}
			return currentItem.attackSpeed;
		}
	}
}

IghtZoomah.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
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: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("IghtZoomah")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("IghtZoomah")]
[assembly: AssemblyTitle("IghtZoomah")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace IghtZoomah;

[BepInPlugin("me.perzero.ightzoomah", "Ight Zoomah", "1.1.0.0")]
public class Main : BaseUnityPlugin
{
	public static Main instance;

	public Harmony harmony;

	public ConfigEntry<KeyCode> keyBind;

	private float zoomValue;

	private float zoom;

	private void Awake()
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Expected O, but got Unknown
		if ((Object)(object)instance == (Object)null)
		{
			instance = this;
		}
		else
		{
			Object.Destroy((Object)(object)this);
		}
		harmony = new Harmony("me.perzero.ightzoomah");
		harmony.PatchAll(typeof(HotbarPatch));
		keyBind = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "ZoomBind", (KeyCode)99, "The keybind for zooming in");
		zoomValue = 30f;
	}

	private void Update()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		if (Input.GetKey(keyBind.Value))
		{
			Zoom();
		}
		else
		{
			DeZoom();
		}
		if (Object.op_Implicit((Object)(object)MoveCamera.Instance))
		{
			MoveCamera.Instance.UpdateFov(zoom);
		}
	}

	private void DeZoom()
	{
		zoom = Mathf.Lerp(zoom, (float)CurrentSettings.Instance.fov, 0.2f);
	}

	private void Zoom()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		zoomValue = Mathf.Clamp(zoomValue - Input.mouseScrollDelta.y * 10f, 5f, 120f);
		zoom = Mathf.Lerp(zoom, zoomValue, 0.2f);
	}
}
internal class HotbarPatch
{
	[HarmonyPatch(typeof(Hotbar), "Update")]
	[HarmonyPrefix]
	private static bool UpdatePrefix(ref int ___currentActive)
	{
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 1; i < 8; i++)
		{
			if (Input.GetButtonDown("Hotbar" + i))
			{
				___currentActive = i - 1;
				Hotbar.Instance.UpdateHotbar();
			}
		}
		if (Input.GetKey(Main.instance.keyBind.Value))
		{
			return false;
		}
		float y = Input.mouseScrollDelta.y;
		if (y > 0.5f)
		{
			___currentActive--;
			if (___currentActive < 0)
			{
				___currentActive = 6;
			}
			Hotbar.Instance.UpdateHotbar();
			return false;
		}
		if (y < -0.5f)
		{
			___currentActive++;
			if (___currentActive > 6)
			{
				___currentActive = 0;
			}
			Hotbar.Instance.UpdateHotbar();
		}
		return false;
	}
}

Drill Mod.dll

Decompiled a year ago
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Muck Squad")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Adds drills to the game.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Drill Mod")]
[assembly: AssemblyTitle("Drill Mod")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Mod;

[BepInPlugin("mucksquad.plugins.drillmod", "Drill Mod", "1.0.0.0")]
public class DrillMod : BaseUnityPlugin
{
	public void Awake()
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"hello!");
		Harmony val = new Harmony("mucksquad.plugins.drillmod");
		val.PatchAll();
	}

	public static AssetBundle GetAssetBundleFromResources(string fileName)
	{
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		string name = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(fileName));
		using Stream stream = executingAssembly.GetManifestResourceStream(name);
		return AssetBundle.LoadFromStream(stream);
	}
}
[HarmonyPatch]
internal class Patches
{
	public static InventoryItem[] drills;

	public static AudioClip drillSound;

	public static AudioClip chargeSound;

	public static bool holdingLeftClick;

	public static float timePassed;

	[HarmonyPatch(typeof(ItemManager), "InitAllItems")]
	[HarmonyPostfix]
	private static void initItems()
	{
		if (drills == null)
		{
			AssetBundle assetBundleFromResources = DrillMod.GetAssetBundleFromResources("quinnsmod");
			drills = assetBundleFromResources.LoadAllAssets<InventoryItem>();
			drillSound = assetBundleFromResources.LoadAsset<AudioClip>("assets/1 custom imported/sfx/drillsound.wav");
		}
		InventoryItem[] array = drills;
		foreach (InventoryItem val in array)
		{
			val.id = ItemManager.Instance.allItems.Count;
			CraftRequirement[] requirements = val.requirements;
			foreach (CraftRequirement val2 in requirements)
			{
				if (!(val2.item.name != ItemManager.Instance.allItems[val2.item.id].name))
				{
					continue;
				}
				foreach (InventoryItem value in ItemManager.Instance.allItems.Values)
				{
					if (value.name == val2.item.name)
					{
						val2.item.id = value.id;
						Debug.Log((object)("Fixed " + val2.item.name + " id (Crafting Requirement)"));
					}
				}
			}
			ItemManager.Instance.allItems.Add(val.id, val);
			Debug.Log((object)("Added " + val.name));
		}
	}

	[HarmonyPatch(typeof(UseInventory), "Awake")]
	[HarmonyPostfix]
	private static void initChargeSound(UseInventory __instance)
	{
		chargeSound = __instance.chargeSfx.clip;
	}

	private static IEnumerator drillStart(UseInventory instance)
	{
		float lerp = 0f;
		Vector3 startpos = instance.renderTransform.localPosition;
		Vector3 endpos = new Vector3(1f, 0f, 0f);
		while (lerp < 1f && holdingLeftClick)
		{
			instance.renderTransform.localPosition = Vector3.Lerp(startpos, endpos, lerp);
			lerp += Time.deltaTime * 4f;
			yield return null;
		}
	}

	private static IEnumerator drillStop(UseInventory instance, InventoryItem currentItem)
	{
		float lerp = 0f;
		Vector3 startpos = instance.renderTransform.localPosition;
		Vector3 endpos = currentItem.positionOffset;
		while (lerp < 1f && !holdingLeftClick)
		{
			instance.renderTransform.localPosition = Vector3.Lerp(startpos, endpos, lerp);
			lerp += Time.deltaTime * 4f;
			yield return null;
		}
	}

	[HarmonyPatch(typeof(UseInventory), "Use")]
	[HarmonyPrefix]
	private static bool useDrill(UseInventory __instance)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Invalid comparison between Unknown and I4
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		InventoryItem val = (InventoryItem)Traverse.Create((object)__instance).Field("currentItem").GetValue();
		if ((Object)(object)val != (Object)null && val.name.Contains("Drill") && (int)val.type == 2)
		{
			Transform playerCam = PlayerMovement.Instance.playerCam;
			if (!holdingLeftClick)
			{
				Debug.Log((object)val.attackSpeed.ToString());
				holdingLeftClick = true;
				((MonoBehaviour)__instance).StartCoroutine(drillStart(__instance));
				__instance.chargeSfx.clip = drillSound;
				__instance.chargeSfx.pitch = val.attackSpeed / 6f;
			}
			if (!__instance.chargeSfx.isPlaying)
			{
				__instance.chargeSfx.Play();
			}
			__instance.renderTransform.Rotate(new Vector3(1f, 0f, 0f), 5f);
			float num = (float)Traverse.Create((object)__instance).Field("attackTime").GetValue();
			float num2 = val.attackSpeed * PowerupInventory.Instance.GetAttackSpeedMultiplier((int[])null);
			timePassed += Time.deltaTime;
			if (timePassed >= num / num2 && __instance.renderTransform.localPosition != val.positionOffset)
			{
				timePassed = 0f;
				__instance.hitBox.playerCam = playerCam;
				__instance.hitBox.UseHitbox();
				Debug.Log((object)"Using Drill!");
			}
			return false;
		}
		return true;
	}

	[HarmonyPatch(typeof(UseInventory), "UseButtonUp")]
	[HarmonyPostfix]
	private static void stopUsingDrill(UseInventory __instance)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		InventoryItem currentItem = (InventoryItem)Traverse.Create((object)__instance).Field("currentItem").GetValue();
		if (holdingLeftClick)
		{
			timePassed = 0f;
			holdingLeftClick = false;
			__instance.chargeSfx.Stop();
			((MonoBehaviour)__instance).StartCoroutine(drillStop(__instance, currentItem));
		}
	}

	[HarmonyPatch(typeof(Hotbar), "UpdateHotbar")]
	[HarmonyPostfix]
	private static void hotbarSwitch()
	{
		if (holdingLeftClick)
		{
			holdingLeftClick = false;
			timePassed = 0f;
			UseInventory.Instance.chargeSfx.Stop();
		}
		AudioClip val2 = (UseInventory.Instance.chargeSfx.clip = drillSound);
		if (Object.op_Implicit((Object)(object)val2))
		{
			UseInventory.Instance.chargeSfx.clip = chargeSound;
		}
	}

	[HarmonyPatch(typeof(CraftingUI), "Awake")]
	[HarmonyPostfix]
	private static void addCrafting(CraftingUI __instance)
	{
		Tab[] tabs = __instance.tabs;
		foreach (Tab val in tabs)
		{
			if (Array.Exists(val.items, (InventoryItem item) => item.name == "Gold Axe"))
			{
				val.items = val.items.Concat(drills).ToArray();
			}
		}
		Debug.Log((object)"Added Drill Crafting");
	}
}

Assembly-CSharp-firstpass.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace MilkShake;

public interface IShakeParameters
{
	ShakeType ShakeType { get; set; }

	float Strength { get; set; }

	float Roughness { get; set; }

	float FadeIn { get; set; }

	float FadeOut { get; set; }

	Vector3 PositionInfluence { get; set; }

	Vector3 RotationInfluence { get; set; }
}
[Serializable]
public class ShakeInstance
{
	public ShakeParameters ShakeParameters;

	public float StrengthScale;

	public float RoughnessScale;

	public bool RemoveWhenStopped;

	private int baseSeed;

	private float seed1;

	private float seed2;

	private float seed3;

	private float noiseTimer;

	private float fadeTimer;

	private float fadeInTime;

	private float fadeOutTime;

	private float pauseTimer;

	private float pauseFadeTime;

	private int lastUpdatedFrame;

	public ShakeState State { get; private set; }

	public bool IsPaused { get; private set; }

	public bool IsFinished
	{
		get
		{
			if (State == ShakeState.Stopped)
			{
				return RemoveWhenStopped;
			}
			return false;
		}
	}

	public float CurrentStrength => ShakeParameters.Strength * fadeTimer * StrengthScale;

	public float CurrentRoughness => ShakeParameters.Roughness * fadeTimer * RoughnessScale;

	public ShakeInstance(int? seed = null)
	{
		if (!seed.HasValue)
		{
			seed = Random.Range(-10000, 10000);
		}
		baseSeed = seed.Value;
		seed1 = (float)baseSeed / 2f;
		seed2 = (float)baseSeed / 3f;
		seed3 = (float)baseSeed / 4f;
		noiseTimer = baseSeed;
		fadeTimer = 0f;
		pauseTimer = 0f;
		StrengthScale = 1f;
		RoughnessScale = 1f;
	}

	public ShakeInstance(IShakeParameters shakeData, int? seed = null)
		: this(seed)
	{
		ShakeParameters = new ShakeParameters(shakeData);
		fadeInTime = shakeData.FadeIn;
		fadeOutTime = shakeData.FadeOut;
		State = ShakeState.FadingIn;
	}

	public ShakeResult UpdateShake(float deltaTime)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		ShakeResult result = default(ShakeResult);
		result.PositionShake = getPositionShake();
		result.RotationShake = getRotationShake();
		if (Time.frameCount == lastUpdatedFrame)
		{
			return result;
		}
		if (pauseFadeTime > 0f)
		{
			if (IsPaused)
			{
				pauseTimer += deltaTime / pauseFadeTime;
			}
			else
			{
				pauseTimer -= deltaTime / pauseFadeTime;
			}
		}
		pauseTimer = Mathf.Clamp01(pauseTimer);
		noiseTimer += (1f - pauseTimer) * deltaTime * CurrentRoughness;
		if (State == ShakeState.FadingIn)
		{
			if (fadeInTime > 0f)
			{
				fadeTimer += deltaTime / fadeInTime;
			}
			else
			{
				fadeTimer = 1f;
			}
		}
		else if (State == ShakeState.FadingOut)
		{
			if (fadeOutTime > 0f)
			{
				fadeTimer -= deltaTime / fadeOutTime;
			}
			else
			{
				fadeTimer = 0f;
			}
		}
		fadeTimer = Mathf.Clamp01(fadeTimer);
		if (fadeTimer == 1f)
		{
			if (ShakeParameters.ShakeType == ShakeType.Sustained)
			{
				State = ShakeState.Sustained;
			}
			else if (ShakeParameters.ShakeType == ShakeType.OneShot)
			{
				Stop(ShakeParameters.FadeOut, removeWhenStopped: true);
			}
		}
		else if (fadeTimer == 0f)
		{
			State = ShakeState.Stopped;
		}
		lastUpdatedFrame = Time.frameCount;
		return result;
	}

	public void Start(float fadeTime)
	{
		fadeInTime = fadeTime;
		State = ShakeState.FadingIn;
	}

	public void Stop(float fadeTime, bool removeWhenStopped)
	{
		fadeOutTime = fadeTime;
		RemoveWhenStopped = removeWhenStopped;
		State = ShakeState.FadingOut;
	}

	public void Pause(float fadeTime)
	{
		IsPaused = true;
		pauseFadeTime = fadeTime;
		if (fadeTime <= 0f)
		{
			pauseTimer = 1f;
		}
	}

	public void Resume(float fadeTime)
	{
		IsPaused = false;
		pauseFadeTime = fadeTime;
		if (fadeTime <= 0f)
		{
			pauseTimer = 0f;
		}
	}

	public void TogglePaused(float fadeTime)
	{
		if (IsPaused)
		{
			Resume(fadeTime);
		}
		else
		{
			Pause(fadeTime);
		}
	}

	private Vector3 getPositionShake()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		Vector3 zero = Vector3.zero;
		zero.x = getNoise(noiseTimer + seed1, baseSeed);
		zero.y = getNoise(baseSeed, noiseTimer);
		zero.z = getNoise(seed3 + noiseTimer, (float)baseSeed + noiseTimer);
		return Vector3.Scale(zero * CurrentStrength, ShakeParameters.PositionInfluence);
	}

	private Vector3 getRotationShake()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		Vector3 zero = Vector3.zero;
		zero.x = getNoise(noiseTimer - (float)baseSeed, seed3);
		zero.y = getNoise(baseSeed, noiseTimer + seed2);
		zero.z = getNoise((float)baseSeed + noiseTimer, seed1 + noiseTimer);
		return Vector3.Scale(zero * CurrentStrength, ShakeParameters.RotationInfluence);
	}

	private float getNoise(float x, float y)
	{
		return (Mathf.PerlinNoise(x, y) - 0.5f) * 2f;
	}
}
[Serializable]
public class ShakeParameters : IShakeParameters
{
	[Header("Shake Type")]
	[SerializeField]
	private ShakeType shakeType;

	[Header("Shake Strength")]
	[SerializeField]
	private float strength;

	[SerializeField]
	private float roughness;

	[Header("Fade")]
	[SerializeField]
	private float fadeIn;

	[SerializeField]
	private float fadeOut;

	[Header("Shake Influence")]
	[SerializeField]
	private Vector3 positionInfluence;

	[SerializeField]
	private Vector3 rotationInfluence;

	public ShakeType ShakeType
	{
		get
		{
			return shakeType;
		}
		set
		{
			shakeType = value;
		}
	}

	public float Strength
	{
		get
		{
			return strength;
		}
		set
		{
			strength = value;
		}
	}

	public float Roughness
	{
		get
		{
			return roughness;
		}
		set
		{
			roughness = value;
		}
	}

	public float FadeIn
	{
		get
		{
			return fadeIn;
		}
		set
		{
			fadeIn = value;
		}
	}

	public float FadeOut
	{
		get
		{
			return fadeOut;
		}
		set
		{
			fadeOut = value;
		}
	}

	public Vector3 PositionInfluence
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return positionInfluence;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			positionInfluence = value;
		}
	}

	public Vector3 RotationInfluence
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return rotationInfluence;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			rotationInfluence = value;
		}
	}

	public ShakeParameters()
	{
	}

	public ShakeParameters(IShakeParameters original)
	{
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		shakeType = original.ShakeType;
		strength = original.Strength;
		roughness = original.Roughness;
		fadeIn = original.FadeIn;
		fadeOut = original.FadeOut;
		positionInfluence = original.PositionInfluence;
		rotationInfluence = original.RotationInfluence;
	}
}
[CreateAssetMenu(fileName = "New Shake Preset", menuName = "MilkShake/Shake Preset")]
public class ShakePreset : ScriptableObject, IShakeParameters
{
	[Header("Shake Type")]
	[SerializeField]
	private ShakeType shakeType;

	[Header("Shake Strength")]
	[SerializeField]
	private float strength;

	[SerializeField]
	private float roughness;

	[Header("Fade")]
	[SerializeField]
	private float fadeIn;

	[SerializeField]
	private float fadeOut;

	[Header("Shake Influence")]
	[SerializeField]
	private Vector3 positionInfluence;

	[SerializeField]
	private Vector3 rotationInfluence;

	public ShakeType ShakeType
	{
		get
		{
			return shakeType;
		}
		set
		{
			shakeType = value;
		}
	}

	public float Strength
	{
		get
		{
			return strength;
		}
		set
		{
			strength = value;
		}
	}

	public float Roughness
	{
		get
		{
			return roughness;
		}
		set
		{
			roughness = value;
		}
	}

	public float FadeIn
	{
		get
		{
			return fadeIn;
		}
		set
		{
			fadeIn = value;
		}
	}

	public float FadeOut
	{
		get
		{
			return fadeOut;
		}
		set
		{
			fadeOut = value;
		}
	}

	public Vector3 PositionInfluence
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return positionInfluence;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			positionInfluence = value;
		}
	}

	public Vector3 RotationInfluence
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return rotationInfluence;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			rotationInfluence = value;
		}
	}
}
public struct ShakeResult
{
	public Vector3 PositionShake;

	public Vector3 RotationShake;

	public static ShakeResult operator +(ShakeResult a, ShakeResult b)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		ShakeResult result = default(ShakeResult);
		result.PositionShake = a.PositionShake + b.PositionShake;
		result.RotationShake = a.RotationShake + b.RotationShake;
		return result;
	}
}
public enum ShakeState
{
	FadingIn,
	Sustained,
	FadingOut,
	Stopped
}
public enum ShakeType
{
	OneShot,
	Sustained
}
[AddComponentMenu("MilkShake/Shaker")]
public class Shaker : MonoBehaviour
{
	public static List<Shaker> GlobalShakers = new List<Shaker>();

	[SerializeField]
	private bool addToGlobalShakers;

	private List<ShakeInstance> activeShakes = new List<ShakeInstance>();

	public static ShakeInstance ShakeAll(IShakeParameters shakeData, int? seed = null)
	{
		ShakeInstance shakeInstance = new ShakeInstance(shakeData, seed);
		AddShakeAll(shakeInstance);
		return shakeInstance;
	}

	public static void ShakeAllSeparate(IShakeParameters shakeData, List<ShakeInstance> shakeInstances = null, int? seed = null)
	{
		shakeInstances?.Clear();
		for (int i = 0; i < GlobalShakers.Count; i++)
		{
			if (((Component)GlobalShakers[i]).gameObject.activeInHierarchy)
			{
				ShakeInstance shakeInstance = GlobalShakers[i].Shake(shakeData, seed);
				if (shakeInstances != null && shakeInstance != null)
				{
					shakeInstances.Add(shakeInstance);
				}
			}
		}
	}

	public static void ShakeAllFromPoint(Vector3 point, float maxDistance, IShakeParameters shakeData, List<ShakeInstance> shakeInstances = null, int? seed = null)
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		shakeInstances?.Clear();
		for (int i = 0; i < GlobalShakers.Count; i++)
		{
			if (((Component)GlobalShakers[i]).gameObject.activeInHierarchy)
			{
				ShakeInstance shakeInstance = GlobalShakers[i].ShakeFromPoint(point, maxDistance, shakeData, seed);
				if (shakeInstances != null && shakeInstance != null)
				{
					shakeInstances.Add(shakeInstance);
				}
			}
		}
	}

	public static void AddShakeAll(ShakeInstance shakeInstance)
	{
		for (int i = 0; i < GlobalShakers.Count; i++)
		{
			if (((Component)GlobalShakers[i]).gameObject.activeInHierarchy)
			{
				GlobalShakers[i].AddShake(shakeInstance);
			}
		}
	}

	private void Awake()
	{
		if (addToGlobalShakers)
		{
			GlobalShakers.Add(this);
		}
	}

	private void OnDestroy()
	{
		if (addToGlobalShakers)
		{
			GlobalShakers.Remove(this);
		}
	}

	private void Update()
	{
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		ShakeResult shakeResult = default(ShakeResult);
		for (int i = 0; i < activeShakes.Count; i++)
		{
			if (activeShakes[i].IsFinished)
			{
				activeShakes.RemoveAt(i);
				i--;
			}
			else
			{
				shakeResult += activeShakes[i].UpdateShake(Time.deltaTime);
			}
		}
		((Component)this).transform.localPosition = shakeResult.PositionShake;
		((Component)this).transform.localEulerAngles = shakeResult.RotationShake;
	}

	public ShakeInstance Shake(IShakeParameters shakeData, int? seed = null)
	{
		ShakeInstance shakeInstance = new ShakeInstance(shakeData, seed);
		AddShake(shakeInstance);
		return shakeInstance;
	}

	public ShakeInstance ShakeFromPoint(Vector3 point, float maxDistance, IShakeParameters shakeData, int? seed = null)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		float num = Vector3.Distance(((Component)this).transform.position, point);
		if (num < maxDistance)
		{
			ShakeInstance shakeInstance = new ShakeInstance(shakeData, seed);
			shakeInstance.RoughnessScale = (shakeInstance.StrengthScale = 1f - Mathf.Clamp01(num / maxDistance));
			AddShake(shakeInstance);
			return shakeInstance;
		}
		return null;
	}

	public void AddShake(ShakeInstance shakeInstance)
	{
		activeShakes.Add(shakeInstance);
	}
}

MoreWeapons.dll

Decompiled a year ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("MoreWeapons")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MoreWeapons")]
[assembly: AssemblyTitle("MoreWeapons")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MoreWeapons;

[HarmonyPatch]
internal class Init : MonoBehaviour
{
	private static InventoryItem[] newItems;

	private static List<InventoryItem> anvilWeapons = new List<InventoryItem>();

	private static AssetBundle GetAssetBundleFromResources(string fileName)
	{
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		string name = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(fileName));
		using Stream stream = executingAssembly.GetManifestResourceStream(name);
		return AssetBundle.LoadFromStream(stream);
	}

	[HarmonyPatch(typeof(ItemManager), "InitAllItems")]
	[HarmonyPostfix]
	private static void initItems()
	{
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Invalid comparison between Unknown and I4
		if (newItems == null)
		{
			AssetBundle assetBundleFromResources = GetAssetBundleFromResources("weaponsmod");
			newItems = assetBundleFromResources.LoadAllAssets<InventoryItem>();
			ItemAbilities.saberSwingSfx = (from value in assetBundleFromResources.LoadAllAssets<AudioClip>()
				where ((Object)value).name.Contains("swing")
				select value).ToArray();
			ItemAbilities.igniteSfx = assetBundleFromResources.LoadAsset<AudioClip>("Assets/CustomItems/WeaponsMod/SFX/saber_ignite.wav");
			ItemAbilities.deflectSfx = assetBundleFromResources.LoadAsset<AudioClip>("Assets/CustomItems/WeaponsMod/SFX/saber_deflect.wav");
			InventoryItem[] array = newItems;
			foreach (InventoryItem val in array)
			{
				if ((int)val.type == 3 && val.craftable && val.stationRequirement.name == "Anvil")
				{
					anvilWeapons.Add(val);
				}
			}
		}
		InventoryItem[] array2 = newItems;
		foreach (InventoryItem val2 in array2)
		{
			val2.id = ItemManager.Instance.allItems.Count;
			ItemManager.Instance.allItems.Add(val2.id, val2);
			Debug.Log((object)("Added " + val2.name));
		}
		InventoryItem[] array3 = newItems;
		foreach (InventoryItem val3 in array3)
		{
			if (!val3.craftable || val3.requirements == null)
			{
				continue;
			}
			CraftRequirement[] requirements = val3.requirements;
			foreach (CraftRequirement val4 in requirements)
			{
				if (!(val4.item.name != ItemManager.Instance.allItems[val4.item.id].name))
				{
					continue;
				}
				foreach (InventoryItem value in ItemManager.Instance.allItems.Values)
				{
					if (value.name == val4.item.name)
					{
						val4.item.id = value.id;
						Debug.Log((object)("Fixed " + val4.item.name + " id (Crafting Requirement)"));
					}
				}
			}
		}
	}

	[HarmonyPatch(typeof(UseInventory), "Awake")]
	[HarmonyPostfix]
	private static void initSounds(UseInventory __instance)
	{
		ItemAbilities.originalSwingSfx = __instance.swingSfx.sounds;
		ItemAbilities.originalChargeSfx = __instance.chargeSfx.clip;
	}

	[HarmonyPatch(typeof(LootExtra), "CheckDrop", new Type[]
	{
		typeof(int),
		typeof(HitableResource)
	})]
	[HarmonyPrefix]
	private static void modifyResourceDropTable(HitableResource hitable)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Invalid comparison between Unknown and I4
		if ((int)hitable.compatibleItem != 2 || !((Object)(object)((Hitable)hitable).dropTable != (Object)null))
		{
			return;
		}
		InventoryItem[] array = newItems;
		foreach (InventoryItem val in array)
		{
			if (val.name == "Glow Crystal" && !Array.Exists(((Hitable)hitable).dropTable.loot, (LootItems loot) => loot.item.name == "Glow Crystal"))
			{
				Main.addToResourceDropTable(hitable, val, 1, 2, 0.01f);
				break;
			}
		}
	}

	[HarmonyPatch(typeof(MobSpawner), "FillList")]
	[HarmonyPostfix]
	private static void initMobDropTables(MobSpawner __instance)
	{
		InventoryItem[] array = newItems;
		foreach (InventoryItem val in array)
		{
			if (val.name == "Amber Fang")
			{
				Main.addToMobDropTable(11, val, 1, 1, 0.1f);
			}
			if (val.name == "Glow Crystal")
			{
				Main.addToMobDropTable(6, val, 1, 1, 0.005f);
				Main.addToMobDropTable(9, val, 1, 3, 0.05f);
			}
		}
	}

	[HarmonyPatch(typeof(CraftingUI), "Awake")]
	[HarmonyPostfix]
	private static void addCrafting(CraftingUI __instance)
	{
		Tab[] tabs = __instance.tabs;
		foreach (Tab val in tabs)
		{
			if (Array.TrueForAll(val.items, (InventoryItem item) => (int)item.type == 3))
			{
				val.items = val.items.Concat(anvilWeapons).ToArray();
				break;
			}
		}
		Debug.Log((object)"Added Weapon Crafting");
	}
}
[HarmonyPatch]
internal class ItemAbilities
{
	private static bool hasStrength;

	public static AudioClip[] saberSwingSfx;

	public static AudioClip[] originalSwingSfx;

	public static AudioClip originalChargeSfx;

	public static AudioClip igniteSfx;

	public static AudioClip deflectSfx;

	[HarmonyPatch(typeof(PlayerStatus), "AddKill", new Type[]
	{
		typeof(int),
		typeof(Mob)
	})]
	[HarmonyPostfix]
	private static void invokeStrength(PlayerStatus __instance)
	{
		if (Hotbar.Instance.currentItem.name == "Asphodel Scythe")
		{
			Debug.Log((object)"Adding Strength!");
			hasStrength = true;
			((MonoBehaviour)__instance).StopCoroutine(removeStrength());
			((MonoBehaviour)__instance).StartCoroutine(removeStrength());
		}
	}

	private static IEnumerator removeStrength()
	{
		yield return (object)new WaitForSeconds(5f);
		Debug.Log((object)"Removing Strength!");
		hasStrength = false;
	}

	[HarmonyPatch(typeof(PowerupInventory), "GetStrengthMultiplier", new Type[] { typeof(int[]) })]
	[HarmonyPostfix]
	private static void strengthChange(ref float __result)
	{
		if (hasStrength)
		{
			__result *= 1.35f;
		}
	}

	[HarmonyPatch(typeof(PowerupInventory), "GetCritChance", new Type[] { typeof(int[]) })]
	[HarmonyPostfix]
	private static void critChange(ref float __result)
	{
		if ((Object)(object)Hotbar.Instance.currentItem != (Object)null && Hotbar.Instance.currentItem.name == "Ambertooth Blade")
		{
			__result += 0.15f;
		}
	}

	[HarmonyPatch(typeof(PowerupInventory), "GetSpeedMultiplier", new Type[] { typeof(int[]) })]
	[HarmonyPostfix]
	private static void speedChange(ref float __result)
	{
		if ((Object)(object)Hotbar.Instance.currentItem != (Object)null && Hotbar.Instance.currentItem.name == "Hellruin Greatsword")
		{
			__result *= 0.8f;
		}
	}

	[HarmonyPatch(typeof(UseInventory), "SetWeapon", new Type[] { typeof(InventoryItem) })]
	[HarmonyPrefix]
	private static void hotbarCheck(UseInventory __instance, InventoryItem item)
	{
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Expected O, but got Unknown
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Invalid comparison between Unknown and I4
		if (!((Object)(object)item == (Object)null))
		{
			if (UseInventory.Instance.chargeSfx.isPlaying)
			{
				UseInventory.Instance.chargeSfx.Stop();
			}
			if (item.name == "Glow Saber" && !item.Compare((InventoryItem)Traverse.Create((object)__instance).Field("currentItem").GetValue()))
			{
				UseInventory.Instance.chargeSfx.clip = igniteSfx;
				UseInventory.Instance.chargeSfx.pitch = 1f;
				UseInventory.Instance.chargeSfx.Play();
			}
			else if ((int)item.type == 9)
			{
				UseInventory.Instance.chargeSfx.clip = originalChargeSfx;
			}
		}
	}

	[HarmonyPatch(typeof(UseInventory), "Use")]
	[HarmonyPrefix]
	private static bool useLightSaber(UseInventory __instance)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Invalid comparison between Unknown and I4
		InventoryItem val = (InventoryItem)Traverse.Create((object)__instance).Field("currentItem").GetValue();
		if ((Object)(object)val != (Object)null && val.name == "Glow Saber" && (int)val.type == 3 && !Main.IsAnimationPlaying(__instance, "Attack") && !OtherInput.Instance.IsAnyMenuOpen())
		{
			float num = (float)Traverse.Create((object)__instance).Field("attackTime").GetValue();
			float num2 = val.attackSpeed * PowerupInventory.Instance.GetAttackSpeedMultiplier((int[])null);
			num /= num2;
			__instance.swingSfx.sounds = saberSwingSfx;
			__instance.swingSfx.Randomize(0.15f / num2);
			string text = "Attack" + Random.Range(1, 4);
			ClientSend.AnimationUpdate((SharedAnimation)0, true);
			__instance.animator.Play(text);
			__instance.animator.SetFloat("AttackSpeed", num2);
			CooldownBar.Instance.ResetCooldownTime(num, false);
			return false;
		}
		__instance.swingSfx.sounds = originalSwingSfx;
		return true;
	}

	[HarmonyPatch(typeof(HitBox), "UseHitbox")]
	[HarmonyPrefix]
	private static void saberDestroyProjectile(HitBox __instance)
	{
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Unknown result type (might be due to invalid IL or missing references)
		InventoryItem currentItem = Hotbar.Instance.currentItem;
		if (!((Object)(object)currentItem != (Object)null) || !currentItem.name.Contains("Glow Saber"))
		{
			return;
		}
		float num = 1.2f + currentItem.attackRange + PlayerStatus.Instance.currentChunkArmorMultiplier;
		RaycastHit[] array = Physics.SphereCastAll(__instance.playerCam.position + __instance.playerCam.forward * 0.1f, 3f, __instance.playerCam.forward, num, LayerMask.op_Implicit(__instance.whatIsHittable));
		Array.Sort(array, (RaycastHit x, RaycastHit y) => ((RaycastHit)(ref x)).distance.CompareTo(((RaycastHit)(ref y)).distance));
		if (array.Length < 1)
		{
			return;
		}
		RaycastHit[] array2 = array;
		for (int i = 0; i < array2.Length; i++)
		{
			RaycastHit val = array2[i];
			Collider collider = ((RaycastHit)(ref val)).collider;
			EnemyProjectile component = ((Component)((Component)collider).transform.root).GetComponent<EnemyProjectile>();
			if ((Object)(object)component != (Object)null)
			{
				UseInventory.Instance.chargeSfx.clip = deflectSfx;
				UseInventory.Instance.chargeSfx.pitch = Random.Range(0.75f, 1.25f);
				UseInventory.Instance.chargeSfx.Play();
				Object.Instantiate<GameObject>(component.hitFx, ((Component)component).transform.position, Quaternion.LookRotation(((Component)component).transform.forward));
				Object.Destroy((Object)(object)((Component)component).gameObject);
			}
		}
	}
}
[BepInPlugin("mucky.plugins.moreweapons", "More Weapons", "1.0.0.0")]
public class Main : BaseUnityPlugin
{
	public const string id = "mucky.plugins.moreweapons";

	public void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("mucky.plugins.moreweapons");
		val.PatchAll();
	}

	public static void addToMobDropTable(int mobID, InventoryItem item, int min, int max, float chance)
	{
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Expected O, but got Unknown
		LootItems[] loot = ((Hitable)((Component)MobSpawner.Instance.allMobs[mobID].mobPrefab.GetComponent<Mob>()).GetComponent<HitableMob>()).dropTable.loot;
		LootItems[] array = (LootItems[])(object)new LootItems[loot.Length + 1];
		loot.CopyTo(array, 0);
		LootItems val = new LootItems();
		val.item = item;
		val.amountMin = min;
		val.amountMax = max;
		val.dropChance = chance;
		array[loot.Length] = val;
		((Hitable)((Component)MobSpawner.Instance.allMobs[mobID].mobPrefab.GetComponent<Mob>()).GetComponent<HitableMob>()).dropTable.loot = array;
	}

	public static void addToResourceDropTable(HitableResource h, InventoryItem item, int min, int max, float chance)
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Expected O, but got Unknown
		LootItems[] loot = ((Hitable)h).dropTable.loot;
		LootItems[] array = (LootItems[])(object)new LootItems[loot.Length + 1];
		loot.CopyTo(array, 0);
		LootItems val = new LootItems();
		val.item = item;
		val.amountMin = min;
		val.amountMax = max;
		val.dropChance = chance;
		array[loot.Length] = val;
		((Hitable)h).dropTable.loot = array;
	}

	public static bool IsAnimationPlaying(UseInventory instance, string animationName)
	{
		if (instance.animator.GetCurrentAnimatorClipInfo(0).Length == 0)
		{
			return false;
		}
		string name = ((Object)((AnimatorClipInfo)(ref instance.animator.GetCurrentAnimatorClipInfo(0)[0])).clip).name;
		return name.Contains(animationName) || animationName == name;
	}
}

PowerupDrop.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("PowerupDrop")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("PowerupDrop")]
[assembly: AssemblyTitle("PowerupDrop")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace PowerupDrop;

public class Packets
{
	public static void ClientSendCanPowerupDrop()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Packet val = new Packet(203);
		try
		{
			ClientSend.SendTCPData(val);
		}
		finally
		{
			((IDisposable)val)?.Dispose();
		}
	}

	public static void ServerHandleCanPowerupDrop(int fromClient, Packet packet)
	{
		PowerupDrop.playersWithMod.Add(fromClient);
	}

	public static void ClientSendPowerupDrop(Powerup powerup)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		Packet val = new Packet(204);
		try
		{
			val.Write(powerup.name);
			val.Write(powerup.id);
			val.Write(((Component)PlayerStatus.Instance).transform.position);
			ClientSend.SendTCPData(val);
		}
		finally
		{
			((IDisposable)val)?.Dispose();
		}
	}

	public static void ServerHandlePowerupDrop(int fromClient, Packet packet)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		string powerupName = packet.ReadString(true);
		int powerupId = packet.ReadInt(true);
		Vector3 position = packet.ReadVector3(true);
		ServerSendPowerupDrop(fromClient, powerupName, powerupId, position);
	}

	public static void ServerSendPowerupDrop(int toClient, string powerupName, int powerupId, Vector3 position)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		if (PowerupDrop.playersWithMod.Count >= GameManager.players.Count)
		{
			Packet val = new Packet(205);
			try
			{
				val.Write(powerupName);
				val.Write(powerupId);
				ServerSend.SendTCPData(toClient, val);
			}
			finally
			{
				((IDisposable)val)?.Dispose();
			}
			int nextId = ItemManager.Instance.GetNextId();
			ItemManager.Instance.DropPowerupAtPosition(powerupId, position, nextId);
			ServerSend.DropPowerupAtPosition(powerupId, nextId, position);
		}
	}

	public static void ClientHandlePowerupDrop(Packet packet)
	{
		string text = packet.ReadString(true);
		int num = packet.ReadInt(true);
		GameObject val = PowerupUI.Instance.powerups[num];
		TextMeshProUGUI componentInChildren = val.GetComponentInChildren<TextMeshProUGUI>();
		int num2 = int.Parse(((TMP_Text)componentInChildren).text);
		num2--;
		((TMP_Text)componentInChildren).text = string.Concat(num2);
		PowerupInventory.Instance.powerups[num]--;
		PlayerStatus.Instance.UpdateStats();
		if (PlayerStatus.Instance.hp > (float)PlayerStatus.Instance.maxHp)
		{
			PlayerStatus.Instance.hp = PlayerStatus.Instance.maxHp;
		}
		if (PlayerStatus.Instance.shield > (float)PlayerStatus.Instance.maxShield)
		{
			PlayerStatus.Instance.shield = PlayerStatus.Instance.maxShield;
		}
		string colorName = ItemManager.Instance.allPowerups[num].GetColorName();
		ChatBox.Instance.SendMessage("Dropped <color=" + colorName + ">(" + text + ")<color=white>");
		if (num2 == 0)
		{
			Object.Destroy((Object)(object)val);
			PowerupUI.Instance.powerups.Remove(num);
			ItemInfo.Instance.Fade(0f, 0.2f);
		}
	}
}
public class MuckPatch
{
	[HarmonyPostfix]
	[HarmonyPatch(typeof(Server), "InitializeServerPackets")]
	public static void InitializeServerPackets()
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		Server.PacketHandlers.Add(203, new PacketHandler(Packets.ServerHandleCanPowerupDrop));
		Server.PacketHandlers.Add(204, new PacketHandler(Packets.ServerHandlePowerupDrop));
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(LocalClient), "InitializeClientData")]
	public static void InitializeClientData()
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		LocalClient.packetHandlers.Add(205, new PacketHandler(Packets.ClientHandlePowerupDrop));
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(GameManager), "StartGame")]
	public static void OnStartGame()
	{
		Packets.ClientSendCanPowerupDrop();
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(PowerupUI), "AddPowerup")]
	public static void OnAddPowerup(ref int powerupId)
	{
		if ((Object)(object)PowerupUI.Instance.powerups[powerupId].GetComponent<ClickablePowerupInfo>() == (Object)null)
		{
			GameObject val = PowerupUI.Instance.powerups[powerupId];
			Object.Destroy((Object)(object)val.GetComponent<PowerupInfo>());
			ClickablePowerupInfo clickablePowerupInfo = val.AddComponent<ClickablePowerupInfo>();
			clickablePowerupInfo.powerup = ItemManager.Instance.allPowerups[powerupId];
		}
	}
}
[BepInPlugin("PowerupDrop", "PowerupDrop", "1.0.0")]
[BepInProcess("Muck.exe")]
public class PowerupDrop : BaseUnityPlugin
{
	public const string GUID = "PowerupDrop";

	public const string NAME = "PowerupDrop";

	public const string VERSION = "1.0.0";

	public static List<int> playersWithMod = new List<int>();

	public static bool hasMod = Directory.GetFiles(Directory.GetCurrentDirectory(), "PowerupDrop.dll", SearchOption.AllDirectories).FirstOrDefault() != null;

	public void Awake()
	{
		Harmony.CreateAndPatchAll(typeof(MuckPatch), (string)null);
		((BaseUnityPlugin)this).Logger.LogMessage((object)"Loaded PowerupDrop");
	}
}
public class ClickablePowerupInfo : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler, IPointerClickHandler
{
	public Powerup powerup { get; set; }

	public void OnPointerEnter(PointerEventData eventData)
	{
		ItemInfo.Instance.SetText(powerup.name + "\n<size=50%><i>" + powerup.description, true);
	}

	public void OnPointerExit(PointerEventData eventData)
	{
		ItemInfo.Instance.Fade(0f, 0.2f);
	}

	public void OnPointerClick(PointerEventData eventData)
	{
		Packets.ClientSendPowerupDrop(powerup);
	}
}

BetterChat.dll

Decompiled a year ago
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("BetterChat")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BetterChat")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace BetterChat;

[BepInPlugin("Terrain.BetterChat", "BetterChat", "1.0.0.0")]
public class Main : BaseUnityPlugin
{
	public const string Name = "BetterChat";

	public const string Author = "Terrain";

	public const string Guid = "Terrain.BetterChat";

	public const string Version = "1.0.0.0";

	internal readonly ManualLogSource log;

	internal readonly Harmony harmony;

	internal readonly Assembly assembly;

	public readonly string modFolder;

	private Main()
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Expected O, but got Unknown
		log = ((BaseUnityPlugin)this).Logger;
		harmony = new Harmony("Terrain.BetterChat");
		assembly = Assembly.GetExecutingAssembly();
		modFolder = Path.GetDirectoryName(assembly.Location);
		harmony.PatchAll(assembly);
	}
}
[HarmonyPatch]
public class ChatFixPatches
{
	private static List<string> history = new List<string>();

	private static int selectedMessage = -1;

	[HarmonyPatch(typeof(ChatBox), "SendMessage")]
	[HarmonyPrefix]
	private static bool SendMessagePrefix(ChatBox __instance, out int __state, string message)
	{
		__state = __instance.maxMsgLength;
		if (string.IsNullOrEmpty(message))
		{
			__instance.typing = false;
			__instance.ClearMessage();
			((MonoBehaviour)__instance).CancelInvoke("HideChat");
			((MonoBehaviour)__instance).Invoke("HideChat", 5f);
			return false;
		}
		if (history.Count == 0 || history[0] != message)
		{
			history.Insert(0, message);
		}
		if (message[0] == '/')
		{
			__instance.maxMsgLength = int.MaxValue;
		}
		return true;
	}

	[HarmonyPatch(typeof(ChatBox), "SendMessage")]
	[HarmonyPostfix]
	private static void SendMessagePostfix(ChatBox __instance, int __state)
	{
		__instance.maxMsgLength = __state;
	}

	[HarmonyPatch(typeof(ChatBox), "AppendMessage")]
	[HarmonyPrefix]
	private static void AppendMessagePrefix(ChatBox __instance, out int __state, int fromUser)
	{
		__state = __instance.maxChars;
		if (fromUser < 0)
		{
			__instance.maxChars = int.MaxValue;
		}
	}

	[HarmonyPatch(typeof(ChatBox), "AppendMessage")]
	[HarmonyPostfix]
	private static void AppendMessagePostfix(ChatBox __instance, int __state)
	{
		__instance.maxChars = __state;
	}

	[HarmonyPatch(typeof(ChatBox), "UserInput")]
	[HarmonyPostfix]
	private static void UserInput(ChatBox __instance)
	{
		if (__instance.typing)
		{
			int num = selectedMessage;
			if (selectedMessage >= 0 && __instance.inputField.text != history[selectedMessage])
			{
				selectedMessage = -1;
			}
			if (Input.GetKeyDown((KeyCode)273))
			{
				selectedMessage++;
			}
			if (Input.GetKeyDown((KeyCode)274))
			{
				selectedMessage--;
			}
			if (selectedMessage >= history.Count)
			{
				selectedMessage = history.Count - 1;
			}
			if (selectedMessage < 0)
			{
				selectedMessage = -1;
			}
			if (selectedMessage != -1 && selectedMessage != num)
			{
				__instance.inputField.text = history[selectedMessage];
			}
		}
	}

	[HarmonyPatch(typeof(Hotbar), "Update")]
	[HarmonyPrefix]
	private static bool Update()
	{
		return !OtherInput.Instance.OtherUiActive();
	}
}

MuckSettings.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MuckSettings")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MuckSettings")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace MuckSettings;

[BepInPlugin("Terrain.MuckSettings", "MuckSettings", "1.0.0.0")]
public class Main : BaseUnityPlugin
{
	public const string Name = "MuckSettings";

	public const string Author = "Terrain";

	public const string Guid = "Terrain.MuckSettings";

	public const string Version = "1.0.0.0";

	internal readonly ManualLogSource log;

	internal readonly Harmony harmony;

	internal readonly Assembly assembly;

	public readonly string modFolder;

	public static GameObject SettingsScroll;

	public static GameObject BoolSetting;

	public static GameObject ControlSetting;

	public static GameObject ResolutionSetting;

	public static GameObject ScrollSetting;

	public static GameObject SliderSetting;

	public static GameObject TwoBoolSetting;

	private static readonly OSPlatform[] supportedPlatforms = new OSPlatform[3]
	{
		OSPlatform.Windows,
		OSPlatform.Linux,
		OSPlatform.OSX
	};

	private Main()
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Expected O, but got Unknown
		log = ((BaseUnityPlugin)this).Logger;
		harmony = new Harmony("Terrain.MuckSettings");
		assembly = Assembly.GetExecutingAssembly();
		modFolder = Path.GetDirectoryName(assembly.Location);
		AssetBundle assetBundle = GetAssetBundle("settings");
		SettingsScroll = assetBundle.LoadAsset<GameObject>("Assets/PrefabInstance/SettingsScroll.prefab");
		BoolSetting = assetBundle.LoadAsset<GameObject>("Assets/PrefabInstance/BoolSetting.prefab");
		ControlSetting = assetBundle.LoadAsset<GameObject>("Assets/PrefabInstance/ControlSetting.prefab");
		ResolutionSetting = assetBundle.LoadAsset<GameObject>("Assets/PrefabInstance/ResolutionSetting.prefab");
		ScrollSetting = assetBundle.LoadAsset<GameObject>("Assets/PrefabInstance/ScrollSetting.prefab");
		SliderSetting = assetBundle.LoadAsset<GameObject>("Assets/PrefabInstance/SliderSetting.prefab");
		TwoBoolSetting = assetBundle.LoadAsset<GameObject>("Assets/PrefabInstance/TwoBoolSetting.prefab");
		BoolSetting.AddComponent<OneBoolSetting>();
		ControlSetting.AddComponent<ControlSetting>();
		ResolutionSetting.AddComponent<ResolutionSetting>();
		ScrollSetting.AddComponent<ScrollSetting>();
		SliderSetting.AddComponent<SliderSetting>();
		TwoBoolSetting.AddComponent<TwoBoolSetting>();
		harmony.PatchAll(assembly);
	}

	private static AssetBundle GetAssetBundle(string name)
	{
		OSPlatform[] array = supportedPlatforms;
		for (int i = 0; i < array.Length; i++)
		{
			OSPlatform osPlatform = array[i];
			if (RuntimeInformation.IsOSPlatform(osPlatform))
			{
				name = name + "-" + osPlatform.ToString().ToLower();
				break;
			}
		}
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		string name2 = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(name));
		using Stream stream = executingAssembly.GetManifestResourceStream(name2);
		return AssetBundle.LoadFromStream(stream);
	}
}
public static class KeyListenerCurrentlyChanging
{
	public static ControlSetting value;
}
public class Settings
{
	public class Page : IDisposable
	{
		private class SettingsItem<T> : IDisposable where T : Setting
		{
			public T obj;

			private Page page;

			public SettingsItem(Page page, GameObject gameObject, string name)
			{
				obj = Object.Instantiate<GameObject>(gameObject).GetComponent<T>();
				obj.SetName(name);
				this.page = page;
			}

			public void Dispose()
			{
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Expected O, but got Unknown
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				RectTransform val = (RectTransform)((Component)obj).transform;
				((Transform)val).SetParent((Transform)(object)page.content, false);
				page.height += val.sizeDelta.y;
				page.total++;
			}
		}

		private RectTransform content;

		private float height;

		private int total;

		private float maxScrollWidth;

		private List<RectTransform> scrollSettings = new List<RectTransform>();

		public Page(GameObject tab)
		{
			Object.Destroy((Object)(object)tab.GetComponent<VerticalLayoutGroup>());
			GameObject val = Object.Instantiate<GameObject>(Main.SettingsScroll);
			content = val.GetComponent<ScrollRect>().content;
			val.transform.SetParent(tab.transform, false);
		}

		public void AddControlSetting(string name, ConfigEntry<KeyCode> configEntry)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			AddControlSetting(name, configEntry.Value, delegate(KeyCode key)
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				configEntry.Value = key;
			});
		}

		public void AddControlSetting(string name, KeyCode defaultValue, Action<KeyCode> update)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			SettingsItem<ControlSetting> setting = new SettingsItem<ControlSetting>(this, Main.ControlSetting, name);
			try
			{
				setting.obj.SetSetting(defaultValue);
				((UnityEvent)setting.obj.onClick).AddListener((UnityAction)delegate
				{
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					update(setting.obj.currentKey);
				});
			}
			finally
			{
				if (setting != null)
				{
					((IDisposable)setting).Dispose();
				}
			}
		}

		public void AddSliderSetting(string name, ConfigEntry<int> configEntry, int min, int max)
		{
			AddSliderSetting(name, configEntry.Value, min, max, delegate(int value)
			{
				configEntry.Value = value;
			});
		}

		public void AddSliderSetting(string name, int defaultValue, int min, int max, Action<int> update)
		{
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			SettingsItem<SliderSetting> setting = new SettingsItem<SliderSetting>(this, Main.SliderSetting, name);
			try
			{
				setting.obj.slider.minValue = min;
				setting.obj.slider.maxValue = max;
				setting.obj.SetSettings(defaultValue);
				((UnityEvent)setting.obj.onClick).AddListener((UnityAction)delegate
				{
					update(setting.obj.currentSetting);
				});
			}
			finally
			{
				if (setting != null)
				{
					((IDisposable)setting).Dispose();
				}
			}
		}

		public void AddScrollSetting<T>(string name, ConfigEntry<T> configEntry) where T : Enum
		{
			AddScrollSetting(name, configEntry.Value, delegate(T value)
			{
				configEntry.Value = value;
			});
		}

		public void AddScrollSetting<T>(string name, T defaultValue, Action<T> update) where T : Enum
		{
			AddScrollSetting<T>(name, Array.IndexOf(Enum.GetNames(typeof(T)), defaultValue.ToString()), delegate(int value)
			{
				update((T)Enum.ToObject(typeof(T), value));
			});
		}

		public void AddScrollSetting<T>(string name, int index, Action<int> update) where T : Enum
		{
			string[] names = Enum.GetNames(typeof(T));
			AddScrollSetting(name, names, index, update);
		}

		public void AddScrollSetting(string name, string[] values, int defaultIndex, Action<int> update)
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Expected O, but got Unknown
			SettingsItem<ScrollSetting> setting = new SettingsItem<ScrollSetting>(this, Main.ScrollSetting, name);
			try
			{
				foreach (string text in values)
				{
					((TMP_Text)setting.obj.settingText).text = text;
					scrollSettings.Add((RectTransform)((TMP_Text)setting.obj.settingText).transform);
					maxScrollWidth = Math.Max(((TMP_Text)setting.obj.settingText).preferredWidth, maxScrollWidth);
				}
				setting.obj.SetSettings(values, defaultIndex);
				((UnityEvent)setting.obj.onClick).AddListener((UnityAction)delegate
				{
					update(setting.obj.currentSetting);
				});
			}
			finally
			{
				if (setting != null)
				{
					((IDisposable)setting).Dispose();
				}
			}
		}

		public void AddBoolSetting(string name, ConfigEntry<bool> configEntry)
		{
			AddBoolSetting(name, configEntry.Value, delegate(bool value)
			{
				configEntry.Value = value;
			});
		}

		public void AddBoolSetting(string name, bool defaultValue, Action<bool> update)
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			SettingsItem<OneBoolSetting> setting = new SettingsItem<OneBoolSetting>(this, Main.BoolSetting, name);
			try
			{
				setting.obj.SetSetting(defaultValue);
				((UnityEvent)setting.obj.onClick).AddListener((UnityAction)delegate
				{
					update(IntToBool(setting.obj.currentSetting));
				});
			}
			finally
			{
				if (setting != null)
				{
					((IDisposable)setting).Dispose();
				}
			}
		}

		public void AddTwoBoolSetting(string name, string label1, string label2, ConfigEntry<bool> configEntry1, ConfigEntry<bool> configEntry2)
		{
			AddTwoBoolSetting(name, label1, label2, configEntry1.Value, configEntry2.Value, delegate(bool value1, bool value2)
			{
				configEntry1.Value = value1;
				configEntry2.Value = value2;
			});
		}

		public void AddTwoBoolSetting(string name, string label1, string label2, bool defaultValue1, bool defaultValue2, Action<bool, bool> update)
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			SettingsItem<TwoBoolSetting> setting = new SettingsItem<TwoBoolSetting>(this, Main.TwoBoolSetting, name);
			try
			{
				setting.obj.SetSetting(defaultValue1, defaultValue2);
				setting.obj.SetLabels(label1, label2);
				((UnityEvent)setting.obj.onClick).AddListener((UnityAction)delegate
				{
					update(IntToBool(setting.obj.currentSetting & 1), IntToBool(setting.obj.currentSetting & 2));
				});
			}
			finally
			{
				if (setting != null)
				{
					((IDisposable)setting).Dispose();
				}
			}
		}

		public void AddResolutionSetting(string name, Resolution[] resolutions, Resolution current)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			using SettingsItem<ResolutionSetting> settingsItem = new SettingsItem<ResolutionSetting>(this, Main.ResolutionSetting, name);
			settingsItem.obj.SetSettings(resolutions, current);
		}

		public void Dispose()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			foreach (RectTransform scrollSetting in scrollSettings)
			{
				scrollSetting.sizeDelta = new Vector2(maxScrollWidth, scrollSetting.sizeDelta.y);
			}
			VerticalLayoutGroup component = ((Component)content).GetComponent<VerticalLayoutGroup>();
			content.sizeDelta = new Vector2(content.sizeDelta.x, height + (float)(total - 1) * ((HorizontalOrVerticalLayoutGroup)component).spacing + (float)((LayoutGroup)component).padding.top + (float)((LayoutGroup)component).padding.bottom);
		}
	}

	public enum BoolSetting
	{
		Off,
		On
	}

	public enum VSync
	{
		Off,
		Always,
		Half
	}

	public enum ShadowQuality
	{
		Off,
		Hard,
		Soft
	}

	public enum ShadowResolution
	{
		Low,
		Medium,
		High,
		Ultra
	}

	public enum ShadowDistance
	{
		Low,
		Medium,
		High,
		Ultra
	}

	public enum ShadowCascades
	{
		None,
		Two,
		Four
	}

	public enum TextureResolution
	{
		Low,
		Medium,
		High,
		Ultra
	}

	public enum AntiAliasing
	{
		Off,
		x2,
		x4,
		x8
	}

	public enum Bloom
	{
		Off,
		Fast,
		Fancy
	}

	public Button backBtn;

	public static void Gameplay(Page page)
	{
		page.AddBoolSetting("Camera Shake", SaveManager.Instance.state.cameraShake, UpdateCamShake);
		page.AddSliderSetting("FOV", SaveManager.Instance.state.fov, 50, 120, UpdateFov);
		page.AddSliderSetting("Sensitivity", FloatToInt(SaveManager.Instance.state.sensMultiplier), 0, 500, UpdateSens);
		page.AddTwoBoolSetting("Inverted Mouse", "X", "Y", SaveManager.Instance.state.invertedMouseHor, SaveManager.Instance.state.invertedMouseVert, UpdateInverted);
		page.AddBoolSetting("Grass", SaveManager.Instance.state.grass, UpdateGrass);
		page.AddBoolSetting("Tutorial", SaveManager.Instance.state.tutorial, UpdateTutorial);
	}

	public static void Controls(Page page)
	{
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_011a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0140: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		page.AddControlSetting("Forward", SaveManager.Instance.state.forward, UpdateForwardKey);
		page.AddControlSetting("Backward", SaveManager.Instance.state.backwards, UpdateBackwardKey);
		page.AddControlSetting("Left", SaveManager.Instance.state.left, UpdateLeftKey);
		page.AddControlSetting("Right", SaveManager.Instance.state.right, UpdateRightKey);
		page.AddControlSetting("Jump", SaveManager.Instance.state.jump, UpdateJumpKey);
		page.AddControlSetting("Sprint", SaveManager.Instance.state.sprint, UpdateSprintKey);
		page.AddControlSetting("Interact", SaveManager.Instance.state.interact, UpdateInteractKey);
		page.AddControlSetting("Inventory", SaveManager.Instance.state.inventory, UpdateInventoryKey);
		page.AddControlSetting("Map", SaveManager.Instance.state.map, UpdateMapKey);
		page.AddControlSetting("Attack/Eat", SaveManager.Instance.state.leftClick, UpdateLeftClickKey);
		page.AddControlSetting("Build", SaveManager.Instance.state.rightClick, UpdateRightClickKey);
	}

	public static void Graphics(Page page)
	{
		page.AddScrollSetting<ShadowQuality>("Shadow Quality", SaveManager.Instance.state.shadowQuality, UpdateShadowQuality);
		page.AddScrollSetting<ShadowResolution>("Shadow Resolution", SaveManager.Instance.state.shadowResolution, UpdateShadowResolution);
		page.AddScrollSetting<ShadowDistance>("Shadow Distance", SaveManager.Instance.state.shadowDistance, UpdateShadowDistance);
		page.AddScrollSetting<ShadowCascades>("Shadow Cascades", SaveManager.Instance.state.shadowCascade, UpdateShadowCascades);
		page.AddScrollSetting<TextureResolution>("Texture Resolution", SaveManager.Instance.state.textureQuality, UpdateTextureRes);
		page.AddScrollSetting<AntiAliasing>("Anti Aliasing", SaveManager.Instance.state.antiAliasing, UpdateAntiAliasing);
		page.AddBoolSetting("Soft Particles", SaveManager.Instance.state.softParticles, UpdateSoftParticles);
		page.AddScrollSetting<Bloom>("Bloom", SaveManager.Instance.state.bloom, UpdateBloom);
		page.AddBoolSetting("Motion Blur", SaveManager.Instance.state.motionBlur, UpdateMotionBlur);
		page.AddBoolSetting("Ambient Occlusion", SaveManager.Instance.state.ambientOcclusion, UpdateAO);
	}

	public static void Video(Page page)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		page.AddResolutionSetting("Resolution", Screen.resolutions, Screen.currentResolution);
		page.AddBoolSetting("Fullscreen", Screen.fullScreen, UpdateFullscreen);
		page.AddScrollSetting<FullScreenMode>("Fullscreen Mode", SaveManager.Instance.state.fullscreenMode, (Action<int>)UpdateFullscreenMode);
		page.AddScrollSetting<VSync>("VSync", SaveManager.Instance.state.vSync, UpdateVSync);
		page.AddSliderSetting("Max FPS", SaveManager.Instance.state.fpsLimit, 30, 500, UpdateMaxFps);
	}

	public static void Audio(Page page)
	{
		page.AddSliderSetting("Master volume", SaveManager.Instance.state.volume, 0, 10, UpdateVolume);
		page.AddSliderSetting("Music volume", SaveManager.Instance.state.music, 0, 10, UpdateMusic);
	}

	public static void UpdateCamShake(bool current)
	{
		CurrentSettings.Instance.UpdateCamShake(current);
	}

	public static void UpdateInverted(bool x, bool y)
	{
		CurrentSettings.Instance.UpdateInverted(x, y);
	}

	public static void UpdateGrass(bool current)
	{
		CurrentSettings.Instance.UpdateGrass(current);
	}

	public static void UpdateTutorial(bool current)
	{
		CurrentSettings.Instance.UpdateTutorial(current);
	}

	public static void UpdateSens(int current)
	{
		CurrentSettings.Instance.UpdateSens(IntToFloat(current));
	}

	public static void UpdateFov(int current)
	{
		CurrentSettings.Instance.UpdateFov((float)current);
	}

	public static void UpdateForwardKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.forward = current;
		SaveManager.Instance.Save();
		InputManager.forward = current;
	}

	public static void UpdateBackwardKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.backwards = current;
		SaveManager.Instance.Save();
		InputManager.backwards = current;
	}

	public static void UpdateLeftKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.left = current;
		SaveManager.Instance.Save();
		InputManager.left = current;
	}

	public static void UpdateRightKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.right = current;
		SaveManager.Instance.Save();
		InputManager.right = current;
	}

	public static void UpdateJumpKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.jump = current;
		SaveManager.Instance.Save();
		InputManager.jump = current;
	}

	public static void UpdateSprintKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.sprint = current;
		SaveManager.Instance.Save();
		InputManager.sprint = current;
	}

	public static void UpdateInteractKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.interact = current;
		SaveManager.Instance.Save();
		InputManager.interact = current;
	}

	public static void UpdateInventoryKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.inventory = current;
		SaveManager.Instance.Save();
		InputManager.inventory = current;
	}

	public static void UpdateMapKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.map = current;
		SaveManager.Instance.Save();
		InputManager.map = current;
	}

	public static void UpdateLeftClickKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.leftClick = current;
		SaveManager.Instance.Save();
		InputManager.leftClick = current;
	}

	public static void UpdateRightClickKey(KeyCode current)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		SaveManager.Instance.state.rightClick = current;
		SaveManager.Instance.Save();
		InputManager.rightClick = current;
	}

	public static void UpdateShadowQuality(int current)
	{
		CurrentSettings.Instance.UpdateShadowQuality(current);
	}

	public static void UpdateShadowResolution(int current)
	{
		CurrentSettings.Instance.UpdateShadowResolution(current);
	}

	public static void UpdateShadowDistance(int current)
	{
		CurrentSettings.Instance.UpdateShadowDistance(current);
	}

	public static void UpdateShadowCascades(int current)
	{
		CurrentSettings.Instance.UpdateShadowCascades(current);
	}

	public static void UpdateTextureRes(int current)
	{
		CurrentSettings.Instance.UpdateTextureQuality(current);
	}

	public static void UpdateAntiAliasing(int current)
	{
		CurrentSettings.Instance.UpdateAntiAliasing(current);
	}

	public static void UpdateBloom(int current)
	{
		CurrentSettings.Instance.UpdateBloom(current);
	}

	public static void UpdateSoftParticles(bool current)
	{
		CurrentSettings.Instance.UpdateSoftParticles(current);
	}

	public static void UpdateMotionBlur(bool current)
	{
		CurrentSettings.Instance.UpdateMotionBlur(current);
	}

	public static void UpdateAO(bool current)
	{
		CurrentSettings.Instance.UpdateAO(current);
	}

	public static void UpdateFullscreen(bool current)
	{
		CurrentSettings.Instance.UpdateFullscreen(current);
	}

	public static void UpdateFullscreenMode(int current)
	{
		CurrentSettings.Instance.UpdateFullscreenMode(current);
	}

	public static void UpdateVSync(int current)
	{
		CurrentSettings.Instance.UpdateVSync(current);
	}

	public static void UpdateMaxFps(int current)
	{
		CurrentSettings.Instance.UpdateMaxFps(current);
	}

	public static void UpdateVolume(int current)
	{
		CurrentSettings.Instance.UpdateVolume(current);
	}

	public static void UpdateMusic(int current)
	{
		CurrentSettings.Instance.UpdateMusic(current);
	}

	public static float IntToFloat(int i)
	{
		return (float)i / 100f;
	}

	public static int FloatToInt(float f)
	{
		return (int)(f * 100f);
	}

	public static int BoolToInt(bool b)
	{
		if (b)
		{
			return 1;
		}
		return 0;
	}

	public static bool IntToBool(int i)
	{
		return i != 0;
	}
}
[HarmonyPatch(typeof(KeyListener), "Update")]
internal class UpdateKeyListener
{
	private static bool Prefix(KeyListener __instance)
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		if (!__instance.overlay.activeInHierarchy)
		{
			return false;
		}
		if (Input.GetKeyDown((KeyCode)27))
		{
			__instance.CloseListener();
			return false;
		}
		foreach (KeyCode value in Enum.GetValues(typeof(KeyCode)))
		{
			if (Input.GetKey(value))
			{
				KeyListenerCurrentlyChanging.value.SetKey(value);
				__instance.CloseListener();
				break;
			}
		}
		return false;
	}
}
[HarmonyPatch(typeof(KeyListener), "CloseListener")]
internal class CloseKeyListener
{
	private static void Postfix()
	{
		KeyListenerCurrentlyChanging.value = null;
	}
}
[HarmonyPatch(typeof(Settings), "UpdateSave")]
internal class SettingsMenu
{
	private static bool Prefix(Settings __instance)
	{
		TopNavigate componentInChildren = ((Component)__instance).GetComponentInChildren<TopNavigate>();
		GameObject[] settingMenus = componentInChildren.settingMenus;
		foreach (GameObject val in settingMenus)
		{
			int childCount = val.transform.childCount;
			while (childCount-- > 0)
			{
				Object.Destroy((Object)(object)((Component)val.transform.GetChild(childCount)).gameObject);
			}
		}
		using (Settings.Page page = new Settings.Page(componentInChildren.settingMenus[0]))
		{
			Settings.Gameplay(page);
		}
		using (Settings.Page page2 = new Settings.Page(componentInChildren.settingMenus[1]))
		{
			Settings.Controls(page2);
		}
		using (Settings.Page page3 = new Settings.Page(componentInChildren.settingMenus[2]))
		{
			Settings.Graphics(page3);
		}
		using (Settings.Page page4 = new Settings.Page(componentInChildren.settingMenus[3]))
		{
			Settings.Video(page4);
		}
		using (Settings.Page page5 = new Settings.Page(componentInChildren.settingMenus[4]))
		{
			Settings.Audio(page5);
		}
		return false;
	}
}
public class Setting : MonoBehaviour
{
	public class ButtonClickedEvent : UnityEvent
	{
	}

	public int currentSetting;

	public ButtonClickedEvent m_OnClick = new ButtonClickedEvent();

	public string settingName;

	public TextMeshProUGUI nameText;

	public ButtonClickedEvent onClick
	{
		get
		{
			return m_OnClick;
		}
		set
		{
			m_OnClick = value;
		}
	}

	public void SetName(string name)
	{
		settingName = name;
		((TMP_Text)nameText).text = name;
	}
}
public class ControlSetting : Setting
{
	public TextMeshProUGUI keyText;

	public KeyCode currentKey;

	public void Awake()
	{
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Expected O, but got Unknown
		nameText = ((Component)((Component)this).transform.GetChild(0).GetChild(0)).GetComponent<TextMeshProUGUI>();
		keyText = ((Component)((Component)this).transform.GetChild(1).GetChild(0).GetChild(0)).GetComponent<TextMeshProUGUI>();
		((UnityEvent)((Component)((Component)this).transform.GetChild(1).GetChild(0)).GetComponent<Button>().onClick).AddListener(new UnityAction(StartListening));
	}

	public void SetSetting(KeyCode k)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		currentKey = k;
		MonoBehaviour.print((object)("key: " + ((object)(KeyCode)(ref k)).ToString()));
		UpdateSetting();
	}

	public void UpdateSetting()
	{
		((TMP_Text)keyText).text = ((object)(KeyCode)(ref currentKey)).ToString() ?? "";
	}

	public void SetKey(KeyCode k)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		currentKey = k;
		((UnityEvent)base.onClick).Invoke();
		UpdateSetting();
	}

	public void StartListening()
	{
		KeyListener instance = KeyListener.Instance;
		((TMP_Text)instance.alertText).text = "Press any key for\n\"" + settingName + "\"\n\n<i><size=60%>...escape to go back";
		KeyListenerCurrentlyChanging.value = this;
		instance.overlay.SetActive(true);
	}
}
public class OneBoolSetting : Setting
{
	public GameObject checkMark;

	public void Awake()
	{
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Expected O, but got Unknown
		nameText = ((Component)((Component)this).transform.GetChild(0).GetChild(0)).GetComponent<TextMeshProUGUI>();
		checkMark = ((Component)((Component)this).transform.GetChild(1).GetChild(0).GetChild(0)).gameObject;
		((UnityEvent)((Component)((Component)this).transform.GetChild(1).GetChild(0)).GetComponent<Button>().onClick).AddListener(new UnityAction(ToggleSetting));
	}

	public void SetSetting(int s)
	{
		currentSetting = s;
		UpdateSetting();
	}

	public void SetSetting(bool s)
	{
		if (s)
		{
			currentSetting = 1;
		}
		else
		{
			currentSetting = 0;
		}
		UpdateSetting();
	}

	public void ToggleSetting()
	{
		if (currentSetting == 1)
		{
			currentSetting = 0;
		}
		else
		{
			currentSetting = 1;
		}
		UpdateSetting();
	}

	public void UpdateSetting()
	{
		if (currentSetting == 1)
		{
			checkMark.SetActive(true);
		}
		else
		{
			checkMark.SetActive(false);
		}
		((UnityEvent)m_OnClick).Invoke();
	}
}
public class TwoBoolSetting : Setting
{
	public GameObject checkMark1;

	public GameObject checkMark2;

	public TextMeshProUGUI label1;

	public TextMeshProUGUI label2;

	public void Awake()
	{
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ca: Expected O, but got Unknown
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Expected O, but got Unknown
		nameText = ((Component)((Component)this).transform.GetChild(0).GetChild(0)).GetComponent<TextMeshProUGUI>();
		checkMark1 = ((Component)((Component)this).transform.GetChild(1).GetChild(0).GetChild(0)).gameObject;
		checkMark2 = ((Component)((Component)this).transform.GetChild(1).GetChild(2).GetChild(0)).gameObject;
		label1 = ((Component)((Component)this).transform.GetChild(1).GetChild(1)).GetComponent<TextMeshProUGUI>();
		label2 = ((Component)((Component)this).transform.GetChild(1).GetChild(3)).GetComponent<TextMeshProUGUI>();
		((UnityEvent)((Component)((Component)this).transform.GetChild(1).GetChild(0)).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
		{
			ToggleSetting(0);
		});
		((UnityEvent)((Component)((Component)this).transform.GetChild(1).GetChild(2)).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
		{
			ToggleSetting(1);
		});
	}

	public void SetSetting(int s)
	{
		currentSetting = s;
		UpdateSetting();
	}

	public void SetSetting(bool a, bool b)
	{
		currentSetting = (a ? 1 : 0) | (b ? 2 : 0);
		UpdateSetting();
	}

	public void ToggleSetting(int bit)
	{
		currentSetting ^= 1 << bit;
		UpdateSetting();
	}

	public void SetLabels(string first, string second)
	{
		((TMP_Text)label1).text = first;
		((TMP_Text)label2).text = second;
	}

	public void UpdateSetting()
	{
		checkMark1.SetActive((currentSetting & 1) != 0);
		checkMark2.SetActive((currentSetting & 2) != 0);
		((UnityEvent)m_OnClick).Invoke();
	}
}
public class SliderSetting : Setting
{
	public Slider slider;

	public TextMeshProUGUI value;

	public void Awake()
	{
		nameText = ((Component)((Component)this).transform.GetChild(0).GetChild(0)).GetComponent<TextMeshProUGUI>();
		slider = ((Component)((Component)this).transform.GetChild(1).GetChild(0)).GetComponent<Slider>();
		((UnityEvent<float>)(object)slider.onValueChanged).AddListener((UnityAction<float>)delegate
		{
			UpdateSettings();
		});
		value = ((Component)((Component)this).transform.GetChild(1).GetChild(1).GetChild(0)).GetComponent<TextMeshProUGUI>();
	}

	public void SetSettings(int startVal)
	{
		currentSetting = startVal;
		slider.value = startVal;
		UpdateSettings();
	}

	public void UpdateSettings()
	{
		currentSetting = (int)slider.value;
		((TMP_Text)value).text = string.Concat(currentSetting);
		((UnityEvent)m_OnClick).Invoke();
	}

	public static float Truncate(float value, int digits)
	{
		double num = Math.Pow(10.0, digits);
		return (float)(Math.Truncate(num * (double)value) / num);
	}
}
public class ScrollSetting : Setting
{
	public TextMeshProUGUI settingText;

	public string[] settingNames;

	public RawImage scrollLeft;

	public RawImage scrollRight;

	public void Awake()
	{
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Expected O, but got Unknown
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Expected O, but got Unknown
		nameText = ((Component)((Component)this).transform.GetChild(0).GetChild(0)).GetComponent<TextMeshProUGUI>();
		settingText = ((Component)((Component)this).transform.GetChild(1).GetChild(1)).GetComponent<TextMeshProUGUI>();
		scrollLeft = ((Component)((Component)this).transform.GetChild(1).GetChild(0)).GetComponent<RawImage>();
		((UnityEvent)((Component)scrollLeft).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
		{
			Scroll(-1);
		});
		scrollRight = ((Component)((Component)this).transform.GetChild(1).GetChild(2)).GetComponent<RawImage>();
		((UnityEvent)((Component)scrollRight).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
		{
			Scroll(1);
		});
	}

	public void SetSettings(string[] settings, int startVal)
	{
		settingNames = settings;
		currentSetting = startVal;
		UpdateSetting();
	}

	public void Scroll(int i)
	{
		currentSetting += i;
		UpdateSetting();
	}

	public void UpdateSetting()
	{
		((TMP_Text)settingText).text = settingNames[currentSetting];
		if (currentSetting == 0)
		{
			((Behaviour)scrollLeft).enabled = false;
		}
		else if (currentSetting > 0)
		{
			((Behaviour)scrollLeft).enabled = true;
		}
		if (currentSetting == settingNames.Length - 1)
		{
			((Behaviour)scrollRight).enabled = false;
		}
		else if (currentSetting < settingNames.Length - 1)
		{
			((Behaviour)scrollRight).enabled = true;
		}
		((UnityEvent)m_OnClick).Invoke();
	}
}
public class ResolutionSetting : Setting
{
	public RawImage scrollLeft;

	public RawImage scrollRight;

	public TextMeshProUGUI settingText;

	public Resolution[] resolutions;

	public void Awake()
	{
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Expected O, but got Unknown
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Expected O, but got Unknown
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Expected O, but got Unknown
		nameText = ((Component)((Component)this).transform.GetChild(0).GetChild(0)).GetComponent<TextMeshProUGUI>();
		settingText = ((Component)((Component)this).transform.GetChild(1).GetChild(1)).GetComponent<TextMeshProUGUI>();
		scrollLeft = ((Component)((Component)this).transform.GetChild(1).GetChild(0)).GetComponent<RawImage>();
		((UnityEvent)((Component)scrollLeft).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
		{
			Scroll(-1);
		});
		scrollRight = ((Component)((Component)this).transform.GetChild(1).GetChild(2)).GetComponent<RawImage>();
		((UnityEvent)((Component)scrollRight).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
		{
			Scroll(1);
		});
		((UnityEvent)((Component)((Component)this).transform.GetChild(1).GetChild(3)).GetComponent<Button>().onClick).AddListener(new UnityAction(ApplySetting));
	}

	public void SetSettings(Resolution[] resolutions, Resolution current)
	{
		this.resolutions = resolutions;
		for (int i = 0; i < resolutions.Length; i++)
		{
			if (((Resolution)(ref current)).width == ((Resolution)(ref resolutions[i])).width && ((Resolution)(ref current)).height == ((Resolution)(ref resolutions[i])).height)
			{
				currentSetting = i;
				MonoBehaviour.print((object)"found current res");
			}
		}
		UpdateSetting();
	}

	public void Scroll(int i)
	{
		currentSetting += i;
		UpdateSetting();
	}

	public void UpdateSetting()
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		((TMP_Text)settingText).text = ResolutionToText(resolutions[currentSetting]);
		if (currentSetting == 0)
		{
			((Behaviour)scrollLeft).enabled = false;
		}
		else if (currentSetting > 0)
		{
			((Behaviour)scrollLeft).enabled = true;
		}
		if (currentSetting == resolutions.Length - 1)
		{
			((Behaviour)scrollRight).enabled = false;
		}
		else if (currentSetting < resolutions.Length - 1)
		{
			((Behaviour)scrollRight).enabled = true;
		}
	}

	public string ResolutionToText(Resolution r)
	{
		return ((object)(Resolution)(ref r)).ToString();
	}

	public void ApplySetting()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		Resolution val = resolutions[currentSetting];
		CurrentSettings.Instance.UpdateResolution(((Resolution)(ref val)).width, ((Resolution)(ref val)).height, ((Resolution)(ref val)).refreshRate);
	}
}

Item_Choice.dll

Decompiled a year ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Item_Choice")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Item_Choice")]
[assembly: AssemblyTitle("Item_Choice")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace ItemChoice;

public class ItemChoiceUI : MonoBehaviour
{
	public static GameObject instance;

	public static int ItemChoiceUIID;

	public static int contentID;

	public static int targetObjID;

	public static void Init(Transform p)
	{
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		instance = Object.Instantiate<GameObject>(_Assets.itemChoiceUI);
		instance.SetActive(false);
		instance.transform.SetParent(p);
		instance.transform.localPosition = new Vector3(0f, 0f, 0f);
		ItemChoiceUIID = ((Object)instance).GetInstanceID();
		contentID = ((Object)((Component)((GameObject)Object.FindObjectFromInstanceID(ItemChoiceUIID)).transform.Find("VerticalScroll/VerticalViewport/VerticalContent")).gameObject).GetInstanceID();
		AddPowerupsToUI(ItemManager.Instance.powerupsWhite);
		AddPowerupsToUI(ItemManager.Instance.powerupsBlue);
		AddPowerupsToUI(ItemManager.Instance.powerupsOrange);
	}

	public static void AddPowerupsToUI(Powerup[] powerUpsArray)
	{
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Expected O, but got Unknown
		foreach (Powerup p in powerUpsArray)
		{
			if (!ItemSpirit.isSpirit(p))
			{
				GameObject val = Object.Instantiate<GameObject>(_Assets.powerupHolder);
				GameObject gameObject = ((Component)val.transform.GetChild(0)).gameObject;
				val.SetActive(false);
				((Object)val).name = p.name;
				((Transform)val.GetComponent<RectTransform>()).SetParent((Transform)(object)((GameObject)Object.FindObjectFromInstanceID(contentID)).GetComponent<RectTransform>());
				val.AddComponent<PowerupInItemChoiceUI>().powerup = p;
				gameObject.GetComponent<RawImage>().texture = (Texture)(object)p.sprite.texture;
				((UnityEvent)gameObject.GetComponent<Button>().onClick).AddListener((UnityAction)delegate
				{
					SpriteOnClick(p.id);
				});
			}
		}
	}

	public static void ShowTierInUI(PowerTier t)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		foreach (Transform item in (Transform)((GameObject)Object.FindObjectFromInstanceID(contentID)).GetComponent<RectTransform>())
		{
			Transform val = item;
			if (!((object)(PowerTier)(ref ((Component)val).GetComponent<PowerupInItemChoiceUI>().powerup.tier)).Equals((object?)t))
			{
				((Component)val).gameObject.SetActive(false);
			}
			else
			{
				((Component)val).gameObject.SetActive(true);
			}
		}
	}

	public static void SpriteOnClick(int powerupID)
	{
		HideUI();
		SpiritInteract.Instance.ChoseItem(powerupID, targetObjID);
	}

	public static void ToggleUI()
	{
		if (instance.activeInHierarchy)
		{
			instance.SetActive(false);
			Cursor.visible = false;
			Cursor.lockState = (CursorLockMode)1;
		}
		else
		{
			instance.SetActive(true);
			Cursor.visible = true;
			Cursor.lockState = (CursorLockMode)0;
		}
	}

	public static void HideUI()
	{
		if (instance.activeInHierarchy)
		{
			instance.SetActive(false);
			Cursor.visible = false;
			Cursor.lockState = (CursorLockMode)1;
		}
	}
}
public class ItemSpirit
{
	public static Powerup whiteSpirit = ScriptableObject.CreateInstance<Powerup>();

	public static Powerup blueSpirit = ScriptableObject.CreateInstance<Powerup>();

	public static Powerup orangeSpirit = ScriptableObject.CreateInstance<Powerup>();

	public static Powerup[] spiritList = (Powerup[])(object)new Powerup[3] { whiteSpirit, blueSpirit, orangeSpirit };

	public static int[] spiritID = new int[3];

	public static void Init()
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		whiteSpirit.name = "White Spirit";
		whiteSpirit.tier = (PowerTier)0;
		whiteSpirit.description = "A spirit of a white powerup... it was everything but now it is nothing";
		whiteSpirit.mesh = _Assets.spiritMesh;
		whiteSpirit.material = _Assets.whiteSpiritMat;
		blueSpirit.name = "Blue Spirit";
		blueSpirit.tier = (PowerTier)1;
		blueSpirit.description = "A spirit of a blue powerup... it was everything but now it is nothing";
		blueSpirit.mesh = _Assets.spiritMesh;
		blueSpirit.material = _Assets.blueSpiritMat;
		orangeSpirit.name = "Orange Spirit";
		orangeSpirit.tier = (PowerTier)2;
		orangeSpirit.description = "A spirit of a orange powerup... it was everything but now it is nothing";
		orangeSpirit.mesh = _Assets.spiritMesh;
		orangeSpirit.material = _Assets.orangeSpiritMat;
	}

	public static bool isSpirit(Powerup testMe)
	{
		Powerup[] array = spiritList;
		foreach (Powerup val in array)
		{
			if (val.name.Equals(testMe.name))
			{
				return true;
			}
		}
		return false;
	}

	public static void initSpiritID(Dictionary<int, Powerup> allPowerups)
	{
		int num = 0;
		foreach (KeyValuePair<int, Powerup> allPowerup in allPowerups)
		{
			if (isSpirit(allPowerup.Value))
			{
				spiritID[num] = allPowerup.Key;
				num++;
			}
		}
	}
}
internal class PowerupInItemChoiceUI : MonoBehaviour
{
	public Powerup powerup;
}
public class SpiritInteract : MonoBehaviour, Interactable
{
	public int parentID;

	public static SpiritInteract Instance;

	public void Awake()
	{
		Instance = this;
	}

	public void AllExecute()
	{
	}

	public string GetName()
	{
		return "Choose item";
	}

	public void Interact()
	{
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Expected O, but got Unknown
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		bool flag = false;
		foreach (Transform item in ItemManager.Instance.list[parentID].GetComponent<Transform>())
		{
			Transform val = item;
			if (((Object)val).name.Equals("SpiritInteract"))
			{
				flag = true;
			}
		}
		if (flag)
		{
			PowerTier tier = ItemManager.Instance.list[parentID].GetComponent<Item>().powerup.tier;
			ItemChoiceUI.targetObjID = parentID;
			ItemChoiceUI.ShowTierInUI(tier);
			ItemChoiceUI.ToggleUI();
		}
	}

	public bool IsStarted()
	{
		return false;
	}

	public void LocalExecute()
	{
	}

	public void RemoveObject()
	{
	}

	public void ServerExecute(int fromClient = -1)
	{
	}

	public void ChoseItem(int powerupID, int targetID)
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = ItemManager.Instance.list[targetID];
		Powerup val2 = ItemManager.Instance.allPowerups[powerupID];
		RemoveAndDropPowerup(val2.id, val.transform.position, targetID);
	}

	public void RemoveAndDropPowerup(int powerupID, Vector3 pos, int id)
	{
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		ItemManager.Instance.PickupItem(id);
		ServerSend.PickupItem(-1, id);
		GameObject val = Object.Instantiate<GameObject>(ItemManager.Instance.dropItem);
		Powerup powerup = Object.Instantiate<Powerup>(ItemManager.Instance.allPowerups[powerupID]);
		Item component = val.GetComponent<Item>();
		component.powerup = powerup;
		component.UpdateMesh();
		val.AddComponent<BoxCollider>();
		val.transform.position = pos;
		if (ItemManager.Instance.attatchDebug)
		{
			GameObject val2 = Object.Instantiate<GameObject>(ItemManager.Instance.debug, val.transform);
			val2.GetComponent<DebugObject>().text = string.Concat(id);
			val2.transform.localPosition = Vector3.up * 1.25f;
		}
		val.GetComponent<Item>().objectID = id;
		val.GetComponent<Item>().pickupDelay = 0.5f;
		ItemManager.Instance.list.Add(id, val);
		ServerSend.DropPowerupAtPosition(powerupID, id, pos);
	}
}
public class _Assets
{
	private static AssetBundle assetBundle;

	public static GameObject spiritObj;

	public static Mesh spiritMesh;

	public static Texture spiritTexture;

	public static Material whiteSpiritMat;

	public static Material blueSpiritMat;

	public static Material orangeSpiritMat;

	public static GameObject spiritInteract;

	public static GameObject itemChoiceUI;

	public static GameObject powerupHolder;

	public static void Init()
	{
		assetBundle = AssetBundle.LoadFromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ItemChoice.__itemchoiceassets"));
		spiritObj = assetBundle.LoadAsset<GameObject>("spirit");
		spiritMesh = spiritObj.GetComponent<MeshFilter>().mesh;
		spiritTexture = (Texture)(object)assetBundle.LoadAsset<Texture2D>("spiritTexture");
		whiteSpiritMat = assetBundle.LoadAsset<Material>("White");
		blueSpiritMat = assetBundle.LoadAsset<Material>("Blue");
		orangeSpiritMat = assetBundle.LoadAsset<Material>("Orange");
		spiritInteract = assetBundle.LoadAsset<GameObject>("SpiritInteract");
		itemChoiceUI = assetBundle.LoadAsset<GameObject>("ItemChoiceUI");
		powerupHolder = assetBundle.LoadAsset<GameObject>("PowerupHolder");
	}
}
public class _Config
{
}
[BepInPlugin("wugg.itemchoice", "Item Choice", "1.0.0.2")]
public class _Main : BaseUnityPlugin
{
	private const string MOD_ID = "wugg.itemchoice";

	private const string MOD_NAME = "Item Choice";

	private const string MOD_VERSION = "1.0.0.2";

	private Harmony harmony = new Harmony("wugg.itemchoice");

	private void Awake()
	{
		_Assets.Init();
		ItemSpirit.Init();
		harmony.PatchAll();
	}
}
[HarmonyPatch]
public class _Patches
{
	[HarmonyPrefix]
	[HarmonyPatch(typeof(ItemManager), "InitAllPowerups")]
	private static void RegisterPowerups(ref Powerup[] ___powerupsWhite, ref Powerup[] ___powerupsBlue, ref Powerup[] ___powerupsOrange)
	{
		___powerupsWhite = CollectionExtensions.AddToArray<Powerup>(___powerupsWhite, ItemSpirit.whiteSpirit);
		___powerupsBlue = CollectionExtensions.AddToArray<Powerup>(___powerupsBlue, ItemSpirit.blueSpirit);
		___powerupsOrange = CollectionExtensions.AddToArray<Powerup>(___powerupsOrange, ItemSpirit.orangeSpirit);
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(ItemManager), "InitAllPowerups")]
	private static void RegisterID(Dictionary<int, Powerup> ___allPowerups)
	{
		ItemSpirit.initSpiritID(___allPowerups);
	}

	[HarmonyPrefix]
	[HarmonyPatch(typeof(ItemManager), "DropPowerupAtPosition")]
	public static void DropPowerupAtPosition(ref int powerupId, Dictionary<int, Powerup> ___allPowerups)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Expected I4, but got Unknown
		PowerTier tier = ___allPowerups[powerupId].tier;
		PowerTier val = tier;
		switch ((int)val)
		{
		case 0:
			powerupId = ItemSpirit.spiritID[0];
			break;
		case 1:
			powerupId = ItemSpirit.spiritID[1];
			break;
		case 2:
			powerupId = ItemSpirit.spiritID[2];
			break;
		}
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(ItemManager), "DropPowerupAtPosition")]
	public static void AddInteractComponent(ref int powerupId, Dictionary<int, Powerup> ___allPowerups, int objectID, ref Dictionary<int, GameObject> ___list)
	{
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		Transform transform = ___list[objectID].transform;
		if (ItemSpirit.isSpirit(___allPowerups[powerupId]))
		{
			GameObject val = Object.Instantiate<GameObject>(_Assets.spiritInteract, transform.position, transform.rotation);
			((Object)val).name = "SpiritInteract";
			val.layer = 15;
			val.AddComponent<SpiritInteract>();
			Object.Destroy((Object)(object)val.GetComponent<MeshRenderer>());
			val.GetComponent<SpiritInteract>().parentID = objectID;
			((Collider)val.GetComponent<SphereCollider>()).isTrigger = true;
			val.transform.parent = ___list[objectID].transform;
		}
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(Item), "ReadyToPickup")]
	private static void CancelPickup(Item __instance, ref bool ___readyToPickUp)
	{
		if (Object.op_Implicit((Object)(object)__instance.powerup) && ItemSpirit.isSpirit(__instance.powerup))
		{
			___readyToPickUp = false;
		}
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(UiController), "Awake")]
	private static void Bruh(UiController ___Instance)
	{
		ItemChoiceUI.Init(((Component)___Instance).gameObject.transform);
	}

	[HarmonyPrefix]
	[HarmonyPatch(typeof(OtherInput), "OtherUiActive")]
	public static bool ItemChoiceUIActive(ref bool __result)
	{
		if (ItemChoiceUI.instance.activeInHierarchy)
		{
			__result = true;
			return false;
		}
		return true;
	}

	[HarmonyPrefix]
	[HarmonyPatch(typeof(OtherInput), "Update")]
	private static bool ItemChoiceUICancel()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Invalid comparison between Unknown and I4
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		if ((int)GameManager.state == 2)
		{
			return true;
		}
		if (OtherInput.Instance.pauseUi.activeInHierarchy || OtherInput.Instance.settingsUi.activeInHierarchy)
		{
			return true;
		}
		if (Input.GetKeyDown(InputManager.map) || Input.GetKeyDown(InputManager.inventory))
		{
			ItemChoiceUI.HideUI();
			return true;
		}
		if (!Input.GetButton("Cancel") || !ItemChoiceUI.instance.activeInHierarchy)
		{
			return true;
		}
		ItemChoiceUI.HideUI();
		return false;
	}

	[HarmonyPrefix]
	[HarmonyPatch(typeof(Hotbar), "Update")]
	private static bool Update()
	{
		if (!ItemChoiceUI.instance.activeInHierarchy)
		{
			return true;
		}
		return false;
	}
}
public static class PluginInfo
{
	public const string PLUGIN_GUID = "Item_Choice";

	public const string PLUGIN_NAME = "Item_Choice";

	public const string PLUGIN_VERSION = "1.0.0";
}

EHM.Core.dll

Decompiled a year ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using JetBrains.Annotations;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("EHM.Core")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("EHM.Core")]
[assembly: AssemblyTitle("EHM.Core")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace EHM.Core
{
	[BepInPlugin("studzy.EHM.core", "EHM Core", "1.0.3")]
	public class Main : BaseUnityPlugin
	{
		public const string GUID = "studzy.EHM.core";

		public const string Name = "EHM Core";

		public const string Version = "1.0.3";

		public static bool superMoon = false;

		public static float mobNightMultiplier = 0.1f;

		public static List<string> mobChanged = new List<string>();

		internal void Awake()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			Debug.Log((object)"Loaded EHM Core v1.0.3");
			Harmony val = new Harmony("com.studzy.ehmcore");
			val.PatchAll(Assembly.GetExecutingAssembly());
		}

		internal void Update()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (!(((Scene)(ref activeScene)).name == "GameAfterLobby"))
			{
				return;
			}
			foreach (KeyValuePair<int, Mob> mob in MobManager.Instance.mobs)
			{
				Mob value = mob.Value;
				HitableMob component = ((Component)value).GetComponent<HitableMob>();
				if (!mobChanged.Contains(((Hitable)component).entityName))
				{
					LootDrop dropTable = ((Hitable)component).dropTable;
					int num = 0;
					if (((Hitable)component).entityName == "Lil' Dave")
					{
						num = 1;
					}
					LootItems[] loot = dropTable.loot;
					foreach (LootItems val in loot)
					{
						if (!(val.item.name != "Coin"))
						{
							val.amountMax = Mathf.FloorToInt((float)val.amountMax / 2f) + num;
							val.amountMin = Mathf.FloorToInt((float)val.amountMin / 2f) + num;
						}
					}
					mobChanged.Add(((Hitable)component).entityName);
				}
				if (!superMoon)
				{
					value.multiplier = 1.15f + 0.15f * (float)GetPlayersAlive() + mobNightMultiplier;
					value.bossMultiplier = 1.25f + 0.15f * (float)GetPlayersAlive() + mobNightMultiplier;
				}
				else
				{
					value.multiplier = 1.45f + 0.15f * (float)GetPlayersAlive() + mobNightMultiplier;
					value.bossMultiplier = 1.55f + 0.15f * (float)GetPlayersAlive() + mobNightMultiplier;
				}
			}
			ItemManager.Instance.GetItemByName("Coin").craftAmount = 2;
			MeshRenderer component2 = GameObject.Find("Moon 1").GetComponent<MeshRenderer>();
			if (superMoon)
			{
				Color color = default(Color);
				((Color)(ref color))..ctor(240f, 50f, 36f);
				((Renderer)component2).material.color = color;
			}
			else
			{
				((Renderer)component2).material.color = new Color(0.8538f, 1f, 0.9847f);
			}
		}

		private int GetPlayersAlive()
		{
			int num = 0;
			foreach (PlayerManager value in GameManager.players.Values)
			{
				if (Object.op_Implicit((Object)(object)value) && !value.dead)
				{
					num++;
				}
			}
			return num;
		}
	}
}
namespace EHM.Core.Patches
{
	[HarmonyPatch(typeof(DayCycle), "Update")]
	internal class CyclePatch
	{
		[HarmonyPostfix]
		private static void SetNightDuration(DayCycle __instance)
		{
			__instance.nightDuration = 0.7f;
		}
	}
	[HarmonyPatch(typeof(GameLoop), "NewDay")]
	internal class MobNightModifier
	{
		[HarmonyPostfix]
		private static void SetMobNight(int day)
		{
			Main.mobNightMultiplier = (float)day / 10f;
			if (Main.mobNightMultiplier <= 0f)
			{
				Main.mobNightMultiplier = 0.1f;
			}
		}
	}
	internal class PlayerPatches
	{
	}
	[HarmonyPatch(typeof(PlayerStatus), "Update")]
	internal class PlayerHungerPatch
	{
		[HarmonyPostfix]
		private static void DecreaseHunger(PlayerStatus __instance)
		{
			BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
			if (__instance.hunger == 0f && __instance.hp > 0f)
			{
				__instance.hp -= 0.01f;
			}
			else if (__instance.hp <= 0f)
			{
				typeof(PlayerStatus).GetMethod("PlayerDied", bindingAttr).Invoke(__instance, new object[0]);
			}
		}
	}
	[HarmonyPatch(typeof(PlayerMovement), "Awake")]
	internal class PlayerSpeedPatch
	{
		[HarmonyPostfix]
		private static void DecreaseSpeed(ref float ___maxSpeed, ref float ___maxWalkSpeed)
		{
			___maxSpeed = 5.9f;
			___maxWalkSpeed = 5.9f;
		}
	}
	internal class PowerupCalculationPatch
	{
	}
	[HarmonyPatch(typeof(PowerupInventory), "GetSpeedMultiplier")]
	internal class SpeedCalculationsPatch
	{
		[HarmonyPostfix]
		private static void RemoveSpeedCap([CanBeNull] int[] playerPowerups, ref float __result)
		{
			float num = PowerupInventory.CumulativeDistribution(playerPowerups[ItemManager.Instance.stringToPowerupId["Sneaker"]], 0.0003f, 300f);
			float num2 = 1f;
			if (PlayerStatus.Instance.adrenalineBoost)
			{
				num2 = PowerupInventory.Instance.GetAdrenalineBoost((int[])null);
			}
			__result = (1f + num) * num2 * PlayerStatus.Instance.currentSpeedArmorMultiplier;
		}
	}
	[HarmonyPatch(typeof(PowerupInventory), "GetMaxDraculaStacks")]
	internal class RemoveDraculaMaxStack
	{
		[HarmonyPostfix]
		private static void Remove(ref int __result)
		{
			__result = int.MaxValue;
		}
	}
	[HarmonyPatch(typeof(GameLoop), "Update")]
	internal class SupermoonStartPatch
	{
		[HarmonyPostfix]
		private static void StartSupermoon(int ___currentDay)
		{
			if (___currentDay % 7 == 0 && ___currentDay != 0)
			{
				Main.superMoon = true;
			}
		}
	}
	[HarmonyPatch(typeof(Tutorial), "Update")]
	internal class TutorialPatch
	{
		[HarmonyPrefix]
		private static void EndTutorial(ref int ___progress)
		{
			___progress = 1000;
		}
	}
}

EHM.Items.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using EHM.Items.MonoBehaviours;
using EHM.Items.Patches;
using HarmonyLib;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("EHM.Items")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("EHM.Items")]
[assembly: AssemblyTitle("EHM.Items")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace EHM.Items
{
	[BepInPlugin("studzy.EHM.items", "EHM Items", "1.0.1")]
	public class Main : BaseUnityPlugin
	{
		public const string GUID = "studzy.EHM.items";

		public const string Name = "EHM Items";

		public const string Version = "1.0.1";

		public static InventoryItem[] items;

		public static Texture2D[] sprites;

		public static GameObject accs;

		public static bool inventoryAdded;

		public static bool changedUI;

		internal void Awake()
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			Debug.Log((object)"Loaded EHM Items v1.0.1");
			AssetBundle assetBundleFromResources = GetAssetBundleFromResources("custom_items");
			items = assetBundleFromResources.LoadAllAssets<InventoryItem>();
			sprites = assetBundleFromResources.LoadAllAssets<Texture2D>();
			Harmony val = new Harmony("com.studzy.ehmitems");
			val.PatchAll(Assembly.GetExecutingAssembly());
		}

		internal void Start()
		{
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Expected O, but got Unknown
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Expected O, but got Unknown
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_038c: Expected O, but got Unknown
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Expected O, but got Unknown
			//IL_0416: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Expected O, but got Unknown
			//IL_046e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0473: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Expected O, but got Unknown
			//IL_04c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e9: Expected O, but got Unknown
			//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_0511: Expected O, but got Unknown
			for (int i = 0; i < items.Length; i++)
			{
				Debug.Log((object)i);
				items[i].id = i + ItemManager.Instance.allScriptableItems.Length;
				ItemManager.Instance.allItems.Add(items[i].id, items[i]);
			}
			ItemManager.Instance.allScriptableItems = ItemManager.Instance.allScriptableItems.Concat(items).ToArray();
			InventoryItem itemByName = ItemManager.Instance.GetItemByName("Adamantite bar");
			itemByName.processable = true;
			itemByName.processedItem = ItemManager.Instance.GetItemByName("Trezolite Bar");
			itemByName.processTime = 15f;
			for (int j = 0; j < items.Length; j++)
			{
				switch (items[j].name)
				{
				case "Forge":
				{
					items[j].prefab.gameObject.layer = LayerMask.NameToLayer("Object");
					((Component)items[j].prefab.gameObject.transform.Find("Interactable")).gameObject.layer = LayerMask.NameToLayer("Interact");
					items[j].prefab.gameObject.AddComponent<HitableChest>();
					HitableChest component = items[j].prefab.GetComponent<HitableChest>();
					((Hitable)component).entityName = "Forge";
					((Hitable)component).hp = 100;
					((Hitable)component).maxHp = 100;
					((HitableResource)component).compatibleItem = (ItemType)2;
					((HitableResource)component).dropItem = ItemManager.Instance.GetItemByName("Forge");
					((HitableResource)component).amount = 1;
					((HitableResource)component).dontScale = true;
					GameObject gameObject = ItemManager.Instance.GetItemByName("Furnace").prefab.gameObject;
					((Hitable)component).destroyFx = ((Hitable)gameObject.GetComponent<HitableChest>()).destroyFx;
					((Hitable)component).hitFx = ((Hitable)gameObject.GetComponent<HitableChest>()).hitFx;
					((Hitable)component).numberFx = ((Hitable)gameObject.GetComponent<HitableChest>()).numberFx;
					((Hitable)component).dropTable = ((Hitable)gameObject.GetComponent<HitableChest>()).dropTable;
					Transform val = items[j].prefab.gameObject.transform.Find("Interactable");
					GameObject gameObject2 = ((Component)val).gameObject;
					gameObject2.AddComponent<ChestInteract>();
					gameObject2.AddComponent<FurnaceSync>();
					ChestInteract component2 = gameObject2.GetComponent<ChestInteract>();
					component2.state = (CraftingState)5;
					FurnaceSync component3 = gameObject2.GetComponent<FurnaceSync>();
					component3.processType = (ProcessType)0;
					((Chest)component3).inUse = false;
					((Chest)component3).chestSize = 3;
					List<CraftRequirement> list6 = new List<CraftRequirement>
					{
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Iron bar"),
							amount = 10
						},
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Rock"),
							amount = 25
						}
					};
					AddCraftable(items[j], ItemManager.Instance.GetItemByName("Workbench"), list6.ToArray());
					break;
				}
				case "Glowpowder":
				{
					List<CraftRequirement> list5 = new List<CraftRequirement>
					{
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Flint"),
							amount = 4
						}
					};
					AddCraftable(items[j], ItemManager.Instance.GetItemByName("Workbench"), list5.ToArray());
					break;
				}
				case "Steel Ring":
				{
					List<CraftRequirement> list4 = new List<CraftRequirement>
					{
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Iron bar"),
							amount = 4
						}
					};
					AddCraftable(items[j], ItemManager.Instance.GetItemByName("Anvil"), list4.ToArray());
					break;
				}
				case "Mithril Ring":
				{
					List<CraftRequirement> list3 = new List<CraftRequirement>
					{
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Mithril bar"),
							amount = 4
						}
					};
					AddCraftable(items[j], ItemManager.Instance.GetItemByName("Anvil"), list3.ToArray());
					break;
				}
				case "Gold Ring":
				{
					List<CraftRequirement> list2 = new List<CraftRequirement>
					{
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Gold bar"),
							amount = 4
						}
					};
					AddCraftable(items[j], ItemManager.Instance.GetItemByName("Anvil"), list2.ToArray());
					break;
				}
				case "Trezolite Katana":
				{
					List<CraftRequirement> list = new List<CraftRequirement>
					{
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Trezolite Bar"),
							amount = 7
						},
						new CraftRequirement
						{
							item = ItemManager.Instance.GetItemByName("Oak Wood"),
							amount = 5
						}
					};
					AddCraftable(items[j], ItemManager.Instance.GetItemByName("Anvil"), list.ToArray());
					break;
				}
				}
			}
		}

		internal void Update()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "GameAfterLobby")
			{
				if (!inventoryAdded)
				{
					List<InventoryItem> itemss = new List<InventoryItem> { ItemManager.Instance.GetItemByName("Forge") };
					AddToStation(itemss, "WorkbenchNew", 2);
					List<InventoryItem> itemss2 = new List<InventoryItem> { ItemManager.Instance.GetItemByName("Glowpowder") };
					AddToStation(itemss2, "WorkbenchNew", 0);
					List<InventoryItem> itemss3 = new List<InventoryItem> { ItemManager.Instance.GetItemByName("Trezolite Katana") };
					AddToStation(itemss3, "AnvilNew", 2);
					List<InventoryItem> itemss4 = new List<InventoryItem>
					{
						ItemManager.Instance.GetItemByName("Steel Ring"),
						ItemManager.Instance.GetItemByName("Mithril Ring"),
						ItemManager.Instance.GetItemByName("Gold Ring")
					};
					AddToStation(itemss4, "AnvilNew", 0);
					inventoryAdded = true;
				}
				ChangeUI();
			}
			else
			{
				inventoryAdded = false;
				SpeedMultiplierPatch.set = false;
				AttackSpeedMultiplierPatch.set = false;
				CritChanceMultiplierPatch.set = false;
			}
		}

		private void AddCraftingIDs()
		{
			foreach (InventoryCell cell in InventoryUI.Instance.cells)
			{
				if ((Object)(object)cell.currentItem != (Object)null)
				{
					UniqueCraftingID component = ((Component)cell).gameObject.GetComponent<UniqueCraftingID>();
					if (!Object.op_Implicit((Object)(object)component))
					{
						((Component)cell).gameObject.AddComponent<UniqueCraftingID>();
						UniqueCraftingID component2 = ((Component)cell).gameObject.GetComponent<UniqueCraftingID>();
						string text = Convert.ToBase64String(Guid.NewGuid().ToByteArray());
						text = text.Replace("=", "");
						text = text.Replace("+", "");
						component2.ucid = text;
						component2.item = cell.currentItem;
						component2.reforge = new Reforge(ReforgeType.AttackDamage, cell.currentItem);
					}
				}
			}
		}

		private void ChangeUI()
		{
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			if (changedUI)
			{
				return;
			}
			using (IEnumerator<GameObject> enumerator = (from obj in Resources.FindObjectsOfTypeAll<GameObject>()
				where ((Object)obj).name == "Arrow/Left Slot"
				select obj).GetEnumerator())
			{
				if (enumerator.MoveNext())
				{
					GameObject current = enumerator.Current;
					GameObject gameObject = ((Component)current.transform.Find("Left hand")).gameObject;
					accs = Object.Instantiate<GameObject>(gameObject, current.transform);
					((Object)accs).name = "Accessories";
					Transform transform = accs.transform;
					transform.position -= new Vector3(0f, -40f, 0f);
					accs.GetComponent<RawImage>().texture = (Texture)(object)sprites[0];
				}
			}
			changedUI = true;
		}

		private void AddCraftable(InventoryItem item, InventoryItem station, CraftRequirement[] craftRequirements)
		{
			if (item.craftable)
			{
				item.requirements = item.requirements.Concat(craftRequirements).ToArray();
				item.stationRequirement = station;
			}
		}

		private void AddToStation(List<InventoryItem> itemss, string stationName, int tabIndex)
		{
			IEnumerable<GameObject> enumerable = from obj in Resources.FindObjectsOfTypeAll<GameObject>()
				where ((Object)obj).name == stationName
				select obj;
			foreach (GameObject item in enumerable)
			{
				CraftingUI component = item.GetComponent<CraftingUI>();
				if (Object.op_Implicit((Object)(object)component))
				{
					InventoryItem[] second = itemss.ToArray();
					component.tabs[tabIndex].items = component.tabs[tabIndex].items.Concat(second).ToArray();
				}
			}
		}

		public static AssetBundle GetAssetBundleFromResources(string fileName)
		{
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			string name = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(fileName));
			using Stream stream = executingAssembly.GetManifestResourceStream(name);
			return AssetBundle.LoadFromStream(stream);
		}
	}
	public enum ReforgeType
	{
		None,
		AttackDamage,
		AttackSpeed,
		ResourceDamage
	}
	public class Reforge
	{
		public ReforgeType type;

		public InventoryItem attachedTo;

		public int defValue = 0;

		public Reforge(ReforgeType _type, InventoryItem _attachedTo)
		{
			type = _type;
			attachedTo = _attachedTo;
		}

		public bool AttachEffect()
		{
			switch (type)
			{
			case ReforgeType.AttackDamage:
			{
				InventoryItem obj3 = attachedTo;
				obj3.attackDamage += 15;
				break;
			}
			case ReforgeType.AttackSpeed:
			{
				InventoryItem obj2 = attachedTo;
				obj2.attackSpeed += 15f;
				break;
			}
			case ReforgeType.ResourceDamage:
			{
				InventoryItem obj = attachedTo;
				obj.resourceDamage += 15;
				break;
			}
			default:
				Debug.Log((object)"unknown");
				break;
			case ReforgeType.None:
				break;
			}
			return true;
		}
	}
	public class ReforgeSystem
	{
		public Reforge reforge;

		public void AddReforge(InventoryItem item, ReforgeType type)
		{
			reforge = new Reforge(type, item);
		}
	}
}
namespace EHM.Items.Patches
{
	[HarmonyPatch(typeof(FurnaceSync), "CanProcess")]
	internal class FuelItemPatch
	{
		[HarmonyPostfix]
		private static void AddNewProcessCheck(FurnaceSync __instance, ref bool __result)
		{
			if (!((Object)(object)((Chest)__instance).cells[0] == (Object)null) && !((Object)(object)((Chest)__instance).cells[1] == (Object)null) && ((Chest)__instance).cells[0].id == 130 && !((Object)((Component)((Component)__instance).gameObject.transform.parent).gameObject).name.Contains("Forge"))
			{
				__result = false;
			}
		}
	}
	internal class PowerupMultipliersPatch
	{
	}
	[HarmonyPatch(typeof(PowerupInventory), "GetSpeedMultiplier")]
	internal class SpeedMultiplierPatch
	{
		public static bool set;

		private static void Postfix(ref float __result)
		{
			if (!((Object)(object)Main.accs == (Object)null) && !((Object)(object)Main.accs.GetComponent<InventoryCell>().currentItem == (Object)null) && !(Main.accs.GetComponent<InventoryCell>().currentItem.name != "Steel Ring"))
			{
				__result += 0.15f;
				set = true;
			}
		}
	}
	[HarmonyPatch(typeof(PowerupInventory), "GetAttackSpeedMultiplier")]
	internal class AttackSpeedMultiplierPatch
	{
		public static bool set;

		private static void Postfix(ref float __result)
		{
			if (!((Object)(object)Main.accs == (Object)null) && !((Object)(object)Main.accs.GetComponent<InventoryCell>().currentItem == (Object)null) && !(Main.accs.GetComponent<InventoryCell>().currentItem.name != "Mithril Ring"))
			{
				__result += 0.1f;
				set = true;
			}
		}
	}
	[HarmonyPatch(typeof(PowerupInventory), "GetCritChance")]
	internal class CritChanceMultiplierPatch
	{
		public static bool set;

		private static void Postfix(ref float __result)
		{
			if (!((Object)(object)Main.accs == (Object)null) && !((Object)(object)Main.accs.GetComponent<InventoryCell>().currentItem == (Object)null) && !(Main.accs.GetComponent<InventoryCell>().currentItem.name != "Gold Ring"))
			{
				__result += 0.05f;
				set = true;
			}
		}
	}
}
namespace EHM.Items.MonoBehaviours
{
	internal class UniqueCraftingID : MonoBehaviour
	{
		public string ucid;

		public InventoryItem item;

		public Reforge reforge;

		public int defaultAttackValue = 0;

		public int defaultResourceDamage = 0;
	}
}