Decompiled source of Frosttys Hard Pack v9.1.2

plugins/2018-LC_API/LC_API.dll

Decompiled a year ago
using System;
using System.Collections.Concurrent;
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.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using LC_API.BundleAPI;
using LC_API.Comp;
using LC_API.Data;
using LC_API.Extensions;
using LC_API.GameInterfaceAPI;
using LC_API.ManualPatches;
using LC_API.ServerAPI;
using Microsoft.CodeAnalysis;
using Steamworks;
using Steamworks.Data;
using TMPro;
using UnityEngine;
using UnityEngine.InputSystem;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
[assembly: AssemblyCompany("LC_API")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Utilities for plugin devs")]
[assembly: AssemblyFileVersion("2.1.1.0")]
[assembly: AssemblyInformationalVersion("2.1.1")]
[assembly: AssemblyProduct("LC_API")]
[assembly: AssemblyTitle("LC_API")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.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 LC_API
{
	internal static class CheatDatabase
	{
		private const string DAT_CD_BROADCAST = "LC_API_CD_Broadcast";

		private const string SIG_REQ_GUID = "LC_API_ReqGUID";

		private const string SIG_SEND_MODS = "LC_APISendMods";

		private static Dictionary<string, PluginInfo> PluginsLoaded = new Dictionary<string, PluginInfo>();

		public static void RunLocalCheatDetector()
		{
			PluginsLoaded = Chainloader.PluginInfos;
			using Dictionary<string, PluginInfo>.ValueCollection.Enumerator enumerator = PluginsLoaded.Values.GetEnumerator();
			while (enumerator.MoveNext())
			{
				switch (enumerator.Current.Metadata.GUID)
				{
				case "mikes.lethalcompany.mikestweaks":
				case "mom.llama.enhancer":
				case "Posiedon.GameMaster":
				case "LethalCompanyScalingMaster":
				case "verity.amberalert":
					ModdedServer.SetServerModdedOnly();
					break;
				}
			}
		}

		public static void OtherPlayerCheatDetector()
		{
			Plugin.Log.LogWarning((object)"Asking all other players for their mod list..");
			GameTips.ShowTip("Mod List:", "Asking all other players for installed mods..");
			GameTips.ShowTip("Mod List:", "Check the logs for more detailed results.\n<size=13>(Note that if someone doesnt show up on the list, they may not have LC_API installed)</size>");
			Networking.Broadcast("LC_API_CD_Broadcast", "LC_API_ReqGUID");
		}

		internal static void CDNetGetString(string data, string signature)
		{
			if (data == "LC_API_CD_Broadcast" && signature == "LC_API_ReqGUID")
			{
				string text = "";
				foreach (PluginInfo value in PluginsLoaded.Values)
				{
					text = text + "\n" + value.Metadata.GUID;
				}
				Networking.Broadcast(GameNetworkManager.Instance.localPlayerController.playerUsername + " responded with these mods:" + text, "LC_APISendMods");
			}
			if (signature == "LC_APISendMods")
			{
				GameTips.ShowTip("Mod List:", data);
				Plugin.Log.LogWarning((object)data);
			}
		}
	}
	[BepInPlugin("LC_API", "LC_API", "2.1.1")]
	public sealed class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Log;

		private ConfigEntry<bool> configOverrideModServer;

		private ConfigEntry<bool> configLegacyAssetLoading;

		private ConfigEntry<bool> configDisableBundleLoader;

		public static bool Initialized { get; private set; }

		private void Awake()
		{
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: 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_015e: Expected O, but got Unknown
			//IL_015f: 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_0172: Expected O, but got Unknown
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Expected O, but got Unknown
			configOverrideModServer = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Force modded server browser", false, "Should the API force you into the modded server browser?");
			configLegacyAssetLoading = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Legacy asset bundle loading", false, "Should the BundleLoader use legacy asset loading? Turning this on may help with loading assets from older plugins.");
			configDisableBundleLoader = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Disable BundleLoader", false, "Should the BundleLoader be turned off? Enable this if you are having problems with mods that load assets using a different method from LC_API's BundleLoader.");
			Log = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Logger.LogWarning((object)"\n.____    _________           _____  __________ .___  \r\n|    |   \\_   ___ \\         /  _  \\ \\______   \\|   | \r\n|    |   /    \\  \\/        /  /_\\  \\ |     ___/|   | \r\n|    |___\\     \\____      /    |    \\|    |    |   | \r\n|_______ \\\\______  /______\\____|__  /|____|    |___| \r\n        \\/       \\//_____/        \\/                 \r\n                                                     ");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"LC_API Starting up..");
			if (configOverrideModServer.Value)
			{
				ModdedServer.SetServerModdedOnly();
			}
			Harmony val = new Harmony("ModAPI");
			MethodInfo methodInfo = AccessTools.Method(typeof(GameNetworkManager), "SteamMatchmaking_OnLobbyCreated", (Type[])null, (Type[])null);
			AccessTools.Method(typeof(GameNetworkManager), "LobbyDataIsJoinable", (Type[])null, (Type[])null);
			MethodInfo methodInfo2 = AccessTools.Method(typeof(ServerPatch), "OnLobbyCreate", (Type[])null, (Type[])null);
			MethodInfo methodInfo3 = AccessTools.Method(typeof(MenuManager), "Awake", (Type[])null, (Type[])null);
			MethodInfo methodInfo4 = AccessTools.Method(typeof(ServerPatch), "CacheMenuManager", (Type[])null, (Type[])null);
			MethodInfo methodInfo5 = AccessTools.Method(typeof(HUDManager), "AddChatMessage", (Type[])null, (Type[])null);
			MethodInfo methodInfo6 = AccessTools.Method(typeof(ServerPatch), "ChatInterpreter", (Type[])null, (Type[])null);
			val.Patch((MethodBase)methodInfo3, new HarmonyMethod(methodInfo4), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)methodInfo5, new HarmonyMethod(methodInfo6), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			Networking.GetString = (Action<string, string>)Delegate.Combine(Networking.GetString, new Action<string, string>(CheatDatabase.CDNetGetString));
			Networking.GetListString = (Action<List<string>, string>)Delegate.Combine(Networking.GetListString, new Action<List<string>, string>(Networking.LCAPI_NET_SYNCVAR_SET));
		}

		internal void Start()
		{
			Initialize();
		}

		internal void OnDestroy()
		{
			Initialize();
		}

		internal void Initialize()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			if (!Initialized)
			{
				Initialized = true;
				if (!configDisableBundleLoader.Value)
				{
					BundleLoader.Load(configLegacyAssetLoading.Value);
				}
				GameObject val = new GameObject("API");
				Object.DontDestroyOnLoad((Object)val);
				val.AddComponent<LC_APIManager>();
				((BaseUnityPlugin)this).Logger.LogInfo((object)"LC_API Started!");
				CheatDatabase.RunLocalCheatDetector();
			}
		}

		internal static void PatchMethodManual(MethodInfo method, MethodInfo patch, Harmony harmony)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			harmony.Patch((MethodBase)method, new HarmonyMethod(patch), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "LC_API";

		public const string PLUGIN_NAME = "LC_API";

		public const string PLUGIN_VERSION = "2.1.1";
	}
}
namespace LC_API.ServerAPI
{
	public static class ModdedServer
	{
		private static bool moddedOnly;

		[Obsolete("Use SetServerModdedOnly() instead. This will be removed/private in a future update.")]
		public static bool setModdedOnly;

		public static bool ModdedOnly => moddedOnly;

		public static void SetServerModdedOnly()
		{
			moddedOnly = true;
			Plugin.Log.LogMessage((object)"A plugin has set your game to only allow you to play with other people who have mods!");
		}

		public static void OnSceneLoaded()
		{
			if (Object.op_Implicit((Object)(object)GameNetworkManager.Instance) && ModdedOnly)
			{
				GameNetworkManager instance = GameNetworkManager.Instance;
				instance.gameVersionNum += 16440;
				setModdedOnly = true;
			}
		}
	}
	public static class Networking
	{
		public static Action<string, string> GetString = delegate
		{
		};

		public static Action<List<string>, string> GetListString = delegate
		{
		};

		public static Action<int, string> GetInt = delegate
		{
		};

		public static Action<float, string> GetFloat = delegate
		{
		};

		public static Action<Vector3, string> GetVector3 = delegate
		{
		};

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

		public static void Broadcast(string data, string signature)
		{
			if (data.Contains("/"))
			{
				Plugin.Log.LogError((object)"Invalid character in broadcasted string event! ( / )");
				return;
			}
			HUDManager.Instance.AddTextToChatOnServer("<size=0>NWE/" + data + "/" + signature + "/" + NetworkBroadcastDataType.BDstring.ToString() + "/" + GameNetworkManager.Instance.localPlayerController.playerClientId + "/</size>", -1);
		}

		public static void Broadcast(List<string> data, string signature)
		{
			string text = "";
			foreach (string datum in data)
			{
				if (datum.Contains("/"))
				{
					Plugin.Log.LogError((object)"Invalid character in broadcasted string event! ( / )");
					return;
				}
				if (datum.Contains("\n"))
				{
					Plugin.Log.LogError((object)"Invalid character in broadcasted string event! ( NewLine )");
					return;
				}
				text = text + datum + "\n";
			}
			HUDManager.Instance.AddTextToChatOnServer("<size=0>NWE/" + data?.ToString() + "/" + signature + "/" + NetworkBroadcastDataType.BDlistString.ToString() + "/" + GameNetworkManager.Instance.localPlayerController.playerClientId + "/</size>", -1);
		}

		public static void Broadcast(int data, string signature)
		{
			HUDManager.Instance.AddTextToChatOnServer("<size=0>NWE/" + data + "/" + signature + "/" + NetworkBroadcastDataType.BDint.ToString() + "/" + GameNetworkManager.Instance.localPlayerController.playerClientId + "/</size>", -1);
		}

		public static void Broadcast(float data, string signature)
		{
			HUDManager.Instance.AddTextToChatOnServer("<size=0>NWE/" + data + "/" + signature + "/" + NetworkBroadcastDataType.BDfloat.ToString() + "/" + GameNetworkManager.Instance.localPlayerController.playerClientId + "/</size>", -1);
		}

		public static void Broadcast(Vector3 data, string signature)
		{
			//IL_0016: 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)
			HUDManager instance = HUDManager.Instance;
			string[] obj = new string[9] { "<size=0>NWE/", null, null, null, null, null, null, null, null };
			Vector3 val = data;
			obj[1] = ((object)(Vector3)(ref val)).ToString();
			obj[2] = "/";
			obj[3] = signature;
			obj[4] = "/";
			obj[5] = NetworkBroadcastDataType.BDvector3.ToString();
			obj[6] = "/";
			obj[7] = GameNetworkManager.Instance.localPlayerController.playerClientId.ToString();
			obj[8] = "/</size>";
			instance.AddTextToChatOnServer(string.Concat(obj), -1);
		}

		public static void RegisterSyncVariable(string name)
		{
			if (!syncStringVars.ContainsKey(name))
			{
				syncStringVars.Add(name, "");
			}
			else
			{
				Plugin.Log.LogError((object)("Cannot register Sync Variable! A Sync Variable has already been registered with name " + name));
			}
		}

		public static void SetSyncVariable(string name, string value)
		{
			if (syncStringVars.ContainsKey(name))
			{
				syncStringVars[name] = value;
				Broadcast(new List<string> { name, value }, "LCAPI_NET_SYNCVAR_SET");
			}
			else
			{
				Plugin.Log.LogError((object)("Cannot set the value of Sync Variable " + name + " as it is not registered!"));
			}
		}

		private static void SetSyncVariableB(string name, string value)
		{
			if (syncStringVars.ContainsKey(name))
			{
				syncStringVars[name] = value;
			}
			else
			{
				Plugin.Log.LogError((object)("Cannot set the value of Sync Variable " + name + " as it is not registered!"));
			}
		}

		internal static void LCAPI_NET_SYNCVAR_SET(List<string> list, string arg2)
		{
			if (arg2 == "LCAPI_NET_SYNCVAR_SET")
			{
				SetSyncVariableB(list[0], list[1]);
			}
		}

		public static string GetSyncVariable(string name)
		{
			if (syncStringVars.ContainsKey(name))
			{
				return syncStringVars[name];
			}
			Plugin.Log.LogError((object)("Cannot get the value of Sync Variable " + name + " as it is not registered!"));
			return "";
		}

		private static void GotString(string data, string signature)
		{
		}

		private static void GotInt(int data, string signature)
		{
		}

		private static void GotFloat(float data, string signature)
		{
		}

		private static void GotVector3(Vector3 data, string signature)
		{
		}
	}
}
namespace LC_API.ManualPatches
{
	internal static class ServerPatch
	{
		internal static bool OnLobbyCreate(GameNetworkManager __instance, Result result, Lobby lobby)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Invalid comparison between Unknown and I4
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			if ((int)result != 1)
			{
				Debug.LogError((object)$"Lobby could not be created! {result}", (Object)(object)__instance);
			}
			__instance.lobbyHostSettings.lobbyName = "[MODDED]" + __instance.lobbyHostSettings.lobbyName.ToString();
			Plugin.Log.LogMessage((object)"server pre-setup success");
			return true;
		}

		internal static bool CacheMenuManager(MenuManager __instance)
		{
			LC_APIManager.MenuManager = __instance;
			return true;
		}

		internal static bool ChatInterpreter(HUDManager __instance, string chatMessage)
		{
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			if (!chatMessage.Contains("NWE") || !chatMessage.Contains("<size=0>"))
			{
				return true;
			}
			string[] array = chatMessage.Split(new char[1] { '/' });
			if (array.Length < 5)
			{
				if (array.Length >= 3)
				{
					if (!int.TryParse(array[4], out var result))
					{
						Plugin.Log.LogWarning((object)"Failed to parse player ID!!");
						return false;
					}
					if ((result == (int)GameNetworkManager.Instance.localPlayerController.playerClientId) & !LC_APIManager.netTester)
					{
						return false;
					}
					Enum.TryParse<NetworkBroadcastDataType>(array[3], out var result2);
					switch (result2)
					{
					case NetworkBroadcastDataType.BDstring:
						Networking.GetString(array[1], array[2]);
						break;
					case NetworkBroadcastDataType.BDint:
						Networking.GetInt(int.Parse(array[1]), array[2]);
						break;
					case NetworkBroadcastDataType.BDfloat:
						Networking.GetFloat(float.Parse(array[1]), array[2]);
						break;
					case NetworkBroadcastDataType.BDvector3:
					{
						string[] array2 = array[1].Replace("(", "").Replace(")", "").Split(new char[1] { ',' });
						Vector3 arg = default(Vector3);
						if (array2.Length == 3)
						{
							if (float.TryParse(array2[0], out var result3) && float.TryParse(array2[1], out var result4) && float.TryParse(array2[2], out var result5))
							{
								arg.x = result3;
								arg.y = result4;
								arg.z = result5;
							}
							else
							{
								Plugin.Log.LogError((object)"Vector3 Network receive fail. This is a failure of the API, and it should be reported as a bug.");
							}
						}
						else
						{
							Plugin.Log.LogError((object)"Vector3 Network receive fail. This is a failure of the API, and it should be reported as a bug.");
						}
						Networking.GetVector3(arg, array[2]);
						break;
					}
					case NetworkBroadcastDataType.BDlistString:
					{
						string[] source = array[1].Split(new char[1] { '\n' });
						Networking.GetListString(source.ToList(), array[2]);
						break;
					}
					}
					_ = LC_APIManager.netTester;
					return false;
				}
				Plugin.Log.LogError((object)"Generic Network receive fail. This is a failure of the API, and it should be reported as a bug.");
				Plugin.Log.LogError((object)$"Generic Network receive fail (expected 5+ data fragments, got {array.Length}). This is a failure of the API, and it should be reported as a bug.");
				return true;
			}
			if (!int.TryParse(array[4], out var result6))
			{
				Plugin.Log.LogWarning((object)("Failed to parse player ID '" + array[4] + "'!!"));
				return false;
			}
			if ((result6 == (int)GameNetworkManager.Instance.localPlayerController.playerClientId) & !LC_APIManager.netTester)
			{
				return false;
			}
			if (!Enum.TryParse<NetworkBroadcastDataType>(array[3], out var result7))
			{
				Plugin.Log.LogError((object)("Unknown datatype - unable to parse '" + array[3] + "' into a known data type!"));
				return false;
			}
			switch (result7)
			{
			case NetworkBroadcastDataType.BDstring:
				Networking.GetString.InvokeActionSafe(array[1], array[2]);
				break;
			case NetworkBroadcastDataType.BDint:
				Networking.GetInt.InvokeActionSafe(int.Parse(array[1]), array[2]);
				break;
			case NetworkBroadcastDataType.BDfloat:
				Networking.GetFloat.InvokeActionSafe(float.Parse(array[1]), array[2]);
				break;
			case NetworkBroadcastDataType.BDvector3:
			{
				string text = array[1].Trim('(', ')');
				string[] array3 = text.Split(new char[1] { ',' });
				Vector3 param = default(Vector3);
				float result8;
				float result9;
				float result10;
				if (array3.Length != 3)
				{
					Plugin.Log.LogError((object)$"Vector3 Network receive fail (expected 3 numbers, got {array3.Length} number(?)(s) instead). This is a failure of the API, and it should be reported as a bug. (passing an empty Vector3 in its place)");
				}
				else if (float.TryParse(array3[0], out result8) && float.TryParse(array3[1], out result9) && float.TryParse(array3[2], out result10))
				{
					param.x = result8;
					param.y = result9;
					param.z = result10;
				}
				else
				{
					Plugin.Log.LogError((object)("Vector3 Network receive fail (failed to parse '" + text + "' as numbers). This is a failure of the API, and it should be reported as a bug."));
				}
				Networking.GetVector3.InvokeActionSafe(param, array[2]);
				break;
			}
			}
			_ = LC_APIManager.netTester;
			return false;
		}

		internal static bool ChatCommands(HUDManager __instance, CallbackContext context)
		{
			if (__instance.chatTextField.text.ToLower().Contains("/modcheck"))
			{
				CheatDatabase.OtherPlayerCheatDetector();
				return false;
			}
			return true;
		}
	}
}
namespace LC_API.GameInterfaceAPI
{
	public static class GameState
	{
		private static readonly Action NothingAction = delegate
		{
		};

		public static int AlivePlayerCount { get; private set; }

		public static ShipState ShipState { get; private set; }

		public static event Action PlayerDied;

		public static event Action LandOnMoon;

		public static event Action WentIntoOrbit;

		public static event Action ShipStartedLeaving;

		internal static void GSUpdate()
		{
			if (!((Object)(object)StartOfRound.Instance == (Object)null))
			{
				if (StartOfRound.Instance.shipHasLanded && ShipState != ShipState.OnMoon)
				{
					ShipState = ShipState.OnMoon;
					GameState.LandOnMoon.InvokeActionSafe();
				}
				if (StartOfRound.Instance.inShipPhase && ShipState != 0)
				{
					ShipState = ShipState.InOrbit;
					GameState.WentIntoOrbit.InvokeActionSafe();
				}
				if (StartOfRound.Instance.shipIsLeaving && ShipState != ShipState.LeavingMoon)
				{
					ShipState = ShipState.LeavingMoon;
					GameState.ShipStartedLeaving.InvokeActionSafe();
				}
				if (AlivePlayerCount < StartOfRound.Instance.livingPlayers)
				{
					GameState.PlayerDied.InvokeActionSafe();
				}
				AlivePlayerCount = StartOfRound.Instance.livingPlayers;
			}
		}

		static GameState()
		{
			GameState.PlayerDied = NothingAction;
			GameState.LandOnMoon = NothingAction;
			GameState.WentIntoOrbit = NothingAction;
			GameState.ShipStartedLeaving = NothingAction;
		}
	}
	public class GameTips
	{
		private static List<string> tipHeaders = new List<string>();

		private static List<string> tipBodys = new List<string>();

		private static float lastMessageTime;

		public static void ShowTip(string header, string body)
		{
			tipHeaders.Add(header);
			tipBodys.Add(body);
		}

		public static void UpdateInternal()
		{
			lastMessageTime -= Time.deltaTime;
			if ((tipHeaders.Count > 0) & (lastMessageTime < 0f))
			{
				lastMessageTime = 5f;
				if ((Object)(object)HUDManager.Instance != (Object)null)
				{
					HUDManager.Instance.DisplayTip(tipHeaders[0], tipBodys[0], false, false, "LC_Tip1");
				}
				tipHeaders.RemoveAt(0);
				tipBodys.RemoveAt(0);
			}
		}
	}
}
namespace LC_API.Extensions
{
	public static class DelegateExtensions
	{
		private static readonly PropertyInfo PluginGetLogger = AccessTools.Property(typeof(BaseUnityPlugin), "Logger");

		public static void InvokeActionSafe(this Action action)
		{
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			if (action == null)
			{
				return;
			}
			Delegate[] invocationList = action.GetInvocationList();
			foreach (Delegate @delegate in invocationList)
			{
				try
				{
					((Action)@delegate)();
				}
				catch (Exception ex)
				{
					Plugin.Log.LogError((object)"Exception while invoking hook callback!");
					string asmName = @delegate.GetMethodInfo().DeclaringType.Assembly.FullName;
					PluginInfo val = ((IEnumerable<PluginInfo>)Chainloader.PluginInfos.Values).FirstOrDefault((Func<PluginInfo, bool>)((PluginInfo pi) => ((object)pi.Instance).GetType().Assembly.FullName == asmName));
					if (val == null)
					{
						Plugin.Log.LogError((object)ex.ToString());
						break;
					}
					((ManualLogSource)PluginGetLogger.GetValue(val.Instance)).LogError((object)ex.ToString());
				}
			}
		}

		public static void InvokeActionSafe<T>(this Action<T> action, T param)
		{
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			if (action == null)
			{
				return;
			}
			Delegate[] invocationList = action.GetInvocationList();
			foreach (Delegate @delegate in invocationList)
			{
				try
				{
					((Action<T>)@delegate)(param);
				}
				catch (Exception ex)
				{
					Plugin.Log.LogError((object)"Exception while invoking hook callback!");
					string asmName = @delegate.GetMethodInfo().DeclaringType.Assembly.FullName;
					PluginInfo val = ((IEnumerable<PluginInfo>)Chainloader.PluginInfos.Values).FirstOrDefault((Func<PluginInfo, bool>)((PluginInfo pi) => ((object)pi.Instance).GetType().Assembly.FullName == asmName));
					if (val == null)
					{
						Plugin.Log.LogError((object)ex.ToString());
						break;
					}
					((ManualLogSource)PluginGetLogger.GetValue(val.Instance)).LogError((object)ex.ToString());
				}
			}
		}

		public static void InvokeActionSafe<T1, T2>(this Action<T1, T2> action, T1 param1, T2 param2)
		{
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			if (action == null)
			{
				return;
			}
			Delegate[] invocationList = action.GetInvocationList();
			foreach (Delegate @delegate in invocationList)
			{
				try
				{
					((Action<T1, T2>)@delegate)(param1, param2);
				}
				catch (Exception ex)
				{
					Plugin.Log.LogError((object)"Exception while invoking hook callback!");
					string asmName = @delegate.GetMethodInfo().DeclaringType.Assembly.FullName;
					PluginInfo val = ((IEnumerable<PluginInfo>)Chainloader.PluginInfos.Values).FirstOrDefault((Func<PluginInfo, bool>)((PluginInfo pi) => ((object)pi.Instance).GetType().Assembly.FullName == asmName));
					if (val == null)
					{
						Plugin.Log.LogError((object)ex.ToString());
						break;
					}
					((ManualLogSource)PluginGetLogger.GetValue(val.Instance)).LogError((object)ex.ToString());
				}
			}
		}

		internal static void InvokeParameterlessDelegate<T>(this T paramlessDelegate) where T : Delegate
		{
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			if ((Delegate?)paramlessDelegate == (Delegate?)null)
			{
				return;
			}
			Delegate[] invocationList = paramlessDelegate.GetInvocationList();
			foreach (Delegate @delegate in invocationList)
			{
				try
				{
					((T)@delegate).DynamicInvoke();
				}
				catch (Exception ex)
				{
					Plugin.Log.LogError((object)"Exception while invoking hook callback!");
					string asmName = @delegate.GetMethodInfo().DeclaringType.Assembly.FullName;
					PluginInfo val = ((IEnumerable<PluginInfo>)Chainloader.PluginInfos.Values).FirstOrDefault((Func<PluginInfo, bool>)((PluginInfo pi) => ((object)pi.Instance).GetType().Assembly.FullName == asmName));
					if (val == null)
					{
						Plugin.Log.LogError((object)ex.ToString());
						break;
					}
					((ManualLogSource)PluginGetLogger.GetValue(val.Instance)).LogError((object)ex.ToString());
				}
			}
		}
	}
}
namespace LC_API.Data
{
	internal enum NetworkBroadcastDataType
	{
		Unknown,
		BDint,
		BDfloat,
		BDvector3,
		BDstring,
		BDlistString
	}
	public enum ShipState
	{
		InOrbit,
		OnMoon,
		LeavingMoon
	}
}
namespace LC_API.Comp
{
	internal class LC_APIManager : MonoBehaviour
	{
		public static MenuManager MenuManager;

		public static bool netTester;

		private static int playerCount;

		private static bool wanttoCheckMods;

		private static float lobbychecktimer;

		public void Update()
		{
			GameState.GSUpdate();
			GameTips.UpdateInternal();
			if ((((Object)(object)HUDManager.Instance != (Object)null) & netTester) && (Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null)
			{
				Networking.Broadcast("testerData", "testerSignature");
			}
			if (!ModdedServer.setModdedOnly)
			{
				ModdedServer.OnSceneLoaded();
			}
			else if (ModdedServer.ModdedOnly && (Object)(object)MenuManager != (Object)null && Object.op_Implicit((Object)(object)MenuManager.versionNumberText))
			{
				((TMP_Text)MenuManager.versionNumberText).text = $"v{GameNetworkManager.Instance.gameVersionNum - 16440}\nMOD";
			}
			if ((Object)(object)GameNetworkManager.Instance != (Object)null)
			{
				if (playerCount < GameNetworkManager.Instance.connectedPlayers)
				{
					lobbychecktimer = -4.5f;
					wanttoCheckMods = true;
				}
				playerCount = GameNetworkManager.Instance.connectedPlayers;
			}
			if (lobbychecktimer < 0f)
			{
				lobbychecktimer += Time.deltaTime;
			}
			else if (wanttoCheckMods)
			{
				wanttoCheckMods = false;
				CD();
			}
		}

		private void CD()
		{
			CheatDatabase.OtherPlayerCheatDetector();
		}
	}
}
namespace LC_API.BundleAPI
{
	public static class BundleLoader
	{
		[Obsolete("Use OnLoadedBundles instead. This will be removed/private in a future update.")]
		public delegate void OnLoadedAssetsDelegate();

		[Obsolete("Use GetLoadedAsset instead. This will be removed/private in a future update.")]
		public static ConcurrentDictionary<string, Object> assets = new ConcurrentDictionary<string, Object>();

		[Obsolete("Use OnLoadedBundles instead. This will be removed/private in a future update.")]
		public static OnLoadedAssetsDelegate OnLoadedAssets = LoadAssetsCompleted;

		public static bool AssetsInLegacyDirectory { get; private set; }

		public static bool LegacyLoadingEnabled { get; private set; }

		public static event Action OnLoadedBundles;

		internal static void Load(bool legacyLoading)
		{
			LegacyLoadingEnabled = legacyLoading;
			Plugin.Log.LogMessage((object)"BundleAPI will now load all asset bundles...");
			string path = Path.Combine(Paths.BepInExRootPath, "Bundles");
			if (!Directory.Exists(path))
			{
				Directory.CreateDirectory(path);
				Plugin.Log.LogMessage((object)"BundleAPI Created legacy bundle directory in BepInEx/Bundles");
			}
			string[] array = (from x in Directory.GetFiles(path, "*", SearchOption.AllDirectories)
				where !x.EndsWith(".manifest", StringComparison.CurrentCultureIgnoreCase)
				select x).ToArray();
			AssetsInLegacyDirectory = array.Length != 0;
			if (!AssetsInLegacyDirectory)
			{
				Plugin.Log.LogMessage((object)"BundleAPI got no assets to load from legacy directory");
			}
			if (AssetsInLegacyDirectory)
			{
				Plugin.Log.LogWarning((object)"The path BepInEx > Bundles is outdated and should not be used anymore! Bundles will be loaded from BepInEx > plugins from now on");
				LoadAllAssetsFromDirectory(array, legacyLoading);
			}
			path = Path.Combine(Paths.BepInExRootPath, "plugins");
			array = (from x in Directory.GetFiles(path, "*", SearchOption.AllDirectories)
				where !x.EndsWith(".dll", StringComparison.CurrentCultureIgnoreCase)
				where !x.EndsWith(".json", StringComparison.CurrentCultureIgnoreCase)
				where !x.EndsWith(".png", StringComparison.CurrentCultureIgnoreCase)
				where !x.EndsWith(".md", StringComparison.CurrentCultureIgnoreCase)
				where !x.EndsWith(".old", StringComparison.CurrentCultureIgnoreCase)
				where !x.EndsWith(".txt", StringComparison.CurrentCultureIgnoreCase)
				select x).ToArray();
			if (array.Length == 0)
			{
				Plugin.Log.LogMessage((object)"BundleAPI got no assets to load from plugins folder");
			}
			else
			{
				LoadAllAssetsFromDirectory(array, legacyLoading);
			}
			OnLoadedAssets.InvokeParameterlessDelegate();
			BundleLoader.OnLoadedBundles.InvokeActionSafe();
		}

		private static void LoadAllAssetsFromDirectory(string[] array, bool legacyLoading)
		{
			if (legacyLoading)
			{
				Plugin.Log.LogMessage((object)("BundleAPI got " + array.Length + " AssetBundles to load!"));
				for (int i = 0; i < array.Length; i++)
				{
					try
					{
						SaveAsset(array[i], legacyLoading);
					}
					catch (Exception)
					{
						Plugin.Log.LogError((object)("Failed to load an assetbundle! Path: " + array[i]));
					}
				}
				return;
			}
			Plugin.Log.LogMessage((object)("BundleAPI got " + array.Length + " AssetBundles to load!"));
			for (int j = 0; j < array.Length; j++)
			{
				try
				{
					SaveAsset(array[j], legacyLoading);
				}
				catch (Exception)
				{
					Plugin.Log.LogError((object)("Failed to load an assetbundle! Path: " + array[j]));
				}
			}
		}

		public static void SaveAsset(string path, bool legacyLoad)
		{
			AssetBundle val = AssetBundle.LoadFromFile(path);
			try
			{
				string[] allAssetNames = val.GetAllAssetNames();
				foreach (string text in allAssetNames)
				{
					Plugin.Log.LogMessage((object)("Got asset for load: " + text));
					Object val2 = val.LoadAsset(text);
					if (val2 == (Object)null)
					{
						Plugin.Log.LogWarning((object)$"Skipped/failed loading an asset (from bundle '{((Object)val).name}') - Asset path: {val2}");
						continue;
					}
					string key = (legacyLoad ? text.ToUpper() : text.ToLower());
					if (assets.ContainsKey(key))
					{
						Plugin.Log.LogError((object)"BundleAPI got duplicate asset!");
						break;
					}
					assets.TryAdd(key, val2);
					Plugin.Log.LogMessage((object)("Loaded asset: " + val2.name));
				}
			}
			finally
			{
				if (val != null)
				{
					val.Unload(false);
				}
			}
		}

		public static TAsset GetLoadedAsset<TAsset>(string itemPath) where TAsset : Object
		{
			Object value = null;
			if (LegacyLoadingEnabled)
			{
				assets.TryGetValue(itemPath.ToUpper(), out value);
			}
			if (value == (Object)null)
			{
				assets.TryGetValue(itemPath.ToLower(), out value);
			}
			return (TAsset)(object)value;
		}

		private static void LoadAssetsCompleted()
		{
			Plugin.Log.LogMessage((object)"BundleAPI finished loading all assets.");
		}

		static BundleLoader()
		{
			BundleLoader.OnLoadedBundles = LoadAssetsCompleted;
		}
	}
}

plugins/5Bit-VoiceHUD/VoiceHUD.dll

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

[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("VoiceHUD")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Displays push-to-talk icon on voice activation")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+f1e0a0cfa0a629002418c9e0aa3a753676e33192")]
[assembly: AssemblyProduct("VoiceHUD")]
[assembly: AssemblyTitle("VoiceHUD")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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 VoiceHUD
{
	[BepInPlugin("5Bit.VoiceHUD", "VoiceHUD", "1.0.4")]
	public class VoiceHUD : BaseUnityPlugin
	{
		private const string modGUID = "5Bit.VoiceHUD";

		private const string modName = "VoiceHUD";

		private const string modVersion = "1.0.4";

		private readonly Harmony harmony = new Harmony("5Bit.VoiceHUD");

		private static VoiceHUD Instance;

		internal static ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("5Bit.VoiceHUD");
			Config.Init();
			harmony.PatchAll();
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "VoiceHUD";

		public const string PLUGIN_NAME = "VoiceHUD";

		public const string PLUGIN_VERSION = "1.0.1";
	}
}
namespace VoiceHUD.Patches
{
	[HarmonyPatch(typeof(HUDManager))]
	internal class VoiceHUDPatch
	{
		private static Color Start = new Color(0f, 255f, 0f, 255f);

		private static Color Center = new Color(165f, 255f, 0f, 255f);

		private static Color End = new Color(255f, 0f, 0f, 255f);

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void Update()
		{
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			if (!IngamePlayerSettings.Instance.settings.micEnabled || IngamePlayerSettings.Instance.settings.pushToTalk || (Object)(object)StartOfRound.Instance.voiceChatModule == (Object)null)
			{
				return;
			}
			VoicePlayerState val = StartOfRound.Instance.voiceChatModule.FindPlayer(StartOfRound.Instance.voiceChatModule.LocalPlayerName);
			if (val.IsSpeaking)
			{
				float num = Mathf.Clamp(val.Amplitude * 35f, 0f, 1f);
				if (Config.ColorsEnabled)
				{
					((Graphic)HUDManager.Instance.PTTIcon).color = GetColorByVolume(num * 100f);
				}
				((Behaviour)HUDManager.Instance.PTTIcon).enabled = num > 0.01f;
			}
		}

		public static Color GetColorByVolume(float volume)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: 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_0031: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			if (volume < 20f)
			{
				return Start;
			}
			if (volume > 70f)
			{
				return End;
			}
			return Center;
		}
	}
}
namespace VoiceHUD.Configuration
{
	internal static class Config
	{
		private const string CONFIG_FILE_NAME = "VoiceHUD.cfg";

		private static ConfigFile config;

		private static ConfigEntry<bool> colorsEnabled;

		public static bool ColorsEnabled => colorsEnabled.Value;

		public static void Init()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			string text = Path.Combine(Paths.ConfigPath, "VoiceHUD.cfg");
			config = new ConfigFile(text, true);
			colorsEnabled = config.Bind<bool>("Config", "Colors enabled", false, "Change icon color based on volume.");
		}
	}
}

plugins/alexanderjoe-LC_Symphony/LCSymphony.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.Configuration;
using HarmonyLib;
using LCSymphony.Patches;
using Steamworks;
using TMPro;
using Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("LCSymphony")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LCSymphony")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("047A9A10-3A21-461E-A7A5-DD6CA798B0A3")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LCSymphony
{
	public static class ConfigSettings
	{
		public static ConfigEntry<bool> PingEnabled { get; set; }

		public static void Init()
		{
			PingEnabled = ((BaseUnityPlugin)Plugin.Instance).Config.Bind<bool>("Ping Management", "PingEnabled", true, "Enable or disable the ping display in the top right corner.");
		}
	}
	public class PingManager : MonoBehaviour
	{
		private Coroutine _coroutine;

		public int Ping { get; private set; }

		private void Start()
		{
			if (ConfigSettings.PingEnabled.Value)
			{
				_coroutine = ((MonoBehaviour)this).StartCoroutine(UpdatePingData());
			}
		}

		private void OnDestroy()
		{
			((MonoBehaviour)this).StopCoroutine(_coroutine);
		}

		private IEnumerator UpdatePingData()
		{
			while (true)
			{
				yield return (object)new WaitForSeconds(0.5f);
				if (GameNetworkManager.Instance.currentLobby.HasValue || !SteamNetworkingUtils.LocalPingLocation.HasValue)
				{
					if (SteamNetworkingUtils.LocalPingLocation.HasValue)
					{
						Ping = SteamNetworkingUtils.EstimatePingTo(SteamNetworkingUtils.LocalPingLocation.Value);
					}
				}
				else
				{
					Plugin.Log("Could not update ping data. Retrying in 5 seconds.");
					yield return (object)new WaitForSeconds(5f);
				}
			}
		}
	}
	[BepInPlugin("dev.alexanderdiaz.lcsymphony", "LC Symphony", "1.1.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string ModGuid = "dev.alexanderdiaz.lcsymphony";

		private const string ModName = "LC Symphony";

		private const string ModVersion = "1.1.0";

		private readonly Harmony _harmony = new Harmony("dev.alexanderdiaz.lcsymphony");

		public static Plugin Instance;

		public static PingManager PingManager;

		public void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			ConfigSettings.Init();
			_harmony.PatchAll(typeof(SkipToStartPatch));
			if (ConfigSettings.PingEnabled.Value)
			{
				_harmony.PatchAll(typeof(HudManagerPatch));
			}
			InitPingManager();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin LC Symphony-1.1.0 loaded!");
		}

		private void InitPingManager()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			//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)
			GameObject val = new GameObject("PingManager");
			Object.DontDestroyOnLoad((Object)val);
			((Object)val).hideFlags = (HideFlags)61;
			val.AddComponent<PingManager>();
			PingManager = val.GetComponent<PingManager>();
		}

		public static void Log(string message)
		{
			((BaseUnityPlugin)Instance).Logger.LogInfo((object)message);
		}
	}
	public class PluginInfo
	{
		public const string PLUGIN_GUID = "dev.alexanderdiaz.lcsymphony";

		public const string PLUGIN_NAME = "LC Symphony";

		public const string PLUGIN_VERSION = "1.1.0";
	}
}
namespace LCSymphony.Patches
{
	[HarmonyPatch(typeof(HUDManager))]
	internal class HudManagerPatch
	{
		private static TextMeshProUGUI _displayText;

		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void PatchHudManagerStart(ref HUDManager __instance)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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)
			//IL_007f: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("PingManagerDisplay");
			val.AddComponent<RectTransform>();
			TextMeshProUGUI obj = val.AddComponent<TextMeshProUGUI>();
			RectTransform rectTransform = ((TMP_Text)obj).rectTransform;
			((Transform)rectTransform).SetParent(((TMP_Text)__instance.debugText).transform.parent.parent.parent, false);
			((Transform)rectTransform).parent = ((Transform)((TMP_Text)__instance.debugText).rectTransform).parent.parent.parent;
			rectTransform.anchorMin = new Vector2(1f, 1f);
			rectTransform.anchorMax = new Vector2(1f, 1f);
			rectTransform.pivot = new Vector2(1f, 1f);
			rectTransform.sizeDelta = new Vector2(100f, 100f);
			rectTransform.anchoredPosition = new Vector2(50f, -1f);
			((TMP_Text)obj).font = ((TMP_Text)__instance.controlTipLines[0]).font;
			((TMP_Text)obj).fontSize = 7f;
			((TMP_Text)obj).text = $"Ping: {Plugin.PingManager.Ping}ms";
			((TMP_Text)obj).overflowMode = (TextOverflowModes)0;
			((Behaviour)obj).enabled = true;
			_displayText = obj;
			Plugin.Log("PingManagerDisplay component added to Canvas.");
		}

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void PatchHudManagerUpdate(ref HUDManager __instance)
		{
			if (((NetworkBehaviour)__instance).NetworkManager.IsHost)
			{
				((TMP_Text)_displayText).text = "Ping: Host";
			}
			else
			{
				((TMP_Text)_displayText).text = $"Ping: {Plugin.PingManager.Ping}ms";
			}
		}
	}
	internal class SkipToStartPatch
	{
		[HarmonyPatch(typeof(PreInitSceneScript), "Start")]
		[HarmonyPostfix]
		private static void chooseOnlineDefaultPatch(ref PreInitSceneScript __instance)
		{
			Plugin.Log("Skipping online mode selection.");
			__instance.ChooseLaunchOption(true);
		}

		[HarmonyPatch(typeof(InitializeGame), "Awake")]
		[HarmonyPostfix]
		private static void Test(ref InitializeGame __instance)
		{
			Plugin.Log("Skipping boot-up screen.");
			__instance.runBootUpScreen = false;
		}
	}
}

plugins/AllToasters-SpectateEnemies/SpectateEnemy.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 GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using Unity.Netcode;
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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("SpectateEnemy")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyInformationalVersion("1.3.0+7904f0b2b5b1b7b06ac7cb8f9ab6fa3d2d5f98dc")]
[assembly: AssemblyProduct("SpectateEnemy")]
[assembly: AssemblyTitle("SpectateEnemy")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.3.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 SpectateEnemy
{
	[BepInPlugin("SpectateEnemy", "SpectateEnemy", "1.3.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static int spectatedEnemyIndex = -1;

		public static bool spectatingEnemies = false;

		public static MethodInfo raycastSpectate = null;

		private ConfigEntry<bool> spectateTurrets;

		private ConfigEntry<bool> spectateLandmines;

		private ConfigEntry<bool> spectatePassives;

		public static bool doSpectateTurrets;

		public static bool doSpectateLandmines;

		public static bool doSpectatePassives;

		private Harmony harmony;

		private void Awake()
		{
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			spectateTurrets = ((BaseUnityPlugin)this).Config.Bind<bool>("Config", "Spectate Turrets", false, "Enables spectating turrets.");
			doSpectateTurrets = spectateTurrets.Value;
			spectateLandmines = ((BaseUnityPlugin)this).Config.Bind<bool>("Config", "Spectate Landmines", false, "Enables spectating landmines.");
			doSpectateLandmines = spectateLandmines.Value;
			spectatePassives = ((BaseUnityPlugin)this).Config.Bind<bool>("Config", "Spectate Passives", false, "Enables spectating passive enemies, such as Docile Locust Bees and Manticoils.");
			doSpectatePassives = spectatePassives.Value;
			harmony = new Harmony("SpectateEnemy");
			harmony.PatchAll();
			raycastSpectate = AccessTools.Method(typeof(PlayerControllerB), "RaycastSpectateCameraAroundPivot", (Type[])null, (Type[])null);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"SpectateEnemy loaded!");
		}
	}
	public class Spectatable : MonoBehaviour
	{
		public SpectatableType type = SpectatableType.Enemy;

		public string enemyName = "Enemy";
	}
	public enum SpectatableType
	{
		Enemy,
		Turret,
		Landmine
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "SpectateEnemy";

		public const string PLUGIN_NAME = "SpectateEnemy";

		public const string PLUGIN_VERSION = "1.3.0";
	}
}
namespace SpectateEnemy.Patches
{
	[HarmonyPatch(typeof(EnemyAI), "Start")]
	public class EnemyAI_Patches
	{
		private static void Postfix(EnemyAI __instance)
		{
			if (Plugin.doSpectatePassives || (!(__instance.enemyType.enemyName == "Docile Locust Bees") && !(__instance.enemyType.enemyName == "Manticoil")))
			{
				Spectatable spectatable = ((Component)__instance).gameObject.AddComponent<Spectatable>();
				spectatable.enemyName = __instance.enemyType.enemyName;
			}
		}
	}
	[HarmonyPatch(typeof(GameNetworkManager), "Disconnect")]
	public class GameNetworkManager_Patches
	{
		private static void Postfix()
		{
			Plugin.spectatedEnemyIndex = -1;
			Plugin.spectatingEnemies = false;
		}
	}
	[HarmonyPatch(typeof(HUDManager), "Update")]
	public class HUDManager_Patches
	{
		private static void Postfix(HUDManager __instance)
		{
			//IL_0064: 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)
			if (!GameNetworkManager.Instance.localPlayerController.isPlayerDead || TimeOfDay.Instance.shipLeavingAlertCalled)
			{
				return;
			}
			TextMeshProUGUI holdButtonToEndGameEarlyText = __instance.holdButtonToEndGameEarlyText;
			((TMP_Text)holdButtonToEndGameEarlyText).text = ((TMP_Text)holdButtonToEndGameEarlyText).text + "\n\n\n\n\nSwitch to " + (Plugin.spectatingEnemies ? "Players" : "Enemies") + ": [E]\nToggle Flashlight : [RMB] (Click)";
			MovementActions movement = __instance.playerActions.Movement;
			if (((MovementActions)(ref movement)).PingScan.WasReleasedThisFrame())
			{
				Light component = ((Component)__instance.playersManager.spectateCamera).GetComponent<Light>();
				if ((Object)(object)component != (Object)null)
				{
					((Behaviour)component).enabled = !((Behaviour)component).enabled;
				}
			}
		}
	}
	[HarmonyPatch(typeof(Landmine), "Start")]
	public class Landmine_Patches
	{
		private static void Postfix(Landmine __instance)
		{
			if (Plugin.doSpectateLandmines)
			{
				Spectatable spectatable = ((Component)__instance).gameObject.AddComponent<Spectatable>();
				spectatable.type = SpectatableType.Landmine;
				((Object)spectatable).name = "Landmine";
			}
		}
	}
	internal class Handler
	{
		public static Spectatable[] spectatorList;

		public static bool Spectate()
		{
			if (Plugin.spectatingEnemies)
			{
				if (spectatorList.Length == 0)
				{
					Plugin.spectatingEnemies = false;
					return true;
				}
				Plugin.spectatedEnemyIndex++;
				if (Plugin.spectatedEnemyIndex >= spectatorList.Length)
				{
					Plugin.spectatedEnemyIndex = 0;
				}
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB), "Interact_performed")]
	public class PlayerControllerB_Interact
	{
		private static bool Prefix(PlayerControllerB __instance)
		{
			if (((NetworkBehaviour)__instance).IsOwner && __instance.isPlayerDead && (!((NetworkBehaviour)__instance).IsServer || __instance.isHostPlayerObject))
			{
				Plugin.spectatingEnemies = !Plugin.spectatingEnemies;
				if (Plugin.spectatingEnemies)
				{
					Handler.spectatorList = Object.FindObjectsByType<Spectatable>((FindObjectsSortMode)0);
					if (Handler.spectatorList.Length == 0)
					{
						Plugin.spectatingEnemies = false;
						return true;
					}
					if (Plugin.spectatedEnemyIndex == -1 || Plugin.spectatedEnemyIndex >= Handler.spectatorList.Length)
					{
						Plugin.spectatedEnemyIndex = 0;
					}
					__instance.spectatedPlayerScript = null;
				}
				else
				{
					__instance.spectatedPlayerScript = ((IEnumerable<PlayerControllerB>)__instance.playersManager.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB x) => !x.isPlayerDead));
				}
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB), "Use_performed")]
	public class PlayerControllerB_Use
	{
		private static bool Prefix(PlayerControllerB __instance)
		{
			if (((NetworkBehaviour)__instance).IsOwner && __instance.isPlayerDead && (!((NetworkBehaviour)__instance).IsServer || __instance.isHostPlayerObject))
			{
				return Handler.Spectate();
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB), "LateUpdate")]
	public class PlayerControllerB_LateUpdate
	{
		private static void Postfix(PlayerControllerB __instance)
		{
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			if (!Plugin.spectatingEnemies)
			{
				return;
			}
			if (Handler.spectatorList.Length == 0)
			{
				Plugin.spectatingEnemies = false;
				return;
			}
			if (Plugin.spectatedEnemyIndex >= Handler.spectatorList.Length)
			{
				Plugin.spectatedEnemyIndex = 0;
			}
			Spectatable obj = Handler.spectatorList[Plugin.spectatedEnemyIndex];
			if ((Object)(object)obj == (Object)null)
			{
				Plugin.spectatedEnemyIndex++;
				if (Plugin.spectatedEnemyIndex >= Handler.spectatorList.Length)
				{
					Plugin.spectatedEnemyIndex = 0;
				}
				return;
			}
			Vector3? spectatePosition = GetSpectatePosition(obj);
			if (!spectatePosition.HasValue)
			{
				Plugin.spectatedEnemyIndex++;
				if (Plugin.spectatedEnemyIndex >= Handler.spectatorList.Length)
				{
					Plugin.spectatedEnemyIndex = 0;
				}
				return;
			}
			if (obj.enemyName == "Enemy")
			{
				TryFixName(ref obj);
			}
			__instance.spectateCameraPivot.position = spectatePosition.Value + GetZoomDistance(obj);
			((TMP_Text)HUDManager.Instance.spectatingPlayerText).text = "(Spectating: " + obj.enemyName + ")";
			Plugin.raycastSpectate.Invoke(__instance, Array.Empty<object>());
		}

		private static void TryFixName(ref Spectatable obj)
		{
			EnemyAI val = default(EnemyAI);
			Turret val2 = default(Turret);
			Landmine val3 = default(Landmine);
			if (((Component)obj).gameObject.TryGetComponent<EnemyAI>(ref val))
			{
				obj.enemyName = val.enemyType.enemyName;
			}
			else if (((Component)obj).gameObject.TryGetComponent<Turret>(ref val2))
			{
				obj.enemyName = "Turret";
			}
			else if (((Component)obj).gameObject.TryGetComponent<Landmine>(ref val3))
			{
				obj.enemyName = "Landmine";
			}
		}

		private static Vector3 GetZoomDistance(Spectatable obj)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//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_006a: 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_0067: 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_005a: 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)
			if (obj.enemyName == "ForestGiant")
			{
				return Vector3.up * 3f;
			}
			if (obj.enemyName == "MouthDog" || obj.enemyName == "Jester")
			{
				return Vector3.up * 2f;
			}
			return Vector3.up;
		}

		private static Vector3? GetSpectatePosition(Spectatable obj)
		{
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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_0036: Unknown result type (might be due to invalid IL or missing references)
			if (obj.type == SpectatableType.Enemy)
			{
				EnemyAI component = ((Component)obj).GetComponent<EnemyAI>();
				if ((Object)(object)component != (Object)null)
				{
					return ((Object)(object)component.eye == (Object)null) ? ((Component)component).transform.position : component.eye.position;
				}
			}
			else if (obj.type == SpectatableType.Turret)
			{
				Turret component2 = ((Component)obj).GetComponent<Turret>();
				if ((Object)(object)component2 != (Object)null)
				{
					return ((Component)component2.centerPoint).transform.position;
				}
			}
			else
			{
				if (obj.type == SpectatableType.Landmine)
				{
					return ((Component)obj).transform.position;
				}
				Debug.LogError((object)("[SpectateEnemy]: Error when spectating: no handler for SpectatableType " + obj.type));
			}
			return null;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB), "SpectateNextPlayer")]
	public class PlayerControllerB_SpectateNext
	{
		private static bool Prefix()
		{
			return !Plugin.spectatingEnemies;
		}
	}
	[HarmonyPatch(typeof(StartOfRound), "ShipLeave")]
	public class StartOfRound_Patches
	{
		private static void Postfix()
		{
			Plugin.spectatedEnemyIndex = -1;
			Plugin.spectatingEnemies = false;
		}
	}
	[HarmonyPatch(typeof(Turret), "Start")]
	public class Turret_Patches
	{
		private static void Postfix(Turret __instance)
		{
			if (Plugin.doSpectateTurrets)
			{
				Spectatable spectatable = ((Component)__instance).gameObject.AddComponent<Spectatable>();
				spectatable.type = SpectatableType.Turret;
				spectatable.enemyName = "Turret";
			}
		}
	}
}

plugins/amnsoft-BetterBoombox/BetterBoombox.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 Microsoft.CodeAnalysis;
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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BetterBoombox")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Less 'human Music' more Kenney Rodgers")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersion("1.1.2")]
[assembly: AssemblyProduct("BetterBoombox")]
[assembly: AssemblyTitle("BetterBoombox")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.2.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 BetterBoombox
{
	public class AutoNextComponent : MonoBehaviour
	{
		private BoomboxItem _boombox;

		private void Awake()
		{
			_boombox = ((Component)this).GetComponent<BoomboxItem>();
			_boombox.boomboxAudio.loop = false;
		}

		private void Update()
		{
			if (_boombox.isPlayingMusic && !_boombox.boomboxAudio.isPlaying)
			{
				((GrabbableObject)_boombox).ItemActivate(true, true);
			}
		}
	}
	public class MusicUpdater : MonoBehaviour
	{
		private AudioClip[] _clips;

		private int _lastObjectCount = 0;

		private void Awake()
		{
			AssetBundle val = AssetBundle.LoadFromFile(Application.dataPath + "/../BepInEx/bundles/BetterBoombox/betterboombox");
			_clips = val.LoadAllAssets<AudioClip>();
		}

		private void Update()
		{
			BoomboxItem[] array = Object.FindObjectsByType<BoomboxItem>((FindObjectsSortMode)0);
			if (array.Length != _lastObjectCount)
			{
				OverrideMusic(array);
				_lastObjectCount = array.Length;
			}
		}

		private void OverrideMusic(BoomboxItem[] boomboxes)
		{
			AutoNextComponent autoNextComponent = default(AutoNextComponent);
			foreach (BoomboxItem val in boomboxes)
			{
				if (((GrabbableObject)val).itemProperties.requiresBattery)
				{
					val.musicAudios = _clips;
					((GrabbableObject)val).itemProperties.requiresBattery = false;
				}
				if (!((Component)val).TryGetComponent<AutoNextComponent>(ref autoNextComponent))
				{
					((Component)val).gameObject.AddComponent<AutoNextComponent>();
				}
			}
		}
	}
	[BepInPlugin("BetterBoombox", "BetterBoombox", "1.1.2")]
	public class Plugin : BaseUnityPlugin
	{
		private static bool Initialized;

		private void Start()
		{
			Initialize();
		}

		private void OnDestroy()
		{
			Initialize();
		}

		private void Initialize()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			if (!Initialized)
			{
				Initialized = true;
				GameObject val = new GameObject("MusicUpdater");
				Object.DontDestroyOnLoad((Object)(object)val);
				MusicUpdater musicUpdater = val.AddComponent<MusicUpdater>();
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin BetterBoombox is loaded!");
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "BetterBoombox";

		public const string PLUGIN_NAME = "BetterBoombox";

		public const string PLUGIN_VERSION = "1.1.2";
	}
}

plugins/anormaltwig-LateCompany/LateCompanyV1.0.4.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Netcode;

[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.6", FrameworkDisplayName = ".NET Framework 4.6")]
[assembly: AssemblyCompany("LateCompany")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LateCompany")]
[assembly: AssemblyTitle("LateCompany")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 LateCompany
{
	public static class PluginInfo
	{
		public const string GUID = "twig.latecompany";

		public const string PrintName = "Late Company";

		public const string Version = "1.0.4";
	}
	[BepInPlugin("twig.latecompany", "Late Company", "1.0.4")]
	internal class Plugin : BaseUnityPlugin
	{
		private ConfigEntry<bool> configLateJoinOrbitOnly;

		public static bool OnlyLateJoinInOrbit;

		public void Awake()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			configLateJoinOrbitOnly = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Late join orbit only", true, "Don't allow joining while the ship is not in orbit.");
			OnlyLateJoinInOrbit = configLateJoinOrbitOnly.Value;
			Harmony val = new Harmony("twig.latecompany");
			val.PatchAll(typeof(Plugin).Assembly);
			((BaseUnityPlugin)this).Logger.Log((LogLevel)16, (object)"Late Company loaded!");
		}
	}
}
namespace LateCompany.Patches
{
	[HarmonyPatch(typeof(GameNetworkManager), "LeaveLobbyAtGameStart")]
	[HarmonyWrapSafe]
	internal static class LeaveLobbyAtGameStart_Patch
	{
		[HarmonyPrefix]
		private static bool Prefix()
		{
			return false;
		}
	}
	[HarmonyPatch(typeof(GameNetworkManager), "ConnectionApproval")]
	[HarmonyWrapSafe]
	internal static class ConnectionApproval_Patch
	{
		[HarmonyPostfix]
		private static void Postfix(ConnectionApprovalRequest request, ConnectionApprovalResponse response)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			if (request.ClientNetworkId != NetworkManager.Singleton.LocalClientId && response.Reason.Contains("Game has already started") && GameNetworkManager.Instance.gameHasStarted && (StartOfRound.Instance.inShipPhase || !Plugin.OnlyLateJoinInOrbit))
			{
				response.Reason = "";
				response.CreatePlayerObject = false;
				response.Approved = true;
				response.Pending = false;
			}
		}
	}
	[HarmonyPatch(typeof(StartOfRound), "OnPlayerConnectedClientRpc")]
	[HarmonyWrapSafe]
	internal class OnPlayerConnectedClientRpc_Patch
	{
		public static MethodInfo BeginSendClientRpc = typeof(RoundManager).GetMethod("__beginSendClientRpc", BindingFlags.Instance | BindingFlags.NonPublic);

		public static MethodInfo EndSendClientRpc = typeof(RoundManager).GetMethod("__endSendClientRpc", BindingFlags.Instance | BindingFlags.NonPublic);

		[HarmonyPostfix]
		private static void Postfix(ulong clientId, int connectedPlayers, ulong[] connectedPlayerIdsOrdered, int assignedPlayerObjectId, int serverMoneyAmount, int levelID, int profitQuota, int timeUntilDeadline, int quotaFulfilled, int randomSeed)
		{
			//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_008f: 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)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: 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_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			StartOfRound instance = StartOfRound.Instance;
			PlayerControllerB val = instance.allPlayerScripts[assignedPlayerObjectId];
			if (instance.connectedPlayersAmount + 1 >= instance.allPlayerScripts.Length)
			{
				GameNetworkManager.Instance.SetLobbyJoinable(false);
			}
			val.DisablePlayerModel(instance.allPlayerObjects[assignedPlayerObjectId], true, true);
			if (((NetworkBehaviour)instance).IsServer && !instance.inShipPhase)
			{
				RoundManager instance2 = RoundManager.Instance;
				ClientRpcParams val2 = default(ClientRpcParams);
				val2.Send = new ClientRpcSendParams
				{
					TargetClientIds = new List<ulong> { clientId }
				};
				ClientRpcParams val3 = val2;
				FastBufferWriter val4 = (FastBufferWriter)BeginSendClientRpc.Invoke(instance2, new object[3] { 1193916134u, val3, 0 });
				BytePacker.WriteValueBitPacked(val4, StartOfRound.Instance.randomMapSeed);
				BytePacker.WriteValueBitPacked(val4, StartOfRound.Instance.currentLevelID);
				EndSendClientRpc.Invoke(instance2, new object[4] { val4, 1193916134u, val3, 0 });
				FastBufferWriter val5 = (FastBufferWriter)BeginSendClientRpc.Invoke(instance2, new object[3] { 2729232387u, val3, 0 });
				EndSendClientRpc.Invoke(instance2, new object[4] { val5, 2729232387u, val3, 0 });
			}
			instance.livingPlayers = instance.connectedPlayersAmount + 1;
			for (int i = 0; i < instance.allPlayerScripts.Length; i++)
			{
				PlayerControllerB val6 = instance.allPlayerScripts[i];
				if (val6.isPlayerControlled && val6.isPlayerDead)
				{
					instance.livingPlayers--;
				}
			}
		}
	}
	[HarmonyPatch(typeof(StartOfRound), "OnPlayerDC")]
	[HarmonyWrapSafe]
	internal class OnPlayerDC_Patch
	{
		[HarmonyPostfix]
		public static void Postfix()
		{
			if (StartOfRound.Instance.inShipPhase || !Plugin.OnlyLateJoinInOrbit)
			{
				GameNetworkManager.Instance.SetLobbyJoinable(true);
			}
		}
	}
	[HarmonyPatch(typeof(StartOfRound), "StartGame")]
	[HarmonyWrapSafe]
	internal class StartGame_Patch
	{
		[HarmonyPrefix]
		public static void Prefix()
		{
			if (Plugin.OnlyLateJoinInOrbit)
			{
				GameNetworkManager.Instance.SetLobbyJoinable(false);
			}
		}
	}
	[HarmonyPatch(typeof(StartOfRound), "SetShipReadyToLand")]
	[HarmonyWrapSafe]
	internal class SetShipReadyToLand_Patch
	{
		[HarmonyPrefix]
		public static void Postfix()
		{
			if (Plugin.OnlyLateJoinInOrbit && StartOfRound.Instance.connectedPlayersAmount + 1 < StartOfRound.Instance.allPlayerScripts.Length)
			{
				GameNetworkManager.Instance.SetLobbyJoinable(true);
			}
		}
	}
}

plugins/BatTeam-LethalFashion/LethalFashion.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.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Netcode;

[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LethalFashion")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Adding immediate outfits for the crew")]
[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: AssemblyInformationalVersion("1.0.3")]
[assembly: AssemblyProduct("LethalFashion")]
[assembly: AssemblyTitle("LethalFashion")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.3.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 LethalFashion
{
	[BepInPlugin("LethalFashion", "LethalFashion", "1.0.3")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log;

		private static Harmony harmonyInstance;

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin LethalFashion is loaded!");
			InitializeHarmony();
		}

		private void InitializeHarmony()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			if (harmonyInstance == null)
			{
				harmonyInstance = new Harmony("LethalFashion");
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Harmony instance created");
				try
				{
					harmonyInstance.PatchAll(typeof(SuitFashion));
					((BaseUnityPlugin)this).Logger.LogInfo((object)"Patch applied successfully. You are now FASHIONABLE.");
				}
				catch (Exception ex)
				{
					((BaseUnityPlugin)this).Logger.LogError((object)("Error applying patch: " + ex.Message));
				}
			}
		}
	}
	public class SuitFashion
	{
		private static readonly MethodInfo unlockItem;

		private static bool isHost;

		static SuitFashion()
		{
			unlockItem = typeof(StartOfRound).GetMethod("SpawnUnlockable", BindingFlags.Instance | BindingFlags.NonPublic);
			if (unlockItem == null)
			{
				Plugin.Log.LogError((object)"SpawnUnlockable method not found in StartOfRound. Please check game/plugin version.");
			}
		}

		public static void SpawnUnlockableDelegate(StartOfRound instance, int ID)
		{
			if (unlockItem == null)
			{
				Plugin.Log.LogError((object)"Cannot invoke SpawnUnlockable - method reference is null. Please check game/plugin version.");
				return;
			}
			if (instance.SpawnedShipUnlockables.ContainsKey(ID))
			{
				Plugin.Log.LogInfo((object)$"Suit with ID {ID} already spawned. Skipping.");
				return;
			}
			try
			{
				unlockItem.Invoke(instance, new object[1] { ID });
			}
			catch (TargetInvocationException ex)
			{
				Plugin.Log.LogError((object)("Error invoking SpawnUnlockable: " + ex.Message));
				if (ex.InnerException != null)
				{
					Plugin.Log.LogError((object)("Inner exception: " + ex.InnerException.Message));
					Plugin.Log.LogError((object)("Stack Trace: " + ex.InnerException.StackTrace));
				}
			}
			catch (Exception ex2)
			{
				Plugin.Log.LogError((object)("General error invoking SpawnUnlockable: " + ex2.Message));
			}
		}

		private static void UnlockSuits(StartOfRound instance)
		{
			int[] array = new int[3] { 1, 2, 3 };
			int[] array2 = array;
			foreach (int num in array2)
			{
				if (num >= 0 && num < instance.unlockablesList.unlockables.Count)
				{
					UnlockableItem val = instance.unlockablesList.unlockables[num];
					if (val != null)
					{
						val.alreadyUnlocked = true;
						val.hasBeenUnlockedByPlayer = true;
						val.inStorage = false;
						SpawnUnlockableDelegate(instance, num);
					}
				}
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "Start")]
		[HarmonyPostfix]
		public static void StartOfRoundSuitPatch(StartOfRound __instance)
		{
			if (isHost)
			{
				UnlockSuits(__instance);
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "ResetShip")]
		[HarmonyPostfix]
		public static void ResetShipSuitPatch(StartOfRound __instance)
		{
			if (isHost)
			{
				UnlockSuits(__instance);
			}
		}

		[HarmonyPatch(typeof(RoundManager), "Start")]
		[HarmonyPrefix]
		private static void SetIsHost()
		{
			isHost = ((NetworkBehaviour)RoundManager.Instance).NetworkManager.IsHost;
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "LethalFashion";

		public const string PLUGIN_NAME = "LethalFashion";

		public const string PLUGIN_VERSION = "1.0.3";
	}
}

plugins/bizzlemip-BiggerLobby/BiggerLobby.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 System.Text;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Configuration;
using BiggerLobby.Patches;
using Dissonance.Audio.Playback;
using GameNetcodeStuff;
using HarmonyLib;
using LC_API.BundleAPI;
using LC_API.ServerAPI;
using Microsoft.CodeAnalysis;
using Steamworks;
using Steamworks.Data;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BiggerLobby")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Increase the max players to 50 in Lethal Company")]
[assembly: AssemblyFileVersion("2.4.0.0")]
[assembly: AssemblyInformationalVersion("2.4.0")]
[assembly: AssemblyProduct("BiggerLobby")]
[assembly: AssemblyTitle("BiggerLobby")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.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]
	[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BiggerLobby
{
	public static class Helper
	{
		public static T[] ResizeArray<T>(T[] oldArray, int newSize)
		{
			T[] array = new T[newSize];
			oldArray.CopyTo(array, 0);
			return array;
		}

		public static void ResizeList<T>(this List<T> list, int size, T element = default(T))
		{
			int count = list.Count;
			if (size < count)
			{
				list.RemoveRange(size, count - size);
			}
			else if (size > count)
			{
				if (size > list.Capacity)
				{
					list.Capacity = size;
				}
				list.AddRange(Enumerable.Repeat(element, size - count));
			}
		}
	}
	[BepInPlugin("BiggerLobby", "BiggerLobby", "2.4.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static bool oldhastime;

		public static int MaxPlayers = 16;

		public static bool instantiating;

		public static NetworkObject[] PlayerObjects = (NetworkObject[])(object)new NetworkObject[0];

		public static Harmony _harmony;

		public static Harmony _harmony2;

		public static ConfigEntry<int>? _LoudnessMultiplier;

		public static bool Initialized = false;

		public static IDictionary<uint, NetworkObject> CustomNetObjects = new Dictionary<uint, NetworkObject>();

		private void Awake()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Expected O, but got Unknown
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Expected O, but got Unknown
			_LoudnessMultiplier = ((BaseUnityPlugin)this).Config.Bind<int>("General", "Player loudness", 1, "Default player loudness");
			_harmony = new Harmony("BiggerLobby");
			_harmony2 = new Harmony("BiggerLobbyA");
			_harmony.PatchAll(typeof(NonGamePatches));
			_harmony.PatchAll(typeof(NonGamePatches.InternalPatches));
			_harmony.PatchAll(typeof(NonGamePatches.InternalPatches2));
			CustomNetObjects.Clear();
			_harmony2.PatchAll(typeof(InternalPatch3));
			_harmony2.PatchAll(typeof(ListSizeTranspilers));
			_harmony2.PatchAll(typeof(PlayerObjects));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"BiggerLobby loaded");
			BundleLoader.OnLoadedAssets = (OnLoadedAssetsDelegate)Delegate.Combine((Delegate?)(object)BundleLoader.OnLoadedAssets, (Delegate?)new OnLoadedAssetsDelegate(OnLoaded));
		}

		private void Start()
		{
			Initialize();
		}

		private void OnDestroy()
		{
			Initialize();
		}

		private void Initialize()
		{
			if (!Initialized)
			{
				Initialized = true;
				ModdedServer.SetServerModdedOnly();
			}
		}

		private void OnLoaded()
		{
			Object.op_Implicit((Object)(object)BundleLoader.GetLoadedAsset<AudioMixer>("assets/diagetic.mixer"));
		}

		public static int GetPlayerCount()
		{
			return MaxPlayers;
		}

		public static int GetPlayerCountMinusOne()
		{
			return MaxPlayers - 1;
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "BiggerLobby";

		public const string PLUGIN_NAME = "BiggerLobby";

		public const string PLUGIN_VERSION = "2.4.0";
	}
}
namespace BiggerLobby.Patches
{
	[HarmonyPatch(typeof(HUDManager))]
	internal class InternalPatch3
	{
		private static MethodInfo TargetMethod()
		{
			return typeof(HUDManager).GetMethod("AddChatMessage", BindingFlags.Instance | BindingFlags.NonPublic);
		}

		[HarmonyPrefix]
		private static void Prefix(HUDManager __instance, string chatMessage, string nameOfUserWhoTyped = "")
		{
			if (!(__instance.lastChatMessage == chatMessage))
			{
				__instance.lastChatMessage = chatMessage;
				__instance.PingHUDElement(__instance.Chat, 4f, 1f, 0.2f);
				if (__instance.ChatMessageHistory.Count >= 4)
				{
					((TMP_Text)__instance.chatText).text.Remove(0, __instance.ChatMessageHistory[0].Length);
					__instance.ChatMessageHistory.Remove(__instance.ChatMessageHistory[0]);
				}
				StringBuilder stringBuilder = new StringBuilder(chatMessage);
				for (int i = 1; i < StartOfRound.Instance.allPlayerScripts.Length; i++)
				{
					stringBuilder.Replace("[playerNum" + i + "]", StartOfRound.Instance.allPlayerScripts[i].playerUsername);
				}
				stringBuilder.Replace("bizzlemip", "<color=#008282>bizzlemip</color>");
				chatMessage = stringBuilder.ToString();
				nameOfUserWhoTyped = nameOfUserWhoTyped.Replace("bizzlemip", "<color=#008282>bizzlemip</color>");
				string item = ((!string.IsNullOrEmpty(nameOfUserWhoTyped)) ? ("<color=#FF0000>" + nameOfUserWhoTyped + "</color>: <color=#FFFF00>'" + chatMessage + "'</color>") : ("<color=#7069ff>" + chatMessage + "</color>"));
				__instance.ChatMessageHistory.Add(item);
				((TMP_Text)__instance.chatText).text = "";
				for (int j = 0; j < __instance.ChatMessageHistory.Count; j++)
				{
					TextMeshProUGUI chatText = __instance.chatText;
					((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n" + __instance.ChatMessageHistory[j];
				}
			}
		}
	}
	[HarmonyPatch]
	public class ListSizeTranspilers
	{
		private static MethodInfo _playerCountMethod = AccessTools.Method(typeof(Plugin), "GetPlayerCount", (Type[])null, (Type[])null);

		private static MethodInfo _playerCountMinusOneMethod = AccessTools.Method(typeof(Plugin), "GetPlayerCountMinusOne", (Type[])null, (Type[])null);

		private static void CheckAndReplace(List<CodeInstruction> codes, int index)
		{
			if (codes[index].opcode == OpCodes.Ldc_I4_4)
			{
				Debug.Log((object)"ok gunna do it");
				codes[index].opcode = OpCodes.Call;
				codes[index].operand = _playerCountMethod;
				Debug.Log((object)"ok gunna did it");
			}
		}

		[HarmonyPatch(typeof(HUDManager), "SyncAllPlayerLevelsServerRpc")]
		[HarmonyPatch(typeof(DressGirlAI), "ChoosePlayerToHaunt")]
		[HarmonyPatch(typeof(CrawlerAI), "Start")]
		[HarmonyTranspiler]
		public static IEnumerable<CodeInstruction> SyncLevelsRpc(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Newarr)
				{
					Debug.Log((object)"newarr");
					CheckAndReplace(list, i - 1);
				}
			}
			return list.AsEnumerable();
		}

		[HarmonyPatch(typeof(PlayerControllerB), "SendNewPlayerValuesServerRpc")]
		[HarmonyPatch(typeof(StartOfRound), "SyncShipUnlockablesClientRpc")]
		[HarmonyPatch(typeof(DressGirlAI), "ChoosePlayerToHaunt")]
		[HarmonyPatch(typeof(EnemyAI), "GetClosestPlayer")]
		[HarmonyPatch(typeof(SpringManAI), "DoAIInterval")]
		[HarmonyPatch(typeof(SpringManAI), "Update")]
		[HarmonyTranspiler]
		public static IEnumerable<CodeInstruction> SendNewPlayerValuesServerRpc(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Blt)
				{
					Debug.Log((object)"blt");
					CheckAndReplace(list, i - 1);
				}
			}
			return list.AsEnumerable();
		}

		[HarmonyPatch(typeof(StartOfRound), "EndOfGameClientRpc")]
		[HarmonyTranspiler]
		public static IEnumerable<CodeInstruction> EndOfGameClientRpc(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Brfalse && list[i - 1].opcode == OpCodes.Ldfld && list[i - 2].opcode == OpCodes.Ldfld && list[i - 3].opcode == OpCodes.Ldarg_0)
				{
					Debug.Log((object)list[i - 1].opcode);
					Debug.Log((object)list[i - 2].opcode);
					Debug.Log((object)list[i - 3].opcode);
					list[i - 1].opcode = OpCodes.Nop;
					list[i - 2].opcode = OpCodes.Nop;
					CheckAndReplace(list, i - 3);
				}
			}
			return list.AsEnumerable();
		}

		[HarmonyPatch(typeof(QuickMenuManager), "ConfirmKickUserFromServer")]
		[HarmonyTranspiler]
		public static IEnumerable<CodeInstruction> ConfirmKickUserFromServer(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Ldc_I4_3)
				{
					list[i].opcode = OpCodes.Call;
					list[i].operand = _playerCountMinusOneMethod;
					Debug.Log((object)"Kick Fix Applied");
					break;
				}
			}
			return list.AsEnumerable();
		}

		[HarmonyPatch(typeof(StartOfRound), "SyncShipUnlockablesServerRpc")]
		[HarmonyPatch(typeof(StartOfRound), "OnClientConnect")]
		[HarmonyPatch(typeof(PlayerControllerB), "SpectateNextPlayer")]
		[HarmonyTranspiler]
		public static IEnumerable<CodeInstruction> SyncShipUnlockablesServerRpc(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Ldc_I4_4)
				{
					list[i].opcode = OpCodes.Call;
					list[i].operand = _playerCountMethod;
				}
			}
			return list.AsEnumerable();
		}
	}
	[HarmonyPatch]
	public class NonGamePatches
	{
		[HarmonyPatch(typeof(GameNetworkManager))]
		internal class InternalPatches
		{
			private static MethodInfo TargetMethod()
			{
				return typeof(GameNetworkManager).GetMethod("ConnectionApproval", BindingFlags.Instance | BindingFlags.NonPublic);
			}

			[HarmonyPrefix]
			private static bool PostFix(GameNetworkManager __instance, ConnectionApprovalRequest request, ConnectionApprovalResponse response)
			{
				//IL_000a: 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_004d: 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)
				Debug.Log((object)("Connection approval callback! Game version of client request: " + Encoding.ASCII.GetString(request.Payload).ToString()));
				Debug.Log((object)$"Joining client id: {request.ClientNetworkId}; Local/host client id: {NetworkManager.Singleton.LocalClientId}");
				if (request.ClientNetworkId == NetworkManager.Singleton.LocalClientId)
				{
					Debug.Log((object)"Stopped connection approval callback, as the client in question was the host!");
					return false;
				}
				bool flag = !__instance.disallowConnection;
				if (flag)
				{
					string @string = Encoding.ASCII.GetString(request.Payload);
					string[] array = @string.Split(",");
					if (string.IsNullOrEmpty(@string))
					{
						response.Reason = "Unknown; please verify your game files.";
						flag = false;
					}
					else if (__instance.gameHasStarted)
					{
						response.Reason = "Game has already started!";
						flag = false;
					}
					else if (__instance.gameVersionNum.ToString() != array[0])
					{
						response.Reason = $"Game version mismatch! Their version: {__instance.gameVersionNum}. Your version: {array[0]}";
						flag = false;
					}
					else if (!__instance.disableSteam && ((Object)(object)StartOfRound.Instance == (Object)null || array.Length < 2 || StartOfRound.Instance.KickedClientIds.Contains((ulong)Convert.ToInt64(array[1]))))
					{
						response.Reason = "You cannot rejoin after being kicked.";
						flag = false;
					}
					else if (!@string.Contains("BiggerLobbyVersion2.4.0"))
					{
						response.Reason = "You need to have <color=#008282>BiggerLobby V2.4.0</color> to join this server!";
						flag = false;
					}
				}
				else
				{
					response.Reason = "The host was not accepting connections.";
				}
				Debug.Log((object)$"Approved connection?: {flag}. Connected players #: {__instance.connectedPlayers}");
				Debug.Log((object)("Disapproval reason: " + response.Reason));
				response.CreatePlayerObject = false;
				response.Approved = flag;
				response.Pending = false;
				return false;
			}
		}

		[HarmonyPatch(typeof(GameNetworkManager))]
		internal class InternalPatches2
		{
			private static MethodInfo TargetMethod()
			{
				return typeof(GameNetworkManager).GetMethod("SteamMatchmaking_OnLobbyCreated", BindingFlags.Instance | BindingFlags.NonPublic);
			}

			[HarmonyPostfix]
			private static void PostFix(GameNetworkManager __instance, Result result, Lobby lobby)
			{
				((Lobby)(ref lobby)).SetData("name", "[BiggerLobby]" + ((Lobby)(ref lobby)).GetData("name"));
			}
		}

		private static PropertyInfo _playbackVolumeProperty = typeof(VoicePlayback).GetInterface("IVoicePlaybackInternal").GetProperty("PlaybackVolume");

		[HarmonyPatch(typeof(StartOfRound), "UpdatePlayerVoiceEffects")]
		[HarmonyPrefix]
		public static void UpdatePlayerVoiceEffects(StartOfRound __instance)
		{
			if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)
			{
				return;
			}
			typeof(StartOfRound).GetField("updatePlayerVoiceInterval", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(__instance, 2f);
			PlayerControllerB val = ((!GameNetworkManager.Instance.localPlayerController.isPlayerDead || !((Object)(object)GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript != (Object)null)) ? GameNetworkManager.Instance.localPlayerController : GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript);
			for (int i = 0; i < __instance.allPlayerScripts.Length; i++)
			{
				PlayerControllerB val2 = __instance.allPlayerScripts[i];
				if ((!val2.isPlayerControlled && !val2.isPlayerDead) || (Object)(object)val2 == (Object)(object)GameNetworkManager.Instance.localPlayerController)
				{
					continue;
				}
				if (val2.voicePlayerState == null || val2.currentVoiceChatIngameSettings._playerState == null || (Object)(object)val2.currentVoiceChatAudioSource == (Object)null)
				{
					__instance.RefreshPlayerVoicePlaybackObjects();
					if (val2.voicePlayerState == null || (Object)(object)val2.currentVoiceChatAudioSource == (Object)null)
					{
						Debug.Log((object)$"Was not able to access voice chat object for player #{i}; {val2.voicePlayerState == null}; {(Object)(object)val2.currentVoiceChatAudioSource == (Object)null}");
						continue;
					}
				}
				AudioSource currentVoiceChatAudioSource = __instance.allPlayerScripts[i].currentVoiceChatAudioSource;
				bool flag = val2.speakingToWalkieTalkie && val.holdingWalkieTalkie && (Object)(object)val2 != (Object)(object)val;
				if (val2.isPlayerDead)
				{
					((Behaviour)((Component)currentVoiceChatAudioSource).GetComponent<AudioLowPassFilter>()).enabled = false;
					((Behaviour)((Component)currentVoiceChatAudioSource).GetComponent<AudioHighPassFilter>()).enabled = false;
					currentVoiceChatAudioSource.panStereo = 0f;
					SoundManager.Instance.playerVoicePitchTargets[val2.playerClientId] = 1f;
					SoundManager.Instance.SetPlayerPitch(1f, (int)val2.playerClientId);
					if (GameNetworkManager.Instance.localPlayerController.isPlayerDead)
					{
						currentVoiceChatAudioSource.spatialBlend = 0f;
						val2.currentVoiceChatIngameSettings.set2D = true;
						if ((Object)(object)val2.currentVoiceChatIngameSettings != (Object)null && (Object)(object)val2.currentVoiceChatIngameSettings._playbackComponent != (Object)null)
						{
							_playbackVolumeProperty.SetValue(val2.currentVoiceChatIngameSettings._playbackComponent, (SoundManager.Instance.playerVoiceVolumes[i] + 1f) * (float)(2 * Plugin._LoudnessMultiplier.Value));
						}
					}
					else
					{
						currentVoiceChatAudioSource.spatialBlend = 1f;
						val2.currentVoiceChatIngameSettings.set2D = false;
						if ((Object)(object)val2.currentVoiceChatIngameSettings != (Object)null && (Object)(object)val2.currentVoiceChatIngameSettings._playbackComponent != (Object)null)
						{
							_playbackVolumeProperty.SetValue(val2.currentVoiceChatIngameSettings._playbackComponent, 0);
						}
					}
					continue;
				}
				AudioLowPassFilter component = ((Component)currentVoiceChatAudioSource).GetComponent<AudioLowPassFilter>();
				OccludeAudio component2 = ((Component)currentVoiceChatAudioSource).GetComponent<OccludeAudio>();
				((Behaviour)component).enabled = true;
				component2.overridingLowPass = flag || __instance.allPlayerScripts[i].voiceMuffledByEnemy;
				((Behaviour)((Component)currentVoiceChatAudioSource).GetComponent<AudioHighPassFilter>()).enabled = flag;
				if (!flag)
				{
					currentVoiceChatAudioSource.spatialBlend = 1f;
					val2.currentVoiceChatIngameSettings.set2D = false;
					currentVoiceChatAudioSource.bypassListenerEffects = false;
					currentVoiceChatAudioSource.bypassEffects = false;
					currentVoiceChatAudioSource.outputAudioMixerGroup = SoundManager.Instance.playerVoiceMixers[val2.playerClientId];
					component.lowpassResonanceQ = 1f;
				}
				else
				{
					currentVoiceChatAudioSource.spatialBlend = 0f;
					val2.currentVoiceChatIngameSettings.set2D = true;
					if (GameNetworkManager.Instance.localPlayerController.isPlayerDead)
					{
						currentVoiceChatAudioSource.panStereo = 0f;
						currentVoiceChatAudioSource.outputAudioMixerGroup = SoundManager.Instance.playerVoiceMixers[val2.playerClientId];
						currentVoiceChatAudioSource.bypassListenerEffects = false;
						currentVoiceChatAudioSource.bypassEffects = false;
					}
					else
					{
						currentVoiceChatAudioSource.panStereo = 0.4f;
						currentVoiceChatAudioSource.bypassListenerEffects = false;
						currentVoiceChatAudioSource.bypassEffects = false;
						currentVoiceChatAudioSource.outputAudioMixerGroup = SoundManager.Instance.playerVoiceMixers[val2.playerClientId];
					}
					component2.lowPassOverride = 4000f;
					component.lowpassResonanceQ = 3f;
				}
				if ((Object)(object)val2.currentVoiceChatIngameSettings != (Object)null && (Object)(object)val2.currentVoiceChatIngameSettings._playbackComponent != (Object)null)
				{
					_playbackVolumeProperty.SetValue(val2.currentVoiceChatIngameSettings._playbackComponent, (SoundManager.Instance.playerVoiceVolumes[i] + 1f) * (float)(2 * Plugin._LoudnessMultiplier.Value));
				}
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "Awake")]
		[HarmonyPrefix]
		public static void ResizeLists(ref StartOfRound __instance)
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			__instance.allPlayerObjects = Helper.ResizeArray(__instance.allPlayerObjects, Plugin.MaxPlayers);
			__instance.allPlayerScripts = Helper.ResizeArray(__instance.allPlayerScripts, Plugin.MaxPlayers);
			__instance.gameStats.allPlayerStats = Helper.ResizeArray(__instance.gameStats.allPlayerStats, Plugin.MaxPlayers);
			__instance.playerSpawnPositions = Helper.ResizeArray(__instance.playerSpawnPositions, Plugin.MaxPlayers);
			for (int i = 4; i < Plugin.MaxPlayers; i++)
			{
				__instance.gameStats.allPlayerStats[i] = new PlayerStats();
				__instance.playerSpawnPositions[i] = __instance.playerSpawnPositions[0];
			}
		}

		[HarmonyPatch(typeof(SoundManager), "SetPlayerVoiceFilters")]
		[HarmonyPrefix]
		public static bool SetPlayerVoiceFilters(ref SoundManager __instance)
		{
			for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++)
			{
				if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && !StartOfRound.Instance.allPlayerScripts[i].isPlayerDead)
				{
					__instance.playerVoicePitches[i] = 1f;
					__instance.playerVoiceVolumes[i] = 1f;
					continue;
				}
				if (StartOfRound.Instance.allPlayerScripts[i].voicePlayerState != null)
				{
					typeof(VoicePlayback).GetProperty("Dissonance.Audio.Playback.IVoicePlaybackInternal.PlaybackVolume", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(StartOfRound.Instance.allPlayerScripts[i].currentVoiceChatIngameSettings._playbackComponent, (SoundManager.Instance.playerVoiceVolumes[i] + 1f) * (float)(2 * Plugin._LoudnessMultiplier.Value));
				}
				if (Mathf.Abs(__instance.playerVoicePitches[i] - __instance.playerVoicePitchTargets[i]) > 0.025f)
				{
					__instance.playerVoicePitches[i] = Mathf.Lerp(__instance.playerVoicePitches[i], __instance.playerVoicePitchTargets[i], 3f * Time.deltaTime);
				}
				else if (__instance.playerVoicePitches[i] != __instance.playerVoicePitchTargets[i])
				{
					__instance.playerVoicePitches[i] = __instance.playerVoicePitchTargets[i];
				}
			}
			return false;
		}

		[HarmonyPatch(typeof(MenuManager), "OnEnable")]
		[HarmonyPostfix]
		public static void CustomMenu(ref MenuManager __instance)
		{
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			GameObject p2;
			RectTransform rt9 = default(RectTransform);
			if (!__instance.isInitScene)
			{
				GameObject gameObject = ((Component)__instance.HostSettingsOptionsNormal.transform.parent.parent).gameObject;
				Component component = gameObject.GetComponent(typeof(RectTransform));
				RectTransform val = (RectTransform)(object)((component is RectTransform) ? component : null);
				p2 = ((Component)gameObject.transform.Find("PrivatePublicDescription")).gameObject;
				Component component2 = p2.GetComponent(typeof(RectTransform));
				RectTransform val2 = (RectTransform)(object)((component2 is RectTransform) ? component2 : null);
				Component component3 = ((Component)__instance.HostSettingsOptionsNormal.transform.Find("EnterAName")).gameObject.GetComponent(typeof(RectTransform));
				RectTransform val3 = (RectTransform)(object)((component3 is RectTransform) ? component3 : null);
				GameObject gameObject2 = ((Component)__instance.HostSettingsOptionsNormal.transform.Find("ServerNameField")).gameObject;
				Component component4 = gameObject2.GetComponent(typeof(RectTransform));
				RectTransform val4 = (RectTransform)(object)((component4 is RectTransform) ? component4 : null);
				Component component5 = ((Component)gameObject.transform.Find("Confirm")).gameObject.GetComponent(typeof(RectTransform));
				RectTransform val5 = (RectTransform)(object)((component5 is RectTransform) ? component5 : null);
				Component component6 = ((Component)gameObject.transform.Find("Back")).gameObject.GetComponent(typeof(RectTransform));
				RectTransform val6 = (RectTransform)(object)((component6 is RectTransform) ? component6 : null);
				Component component7 = ((Component)__instance.HostSettingsOptionsNormal.transform.Find("Public")).gameObject.GetComponent(typeof(RectTransform));
				RectTransform val7 = (RectTransform)(object)((component7 is RectTransform) ? component7 : null);
				Component component8 = ((Component)__instance.HostSettingsOptionsNormal.transform.Find("Private")).gameObject.GetComponent(typeof(RectTransform));
				Component obj = ((component8 is RectTransform) ? component8 : null);
				GameObject val8 = Object.Instantiate<GameObject>(gameObject2, gameObject2.transform.parent);
				ref RectTransform reference = ref rt9;
				Component component9 = val8.GetComponent(typeof(RectTransform));
				reference = (RectTransform)(object)((component9 is RectTransform) ? component9 : null);
				val.sizeDelta = new Vector2(val.sizeDelta.x, 200f);
				val2.anchoredPosition = new Vector2(val2.anchoredPosition.x, -50f);
				val3.anchoredPosition = new Vector2(val3.anchoredPosition.x, 40f);
				val4.anchoredPosition = new Vector2(val4.anchoredPosition.x, 55f);
				val5.anchoredPosition = new Vector2(val5.anchoredPosition.x, -60f);
				val6.anchoredPosition = new Vector2(val6.anchoredPosition.x, -85f);
				val7.anchoredPosition = new Vector2(val7.anchoredPosition.x, -23f);
				((RectTransform)obj).anchoredPosition = new Vector2(((RectTransform)obj).anchoredPosition.x, -23f);
				rt9.anchoredPosition = new Vector2(rt9.anchoredPosition.x, 21f);
				((Object)rt9).name = "ServerPlayersField";
				((Component)rt9).GetComponent<TMP_InputField>().contentType = (ContentType)2;
				((TMP_Text)((Component)((Component)rt9).transform.Find("Text Area").Find("Placeholder")).gameObject.GetComponent<TextMeshProUGUI>()).text = "Max players (16)...";
				((Component)rt9).transform.parent = __instance.HostSettingsOptionsNormal.transform;
				((UnityEvent<string>)(object)((Component)rt9).GetComponent<TMP_InputField>().onValueChanged).AddListener((UnityAction<string>)delegate
				{
					OnChange();
				});
			}
			void OnChange()
			{
				string text = Regex.Replace(((Component)rt9).GetComponent<TMP_InputField>().text, "[^0-9]", "");
				Debug.Log((object)text);
				if (!int.TryParse(text, out var result))
				{
					result = 16;
				}
				result = Math.Min(Math.Max(result, 4), 40);
				Debug.Log((object)result);
				if (result > 16)
				{
					((TMP_Text)p2.GetComponent<TextMeshProUGUI>()).text = "Notice: High max player counts\nmay cause lag.";
				}
				else if (((TMP_Text)p2.GetComponent<TextMeshProUGUI>()).text == "Notice: High max player counts\nmay cause lag.")
				{
					((TMP_Text)p2.GetComponent<TextMeshProUGUI>()).text = "yeah you should be good now lol";
				}
			}
		}

		[HarmonyPatch(typeof(MenuManager), "StartHosting")]
		[HarmonyPrefix]
		public static bool StartHost(MenuManager __instance)
		{
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			if (!GameNetworkManager.Instance.currentLobby.HasValue)
			{
				return true;
			}
			GameObject gameObject = ((Component)__instance.HostSettingsOptionsNormal.transform.Find("ServerPlayersField")).gameObject;
			Debug.Log((object)gameObject);
			GameObject gameObject2 = ((Component)gameObject.transform.Find("Text Area").Find("Text")).gameObject;
			Debug.Log((object)gameObject2);
			TextMeshProUGUI component = gameObject2.GetComponent<TextMeshProUGUI>();
			Debug.Log((object)component);
			string text = Regex.Replace(((TMP_Text)component).text, "[^0-9]", "");
			Debug.Log((object)text);
			if (!int.TryParse(text, out var result))
			{
				result = 16;
			}
			result = Math.Min(Math.Max(result, 4), 40);
			Debug.Log((object)result);
			Lobby valueOrDefault = GameNetworkManager.Instance.currentLobby.GetValueOrDefault();
			((Lobby)(ref valueOrDefault)).SetData("MaxPlayers", result.ToString());
			Debug.Log((object)"SETTING MAX PLAYERS===");
			Plugin.MaxPlayers = result;
			Debug.Log((object)"SetMax");
			Debug.Log((object)result);
			return true;
		}

		[HarmonyPatch(typeof(HUDManager), "FillEndGameStats")]
		[HarmonyPrefix]
		public static bool FillEndGameStats()
		{
			return false;
		}

		[HarmonyPatch(typeof(GameNetworkManager), "StartHost")]
		[HarmonyPrefix]
		public static bool DoTheThe()
		{
			Plugin.CustomNetObjects.Clear();
			return true;
		}

		[HarmonyPatch(typeof(GameNetworkManager), "StartClient")]
		[HarmonyPrefix]
		public static bool StartClient()
		{
			Plugin.CustomNetObjects.Clear();
			return true;
		}

		[HarmonyPatch(typeof(MenuManager), "StartAClient")]
		[HarmonyPrefix]
		public static bool StartAClient()
		{
			Plugin.CustomNetObjects.Clear();
			Debug.Log((object)"LanRunningggg!");
			return true;
		}

		[HarmonyPatch(typeof(SteamLobbyManager), "LoadServerList")]
		[HarmonyPrefix]
		public static async void LoadServerList(SteamLobbyManager __instance)
		{
			if (GameNetworkManager.Instance.waitingForLobbyDataRefresh)
			{
				return;
			}
			Debug.Log((object)typeof(SteamLobbyManager).GetField("refreshServerListTimer", BindingFlags.Instance | BindingFlags.NonPublic));
			typeof(SteamLobbyManager).GetField("refreshServerListTimer", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(__instance, 0f);
			((TMP_Text)__instance.serverListBlankText).text = "Loading server list...";
			FieldInfo LL = typeof(SteamLobbyManager).GetField("currentLobbyList", BindingFlags.Instance | BindingFlags.NonPublic);
			FieldInfo LP = typeof(SteamLobbyManager).GetField("lobbySlotPositionOffset", BindingFlags.Instance | BindingFlags.NonPublic);
			LL.SetValue(__instance, null);
			LobbySlot[] array = Object.FindObjectsOfType<LobbySlot>();
			for (int i = 0; i < array.Length; i++)
			{
				Object.Destroy((Object)(object)((Component)array[i]).gameObject);
			}
			LobbyQuery val;
			switch (__instance.sortByDistanceSetting)
			{
			case 0:
				val = SteamMatchmaking.LobbyList;
				((LobbyQuery)(ref val)).FilterDistanceClose();
				break;
			case 1:
				val = SteamMatchmaking.LobbyList;
				((LobbyQuery)(ref val)).FilterDistanceFar();
				break;
			case 2:
				val = SteamMatchmaking.LobbyList;
				((LobbyQuery)(ref val)).FilterDistanceWorldwide();
				break;
			}
			GameNetworkManager.Instance.waitingForLobbyDataRefresh = true;
			val = SteamMatchmaking.LobbyList;
			val = ((LobbyQuery)(ref val)).WithSlotsAvailable(1);
			val = ((LobbyQuery)(ref val)).WithKeyValue("vers", GameNetworkManager.Instance.gameVersionNum.ToString());
			Lobby[] array2 = await ((LobbyQuery)(ref val)).RequestAsync();
			Debug.Log((object)array2);
			LL.SetValue(__instance, array2);
			GameNetworkManager.Instance.waitingForLobbyDataRefresh = false;
			if (LL.GetValue(__instance) != null)
			{
				if ((LL.GetValue(__instance) as Array).Length == 0)
				{
					((TMP_Text)__instance.serverListBlankText).text = "No available servers to join.\n\n\nBizzlemip wuz here :3";
				}
				else
				{
					((TMP_Text)__instance.serverListBlankText).text = "";
				}
				LP.SetValue(__instance, 0f);
				for (int j = 0; j < (LL.GetValue(__instance) as Lobby[]).Length; j++)
				{
					GameObject obj = Object.Instantiate<GameObject>(__instance.LobbySlotPrefab, __instance.levelListContainer);
					obj.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, (float)LP.GetValue(__instance));
					LP.SetValue(__instance, (float)LP.GetValue(__instance) - 42f);
					LobbySlot componentInChildren = obj.GetComponentInChildren<LobbySlot>();
					((TMP_Text)componentInChildren.LobbyName).text = ((Lobby)(ref (LL.GetValue(__instance) as Lobby[])[j])).GetData("name").Replace("[BiggerLobby]", "[BL]");
					string data = ((Lobby)(ref (LL.GetValue(__instance) as Lobby[])[j])).GetData("MaxPlayers");
					Debug.Log((object)data);
					if (!int.TryParse(data, out var result))
					{
						result = 4;
					}
					result = Math.Min(Math.Max(result, 4), 40);
					((TMP_Text)componentInChildren.playerCount).text = $"{((Lobby)(ref (LL.GetValue(__instance) as Lobby[])[j])).MemberCount} / " + result;
					componentInChildren.lobbyId = ((Lobby)(ref (LL.GetValue(__instance) as Lobby[])[j])).Id;
					componentInChildren.thisLobby = (LL.GetValue(__instance) as Lobby[])[j];
				}
			}
			else
			{
				((TMP_Text)__instance.serverListBlankText).text = "No available servers to join.\n\n\nBizzlemip wuz here :3";
			}
		}

		[HarmonyPatch(typeof(SteamMatchmaking), "CreateLobbyAsync")]
		[HarmonyPrefix]
		public static void SetMaxMembers(ref int maxMembers)
		{
			maxMembers = Plugin.MaxPlayers;
		}

		[HarmonyPatch(typeof(GameNetworkManager), "SetConnectionDataBeforeConnecting")]
		[HarmonyPrefix]
		public static bool SetConnectionDataBeforeConnecting(GameNetworkManager __instance)
		{
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			__instance.localClientWaitingForApproval = true;
			Debug.Log((object)("Game version: " + __instance.gameVersionNum));
			if (__instance.disableSteam)
			{
				NetworkManager.Singleton.NetworkConfig.ConnectionData = Encoding.ASCII.GetBytes(__instance.gameVersionNum + ",BiggerLobbyVersion2.4.0");
			}
			else
			{
				NetworkManager.Singleton.NetworkConfig.ConnectionData = Encoding.ASCII.GetBytes(__instance.gameVersionNum + "," + SteamId.op_Implicit(SteamClient.SteamId) + ",BiggerLobbyVersion2.4.0");
			}
			return false;
		}

		[HarmonyPatch(typeof(GameNetworkManager), "LobbyDataIsJoinable")]
		[HarmonyPrefix]
		public static bool SkipLobbySizeCheck(ref GameNetworkManager __instance, ref bool __result, Lobby lobby)
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			string data = ((Lobby)(ref lobby)).GetData("vers");
			if (!int.TryParse(((Lobby)(ref lobby)).GetData("MaxPlayers"), out var result))
			{
				result = 16;
			}
			result = Math.Min(Math.Max(result, 4), 40);
			if (((Lobby)(ref lobby)).MemberCount >= result || ((Lobby)(ref lobby)).MemberCount < 1)
			{
				Debug.Log((object)$"Lobby join denied! Too many members in lobby! {((Lobby)(ref lobby)).Id}");
				Object.FindObjectOfType<MenuManager>().SetLoadingScreen(false, (RoomEnter)4, "The server is full!");
				__result = false;
				return false;
			}
			if (data != __instance.gameVersionNum.ToString())
			{
				Debug.Log((object)$"Lobby join denied! Attempted to join vers.{data} lobby id: {((Lobby)(ref lobby)).Id}");
				Object.FindObjectOfType<MenuManager>().SetLoadingScreen(false, (RoomEnter)2, $"The server host is playing on version {data} while you are on version {__instance.gameVersionNum}.");
				__result = false;
				return false;
			}
			if (((Lobby)(ref lobby)).GetData("joinable") == "false")
			{
				Debug.Log((object)"Lobby join denied! Host lobby is not joinable");
				Object.FindObjectOfType<MenuManager>().SetLoadingScreen(false, (RoomEnter)2, "The server host has already landed their ship, or they are still loading in.");
				__result = false;
				return false;
			}
			Debug.Log((object)"AEAELOGGINGNUMBER");
			Debug.Log((object)result);
			Debug.Log((object)((Lobby)(ref lobby)).GetData("MaxPlayers"));
			Debug.Log((object)result);
			Debug.Log((object)"SETTING MAX PLAYERS===");
			Plugin.MaxPlayers = result;
			__result = true;
			return false;
		}
	}
	[HarmonyPatch]
	internal class PlayerObjects
	{
		private static StartOfRound startOfRound;

		private static bool instantiating;

		private static int nextClientId;

		private static PlayerControllerB referencePlayer;

		[HarmonyPatch(typeof(StartOfRound), "Awake")]
		[HarmonyPrefix]
		public static void ResizeLists(ref StartOfRound __instance)
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			__instance.allPlayerObjects = Helper.ResizeArray(__instance.allPlayerObjects, Plugin.MaxPlayers);
			__instance.allPlayerScripts = Helper.ResizeArray(__instance.allPlayerScripts, Plugin.MaxPlayers);
			__instance.gameStats.allPlayerStats = Helper.ResizeArray(__instance.gameStats.allPlayerStats, Plugin.MaxPlayers);
			__instance.playerSpawnPositions = Helper.ResizeArray(__instance.playerSpawnPositions, Plugin.MaxPlayers);
			for (int i = 4; i < Plugin.MaxPlayers; i++)
			{
				__instance.gameStats.allPlayerStats[i] = new PlayerStats();
				__instance.playerSpawnPositions[i] = __instance.playerSpawnPositions[0];
			}
		}

		[HarmonyPatch(typeof(ForestGiantAI), "Start")]
		[HarmonyPrefix]
		public static bool ResizeLists2(ref ForestGiantAI __instance)
		{
			__instance.playerStealthMeters = Helper.ResizeArray(__instance.playerStealthMeters, Plugin.MaxPlayers);
			return true;
		}

		[HarmonyPatch(typeof(HUDManager), "Awake")]
		[HarmonyPostfix]
		public static void ResizeLists2(ref HUDManager __instance)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			__instance.endgameStatsAnimator = Object.Instantiate<Animator>(__instance.endgameStatsAnimator);
			__instance.playerLevels = Helper.ResizeArray(__instance.playerLevels, Plugin.MaxPlayers);
			for (int i = 4; i < Plugin.MaxPlayers; i++)
			{
				__instance.playerLevels[i] = new PlayerLevel();
			}
		}

		[HarmonyPatch(typeof(SoundManager), "Awake")]
		[HarmonyPostfix]
		public static void SoundWake(ref SoundManager __instance)
		{
			__instance.playerVoiceMixers = Helper.ResizeArray(__instance.playerVoiceMixers, Plugin.MaxPlayers);
			for (int i = 0; i < Plugin.MaxPlayers; i++)
			{
				__instance.playerVoiceMixers[i] = __instance.diageticMixer.outputAudioMixerGroup;
			}
		}

		[HarmonyPatch(typeof(SoundManager), "Start")]
		[HarmonyPostfix]
		public static void ResizeSoundManagerLists(ref SoundManager __instance)
		{
			__instance.playerVoicePitchLerpSpeed = new float[Plugin.MaxPlayers + 1];
			__instance.playerVoicePitchTargets = new float[Plugin.MaxPlayers + 1];
			__instance.playerVoiceVolumes = new float[Plugin.MaxPlayers + 1];
			__instance.playerVoicePitches = new float[Plugin.MaxPlayers + 1];
			for (int i = 1; i < Plugin.MaxPlayers + 1; i++)
			{
				__instance.playerVoicePitchLerpSpeed[i] = 3f;
				__instance.playerVoicePitchTargets[i] = 1f;
				__instance.playerVoicePitches[i] = 1f;
				__instance.playerVoiceVolumes[i] = 1f;
			}
		}

		[HarmonyPatch(typeof(EnemyAI), "EnableEnemyMesh")]
		[HarmonyPrefix]
		public static bool EnableEnemyMesh(EnemyAI __instance, bool enable, bool overrideDoNotSet = false)
		{
			int layer = ((!enable) ? 23 : 19);
			for (int i = 0; i < __instance.skinnedMeshRenderers.Length; i++)
			{
				if (Object.op_Implicit((Object)(object)__instance.skinnedMeshRenderers[i]) && (!((Component)__instance.skinnedMeshRenderers[i]).CompareTag("DoNotSet") || overrideDoNotSet))
				{
					((Component)__instance.skinnedMeshRenderers[i]).gameObject.layer = layer;
				}
			}
			for (int j = 0; j < __instance.meshRenderers.Length; j++)
			{
				if (Object.op_Implicit((Object)(object)__instance.meshRenderers[j]) && (!((Component)__instance.meshRenderers[j]).CompareTag("DoNotSet") || overrideDoNotSet))
				{
					((Component)__instance.meshRenderers[j]).gameObject.layer = layer;
				}
			}
			return false;
		}

		[HarmonyPatch(typeof(ShipTeleporter), "Awake")]
		[HarmonyPrefix]
		public static bool Awake2(ShipTeleporter __instance)
		{
			int[] array = new int[Plugin.MaxPlayers];
			for (int i = 0; i < Plugin.MaxPlayers; i++)
			{
				array[i] = -1;
			}
			typeof(ShipTeleporter).GetField("playersBeingTeleported", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(__instance, array);
			__instance.buttonTrigger.interactable = false;
			typeof(ShipTeleporter).GetField("cooldownTime", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(__instance, __instance.cooldownAmount);
			return false;
		}

		[HarmonyPatch(typeof(NetworkSceneManager), "PopulateScenePlacedObjects")]
		[HarmonyPrefix]
		public static bool AddPlayers(NetworkSceneManager __instance)
		{
			//IL_019d: 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)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			startOfRound = StartOfRound.Instance;
			if ((Object)(object)startOfRound.allPlayerObjects[Plugin.MaxPlayers - 1] != (Object)null)
			{
				return true;
			}
			referencePlayer = startOfRound.allPlayerObjects[0].GetComponent<PlayerControllerB>();
			GameObject playerPrefab = startOfRound.playerPrefab;
			Transform transform = ((Component)startOfRound.playersContainer).transform;
			FieldInfo field = typeof(NetworkObject).GetField("GlobalObjectIdHash", BindingFlags.Instance | BindingFlags.NonPublic);
			PropertyInfo property = typeof(NetworkObject).GetProperty("NetworkObjectId", BindingFlags.Instance | BindingFlags.Public);
			typeof(NetworkSceneManager).GetField("ScenePlacedObjects", BindingFlags.Instance | BindingFlags.NonPublic);
			instantiating = true;
			typeof(NetworkSpawnManager).GetMethod("SpawnNetworkObjectLocally", BindingFlags.Instance | BindingFlags.NonPublic, null, CallingConventions.Any, new Type[6]
			{
				typeof(NetworkObject),
				typeof(ulong),
				typeof(bool),
				typeof(bool),
				typeof(ulong),
				typeof(bool)
			}, null);
			for (int i = 4; i < Plugin.MaxPlayers; i++)
			{
				nextClientId = i;
				GameObject val = Object.Instantiate<GameObject>(playerPrefab, transform);
				PlayerControllerB component = val.GetComponent<PlayerControllerB>();
				NetworkObject component2 = val.GetComponent<NetworkObject>();
				NetworkObject component3 = ((Component)val.transform.Find("PlayerPhysicsBox")).gameObject.GetComponent<NetworkObject>();
				NetworkObject component4 = ((Component)val.transform.Find("ScavengerModel/metarig/ScavengerModelArmsOnly/metarig/spine.003/shoulder.R/arm.R_upper/arm.R_lower/hand.R/LocalItemHolder")).gameObject.GetComponent<NetworkObject>();
				NetworkObject component5 = ((Component)val.transform.Find("ScavengerModel/metarig/spine/spine.001/spine.002/spine.003/shoulder.R/arm.R_upper/arm.R_lower/hand.R/ServerItemHolder")).gameObject.GetComponent<NetworkObject>();
				component.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true);
				startOfRound.allPlayerObjects[i] = val;
				startOfRound.allPlayerScripts[i] = component;
				uint num = (uint)(6942069 + i);
				ulong num2 = 6942069uL + (ulong)i;
				uint num3 = (uint)(123456789 + i);
				uint num4 = (uint)(987654321 + i);
				uint num5 = (uint)(124585949 + i);
				ulong num6 = 123456789uL + (ulong)i;
				ulong num7 = 987654321uL + (ulong)i;
				ulong num8 = 124585949uL + (ulong)i;
				Scene scene = ((Component)component2).gameObject.scene;
				_ = ((Scene)(ref scene)).handle;
				field.SetValue(component2, num);
				property.SetValue(component2, num2);
				field.SetValue(component3, num3);
				property.SetValue(component3, num6);
				field.SetValue(component4, num4);
				property.SetValue(component4, num7);
				field.SetValue(component5, num5);
				property.SetValue(component5, num8);
				ManualCameraRenderer[] array = Object.FindObjectsByType<ManualCameraRenderer>((FindObjectsInactive)1, (FindObjectsSortMode)0);
				for (int j = 0; j < array.Length; j++)
				{
					array[j].AddTransformAsTargetToRadar(((Component)component).transform, "Player #" + j, false);
				}
			}
			instantiating = false;
			return true;
		}

		[HarmonyPatch(typeof(QuickMenuManager), "AddUserToPlayerList")]
		[HarmonyPrefix]
		public static bool AddUserToPlayerList(QuickMenuManager __instance, ulong steamId, string playerName, int playerObjectId)
		{
			if (playerObjectId >= 0 && playerObjectId <= Plugin.MaxPlayers)
			{
				__instance.playerListSlots[playerObjectId].KickUserButton.SetActive(((NetworkBehaviour)StartOfRound.Instance).IsServer);
				__instance.playerListSlots[playerObjectId].slotContainer.SetActive(true);
				__instance.playerListSlots[playerObjectId].isConnected = true;
				__instance.playerListSlots[playerObjectId].playerSteamId = steamId;
				((TMP_Text)__instance.playerListSlots[playerObjectId].usernameHeader).text = playerName.Replace("bizzlemip", "<color=#008282>bizzlemip</color>");
				if ((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null)
				{
					__instance.playerListSlots[playerObjectId].volumeSliderContainer.SetActive(playerObjectId != (int)GameNetworkManager.Instance.localPlayerController.playerClientId);
				}
			}
			return false;
		}

		[HarmonyPatch(typeof(QuickMenuManager), "Update")]
		[HarmonyPrefix]
		private static bool Update(QuickMenuManager __instance)
		{
			for (int i = 0; i < __instance.playerListSlots.Length; i++)
			{
				if (__instance.playerListSlots[i].isConnected)
				{
					float num = __instance.playerListSlots[i].volumeSlider.value / __instance.playerListSlots[i].volumeSlider.maxValue;
					if (num == -1f)
					{
						SoundManager.Instance.playerVoiceVolumes[i] = -1f;
					}
					else
					{
						SoundManager.Instance.playerVoiceVolumes[i] = num;
					}
				}
			}
			return false;
		}

		[HarmonyPatch(typeof(QuickMenuManager), "Start")]
		[HarmonyPrefix]
		public static bool FixPlayerList(ref QuickMenuManager __instance)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Expected O, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: 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_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Expected O, but got Unknown
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Expected O, but got Unknown
			GameObject val = null;
			GameObject gameObject = ((Component)__instance.playerListPanel.transform.Find("Image")).gameObject;
			if (Object.op_Implicit((Object)(object)gameObject.transform.Find("Mask")))
			{
				val = ((Component)gameObject.transform.Find("Mask")).gameObject;
			}
			GameObject val2 = new GameObject("Mask");
			GameObject val3 = new GameObject("ScrollViewport");
			GameObject val4 = new GameObject("BGCollision");
			GameObject val5 = new GameObject("ScrollContent");
			val2.transform.SetParent(gameObject.transform);
			val3.transform.SetParent(val2.transform);
			val4.transform.SetParent(val3.transform);
			val5.transform.SetParent(val3.transform);
			val2.transform.localScale = Vector3.one;
			val3.transform.localScale = Vector3.one;
			val5.transform.localScale = Vector3.one;
			val2.AddComponent<RectTransform>().sizeDelta = new Vector2(300f, 280f);
			val2.transform.localPosition = new Vector3(-10f, 110f, 0f);
			val3.transform.localPosition = new Vector3(0f, -10f, 0f);
			val5.AddComponent<RectTransform>().pivot = new Vector2(0.5f, 1f);
			val2.GetComponent<RectTransform>().pivot = new Vector2(0.5f, 1f);
			val2.transform.localPosition = new Vector3(-10f, 110f, 0f);
			val2.AddComponent<RectMask2D>();
			VerticalLayoutGroup val6 = val5.AddComponent<VerticalLayoutGroup>();
			ContentSizeFitter obj = val5.AddComponent<ContentSizeFitter>();
			ScrollRect obj2 = val3.AddComponent<ScrollRect>();
			obj2.viewport = val3.AddComponent<RectTransform>();
			obj2.content = val5.GetComponent<RectTransform>();
			obj2.horizontal = false;
			Image val7 = val4.AddComponent<Image>();
			val4.GetComponent<RectTransform>().anchorMin = new Vector2(0f, 0f);
			val4.GetComponent<RectTransform>().anchorMax = new Vector2(1f, 1f);
			((Graphic)val7).color = new Color(255f, 255f, 255f, 0f);
			((HorizontalOrVerticalLayoutGroup)val6).spacing = 50f;
			obj.horizontalFit = (FitMode)0;
			obj.verticalFit = (FitMode)2;
			__instance.playerListSlots = Helper.ResizeArray(__instance.playerListSlots, Plugin.MaxPlayers);
			for (int i = 0; i < Plugin.MaxPlayers; i++)
			{
				if (i < 4)
				{
					__instance.playerListSlots[i].slotContainer.transform.SetParent(val5.transform);
					continue;
				}
				PlayerListSlot val8 = new PlayerListSlot();
				GameObject val9 = (val8.slotContainer = Object.Instantiate<GameObject>(__instance.playerListSlots[0].slotContainer));
				val8.volumeSliderContainer = ((Component)val9.transform.Find("VoiceVolumeSlider")).gameObject;
				val8.KickUserButton = ((Component)val9.transform.Find("KickButton")).gameObject;
				QuickMenuManager yeahoriginal = __instance;
				int localI = i;
				((UnityEvent)val8.KickUserButton.GetComponent<Button>().onClick).AddListener((UnityAction)delegate
				{
					yeahoriginal.KickUserFromServer(localI);
				});
				val8.isConnected = false;
				val8.usernameHeader = ((Component)val9.transform.Find("PlayerNameButton").Find("PName")).gameObject.GetComponent<TextMeshProUGUI>();
				val8.volumeSlider = ((Component)val9.transform.Find("VoiceVolumeSlider").Find("Slider")).gameObject.GetComponent<Slider>();
				val8.playerSteamId = __instance.playerListSlots[0].playerSteamId;
				val9.transform.SetParent(val5.transform, false);
				__instance.playerListSlots[i] = val8;
			}
			if ((Object)(object)val != (Object)null)
			{
				Object.Destroy((Object)(object)val);
			}
			return true;
		}

		[HarmonyPatch(typeof(StartOfRound), "SyncShipUnlockablesClientRpc")]
		[HarmonyPrefix]
		public static bool SyncShipUnlockablesClientRpc(StartOfRound __instance, int[] playerSuitIDs, bool shipLightsOn, Vector3[] placeableObjectPositions, Vector3[] placeableObjectRotations, int[] placeableObjects, int[] storedItems, int[] scrapValues, int[] itemSaveData)
		{
			Debug.Log((object)"INITIAL ARRAY LENGTHS");
			Debug.Log((object)__instance.allPlayerScripts.Length);
			Debug.Log((object)playerSuitIDs.Length);
			return true;
		}

		[HarmonyPatch(typeof(ManualCameraRenderer), "Awake")]
		[HarmonyPrefix]
		public static bool Mawake(ref ManualCameraRenderer __instance)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			for (int i = 0; i < 4; i++)
			{
				__instance.radarTargets.Add(new TransformAndName(((Component)StartOfRound.Instance.allPlayerScripts[i]).transform, StartOfRound.Instance.allPlayerScripts[i].playerUsername, false));
			}
			__instance.targetTransformIndex = 0;
			__instance.targetedPlayer = StartOfRound.Instance.allPlayerScripts[0];
			return false;
		}

		[HarmonyPatch(typeof(PlayerControllerB), "Awake")]
		[HarmonyPrefix]
		public static bool FixPlayerObject(ref PlayerControllerB __instance)
		{
			if (!instantiating)
			{
				return true;
			}
			((Object)((Component)__instance).gameObject).name = $"ExtraPlayer{nextClientId}";
			__instance.playerClientId = (ulong)nextClientId;
			__instance.actualClientId = (ulong)nextClientId;
			StartOfRound.Instance.allPlayerObjects[nextClientId] = ((Component)((Component)__instance).transform.parent).gameObject;
			StartOfRound.Instance.allPlayerScripts[nextClientId] = __instance;
			FieldInfo[] fields = typeof(PlayerControllerB).GetFields();
			foreach (FieldInfo fieldInfo in fields)
			{
				object value = fieldInfo.GetValue(__instance);
				object value2 = fieldInfo.GetValue(referencePlayer);
				if (value == null && value2 != null)
				{
					fieldInfo.SetValue(__instance, value2);
				}
			}
			((Behaviour)__instance).enabled = true;
			return true;
		}

		[HarmonyPatch(typeof(StartOfRound), "GetPlayerSpawnPosition")]
		[HarmonyTranspiler]
		public static IEnumerable<CodeInstruction> GetPlayerSpawnPosition(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			list[0].opcode = OpCodes.Ldc_I4_1;
			return list.AsEnumerable();
		}
	}
}

plugins/BunyaPineTree-ModelReplacementAPI/ModelReplacementAPI.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.Bootstrap;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LCThirdPerson;
using Microsoft.CodeAnalysis;
using MoreCompany.Cosmetics;
using Newtonsoft.Json;
using UnityEngine;
using _3rdPerson.Helper;

[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ModelReplacementAPI")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A template for Lethal Company")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+57b57c50cb5b4bd1a94b58258bec7bf3ad7e7583")]
[assembly: AssemblyProduct("ModelReplacementAPI")]
[assembly: AssemblyTitle("ModelReplacementAPI")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ModelReplacement
{
	internal class AvatarBodyUpdater : MonoBehaviour
	{
		private void LateUpdate()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: 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_008b: 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)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			Animator val = new Animator();
			Animator val2 = new Animator();
			Array values = Enum.GetValues(typeof(HumanBodyBones));
			foreach (object item in values)
			{
				Transform boneTransform = val.GetBoneTransform((HumanBodyBones)item);
				Transform boneTransform2 = val.GetBoneTransform((HumanBodyBones)item);
				if (!((Object)(object)boneTransform == (Object)null) && !((Object)(object)boneTransform2 == (Object)null))
				{
					boneTransform2.rotation = new Quaternion(boneTransform.rotation.x, boneTransform.rotation.y, boneTransform.rotation.z, boneTransform.rotation.w);
				}
			}
		}
	}
	public abstract class BodyReplacementBase : MonoBehaviour
	{
		public bool renderLocalDebug = false;

		public bool renderBase = false;

		public bool renderModel = false;

		public string boneMapJsonStr;

		public string jsonPath;

		public BoneMap Map;

		public PlayerControllerB controller;

		public GameObject replacementModel;

		public GameObject deadBody = null;

		public GameObject replacementDeadBody = null;

		public BoneMap ragDollMap;

		private MeshRenderer nameTagObj = null;

		private MeshRenderer nameTagObj2 = null;

		public bool flagReparentObject = false;

		public bool moreCompanyCosmeticsReparented = false;

		internal bool ragdollEnabled = true;

		internal bool bloodDecalsEnabled = true;

		public bool localPlayer => (ulong)StartOfRound.Instance.thisClientPlayerId == controller.playerClientId;

		public abstract string boneMapFileName { get; }

		public bool DangerousViewState()
		{
			return ThirdPersonCamera.ViewState;
		}

		public bool DangerousLCViewState()
		{
			return ThirdPersonPlugin.Instance.Enabled;
		}

		public bool RenderBodyReplacement()
		{
			if (!localPlayer)
			{
				return true;
			}
			if (ModelReplacementAPI.thirdPersonPresent)
			{
				return DangerousViewState();
			}
			if (ModelReplacementAPI.LCthirdPersonPresent)
			{
				return DangerousLCViewState();
			}
			return false;
		}

		public abstract GameObject LoadAssetsAndReturnModel();

		public abstract void AddModelScripts();

		public virtual Transform[] GetMappedBones()
		{
			List<Transform> list = new List<Transform>();
			SkinnedMeshRenderer[] componentsInChildren = replacementModel.GetComponentsInChildren<SkinnedMeshRenderer>();
			foreach (SkinnedMeshRenderer val in componentsInChildren)
			{
				list.AddRange(val.bones);
			}
			return list.ToArray();
		}

		private void CreateAndParentRagdoll(DeadBodyInfo bodyinfo)
		{
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			Console.WriteLine("Death on " + controller.playerUsername);
			deadBody = ((Component)bodyinfo).gameObject;
			SkinnedMeshRenderer componentInChildren = deadBody.GetComponentInChildren<SkinnedMeshRenderer>();
			replacementDeadBody = Object.Instantiate<GameObject>(replacementModel);
			Renderer[] componentsInChildren = replacementDeadBody.GetComponentsInChildren<Renderer>();
			foreach (Renderer val in componentsInChildren)
			{
				val.enabled = true;
			}
			((Renderer)componentInChildren).enabled = false;
			List<Transform> list = new List<Transform>();
			SkinnedMeshRenderer[] componentsInChildren2 = replacementDeadBody.GetComponentsInChildren<SkinnedMeshRenderer>();
			foreach (SkinnedMeshRenderer val2 in componentsInChildren2)
			{
				list.AddRange(val2.bones);
			}
			Transform[] originalMappedBones = GetMappedBones();
			Transform[] array = (Transform[])(object)new Transform[originalMappedBones.Length];
			int i;
			for (i = 0; i < originalMappedBones.Length; i++)
			{
				array[i] = list.Where((Transform bone) => ((Object)bone).name == ((Object)originalMappedBones[i]).name).First();
			}
			ragDollMap = BoneMap.DeserializeFromJson(boneMapJsonStr);
			ragDollMap.MapBones(componentInChildren.bones, array);
			ragDollMap.RootBone().parent = componentInChildren.rootBone;
			ragDollMap.RootBone().localPosition = Vector3.zero + Map.PositionOffset();
			GameObject[] bodyBloodDecals = bodyinfo.bodyBloodDecals;
			foreach (GameObject val3 in bodyBloodDecals)
			{
				Transform parent = val3.transform.parent;
				Transform mappedTransform = ragDollMap.GetMappedTransform(((Object)parent).name);
				if (Object.op_Implicit((Object)(object)mappedTransform))
				{
					Object.Instantiate<GameObject>(val3, mappedTransform);
				}
			}
		}

		public virtual void AfterAwake()
		{
		}

		public void RepairModel()
		{
			if ((Object)(object)controller == (Object)null)
			{
				ModelReplacementAPI.Instance.Logger.LogFatal((object)$" {((object)this).GetType()} PlayerControllerB is null");
				Object.Destroy((Object)(object)this);
			}
			if ((Object)(object)controller.thisPlayerModel == (Object)null)
			{
				ModelReplacementAPI.Instance.Logger.LogFatal((object)$"{((Object)controller).name} {((object)this).GetType()} base player model is null");
				Object.Destroy((Object)(object)this);
			}
			if ((Object)(object)replacementModel == (Object)null)
			{
				ModelReplacementAPI.Instance.Logger.LogFatal((object)$"{((Object)controller).name} {((object)this).GetType()} replacementModel is null");
				Object.Destroy((Object)(object)this);
			}
			Map = BoneMap.DeserializeFromJson(boneMapJsonStr);
			Map.MapBones(controller.thisPlayerModel.bones, GetMappedBones());
			Map.SetBodyReplacement(this);
			ReparentModel();
			moreCompanyCosmeticsReparented = false;
		}

		internal void Awake()
		{
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: 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_0185: 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_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Expected O, but got Unknown
			controller = ((Component)this).GetComponent<PlayerControllerB>();
			Console.WriteLine("Awake " + controller.playerUsername);
			replacementModel = LoadAssetsAndReturnModel();
			if ((Object)(object)replacementModel == (Object)null)
			{
				Console.WriteLine("LoadAssetsAndReturnModel returned null");
			}
			Renderer[] componentsInChildren = replacementModel.GetComponentsInChildren<Renderer>();
			Material material = ((Renderer)((Component)controller.thisPlayerModel).GetComponent<SkinnedMeshRenderer>()).material;
			Renderer[] array = componentsInChildren;
			foreach (Renderer val in array)
			{
				List<Material> list = new List<Material>();
				Material[] materials = val.materials;
				foreach (Material val2 in materials)
				{
					Material val3 = new Material(material);
					val3.mainTexture = val2.mainTexture;
					list.Add(val3);
				}
				val.SetMaterials(list);
			}
			try
			{
				AddModelScripts();
			}
			catch (Exception ex)
			{
				ModelReplacementAPI.Instance.Logger.LogError((object)("Could not set all model scripts.\n Error: " + ex.Message));
			}
			replacementModel = Object.Instantiate<GameObject>(replacementModel);
			SetRenderers(enabled: false);
			replacementModel.transform.localPosition = new Vector3(0f, 0f, 0f);
			replacementModel.SetActive(true);
			Bounds bounds = ((Renderer)controller.thisPlayerModel).bounds;
			Vector3 extents = ((Bounds)(ref bounds)).extents;
			float y = extents.y;
			bounds = GetBounds();
			float num = y / ((Bounds)(ref bounds)).extents.y;
			Transform transform = replacementModel.transform;
			transform.localScale *= num;
			string text = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			while (true)
			{
				string name = new DirectoryInfo(text).Name;
				if (name == "plugins")
				{
					break;
				}
				text = Path.Combine(text, "..");
			}
			string[] files = Directory.GetFiles(text, "*.json", SearchOption.AllDirectories);
			jsonPath = files.Where((string f) => Path.GetFileName(f) == boneMapFileName).First();
			boneMapJsonStr = File.ReadAllText(jsonPath);
			Map = BoneMap.DeserializeFromJson(boneMapJsonStr);
			Map.MapBones(controller.thisPlayerModel.bones, GetMappedBones());
			Map.SetBodyReplacement(this);
			ReparentModel();
			MeshRenderer[] componentsInChildren2 = ((Component)controller).gameObject.GetComponentsInChildren<MeshRenderer>();
			nameTagObj = componentsInChildren2.Where((MeshRenderer x) => ((Object)((Component)x).gameObject).name == "LevelSticker").First();
			nameTagObj2 = componentsInChildren2.Where((MeshRenderer x) => ((Object)((Component)x).gameObject).name == "BetaBadge").First();
			Console.WriteLine("AwakeEnd " + controller.playerUsername);
			AfterAwake();
		}

		public void ReparentModel()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: 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)
			Map.RootBone().parent = controller.thisPlayerModel.rootBone;
			Map.RootBone().localPosition = Vector3.zero + Map.PositionOffset();
		}

		public virtual void AfterStart()
		{
		}

		private void Start()
		{
			AfterStart();
		}

		public virtual void AfterUpdate()
		{
		}

		private void AttemptUnparentMoreCompanyCosmetics()
		{
			if (ModelReplacementAPI.moreCompanyPresent && moreCompanyCosmeticsReparented)
			{
				DangerousUnparent();
			}
		}

		private void AttemptReparentMoreCompanyCosmetics()
		{
			if (ModelReplacementAPI.moreCompanyPresent && !moreCompanyCosmeticsReparented)
			{
				DangerousParent();
			}
		}

		private void DangerousUnparent()
		{
			CosmeticApplication[] componentsInChildren = ((Component)controller).gameObject.GetComponentsInChildren<CosmeticApplication>();
			if (componentsInChildren.Any())
			{
				CosmeticApplication[] array = componentsInChildren;
				foreach (CosmeticApplication val in array)
				{
					foreach (CosmeticInstance spawnedCosmetic in val.spawnedCosmetics)
					{
						((Component)spawnedCosmetic).transform.parent = null;
					}
					moreCompanyCosmeticsReparented = false;
				}
			}
			Console.WriteLine(" unparent done");
		}

		private void DangerousParent()
		{
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: 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_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Expected I4, but got Unknown
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			CosmeticApplication[] componentsInChildren = ((Component)controller).gameObject.GetComponentsInChildren<CosmeticApplication>();
			if (!componentsInChildren.Any())
			{
				return;
			}
			CosmeticApplication[] array = componentsInChildren;
			foreach (CosmeticApplication val in array)
			{
				Console.WriteLine(((object)val).GetType().Name + " parent");
				Transform mappedTransform = Map.GetMappedTransform("spine.004");
				Transform mappedTransform2 = Map.GetMappedTransform("spine.003");
				Transform mappedTransform3 = Map.GetMappedTransform("arm.R_lower");
				Transform mappedTransform4 = Map.GetMappedTransform("spine");
				Transform mappedTransform5 = Map.GetMappedTransform("shin.L");
				Transform mappedTransform6 = Map.GetMappedTransform("shin.R");
				val.head = mappedTransform;
				val.chest = mappedTransform2;
				val.lowerArmRight = mappedTransform3;
				val.hip = mappedTransform4;
				val.shinLeft = mappedTransform5;
				val.shinRight = mappedTransform6;
				foreach (CosmeticInstance spawnedCosmetic in val.spawnedCosmetics)
				{
					Transform val2 = null;
					CosmeticType cosmeticType = spawnedCosmetic.cosmeticType;
					CosmeticType val3 = cosmeticType;
					switch ((int)val3)
					{
					case 0:
						val2 = val.head;
						break;
					case 2:
						val2 = val.chest;
						break;
					case 3:
						val2 = val.lowerArmRight;
						break;
					case 4:
						val2 = val.hip;
						break;
					case 5:
						val2 = val.shinLeft;
						break;
					case 6:
						val2 = val.shinRight;
						break;
					}
					((Component)spawnedCosmetic).transform.position = val2.position;
					((Component)spawnedCosmetic).transform.rotation = val2.rotation;
					((Component)spawnedCosmetic).transform.parent = val2;
				}
				moreCompanyCosmeticsReparented = true;
			}
			Console.WriteLine(" reparent done");
		}

		private void Update()
		{
			if (Map.CompletelyDestroyed())
			{
				Console.WriteLine("Map gone destroy");
				Object.Destroy((Object)(object)this);
				return;
			}
			if (!renderLocalDebug)
			{
				if (RenderBodyReplacement())
				{
					SetRenderers(enabled: true);
					((Renderer)controller.thisPlayerModel).enabled = false;
					((Renderer)controller.thisPlayerModelLOD1).enabled = false;
					((Renderer)controller.thisPlayerModelLOD2).enabled = false;
					((Renderer)nameTagObj).enabled = false;
					((Renderer)nameTagObj2).enabled = false;
				}
				else
				{
					SetRenderers(enabled: false);
				}
			}
			else
			{
				SkinnedMeshRenderer[] componentsInChildren = ((Component)controller).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					Renderer val = (Renderer)(object)componentsInChildren[i];
					val.enabled = renderBase;
				}
				SetRenderers(renderModel);
			}
			Map.UpdateModelbones();
			AttemptReparentMoreCompanyCosmetics();
			if (ragdollEnabled)
			{
				GameObject val2 = null;
				try
				{
					val2 = ((Component)controller.deadBody).gameObject;
				}
				catch
				{
				}
				if (Object.op_Implicit((Object)(object)val2) && (Object)(object)replacementDeadBody == (Object)null)
				{
					CreateAndParentRagdoll(controller.deadBody);
				}
				if (Object.op_Implicit((Object)(object)replacementDeadBody))
				{
					if ((Object)(object)val2 == (Object)null)
					{
						Object.Destroy((Object)(object)replacementDeadBody);
						replacementDeadBody = null;
						ragDollMap = null;
					}
					else
					{
						ragDollMap.UpdateModelbones();
					}
				}
			}
			AfterUpdate();
		}

		private void OnDestroy()
		{
			Console.WriteLine("Destroy body component for " + controller.playerUsername);
			((Renderer)controller.thisPlayerModel).enabled = true;
			((Renderer)controller.thisPlayerModelLOD1).enabled = true;
			((Renderer)controller.thisPlayerModelLOD2).enabled = true;
			((Renderer)nameTagObj).enabled = true;
			((Renderer)nameTagObj2).enabled = true;
			AttemptUnparentMoreCompanyCosmetics();
			Object.Destroy((Object)(object)replacementModel);
			Object.Destroy((Object)(object)replacementDeadBody);
		}

		private void SetRenderers(bool enabled)
		{
			Renderer[] componentsInChildren = replacementModel.GetComponentsInChildren<Renderer>();
			foreach (Renderer val in componentsInChildren)
			{
				val.enabled = enabled;
			}
		}

		private Bounds GetBounds()
		{
			//IL_0003: 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_0063: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: 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_0144: 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_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: 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_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: 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_01b1: 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)
			Bounds result = default(Bounds);
			IEnumerable<Bounds> source = from r in replacementModel.GetComponentsInChildren<SkinnedMeshRenderer>()
				select ((Renderer)r).bounds;
			Bounds val = source.OrderByDescending((Bounds x) => ((Bounds)(ref x)).max.x).First();
			float x2 = ((Bounds)(ref val)).max.x;
			val = source.OrderByDescending((Bounds x) => ((Bounds)(ref x)).max.y).First();
			float y = ((Bounds)(ref val)).max.y;
			val = source.OrderByDescending((Bounds x) => ((Bounds)(ref x)).max.z).First();
			float z = ((Bounds)(ref val)).max.z;
			val = source.OrderBy((Bounds x) => ((Bounds)(ref x)).min.x).First();
			float x3 = ((Bounds)(ref val)).min.x;
			val = source.OrderBy((Bounds x) => ((Bounds)(ref x)).min.y).First();
			float y2 = ((Bounds)(ref val)).min.y;
			val = source.OrderBy((Bounds x) => ((Bounds)(ref x)).min.z).First();
			float z2 = ((Bounds)(ref val)).min.z;
			((Bounds)(ref result)).SetMinMax(new Vector3(x3, y2, z2), new Vector3(z, y, z));
			return result;
		}
	}
	[JsonObject]
	public class BoneMap
	{
		public class MappedBone
		{
			public string playerBoneString;

			public string modelBoneString;

			public Quaternion rotationOffset = Quaternion.identity;

			public Transform playerTransform;

			public Transform modelTransform;

			public List<string> additionalVars = new List<string>();

			public MappedBone(string playerBoneString, string modelBoneString, Quaternion rotationOffset, Transform playerTransform, Transform modelTransform)
			{
				//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_002d: 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)
				this.playerBoneString = playerBoneString;
				this.modelBoneString = modelBoneString;
				this.rotationOffset = rotationOffset;
				this.playerTransform = playerTransform;
				this.modelTransform = modelTransform;
			}

			public MappedBone(List<string> vars, Transform player, Transform model)
			{
				//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_00a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
				playerTransform = player;
				modelTransform = model;
				int count = vars.Count;
				if (count >= 2)
				{
					playerBoneString = vars[0];
					modelBoneString = vars[1];
				}
				if (count >= 6)
				{
					try
					{
						float num = float.Parse(vars[2]);
						float num2 = float.Parse(vars[3]);
						float num3 = float.Parse(vars[4]);
						float num4 = float.Parse(vars[5]);
						rotationOffset = new Quaternion(num, num2, num3, num4);
					}
					catch (Exception)
					{
						ModelReplacementAPI.Instance.Logger.LogError((object)("could not parse rotation offset for player bone " + playerBoneString + " xyzw(" + vars[2] + "," + vars[3] + "," + vars[4] + "," + vars[5] + ")"));
					}
				}
				if (count > 6)
				{
					for (int i = 6; i < count; i++)
					{
						additionalVars.Add(vars[i]);
					}
				}
			}

			public bool Update()
			{
				//IL_005d: 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_007d: 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_0097: 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_00af: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)modelTransform == (Object)null || (Object)(object)playerTransform == (Object)null)
				{
					ModelReplacementAPI.Instance.Logger.LogError((object)("Could not Update bone, model or player transform is null. Destroying MappedBone (" + modelBoneString + ")"));
					return true;
				}
				try
				{
					modelTransform.rotation = new Quaternion(playerTransform.rotation.x, playerTransform.rotation.y, playerTransform.rotation.z, playerTransform.rotation.w);
					Transform obj = modelTransform;
					obj.rotation *= rotationOffset;
				}
				catch
				{
					ModelReplacementAPI.Instance.Logger.LogError((object)("Could not Update bones for " + ((Object)playerTransform).name + " to " + ((Object)modelTransform).name + " "));
					return true;
				}
				return false;
			}
		}

		[JsonProperty]
		private List<List<string>> boneMap = new List<List<string>>();

		[JsonIgnore]
		private List<MappedBone> mappedBones = new List<MappedBone>();

		[JsonProperty]
		private List<float> _positionOffSet = new List<float>();

		[JsonIgnore]
		private Vector3 positionOffset = Vector3.zero;

		[JsonProperty]
		private List<float> _itemHolderPositionOffset = new List<float>();

		[JsonIgnore]
		private Vector3 itemHolderPositionOffset = Vector3.zero;

		[JsonProperty]
		private string itemHolderBone = "";

		[JsonIgnore]
		private Transform itemHolderTransform = null;

		[JsonProperty]
		private string rootBone = "";

		[JsonIgnore]
		private Transform rootBoneTransform = null;

		[JsonIgnore]
		public Transform[] playerBoneList = null;

		[JsonIgnore]
		public Transform[] modelBoneList = null;

		[JsonIgnore]
		public BodyReplacementBase replacementBase;

		public static BoneMap DeserializeFromJson(string jsonStr)
		{
			return JsonConvert.DeserializeObject<BoneMap>(jsonStr);
		}

		public string SerializeToJsonString()
		{
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			_positionOffSet = new List<float> { positionOffset.x, positionOffset.y, positionOffset.z };
			_itemHolderPositionOffset = new List<float> { itemHolderPositionOffset.x, itemHolderPositionOffset.y, itemHolderPositionOffset.z };
			boneMap.Clear();
			foreach (MappedBone mappedBone in mappedBones)
			{
				List<string> list = new List<string>();
				list.Add(mappedBone.playerBoneString);
				list.Add(mappedBone.modelBoneString);
				if (mappedBone.rotationOffset != Quaternion.identity)
				{
					list.Add(mappedBone.rotationOffset.x.ToString());
					list.Add(mappedBone.rotationOffset.y.ToString());
					list.Add(mappedBone.rotationOffset.z.ToString());
					list.Add(mappedBone.rotationOffset.w.ToString());
					if (mappedBone.additionalVars.Count > 0)
					{
						foreach (string additionalVar in mappedBone.additionalVars)
						{
							list.Add(additionalVar);
						}
					}
				}
				boneMap.Add(list);
			}
			return JsonConvert.SerializeObject((object)this);
		}

		public void SetBodyReplacement(BodyReplacementBase body)
		{
			replacementBase = body;
		}

		public void MapBones(Transform[] playerBones, Transform[] modelBones)
		{
			//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_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			playerBoneList = playerBones;
			modelBoneList = modelBones;
			if (!boneMap.Where((List<string> x) => x[0] == "PlayerRagdoll(Clone)").Any() && boneMap.Where((List<string> x) => x[0] == "spine").Any())
			{
				List<string> list = new List<string>();
				List<string> list2 = boneMap.Where((List<string> x) => x[0] == "spine").First();
				for (int i = 0; i < list2.Count(); i++)
				{
					if (i == 0)
					{
						list.Add("PlayerRagdoll(Clone)");
					}
					else
					{
						list.Add(list2[i]);
					}
				}
				boneMap.Add(list);
			}
			mappedBones.Clear();
			itemHolderTransform = null;
			if (_positionOffSet.Count == 3)
			{
				positionOffset = new Vector3(_positionOffSet[0], _positionOffSet[1], _positionOffSet[2]);
			}
			if (_itemHolderPositionOffset.Count == 3)
			{
				itemHolderPositionOffset = new Vector3(_itemHolderPositionOffset[0], _itemHolderPositionOffset[1], _itemHolderPositionOffset[2]);
			}
			foreach (List<string> item in boneMap)
			{
				string playerBone = item[0];
				string modelBone = item[1];
				if (modelBone == "")
				{
					continue;
				}
				if (!modelBones.Any((Transform x) => ((Object)x).name == modelBone))
				{
					ModelReplacementAPI.Instance.Logger.LogWarning((object)("No bone in model with name (" + modelBone + ")"));
					continue;
				}
				if (!playerBones.Any((Transform x) => ((Object)x).name == playerBone))
				{
					ModelReplacementAPI.Instance.Logger.LogWarning((object)("No bone in player with name (" + playerBone + ")"));
					continue;
				}
				Transform player = playerBones.Where((Transform x) => ((Object)x).name == playerBone).First();
				Transform model = modelBones.Where((Transform x) => ((Object)x).name == modelBone).First();
				mappedBones.Add(new MappedBone(item, player, model));
			}
			itemHolderTransform = modelBones.Where((Transform x) => ((Object)x).name == itemHolderBone).First();
			rootBoneTransform = modelBones.Where((Transform x) => ((Object)x).name == rootBone).First();
		}

		public void UpdateModelbones()
		{
			mappedBones.ForEach(delegate(MappedBone x)
			{
				bool flag = x.Update();
			});
			List<MappedBone> destroyBones = new List<MappedBone>();
			mappedBones.ForEach(delegate(MappedBone x)
			{
				if (x.Update())
				{
					destroyBones.Add(x);
				}
			});
			destroyBones.ForEach(delegate(MappedBone x)
			{
				mappedBones.Remove(x);
			});
		}

		public bool CompletelyDestroyed()
		{
			if (mappedBones.Count() == 0 || (Object)(object)rootBoneTransform == (Object)null)
			{
				Console.WriteLine("bone Map destroyed");
				return true;
			}
			return false;
		}

		public Vector3 PositionOffset()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return positionOffset;
		}

		public Vector3 ItemHolderPositionOffset()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return itemHolderPositionOffset;
		}

		public Transform ItemHolder()
		{
			return itemHolderTransform;
		}

		public Transform RootBone()
		{
			return rootBoneTransform;
		}

		public Transform GetMappedTransform(string playerTransformName)
		{
			IEnumerable<MappedBone> source = mappedBones.Where((MappedBone x) => x.playerBoneString == playerTransformName);
			if (source.Any())
			{
				return source.First().modelTransform;
			}
			ModelReplacementAPI.Instance.Logger.LogWarning((object)("No mapped bone with player bone name " + playerTransformName));
			return null;
		}

		public MappedBone GetMappedBoneWithPlayerName(string playerTransformName)
		{
			IEnumerable<MappedBone> source = mappedBones.Where((MappedBone x) => x.playerBoneString == playerTransformName);
			if (source.Any())
			{
				return source.First();
			}
			ModelReplacementAPI.Instance.Logger.LogWarning((object)("No mapped bone with player bone name " + playerTransformName));
			return null;
		}

		public List<MappedBone> GetMappedBones()
		{
			return mappedBones;
		}

		public void UpdateMappedBone(string playerBoneString, string modelBoneString, Quaternion rotationOffset)
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			IEnumerable<MappedBone> source = mappedBones.Where((MappedBone x) => x.playerBoneString == playerBoneString);
			if (source.Any())
			{
				MappedBone mappedBoneWithPlayerName = GetMappedBoneWithPlayerName(playerBoneString);
				mappedBoneWithPlayerName.modelBoneString = modelBoneString;
				mappedBoneWithPlayerName.rotationOffset = rotationOffset;
				IEnumerable<Transform> source2 = modelBoneList.Where((Transform x) => ((Object)x).name == modelBoneString);
				if (source2.Any())
				{
					mappedBoneWithPlayerName.modelTransform = source2.First();
				}
				return;
			}
			IEnumerable<Transform> source3 = playerBoneList.Where((Transform x) => ((Object)x).name == playerBoneString);
			IEnumerable<Transform> source4 = modelBoneList.Where((Transform x) => ((Object)x).name == modelBoneString);
			Transform playerTransform = null;
			Transform modelTransform = null;
			if (source3.Any())
			{
				playerTransform = source3.First();
			}
			if (source4.Any())
			{
				modelTransform = source4.First();
			}
			MappedBone item = new MappedBone(playerBoneString, modelBoneString, rotationOffset, playerTransform, modelTransform);
			mappedBones.Add(item);
		}

		public void UpdateRootBoneAndOffset(Transform newRootBone, Vector3 offset)
		{
			//IL_0034: 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 ((Object)(object)newRootBone != (Object)(object)rootBoneTransform)
			{
				rootBoneTransform.parent = null;
				rootBoneTransform = newRootBone;
				rootBone = ((Object)newRootBone).name;
			}
			positionOffset = offset;
			replacementBase.ReparentModel();
		}

		public void UpdateItemHolderBoneAndOffset(Transform newRootBone, Vector3 offset)
		{
			//IL_0015: 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)
			itemHolderTransform = newRootBone;
			itemHolderBone = ((Object)newRootBone).name;
			itemHolderPositionOffset = offset;
			replacementBase.flagReparentObject = true;
		}
	}
	[BepInPlugin("meow.ModelReplacementAPI", "ModelReplacementAPI", "1.2.4")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class ModelReplacementAPI : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(GrabbableObject))]
		public class LocateHeldObjectsOnModelReplacementPatch
		{
			[HarmonyPatch("LateUpdate")]
			[HarmonyPostfix]
			public static void LateUpdatePatch(ref GrabbableObject __instance)
			{
				//IL_0095: Unknown result type (might be due to invalid IL or missing references)
				//IL_009a: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00be: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f0: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0100: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Unknown result type (might be due to invalid IL or missing references)
				//IL_010f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				if (!((Object)(object)__instance.parentObject == (Object)null) && !((Object)(object)__instance.playerHeldBy == (Object)null))
				{
					BodyReplacementBase component = ((Component)__instance.playerHeldBy).gameObject.GetComponent<BodyReplacementBase>();
					if (!((Object)(object)component == (Object)null) && component.RenderBodyReplacement() && (!component.renderLocalDebug || component.renderModel))
					{
						Transform val = component.Map.ItemHolder();
						Vector3 val2 = component.Map.ItemHolderPositionOffset();
						((Component)__instance).transform.rotation = val.rotation;
						((Component)__instance).transform.Rotate(__instance.itemProperties.rotationOffset);
						((Component)__instance).transform.position = val.position;
						Vector3 val3 = __instance.itemProperties.positionOffset + val2;
						val3 = val.rotation * val3;
						Transform transform = ((Component)__instance).transform;
						transform.position += val3;
					}
				}
			}
		}

		[HarmonyPatch(typeof(StartOfRound))]
		public class RepairBrokenBodyReplacementsPatch
		{
			[HarmonyPatch("ReviveDeadPlayers")]
			[HarmonyPostfix]
			public static void ReviveDeadPlayersPatch(ref StartOfRound __instance)
			{
				PlayerControllerB[] allPlayerScripts = __instance.allPlayerScripts;
				foreach (PlayerControllerB val in allPlayerScripts)
				{
					if (val.isPlayerDead && !((Object)(object)((Component)val).gameObject.GetComponent<BodyReplacementBase>() == (Object)null))
					{
						Console.WriteLine("Reinstantiating model replacement for " + val.playerUsername + " ");
						Type type = ((object)((Component)val).gameObject.GetComponent<BodyReplacementBase>()).GetType();
						Object.Destroy((Object)(object)((Component)val).gameObject.GetComponent<BodyReplacementBase>());
						((Component)val).gameObject.AddComponent(type);
					}
				}
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB))]
		public class SetRegisteredBodyReplacements
		{
			[HarmonyPatch("Update")]
			[HarmonyPostfix]
			public static void UpdatePatch(ref PlayerControllerB __instance)
			{
				try
				{
					if (__instance.playerSteamId == 0)
					{
						return;
					}
					if (RegisteredModelReplacementOverride != null)
					{
						SetPlayerModelReplacement(__instance, RegisteredModelReplacementOverride);
						return;
					}
					int currentSuitID = __instance.currentSuitID;
					string unlockableName = StartOfRound.Instance.unlockablesList.unlockables[currentSuitID].unlockableName;
					unlockableName = unlockableName.ToLower().Replace(" ", "");
					if (RegisteredModelReplacements.ContainsKey(unlockableName))
					{
						Type type = RegisteredModelReplacements[unlockableName];
						SetPlayerModelReplacement(__instance, type);
					}
					else
					{
						RemovePlayerModelReplacement(__instance);
					}
				}
				catch (Exception)
				{
				}
			}
		}

		public static bool moreCompanyPresent;

		public static bool thirdPersonPresent;

		public static bool LCthirdPersonPresent;

		public static ModelReplacementAPI Instance;

		public ManualLogSource Logger;

		private static Dictionary<string, Type> RegisteredModelReplacements = new Dictionary<string, Type>();

		private static Type RegisteredModelReplacementOverride = null;

		private void Awake()
		{
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			Logger = Logger.CreateLogSource("ModelReplacementAPI");
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			moreCompanyPresent = Chainloader.PluginInfos.ContainsKey("me.swipez.melonloader.morecompany");
			thirdPersonPresent = Chainloader.PluginInfos.ContainsKey("verity.3rdperson");
			LCthirdPersonPresent = Chainloader.PluginInfos.ContainsKey("LCThirdPerson");
			Harmony val = new Harmony("meow.ModelReplacementAPI");
			val.PatchAll();
			Logger.LogInfo((object)"Plugin meow.ModelReplacementAPI is loaded!");
		}

		public static void RegisterModelReplacementOverride(Type type)
		{
			if (!type.IsSubclassOf(typeof(BodyReplacementBase)))
			{
				Instance.Logger.LogError((object)$"Cannot register body replacement override type {type.GetType()}, must inherit from BodyReplacementBase");
				return;
			}
			if (RegisteredModelReplacementOverride != null)
			{
				Instance.Logger.LogError((object)$"Cannot register body replacement override, already registered to {RegisteredModelReplacementOverride.GetType()}.");
				return;
			}
			Instance.Logger.LogInfo((object)$"Registering body replacement override type {type.GetType()}.");
			RegisteredModelReplacementOverride = type;
		}

		public static void RegisterSuitModelReplacement(string suitNameToReplace, Type type)
		{
			suitNameToReplace = suitNameToReplace.ToLower().Replace(" ", "");
			if (!type.IsSubclassOf(typeof(BodyReplacementBase)))
			{
				Instance.Logger.LogError((object)$"Cannot register body replacement type {type.GetType()}, must inherit from BodyReplacementBase");
				return;
			}
			if (RegisteredModelReplacements.ContainsKey(suitNameToReplace))
			{
				Instance.Logger.LogError((object)$"Cannot register body replacement type {type.GetType()}, suit name to replace {suitNameToReplace} is already registered.");
				return;
			}
			Instance.Logger.LogInfo((object)$"Registering body replacement type {type.GetType()} to suit name {suitNameToReplace}.");
			RegisteredModelReplacements.Add(suitNameToReplace, type);
		}

		public static void SetPlayerModelReplacement(PlayerControllerB player, Type type)
		{
			if (!type.IsSubclassOf(typeof(BodyReplacementBase)))
			{
				Instance.Logger.LogError((object)("Cannot set body replacement of type " + type.Name + ", must inherit from BodyReplacementBase"));
				return;
			}
			BodyReplacementBase component = ((Component)player.thisPlayerBody).gameObject.GetComponent<BodyReplacementBase>();
			if ((Object)(object)component != (Object)null)
			{
				if (((object)component).GetType() == type)
				{
					return;
				}
				if (Object.op_Implicit((Object)(object)component))
				{
					Object.Destroy((Object)(object)component);
				}
			}
			((Component)player.thisPlayerBody).gameObject.AddComponent(type);
		}

		public static void RemovePlayerModelReplacement(PlayerControllerB player)
		{
			BodyReplacementBase component = ((Component)player.thisPlayerBody).gameObject.GetComponent<BodyReplacementBase>();
			if (Object.op_Implicit((Object)(object)component))
			{
				Object.Destroy((Object)(object)component);
			}
		}
	}
}

plugins/burgerflipper-MouthDogMeow/MeowMod.dll

Decompiled a year ago
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using MeowMod.Patches;
using MeowMod.Properties;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MeowMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MeowMod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("6e5645a9-7220-4e45-ab6b-9a82f1ec21ec")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MeowMod
{
	[BepInPlugin("Aries.MeowMod", "Mouth Dog Meow", "1.0.0")]
	public class MeowModBase : BaseUnityPlugin
	{
		private const string modGUID = "Aries.MeowMod";

		private const string modName = "Mouth Dog Meow";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Aries.MeowMod");

		private static MeowModBase Instance;

		internal ManualLogSource val;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			val = Logger.CreateLogSource("Aries.MeowMod");
			val.LogWarning((object)"ICD is online!");
			harmony.PatchAll(typeof(MeowModBase));
			harmony.PatchAll(typeof(MeowPatch));
		}
	}
}
namespace MeowMod.Properties
{
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	internal class Resources
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static ResourceManager ResourceManager
		{
			get
			{
				if (resourceMan == null)
				{
					resourceMan = new ResourceManager("MeowMod.Properties.Resources", typeof(Resources).Assembly);
				}
				return resourceMan;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static CultureInfo Culture
		{
			get
			{
				return resourceCulture;
			}
			set
			{
				resourceCulture = value;
			}
		}

		internal static byte[] meowbundle => (byte[])ResourceManager.GetObject("meowbundle", resourceCulture);

		internal Resources()
		{
		}
	}
}
namespace MeowMod.Patches
{
	[HarmonyPatch(typeof(MouthDogAI))]
	internal class MeowPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void soundPatch(ref AudioClip ___breathingSFX)
		{
			AudioClip val = AssetBundle.LoadFromMemory(Resources.meowbundle).LoadAsset<AudioClip>("Assets/meow.mp3");
			___breathingSFX = val;
		}
	}
}

plugins/CapyCat-Solos_Bodycams/SoloBodycams/SolosBodycams.dll

Decompiled a year ago
using System.Collections;
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 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(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("SolosBodycams")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Solo's Bodycams")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SolosBodycams")]
[assembly: AssemblyTitle("SolosBodycams")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace SolosBodycams;

[BepInPlugin("SolosBodycams", "Solo's Bodycams", "1.0")]
public class Plugin : BaseUnityPlugin
{
	private GameObject ShipExternalCamera = null;

	private int TransformIndexCopy;

	private bool ActivateCamera1 = false;

	private bool ActivateCamera2 = false;

	private bool SwitchedMonitors = false;

	private RenderTexture NewRT;

	private Vector3 CameraOriginalPosition;

	private Quaternion CameraOriginalRotation;

	private string Spine4Addition = "";

	private static Plugin Instance;

	private static ConfigFile CameraPlacementFile { get; set; }

	internal static ConfigEntry<bool> BodycamOrHeadcam { get; set; }

	public void Awake()
	{
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Expected O, but got Unknown
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Expected O, but got Unknown
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
		}
		else if ((Object)(object)Instance != (Object)(object)this)
		{
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
		CameraPlacementFile = new ConfigFile(Paths.ConfigPath + "\\SoloMods\\CameraPlacement.cfg", true);
		BodycamOrHeadcam = CameraPlacementFile.Bind<bool>("CameraPlacement", "Bool", true, "True for HEADCAM, False for BODYCAM");
		((BaseUnityPlugin)this).Logger.LogInfo((object)BodycamOrHeadcam.Value);
		if (BodycamOrHeadcam.Value)
		{
			Spine4Addition = "/spine.004";
		}
		else
		{
			Spine4Addition = "";
		}
		Object.DontDestroyOnLoad((Object)((Component)this).gameObject);
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin SolosBodycams is loaded!");
		SceneManager.sceneLoaded += OnSceneLoaded;
	}

	public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
	{
		ActivateCamera2 = false;
		if (!(((Scene)(ref scene)).name == "MainMenu") && !(((Scene)(ref scene)).name == "InitScene") && !(((Scene)(ref scene)).name == "InitSceneLaunchOptions"))
		{
			ActivateCamera1 = true;
			((MonoBehaviour)this).StartCoroutine(LoadSceneEnter());
		}
		else
		{
			ActivateCamera1 = false;
			SwitchedMonitors = false;
		}
	}

	private IEnumerator LoadSceneEnter()
	{
		yield return (object)new WaitForSeconds(5f);
		ActivateCamera2 = true;
		if (!((Object)(object)GameObject.Find("Environment/HangarShip/Cameras/ShipCamera") == (Object)null) && !SwitchedMonitors)
		{
			NewRT = new RenderTexture(160, 120, 32, (RenderTextureFormat)0);
			((Renderer)GameObject.Find("Environment/HangarShip/ShipModels2b/MonitorWall/Cube").GetComponent<MeshRenderer>()).materials[2].mainTexture = ((Renderer)GameObject.Find("Environment/HangarShip/ShipModels2b/MonitorWall/Cube.001").GetComponent<MeshRenderer>()).materials[2].mainTexture;
			((Renderer)GameObject.Find("Environment/HangarShip/ShipModels2b/MonitorWall/Cube.001").GetComponent<MeshRenderer>()).materials[2].mainTexture = (Texture)(object)NewRT;
			if ((Object)(object)ShipExternalCamera == (Object)null)
			{
				ShipExternalCamera = Object.Instantiate<GameObject>(GameObject.Find("Environment/HangarShip/Cameras/ShipCamera"));
				ShipExternalCamera.transform.SetParent(GameObject.Find("Environment/HangarShip/Cameras/ShipCamera").transform.parent);
				ShipExternalCamera.transform.SetLocalPositionAndRotation(GameObject.Find("Environment/HangarShip/Cameras/ShipCamera").transform.localPosition, GameObject.Find("Environment/HangarShip/Cameras/ShipCamera").transform.localRotation);
				ShipExternalCamera.AddComponent<Camera>();
				CameraOriginalPosition = ShipExternalCamera.transform.localPosition;
				CameraOriginalRotation = ShipExternalCamera.transform.localRotation;
				Object.Destroy((Object)(object)((Component)ShipExternalCamera.transform.Find("VolumeMain (1)")).GetComponent<BoxCollider>());
				Object.Destroy((Object)(object)ShipExternalCamera.GetComponent<Animator>());
				Object.Destroy((Object)(object)ShipExternalCamera.GetComponent<MeshRenderer>());
			}
			ShipExternalCamera.GetComponent<Camera>().targetTexture = NewRT;
			SwitchedMonitors = true;
		}
	}

	public void Update()
	{
		//IL_01da: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ee: 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_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0212: Unknown result type (might be due to invalid IL or missing references)
		//IL_0217: 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_009f: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: 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_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_0189: 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_01a2: Unknown result type (might be due to invalid IL or missing references)
		if (!ActivateCamera1 || !ActivateCamera2)
		{
			return;
		}
		TransformIndexCopy = GameObject.Find("Environment/HangarShip/ShipModels2b/MonitorWall/Cube.001/CameraMonitorScript").GetComponent<ManualCameraRenderer>().targetTransformIndex;
		TransformAndName val = GameObject.Find("Environment/HangarShip/ShipModels2b/MonitorWall/Cube.001/CameraMonitorScript").GetComponent<ManualCameraRenderer>().radarTargets[TransformIndexCopy];
		if (!val.isNonPlayer)
		{
			ShipExternalCamera.transform.SetPositionAndRotation(val.transform.Find("ScavengerModel/metarig/spine/spine.001/spine.002/spine.003" + Spine4Addition).position + new Vector3(0f, 0.1f, 0f), val.transform.Find("ScavengerModel/metarig/spine/spine.001/spine.002/spine.003" + Spine4Addition).rotation * Quaternion.Euler(0f, 0f, 0f));
			DeadBodyInfo[] array = Object.FindObjectsOfType<DeadBodyInfo>();
			for (int i = 0; i < array.Length; i++)
			{
				if (array[i].playerScript.playerUsername == val.name)
				{
					ShipExternalCamera.transform.SetPositionAndRotation(((Component)array[i]).gameObject.transform.Find("spine.001/spine.002/spine.003" + Spine4Addition).position + new Vector3(0f, 0.1f, 0f), ((Component)array[i]).gameObject.transform.Find("spine.001/spine.002/spine.003" + Spine4Addition).rotation * Quaternion.Euler(0f, 0f, 0f));
				}
			}
		}
		else
		{
			ShipExternalCamera.transform.SetPositionAndRotation(val.transform.position + new Vector3(0f, 1.6f, 0f), val.transform.rotation * Quaternion.Euler(0f, -90f, 0f));
		}
	}
}
public static class PluginInfo
{
	public const string PLUGIN_GUID = "SolosBodycams";

	public const string PLUGIN_NAME = "SolosBodycams";

	public const string PLUGIN_VERSION = "1.0.0";
}

plugins/Cerzix-GamersSuitMod/GamersSuit.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 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: AssemblyTitle("GamersSuit")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GamersSuit")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("2a6f062c-6cbd-40eb-ba5f-a5904bb66676")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace GamersSuit;

[BepInPlugin("Cerzix.GamersSuitMod", "Gamers Suit Mod", "0.0.1")]
public class GamersSuitModBase : BaseUnityPlugin
{
	[HarmonyPatch(typeof(StartOfRound))]
	internal class StartOfRoundPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPrefix]
		private static void StartPatch(ref StartOfRound __instance)
		{
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Expected O, but got Unknown
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Expected O, but got Unknown
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (SuitsAdded)
				{
					return;
				}
				for (int i = 0; i < __instance.unlockablesList.unlockables.Count; i++)
				{
					UnlockableItem val = __instance.unlockablesList.unlockables[i];
					if (!((Object)(object)val.suitMaterial != (Object)null) || !val.alreadyUnlocked)
					{
						continue;
					}
					List<string> list = Directory.GetDirectories(Paths.PluginPath, "gamerssuit", SearchOption.AllDirectories).ToList();
					List<string> list2 = new List<string>();
					List<string> list3 = new List<string>();
					foreach (string item in list)
					{
						if (item != "")
						{
							string[] files = Directory.GetFiles(item, "*.png");
							Debug.Log((object)("Found file " + item));
							list2.AddRange(files);
						}
					}
					list2.Sort();
					foreach (string item2 in list2)
					{
						string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
						UnlockableItem val2;
						Material val3;
						if (Path.GetFileNameWithoutExtension(item2).ToLower() == "default")
						{
							val2 = val;
							val3 = val2.suitMaterial;
						}
						else
						{
							Debug.Log((object)"Making new suit");
							string text = JsonUtility.ToJson((object)val);
							val2 = JsonUtility.FromJson<UnlockableItem>(text);
							val3 = Object.Instantiate<Material>(val2.suitMaterial);
						}
						byte[] array = File.ReadAllBytes(item2);
						Texture2D val4 = new Texture2D(2, 2);
						ImageConversion.LoadImage(val4, array);
						val3.mainTexture = (Texture)(object)val4;
						val2.unlockableName = Path.GetFileNameWithoutExtension(item2);
						try
						{
							string path = Path.Combine(Path.GetDirectoryName(item2), "advanced", val2.unlockableName + ".json");
							if (File.Exists(path))
							{
								string[] array2 = File.ReadAllLines(path);
								string[] array3 = array2;
								foreach (string text2 in array3)
								{
									string[] array4 = text2.Trim().Split(new char[1] { ':' });
									if (array4.Length != 2)
									{
										continue;
									}
									string text3 = array4[0].Trim('"', ' ', ',');
									string text4 = array4[1].Trim('"', ' ', ',');
									float result2;
									Vector4 vector;
									if (text3 == "PRICE" && int.TryParse(text4, out var result))
									{
										try
										{
											AddToRotatingShop(val2, result, __instance.unlockablesList.unlockables.Count);
										}
										catch (Exception ex)
										{
											Debug.Log((object)("Something went wrong with More Suits! Could not add a suit to the rotating shop. Error: " + ex));
										}
									}
									else if (text4 == "KEYWORD")
									{
										val3.EnableKeyword(text3);
									}
									else if (text4.Contains(".png"))
									{
										string path2 = Path.Combine(Path.GetDirectoryName(item2), "advanced", text4);
										byte[] array5 = File.ReadAllBytes(path2);
										Texture2D val5 = new Texture2D(2, 2);
										ImageConversion.LoadImage(val5, array5);
										val3.SetTexture(text3, (Texture)(object)val5);
									}
									else if (float.TryParse(text4, out result2))
									{
										val3.SetFloat(text3, result2);
									}
									else if (TryParseVector4(text4, out vector))
									{
										val3.SetVector(text3, vector);
									}
								}
							}
						}
						catch (Exception ex2)
						{
							Debug.Log((object)("Something went wrong with More Suits! Error: " + ex2));
						}
						val2.suitMaterial = val3;
						if (val2.unlockableName.ToLower() != "default")
						{
							__instance.unlockablesList.unlockables.Add(val2);
						}
					}
					SuitsAdded = true;
					break;
				}
			}
			catch (Exception ex3)
			{
				Debug.Log((object)("Something went wrong with More Suits! Error: " + ex3));
			}
		}

		[HarmonyPatch("PositionSuitsOnRack")]
		[HarmonyPrefix]
		private static bool PositionSuitsOnRackPatch(ref StartOfRound __instance)
		{
			//IL_0072: 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_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_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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			List<UnlockableSuit> source = Object.FindObjectsOfType<UnlockableSuit>().ToList();
			source = source.OrderBy((UnlockableSuit suit) => suit.syncedSuitID.Value).ToList();
			int num = 0;
			foreach (UnlockableSuit item in source)
			{
				AutoParentToShip component = ((Component)item).gameObject.GetComponent<AutoParentToShip>();
				component.overrideOffset = true;
				component.positionOffset = new Vector3(-2.45f, 2.75f, -8.41f) + __instance.rightmostSuitPosition.forward * 0.18f * (float)num;
				component.rotationOffset = new Vector3(0f, 90f, 0f);
				num++;
			}
			return false;
		}
	}

	private const string modGuid = "Cerzix.GamersSuitMod";

	private const string modName = "Gamers Suit Mod";

	private const string modVersion = "0.0.1";

	private readonly Harmony harmony = new Harmony("Cerzix.GamersSuitMod");

	public static bool SuitsAdded;

	private static GamersSuitModBase Instance;

	private static TerminalNode cancelPurchase;

	private static TerminalKeyword buyKeyword;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Gamers Suit Mod is loaded!");
	}

	private static void AddToRotatingShop(UnlockableItem newSuit, int price, int unlockableID)
	{
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Expected O, but got Unknown
		//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c7: Expected O, but got Unknown
		//IL_0293: Unknown result type (might be due to invalid IL or missing references)
		//IL_029a: Expected O, but got Unknown
		Terminal val = Object.FindObjectOfType<Terminal>();
		for (int i = 0; i < val.terminalNodes.allKeywords.Length; i++)
		{
			if (((Object)val.terminalNodes.allKeywords[i]).name == "Buy")
			{
				buyKeyword = val.terminalNodes.allKeywords[i];
				break;
			}
		}
		newSuit.alreadyUnlocked = false;
		newSuit.shopSelectionNode = ScriptableObject.CreateInstance<TerminalNode>();
		((Object)newSuit.shopSelectionNode).name = newSuit.unlockableName + "SuitBuy1";
		newSuit.shopSelectionNode.creatureName = newSuit.unlockableName + " suit";
		newSuit.shopSelectionNode.displayText = "You have requested to order " + newSuit.unlockableName + " suits.\nTotal cost of item: [totalCost].\n\nPlease CONFIRM or DENY.\n\n";
		newSuit.shopSelectionNode.clearPreviousText = true;
		newSuit.shopSelectionNode.shipUnlockableID = unlockableID;
		newSuit.shopSelectionNode.itemCost = price;
		newSuit.shopSelectionNode.overrideOptions = true;
		CompatibleNoun val2 = new CompatibleNoun();
		val2.noun = ScriptableObject.CreateInstance<TerminalKeyword>();
		val2.noun.word = "confirm";
		val2.noun.isVerb = true;
		val2.result = ScriptableObject.CreateInstance<TerminalNode>();
		((Object)val2.result).name = newSuit.unlockableName + "SuitBuyConfirm";
		val2.result.creatureName = "";
		val2.result.displayText = "Ordered " + newSuit.unlockableName + " suits! Your new balance is [playerCredits].\n\n";
		val2.result.clearPreviousText = true;
		val2.result.shipUnlockableID = unlockableID;
		val2.result.buyUnlockable = true;
		val2.result.itemCost = price;
		val2.result.terminalEvent = "";
		CompatibleNoun val3 = new CompatibleNoun();
		val3.noun = ScriptableObject.CreateInstance<TerminalKeyword>();
		val3.noun.word = "deny";
		val3.noun.isVerb = true;
		if ((Object)(object)cancelPurchase == (Object)null)
		{
			cancelPurchase = ScriptableObject.CreateInstance<TerminalNode>();
		}
		val3.result = cancelPurchase;
		((Object)val3.result).name = "MoreSuitsCancelPurchase";
		val3.result.displayText = "Cancelled order.\n";
		newSuit.shopSelectionNode.terminalOptions = (CompatibleNoun[])(object)new CompatibleNoun[2] { val2, val3 };
		TerminalKeyword val4 = ScriptableObject.CreateInstance<TerminalKeyword>();
		((Object)val4).name = newSuit.unlockableName + "Suit";
		val4.word = newSuit.unlockableName.ToLower() + " suit";
		val4.defaultVerb = buyKeyword;
		CompatibleNoun val5 = new CompatibleNoun();
		val5.noun = val4;
		val5.result = newSuit.shopSelectionNode;
		List<CompatibleNoun> list = buyKeyword.compatibleNouns.ToList();
		list.Add(val5);
		buyKeyword.compatibleNouns = list.ToArray();
		List<TerminalKeyword> list2 = val.terminalNodes.allKeywords.ToList();
		list2.Add(val4);
		list2.Add(val2.noun);
		list2.Add(val3.noun);
		val.terminalNodes.allKeywords = list2.ToArray();
	}

	public static bool TryParseVector4(string input, out Vector4 vector)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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)
		vector = Vector4.zero;
		string[] array = input.Split(new char[1] { ',' });
		if (array.Length == 4 && float.TryParse(array[0], out var result) && float.TryParse(array[1], out var result2) && float.TryParse(array[2], out var result3) && float.TryParse(array[3], out var result4))
		{
			vector = new Vector4(result, result2, result3, result4);
			return true;
		}
		return false;
	}
}

plugins/CodeEnder-Custom_Boombox_Fix/CustomBoomboxFix.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 Microsoft.CodeAnalysis;

[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("CustomBoomboxFix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("CustomBoomboxFix")]
[assembly: AssemblyTitle("CustomBoomboxFix")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace CustomBoomboxFix
{
	[BepInPlugin("CustomBoomboxFix", "CustomBoomboxFix", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private string CustomSongsPluginPath => Path.Combine(Paths.PluginPath, "Custom Songs");

		private string TargetPath => Path.Combine(Paths.BepInExRootPath, "Custom Songs", "Boombox Music");

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin CustomBoomboxFix is loaded!");
			CreatePluginCustomSongsFolder();
			DeleteAllFilesInTargetPath();
			SearchAndCopyCustomSongs();
			CopyMusicFiles();
		}

		private void CreatePluginCustomSongsFolder()
		{
			if (!Directory.Exists(CustomSongsPluginPath))
			{
				Directory.CreateDirectory(CustomSongsPluginPath);
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Created 'Custom Songs' folder in plugin directory.");
			}
		}

		private void CopyMusicFiles()
		{
			if (!Directory.Exists(TargetPath))
			{
				Directory.CreateDirectory(TargetPath);
			}
			IEnumerable<string> enumerable = Directory.GetFiles(CustomSongsPluginPath, "*.mp3").Concat(Directory.GetFiles(CustomSongsPluginPath, "*.wav"));
			foreach (string item in enumerable)
			{
				string fileName = Path.GetFileName(item);
				string text = Path.Combine(TargetPath, fileName);
				if (!File.Exists(text))
				{
					File.Copy(item, text);
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Copied " + fileName + " to Boombox Music folder."));
				}
			}
		}

		private void DeleteAllFilesInTargetPath()
		{
			try
			{
				if (Directory.Exists(TargetPath))
				{
					string[] files = Directory.GetFiles(TargetPath);
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Deleting files in '" + TargetPath + "'..."));
					string[] array = files;
					foreach (string path in array)
					{
						File.Delete(path);
					}
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Deleted files in '" + TargetPath + "'"));
				}
				else
				{
					((BaseUnityPlugin)this).Logger.LogWarning((object)("Target path '" + TargetPath + "' does not exist."));
				}
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("An error occurred while trying to delete files: " + ex.Message));
			}
		}

		private void SearchAndCopyCustomSongs()
		{
			string[] directories = Directory.GetDirectories(Paths.PluginPath);
			string[] array = directories;
			foreach (string path in array)
			{
				string text = Path.Combine(path, "Custom Songs");
				if (!Directory.Exists(text))
				{
					continue;
				}
				IEnumerable<string> enumerable = Directory.GetFiles(text, "*.mp3").Concat(Directory.GetFiles(text, "*.wav"));
				foreach (string item in enumerable)
				{
					string fileName = Path.GetFileName(item);
					string text2 = Path.Combine(TargetPath, fileName);
					if (!File.Exists(text2))
					{
						File.Copy(item, text2);
						((BaseUnityPlugin)this).Logger.LogInfo((object)("Copied " + fileName + " from " + text + " to Boombox Music folder."));
					}
				}
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "CustomBoomboxFix";

		public const string PLUGIN_NAME = "CustomBoomboxFix";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}

plugins/e3s1-BetterLadders/BetterLadders.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 GameNetcodeStuff;
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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BetterLadders")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Alter ladder speed and allow usage with two-handed items")]
[assembly: AssemblyFileVersion("1.2.2.0")]
[assembly: AssemblyInformationalVersion("1.2.2+4e336194702dafb39ba0bcd49e40783f8d68645b")]
[assembly: AssemblyProduct("BetterLadders")]
[assembly: AssemblyTitle("BetterLadders")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.2.2.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 BetterLadders
{
	[BepInPlugin("e3s1.BetterLadders", "BetterLadders", "1.2.2")]
	public class BetterLadders : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(PlayerControllerB))]
		internal class PlayerControllerBPatch
		{
			[HarmonyPatch("Update")]
			[HarmonyPostfix]
			private static void LadderClimbSpeedPatch(ref bool ___isSprinting, ref float ___climbSpeed, ref bool ___isClimbingLadder, ref PlayerControllerB __instance)
			{
				if (___isClimbingLadder)
				{
					float num = ((!___isSprinting) ? (4f * Instance.configClimbSpeedMultiplier.Value) : (4f * Instance.configClimbSpeedMultiplier.Value * Instance.configClimbSprintSpeedMultiplier.Value));
					float num2 = num / 4f;
					___climbSpeed = num;
					if (Instance.configScaleAnimationSpeed.Value && __instance.playerBodyAnimator.GetFloat("animationSpeed") != 0f)
					{
						__instance.playerBodyAnimator.SetFloat("animationSpeed", num2);
					}
				}
			}

			[HarmonyPatch("Interact_performed")]
			[HarmonyPrefix]
			private static void LadderTwoHandedAccessPatch(ref InteractTrigger ___hoveringOverTrigger, ref bool ___twoHanded)
			{
				if ((Instance.configAllowTwoHanded.Value && (Object)(object)___hoveringOverTrigger != (Object)null && ___hoveringOverTrigger.isLadder) & ___twoHanded)
				{
					___hoveringOverTrigger.twoHandedItemAllowed = true;
					___hoveringOverTrigger.specialCharacterAnimation = false;
					___hoveringOverTrigger.hidePlayerItem = true;
				}
			}

			[HarmonyPatch("SetHoverTipAndCurrentInteractTrigger")]
			[HarmonyPostfix]
			private static void LadderHandsFullTipPatch(ref PlayerControllerB __instance, ref InteractTrigger ___hoveringOverTrigger, ref bool ___isHoldingInteract, ref bool ___twoHanded)
			{
				if (((Instance.configAllowTwoHanded.Value && (Object)(object)___hoveringOverTrigger != (Object)null) & ___isHoldingInteract & ___twoHanded) && ___hoveringOverTrigger.isLadder)
				{
					((TMP_Text)__instance.cursorTip).text = ___hoveringOverTrigger.hoverTip.Replace("[LMB]", "[E]");
				}
			}

			[HarmonyPatch("SwitchToItemSlot")]
			[HarmonyPostfix]
			private static void LadderHeldItemVisibilityPatch(ref PlayerControllerB __instance)
			{
				LadderItemVisibility.Set(ref __instance.isClimbingLadder);
			}
		}

		[HarmonyPatch(typeof(InteractTrigger))]
		internal class InteractTriggerPatch
		{
			[HarmonyPatch("SetUsingLadderOnLocalClient")]
			[HarmonyPostfix]
			private static void LadderHeldItemVisibilityPatch(ref bool ___usingLadder)
			{
				LadderItemVisibility.Set(ref ___usingLadder);
			}
		}

		internal static class LadderItemVisibility
		{
			public static void Set(ref bool ___usingLadder)
			{
				PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
				if (localPlayerController.isHoldingObject && ((Instance.configAllowTwoHanded.Value && Instance.configHideTwoHanded.Value && localPlayerController.twoHanded) || (Instance.configHideOneHanded.Value && !localPlayerController.twoHanded)))
				{
					localPlayerController.currentlyHeldObjectServer.EnableItemMeshes(!___usingLadder);
					((BaseUnityPlugin)Instance).Logger.LogInfo((object)$"Held item mesh set to {!___usingLadder}");
				}
			}
		}

		private readonly Harmony harmony = new Harmony("e3s1.BetterLadders");

		public static BetterLadders Instance;

		public const string GUID = "e3s1.BetterLadders";

		public const string NAME = "BetterLadders";

		public const string VERSION = "1.2.2";

		private ConfigEntry<float> configClimbSpeedMultiplier;

		private ConfigEntry<float> configClimbSprintSpeedMultiplier;

		private ConfigEntry<bool> configAllowTwoHanded;

		private ConfigEntry<bool> configScaleAnimationSpeed;

		private ConfigEntry<bool> configHideOneHanded;

		private ConfigEntry<bool> configHideTwoHanded;

		private void Awake()
		{
			Instance = this;
			configClimbSpeedMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("General", "climbSpeedMultipler", 1f, "Ladder climb speed multiplier");
			configClimbSprintSpeedMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("General", "sprintingClimbSpeedMultiplier", 1.25f, "Ladder climb speed multiplier while sprinting, stacks with climbSpeedMultiplier");
			configAllowTwoHanded = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "allowTwoHanded", true, "Whether to allow using ladders while carrying a two-handed object");
			configScaleAnimationSpeed = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "scaleAnimationSpeed", true, "Whether to scale the speed of the climbing animation to the climbing speed");
			configHideOneHanded = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "hideOneHanded", true, "Whether to hide one-handed items while climbing a ladder - false in vanilla");
			configHideTwoHanded = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "hideTwoHanded", true, "Whether to hide two-handed items while climbing a ladder");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"BetterLadders loaded!");
			harmony.PatchAll(typeof(BetterLadders));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
			harmony.PatchAll(typeof(InteractTriggerPatch));
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "BetterLadders";

		public const string PLUGIN_NAME = "BetterLadders";

		public const string PLUGIN_VERSION = "1.2.2";
	}
}

plugins/egeadam-MoreScreams/MoreScreams.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.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Dissonance.Audio.Playback;
using GameNetcodeStuff;
using HarmonyLib;
using MoreScreams.Configuration;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MoreScreams")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MoreScreams")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ba7e5619-9c03-4b8d-9888-381fda81ea0f")]
[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 MoreScreams
{
	[BepInPlugin("egeadam.MoreScreams", "MoreScreams", "1.0.2")]
	public class MoreScreams : BaseUnityPlugin
	{
		private const string modGUID = "egeadam.MoreScreams";

		private const string modName = "MoreScreams";

		private const string modVersion = "1.0.2";

		private readonly Harmony harmony = new Harmony("egeadam.MoreScreams");

		private static MoreScreams Instance;

		internal static ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("egeadam.MoreScreams");
			Config.Init();
			harmony.PatchAll();
		}
	}
}
namespace MoreScreams.Patches
{
	public class AudioConfig
	{
		private PlayerControllerB playerControllerB;

		private float shutUpAt;

		private bool lowPassFilter;

		private bool highPassFilter;

		private float panStereo;

		private float playerVoicePitchTargets;

		private float playerPitch;

		private float spatialBlend;

		private bool set2D;

		private float volume;

		public bool IsAliveOrShuttedUp
		{
			get
			{
				if (!(shutUpAt < Time.time))
				{
					return !playerControllerB.isPlayerDead;
				}
				return true;
			}
		}

		public float ShutUpAt => shutUpAt;

		public bool LowPassFilter => lowPassFilter;

		public bool HighPassFilter => highPassFilter;

		public float PanStereo => panStereo;

		public float PlayerVoicePitchTargets => playerVoicePitchTargets;

		public float PlayerPitch => playerPitch;

		public float SpatialBlend => spatialBlend;

		public bool Set2D => set2D;

		public float Volume => volume;

		public Transform DeadBodyT => ((Component)playerControllerB.deadBody).transform;

		public Transform AudioSourceT => ((Component)playerControllerB.currentVoiceChatAudioSource).transform;

		public AudioConfig(PlayerControllerB playerControllerB, float shutUpAt, bool lowPassFilter, bool highPassFilter, float panStereo, float playerVoicePitchTargets, float playerPitch, float spatialBlend, bool set2D, float volume)
		{
			this.playerControllerB = playerControllerB;
			this.shutUpAt = shutUpAt;
			this.lowPassFilter = lowPassFilter;
			this.highPassFilter = highPassFilter;
			this.panStereo = panStereo;
			this.playerVoicePitchTargets = playerVoicePitchTargets;
			this.playerPitch = playerPitch;
			this.spatialBlend = spatialBlend;
			this.set2D = set2D;
			this.volume = volume;
		}
	}
	[HarmonyPatch(typeof(StartOfRound), "UpdatePlayerVoiceEffects")]
	internal class UpdatePlayerVoiceEffectsPatch
	{
		private static bool updateStarted = false;

		private static Dictionary<PlayerControllerB, AudioConfig> configs = new Dictionary<PlayerControllerB, AudioConfig>();

		public static Dictionary<PlayerControllerB, AudioConfig> Configs => configs;

		[HarmonyBefore(new string[] { "BiggerLobby" })]
		private static void Prefix()
		{
			if (configs == null)
			{
				configs = new Dictionary<PlayerControllerB, AudioConfig>();
			}
			if (!updateStarted)
			{
				((MonoBehaviour)HUDManager.Instance).StartCoroutine(UpdateNumerator());
				updateStarted = true;
			}
			if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || (Object)(object)StartOfRound.Instance == (Object)null || StartOfRound.Instance.allPlayerScripts == null)
			{
				return;
			}
			for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++)
			{
				PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i];
				if (!((Object)(object)val == (Object)null) && (val.isPlayerControlled || val.isPlayerDead) && (Object)(object)val != (Object)(object)GameNetworkManager.Instance.localPlayerController)
				{
					AudioSource currentVoiceChatAudioSource = val.currentVoiceChatAudioSource;
					if (!((Object)(object)currentVoiceChatAudioSource == (Object)null) && val.isPlayerDead && !configs.ContainsKey(val))
					{
						Dictionary<PlayerControllerB, AudioConfig> dictionary = configs;
						float shutUpAt = Time.time + Config.ShutUpAfter;
						bool enabled = ((Behaviour)((Component)currentVoiceChatAudioSource).GetComponent<AudioLowPassFilter>()).enabled;
						bool enabled2 = ((Behaviour)((Component)currentVoiceChatAudioSource).GetComponent<AudioHighPassFilter>()).enabled;
						float panStereo = (currentVoiceChatAudioSource.panStereo = 0f);
						dictionary.Add(val, new AudioConfig(val, shutUpAt, enabled, enabled2, panStereo, SoundManager.Instance.playerVoicePitchTargets[(int)(IntPtr)(long)val.playerClientId], GetPitch(val), currentVoiceChatAudioSource.spatialBlend, val.currentVoiceChatIngameSettings.set2D, val.voicePlayerState.Volume));
					}
				}
			}
		}

		private static void Postfix()
		{
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			if (configs == null)
			{
				configs = new Dictionary<PlayerControllerB, AudioConfig>();
			}
			if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)
			{
				return;
			}
			PlayerControllerB[] array = configs.Keys.ToArray();
			foreach (PlayerControllerB val in array)
			{
				if ((Object)(object)val == (Object)null)
				{
					continue;
				}
				AudioConfig audioConfig = configs[val];
				if (audioConfig == null)
				{
					continue;
				}
				if ((val.isPlayerControlled || val.isPlayerDead) && !((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController))
				{
					if ((Object)(object)val.currentVoiceChatAudioSource == (Object)null)
					{
						continue;
					}
					AudioSource currentVoiceChatAudioSource = val.currentVoiceChatAudioSource;
					if (!audioConfig.IsAliveOrShuttedUp)
					{
						if ((Object)(object)val.deadBody != (Object)null)
						{
							((Component)currentVoiceChatAudioSource).transform.position = ((Component)val.deadBody).transform.position;
						}
						currentVoiceChatAudioSource.panStereo = audioConfig.PanStereo;
						currentVoiceChatAudioSource.spatialBlend = audioConfig.SpatialBlend;
						AudioLowPassFilter component = ((Component)currentVoiceChatAudioSource).GetComponent<AudioLowPassFilter>();
						AudioHighPassFilter component2 = ((Component)currentVoiceChatAudioSource).GetComponent<AudioHighPassFilter>();
						if ((Object)(object)component != (Object)null)
						{
							((Behaviour)component).enabled = audioConfig.LowPassFilter;
						}
						if ((Object)(object)component2 != (Object)null)
						{
							((Behaviour)component2).enabled = audioConfig.HighPassFilter;
						}
						if ((Object)(object)SoundManager.Instance != (Object)null)
						{
							SoundManager.Instance.playerVoicePitchTargets[(int)(IntPtr)(long)val.playerClientId] = audioConfig.PlayerVoicePitchTargets;
							SoundManager.Instance.SetPlayerPitch(audioConfig.PlayerPitch, (int)val.playerClientId);
						}
						val.currentVoiceChatIngameSettings.set2D = audioConfig.Set2D;
						val.voicePlayerState.Volume = audioConfig.Volume;
						val.currentVoiceChatAudioSource.volume = audioConfig.Volume;
					}
				}
				else if (!val.isPlayerDead)
				{
					configs.Remove(val);
				}
			}
		}

		private static IEnumerator UpdateNumerator()
		{
			yield return 0;
			while (true)
			{
				UpdatePlayersStatus();
				yield return (object)new WaitForFixedUpdate();
			}
		}

		private static void UpdatePlayersStatus()
		{
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			if (configs == null)
			{
				return;
			}
			bool flag = false;
			KeyValuePair<PlayerControllerB, AudioConfig>[] array = configs.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				KeyValuePair<PlayerControllerB, AudioConfig> keyValuePair = array[i];
				if (!((Object)(object)keyValuePair.Key == (Object)null))
				{
					if (!keyValuePair.Key.isPlayerDead)
					{
						configs.Remove(keyValuePair.Key);
						flag = true;
					}
					else if ((Object)(object)keyValuePair.Value.DeadBodyT != (Object)null && (Object)(object)keyValuePair.Value.AudioSourceT != (Object)null)
					{
						keyValuePair.Value.AudioSourceT.position = keyValuePair.Value.DeadBodyT.position;
					}
				}
			}
			if (flag)
			{
				StartOfRound.Instance.UpdatePlayerVoiceEffects();
			}
		}

		private static float GetPitch(PlayerControllerB playerControllerB)
		{
			int num = (int)playerControllerB.playerClientId;
			float result = default(float);
			SoundManager.Instance.diageticMixer.GetFloat($"PlayerPitch{num}", ref result);
			return result;
		}
	}
	[HarmonyPatch]
	internal class DissonancePatch
	{
		public static MethodBase TargetMethod()
		{
			return AccessTools.FirstMethod(typeof(VoicePlayback), (Func<MethodInfo, bool>)((MethodInfo method) => method.Name.Contains("SetTransform")));
		}

		private static bool Prefix(object __instance)
		{
			foreach (AudioConfig value in UpdatePlayerVoiceEffectsPatch.Configs.Values)
			{
				if (!value.IsAliveOrShuttedUp && ((object)((Component)((__instance is VoicePlayback) ? __instance : null)).transform).Equals((object?)value.AudioSourceT))
				{
					return false;
				}
			}
			return true;
		}
	}
}
namespace MoreScreams.Configuration
{
	internal static class Config
	{
		private const string CONFIG_FILE_NAME = "MoreScreams.cfg";

		private static ConfigFile config;

		private static ConfigEntry<float> shutUpAfter;

		public static float ShutUpAfter => shutUpAfter.Value;

		public static void Init()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			config = new ConfigFile(Path.Combine(Paths.ConfigPath, "MoreScreams.cfg"), true);
			shutUpAfter = config.Bind<float>("Config", "Shut up after", 2f, "Mutes death player after given seconds.");
		}
	}
}

plugins/EladNLG-EladsHUD/EladsHUD.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.Bootstrap;
using CustomHUD;
using GameNetcodeStuff;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using TMPro;
using Unity.Netcode;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("EladsHUD")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Custom HUD for lethal company :]")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyInformationalVersion("1.1.0")]
[assembly: AssemblyProduct("EladsHUD")]
[assembly: AssemblyTitle("EladsHUD")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
internal class CustomHUD_Mono : MonoBehaviour
{
	public static CustomHUD_Mono instance;

	[Header("Health")]
	public CanvasGroup healthGroup;

	public Image healthBar;

	public TextMeshProUGUI healthText;

	[Header("Stamina")]
	public CanvasGroup staminaGroup;

	public Image staminaBar;

	public Image staminaBarChangeFG;

	public TextMeshProUGUI staminaText;

	public TextMeshProUGUI carryText;

	[Header("Battery")]
	public CanvasGroup batteryGroup;

	public Image batteryBar;

	public TextMeshProUGUI batteryText;

	[Header("Flashlight")]
	public CanvasGroup flashlightGroup;

	public Image flashlightBar;

	public TextMeshProUGUI flashlightText;

	private Color staminaColor;

	private Color staminaWarnColor = new Color(255f, 0f, 0f);

	private float colorLerp;

	private int lastHealth = 100;

	private float lastHealthChange = 0f;

	private void Awake()
	{
		if ((Object)(object)instance != (Object)null)
		{
			throw new Exception("2 instances of CustomHUD_Mono!");
		}
		instance = this;
	}

	private void Start()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		staminaColor = ((Graphic)staminaBar).color;
	}

	public void UpdateFromPlayer(PlayerControllerB player)
	{
		//IL_017d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0183: Unknown result type (might be due to invalid IL or missing references)
		//IL_018e: 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_01f9: 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_024f: Unknown result type (might be due to invalid IL or missing references)
		lastHealthChange += Time.deltaTime;
		if (lastHealth != player.health)
		{
			lastHealth = player.health;
			lastHealthChange = 0f;
		}
		bool privateField = player.GetPrivateField<bool>("isWalking");
		int health = player.health;
		float sprintMeter = player.sprintMeter;
		float sprintTime = player.sprintTime;
		float num = 1f;
		if ((double)player.drunkness > 0.019999999552965164)
		{
			num *= Mathf.Abs(StartOfRound.Instance.drunknessSpeedEffect.Evaluate(player.drunkness) - 1.25f);
		}
		float num2 = (player.isSprinting ? (-1f / sprintTime * player.carryWeight * num) : ((player.isMovementHindered > 0 && privateField) ? (-1f / sprintTime * num * 0.5f) : ((!privateField) ? (1f / (sprintTime + 4f) * num) : (1f / (sprintTime + 9f) * num))));
		float num3 = num2 * 100f;
		if ((double)sprintMeter < 0.3)
		{
			colorLerp = Mathf.Clamp01(colorLerp + Time.deltaTime * 8f);
		}
		else
		{
			colorLerp = Mathf.Clamp01(colorLerp - Time.deltaTime * 8f);
		}
		((Graphic)staminaBar).color = Color.Lerp(staminaColor, staminaWarnColor, colorLerp);
		int num4 = Mathf.RoundToInt(sprintMeter * 100f);
		float num5 = Mathf.Sign(num2);
		float num6 = num5;
		if (num6 != -1f)
		{
			if (num6 != 0f)
			{
				if (num6 != 1f)
				{
				}
				staminaBar.fillAmount = sprintMeter;
				staminaBarChangeFG.fillAmount = 0f;
				((TMP_Text)staminaText).text = string.Format("{0}<size=75%><voffset=1>%</voffset></size> | +{1}<size=75%>/sec</size>", num4, num3.ToString("0.0"));
			}
			else
			{
				staminaBar.fillAmount = sprintMeter;
				staminaBarChangeFG.fillAmount = 0f;
				((TMP_Text)staminaText).text = $"{num4}<size=75%><voffset=1>%</voffset></size> | +0.0<size=75%>/sec</size>";
			}
		}
		else
		{
			staminaBar.fillAmount = sprintMeter - Mathf.Abs(num2);
			((Graphic)staminaBarChangeFG).color = Color.Lerp(Color.white, staminaWarnColor, colorLerp);
			staminaBarChangeFG.fillAmount = Mathf.Min(sprintMeter, Mathf.Abs(num2));
			((Transform)((Graphic)staminaBarChangeFG).rectTransform).localPosition = new Vector3(270f * Mathf.Max(0f, sprintMeter - Mathf.Abs(num2)), 0f);
			((TMP_Text)staminaText).text = string.Format("{0}<size=75%><voffset=1>%</voffset></size> | {1}<size=75%>/sec</size>", num4, num3.ToString("0.0"));
		}
		float num7 = Mathf.RoundToInt(Mathf.Clamp(player.carryWeight - 1f, 0f, 100f) * 105f);
		if (Plugin.shouldDoKGConversion)
		{
			num7 *= 0.453592f;
			((TMP_Text)carryText).text = $"{num7}<size=60%>kg</size>";
		}
		else
		{
			((TMP_Text)carryText).text = $"{num7}<size=60%>lb</size>";
		}
		healthBar.fillAmount = (float)health / 100f;
		((TMP_Text)healthText).text = health.ToString();
		healthGroup.alpha = Mathf.InverseLerp(5f, 4f, lastHealthChange);
		((Component)flashlightGroup).gameObject.SetActive(UpdateFlashlight(player));
		((Component)batteryGroup).gameObject.SetActive(UpdateBattery(player));
	}

	private bool UpdateFlashlight(PlayerControllerB player)
	{
		if (!((Behaviour)player.helmetLight).enabled)
		{
			return false;
		}
		GrabbableObject pocketedFlashlight = player.pocketedFlashlight;
		if ((Object)(object)pocketedFlashlight == (Object)null)
		{
			return false;
		}
		if (!pocketedFlashlight.itemProperties.requiresBattery)
		{
			return false;
		}
		flashlightBar.fillAmount = pocketedFlashlight.insertedBattery.charge;
		int num = Mathf.CeilToInt(pocketedFlashlight.insertedBattery.charge * pocketedFlashlight.itemProperties.batteryUsage);
		((TMP_Text)flashlightText).text = string.Format("{0}% <size=60%>{1}:{2}", Mathf.CeilToInt(pocketedFlashlight.insertedBattery.charge * 100f), num / 60, (num % 60).ToString("D2"));
		return true;
	}

	private bool UpdateBattery(PlayerControllerB player)
	{
		GrabbableObject currentlyHeldObjectServer = player.currentlyHeldObjectServer;
		if ((Object)(object)currentlyHeldObjectServer == (Object)null)
		{
			return false;
		}
		if (!currentlyHeldObjectServer.itemProperties.requiresBattery)
		{
			return false;
		}
		batteryBar.fillAmount = currentlyHeldObjectServer.insertedBattery.charge;
		int num = (int)(currentlyHeldObjectServer.insertedBattery.charge / currentlyHeldObjectServer.itemProperties.batteryUsage);
		int num2 = Mathf.CeilToInt(currentlyHeldObjectServer.insertedBattery.charge * currentlyHeldObjectServer.itemProperties.batteryUsage);
		if (currentlyHeldObjectServer.itemProperties.itemIsTrigger)
		{
			((TMP_Text)batteryText).text = $"{Mathf.CeilToInt(currentlyHeldObjectServer.insertedBattery.charge * 100f)}% ({num} uses remaining)";
		}
		else
		{
			((TMP_Text)batteryText).text = string.Format("{0}% ({1}:{2} remaining)", Mathf.CeilToInt(currentlyHeldObjectServer.insertedBattery.charge * 100f), num2 / 60, (num2 % 60).ToString("D2"));
		}
		return true;
	}
}
namespace EladsHUD
{
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "EladsHUD";

		public const string PLUGIN_NAME = "EladsHUD";

		public const string PLUGIN_VERSION = "1.1.0";
	}
}
namespace CustomHUD
{
	[BepInPlugin("me.eladnlg.customhud", "Elads HUD", "1.1.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public static Plugin instance;

		public AssetBundle assets;

		public GameObject HUD;

		public static bool shouldDoKGConversion;

		private void Awake()
		{
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			if ((Object)(object)instance != (Object)null)
			{
				throw new Exception("what the cuck??? more than 1 plugin instance.");
			}
			instance = this;
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Elad's HUD is loaded!");
			assets = AssetUtils.LoadAssetBundleFromResources("customhud", typeof(PlayerPatches).Assembly);
			HUD = assets.LoadAsset<GameObject>("PlayerInfo");
			Harmony val = new Harmony("me.eladnlg.customhud");
			val.PatchAll(Assembly.GetExecutingAssembly());
		}

		private void Start()
		{
			shouldDoKGConversion = Chainloader.PluginInfos.Any((KeyValuePair<string, PluginInfo> pair) => pair.Value.Metadata.GUID == "com.zduniusz.lethalcompany.lbtokg");
		}
	}
	[HarmonyPatch(typeof(HUDManager))]
	public class HUDPatches
	{
		[HarmonyPostfix]
		[HarmonyPatch("Awake")]
		private static void Awake_Postfix(HUDManager __instance)
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			HUDElement[] privateField = __instance.GetPrivateField<HUDElement[]>("HUDElements");
			privateField[2].canvasGroup.alpha = 0f;
			GameObject val = Object.Instantiate<GameObject>(Plugin.instance.HUD, ((Component)privateField[2].canvasGroup).transform.parent);
			val.transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
			privateField[2].canvasGroup = val.GetComponent<CanvasGroup>();
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	public static class PlayerPatches
	{
		[HarmonyPrefix]
		[HarmonyPatch("LateUpdate")]
		private static void LateUpdate_Prefix(PlayerControllerB __instance)
		{
			if (((NetworkBehaviour)__instance).IsOwner && (!((NetworkBehaviour)__instance).IsServer || __instance.isHostPlayerObject) && !((Object)(object)CustomHUD_Mono.instance == (Object)null))
			{
				CustomHUD_Mono.instance.UpdateFromPlayer(__instance);
			}
		}
	}
	internal static class ReflectionUtils
	{
		public static T GetPrivateField<T>(this object obj, string field)
		{
			return (T)obj.GetType().GetField(field, BindingFlags.Instance | BindingFlags.NonPublic).GetValue(obj);
		}
	}
}
namespace Jotunn.Utils
{
	public static class AssetUtils
	{
		public const char AssetBundlePathSeparator = '$';

		public static Texture2D LoadTexture(string texturePath, bool relativePath = true)
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			string text = texturePath;
			if (relativePath)
			{
				text = Path.Combine(Paths.PluginPath, texturePath);
			}
			if (!File.Exists(text))
			{
				return null;
			}
			if (!text.EndsWith(".png") && !text.EndsWith(".jpg"))
			{
				throw new Exception("LoadTexture can only load png or jpg textures");
			}
			byte[] array = File.ReadAllBytes(text);
			Texture2D val = new Texture2D(2, 2);
			val.LoadRawTextureData(array);
			return val;
		}

		public static Sprite LoadSpriteFromFile(string spritePath)
		{
			//IL_002e: 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)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = LoadTexture(spritePath);
			if ((Object)(object)val != (Object)null)
			{
				return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), default(Vector2), 100f);
			}
			return null;
		}

		public static AssetBundle LoadAssetBundle(string bundlePath)
		{
			string text = Path.Combine(Paths.PluginPath, bundlePath);
			if (!File.Exists(text))
			{
				return null;
			}
			return AssetBundle.LoadFromFile(text);
		}

		public static AssetBundle LoadAssetBundleFromResources(string bundleName, Assembly resourceAssembly)
		{
			if (resourceAssembly == null)
			{
				throw new ArgumentNullException("Parameter resourceAssembly can not be null.");
			}
			string text = null;
			try
			{
				text = resourceAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(bundleName));
			}
			catch (Exception)
			{
			}
			if (text == null)
			{
				Debug.LogError((object)("AssetBundle " + bundleName + " not found in assembly manifest"));
				return null;
			}
			AssetBundle result;
			using (Stream stream = resourceAssembly.GetManifestResourceStream(text))
			{
				result = AssetBundle.LoadFromStream(stream);
			}
			return result;
		}

		public static string LoadText(string path)
		{
			string text = Path.Combine(Paths.PluginPath, path);
			if (!File.Exists(text))
			{
				Debug.LogError((object)("Error, failed to load contents from non-existant path: $" + text));
				return null;
			}
			return File.ReadAllText(text);
		}

		public static Sprite LoadSprite(string assetPath)
		{
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			string text = Path.Combine(Paths.PluginPath, assetPath);
			if (!File.Exists(text))
			{
				return null;
			}
			if (text.Contains('$'.ToString()))
			{
				string[] array = text.Split('$');
				string text2 = array[0];
				string text3 = array[1];
				AssetBundle val = AssetBundle.LoadFromFile(text2);
				Sprite result = val.LoadAsset<Sprite>(text3);
				val.Unload(false);
				return result;
			}
			Texture2D val2 = LoadTexture(text, relativePath: false);
			if (!Object.op_Implicit((Object)(object)val2))
			{
				return null;
			}
			return Sprite.Create(val2, new Rect(0f, 0f, (float)((Texture)val2).width, (float)((Texture)val2).height), Vector2.zero);
		}
	}
}

plugins/EliteMasterEric-Coroner/Coroner.dll

Decompiled a year ago
using System;
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 BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LC_API.ServerAPI;
using Microsoft.CodeAnalysis;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("EliteMasterEric")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Rework the Performance Report with new info, including cause of death.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Coroner")]
[assembly: AssemblyTitle("Coroner")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Coroner
{
	internal class AdvancedDeathTracker
	{
		public const int PLAYER_CAUSE_OF_DEATH_DROPSHIP = 300;

		private static readonly Dictionary<int, AdvancedCauseOfDeath> PlayerCauseOfDeath = new Dictionary<int, AdvancedCauseOfDeath>();

		public static void ClearDeathTracker()
		{
			PlayerCauseOfDeath.Clear();
		}

		public static void SetCauseOfDeath(int playerIndex, AdvancedCauseOfDeath causeOfDeath, bool broadcast = true)
		{
			PlayerCauseOfDeath[playerIndex] = causeOfDeath;
			if (broadcast)
			{
				DeathBroadcaster.BroadcastCauseOfDeath(playerIndex, causeOfDeath);
			}
		}

		public static void SetCauseOfDeath(int playerIndex, CauseOfDeath causeOfDeath, bool broadcast = true)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			SetCauseOfDeath(playerIndex, ConvertCauseOfDeath(causeOfDeath), broadcast);
		}

		public static void SetCauseOfDeath(PlayerControllerB playerController, CauseOfDeath causeOfDeath, bool broadcast = true)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			SetCauseOfDeath((int)playerController.playerClientId, ConvertCauseOfDeath(causeOfDeath), broadcast);
		}

		public static void SetCauseOfDeath(PlayerControllerB playerController, AdvancedCauseOfDeath causeOfDeath, bool broadcast = true)
		{
			SetCauseOfDeath((int)playerController.playerClientId, causeOfDeath, broadcast);
		}

		public static AdvancedCauseOfDeath GetCauseOfDeath(int playerIndex)
		{
			PlayerControllerB playerController = StartOfRound.Instance.allPlayerScripts[playerIndex];
			return GetCauseOfDeath(playerController);
		}

		public static AdvancedCauseOfDeath GetCauseOfDeath(PlayerControllerB playerController)
		{
			if (!PlayerCauseOfDeath.ContainsKey((int)playerController.playerClientId))
			{
				Plugin.Instance.PluginLogger.LogInfo((object)$"Player {playerController.playerClientId} has no custom cause of death stored! Using fallback...");
				return GuessCauseOfDeath(playerController);
			}
			Plugin.Instance.PluginLogger.LogInfo((object)$"Player {playerController.playerClientId} has custom cause of death stored! {PlayerCauseOfDeath[(int)playerController.playerClientId]}");
			return PlayerCauseOfDeath[(int)playerController.playerClientId];
		}

		public static AdvancedCauseOfDeath GuessCauseOfDeath(PlayerControllerB playerController)
		{
			//IL_0041: 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_001e: Invalid comparison between Unknown and I4
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Invalid comparison between Unknown and I4
			if (playerController.isPlayerDead)
			{
				if (IsHoldingJetpack(playerController))
				{
					if ((int)playerController.causeOfDeath == 2)
					{
						return AdvancedCauseOfDeath.Jetpack_Gravity;
					}
					if ((int)playerController.causeOfDeath == 3)
					{
						return AdvancedCauseOfDeath.Jetpack_Blast;
					}
				}
				return ConvertCauseOfDeath(playerController.causeOfDeath);
			}
			return AdvancedCauseOfDeath.Unknown;
		}

		public static bool IsHoldingJetpack(PlayerControllerB playerController)
		{
			GrabbableObject currentlyHeldObjectServer = playerController.currentlyHeldObjectServer;
			if ((Object)(object)currentlyHeldObjectServer == (Object)null)
			{
				return false;
			}
			GameObject gameObject = ((Component)currentlyHeldObjectServer).gameObject;
			if ((Object)(object)gameObject == (Object)null)
			{
				return false;
			}
			GrabbableObject component = gameObject.GetComponent<GrabbableObject>();
			if ((Object)(object)component == (Object)null)
			{
				return false;
			}
			if (component is JetpackItem)
			{
				return true;
			}
			return false;
		}

		public static AdvancedCauseOfDeath ConvertCauseOfDeath(CauseOfDeath causeOfDeath)
		{
			//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)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: 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_003b: Expected I4, but got Unknown
			return (int)causeOfDeath switch
			{
				0 => AdvancedCauseOfDeath.Unknown, 
				1 => AdvancedCauseOfDeath.Bludgeoning, 
				2 => AdvancedCauseOfDeath.Gravity, 
				3 => AdvancedCauseOfDeath.Blast, 
				4 => AdvancedCauseOfDeath.Strangulation, 
				5 => AdvancedCauseOfDeath.Suffocation, 
				6 => AdvancedCauseOfDeath.Mauling, 
				7 => AdvancedCauseOfDeath.Gunshots, 
				8 => AdvancedCauseOfDeath.Crushing, 
				9 => AdvancedCauseOfDeath.Drowning, 
				10 => AdvancedCauseOfDeath.Abandoned, 
				11 => AdvancedCauseOfDeath.Electrocution, 
				_ => AdvancedCauseOfDeath.Unknown, 
			};
		}

		public static string StringifyCauseOfDeath(CauseOfDeath causeOfDeath)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return StringifyCauseOfDeath(ConvertCauseOfDeath(causeOfDeath));
		}

		public static string StringifyCauseOfDeath(AdvancedCauseOfDeath causeOfDeath)
		{
			return causeOfDeath switch
			{
				AdvancedCauseOfDeath.Bludgeoning => "Bludgeoned to death.", 
				AdvancedCauseOfDeath.Gravity => "Fell to their death.", 
				AdvancedCauseOfDeath.Blast => "Went out with a bang.", 
				AdvancedCauseOfDeath.Strangulation => "Strangled to death.", 
				AdvancedCauseOfDeath.Suffocation => "Suffocated to death.", 
				AdvancedCauseOfDeath.Mauling => "Mauled to death.", 
				AdvancedCauseOfDeath.Gunshots => "Shot to death by a turret.", 
				AdvancedCauseOfDeath.Crushing => "Crushed to death.", 
				AdvancedCauseOfDeath.Drowning => "Drowned to death.", 
				AdvancedCauseOfDeath.Abandoned => "Abandoned by their coworkers.", 
				AdvancedCauseOfDeath.Electrocution => "Electrocuted to death.", 
				AdvancedCauseOfDeath.Enemy_Bracken => "Had their neck snapped by a Bracken.", 
				AdvancedCauseOfDeath.Enemy_EyelessDog => "Was eaten by an Eyeless Dog.", 
				AdvancedCauseOfDeath.Enemy_ForestGiant => "Swallowed whole by a Forest Giant.", 
				AdvancedCauseOfDeath.Enemy_CircuitBees => "Electro-stung to death by Circuit Bees.", 
				AdvancedCauseOfDeath.Enemy_GhostGirl => "Died a mysterious death.", 
				AdvancedCauseOfDeath.Enemy_EarthLeviathan => "Swallowed whole by an Earth Leviathan.", 
				AdvancedCauseOfDeath.Enemy_BaboonHawk => "Was eaten by a Baboon Hawk.", 
				AdvancedCauseOfDeath.Enemy_Jester => "Was the butt of a joke.", 
				AdvancedCauseOfDeath.Enemy_SnareFlea => "Was suffocated a Snare Flea.", 
				AdvancedCauseOfDeath.Enemy_Hygrodere => "Was absorbed by a Hygrodere.", 
				AdvancedCauseOfDeath.Enemy_HoarderBug => "Was hoarded by a Hoarder Bug.", 
				AdvancedCauseOfDeath.Enemy_SporeLizard => "Was puffed by a Spore Lizard.", 
				AdvancedCauseOfDeath.Enemy_SandSpider => "Ensnared in the Sand Spider's web.", 
				AdvancedCauseOfDeath.Jetpack_Gravity => "Flew too close to the sun.", 
				AdvancedCauseOfDeath.Jetpack_Blast => "Turned into a firework.", 
				AdvancedCauseOfDeath.Player_Murder => "Was the victim of a murder.", 
				AdvancedCauseOfDeath.Player_Quicksand => "Got stuck in quicksand.", 
				AdvancedCauseOfDeath.Player_DepositItemsDesk => "Received a demotion.", 
				AdvancedCauseOfDeath.Player_Dropship => "Couldn't wait for their items.", 
				AdvancedCauseOfDeath.Player_StunGrenade => "Was the victim of a murder.", 
				AdvancedCauseOfDeath.Unknown => "Most sincerely dead.", 
				_ => "Most sincerely dead.", 
			};
		}

		internal static void SetCauseOfDeath(PlayerControllerB playerControllerB, object enemy_BaboonHawk)
		{
			throw new NotImplementedException();
		}
	}
	internal enum AdvancedCauseOfDeath
	{
		Unknown,
		Bludgeoning,
		Gravity,
		Blast,
		Strangulation,
		Suffocation,
		Mauling,
		Gunshots,
		Crushing,
		Drowning,
		Abandoned,
		Electrocution,
		Enemy_BaboonHawk,
		Enemy_Bracken,
		Enemy_CircuitBees,
		Enemy_EarthLeviathan,
		Enemy_EyelessDog,
		Enemy_ForestGiant,
		Enemy_GhostGirl,
		Enemy_Jester,
		Enemy_SnareFlea,
		Enemy_SporeLizard,
		Enemy_Hygrodere,
		Enemy_SandSpider,
		Enemy_Thumper,
		Enemy_HoarderBug,
		Jetpack_Gravity,
		Jetpack_Blast,
		Player_Quicksand,
		Player_Murder,
		Player_DepositItemsDesk,
		Player_Dropship,
		Player_StunGrenade
	}
	internal class DeathBroadcaster
	{
		private const string SIGNATURE_DEATH = "com.elitemastereric.coroner.death";

		public static void Initialize()
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Initializing DeathBroadcaster...");
			if (Plugin.Instance.IsLC_APIPresent)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"LC_API is present! Registering signature...");
				Networking.GetString = (Action<string, string>)Delegate.Combine(Networking.GetString, new Action<string, string>(OnBroadcastString));
			}
			else
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"LC_API is not present! Skipping registration...");
			}
		}

		private static void OnBroadcastString(string data, string signature)
		{
			if (signature == "com.elitemastereric.coroner.death")
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Broadcast has been received from LC_API!");
				string[] array = data.Split('|');
				int playerIndex = int.Parse(array[0]);
				int num = int.Parse(array[1]);
				AdvancedCauseOfDeath causeOfDeath = (AdvancedCauseOfDeath)num;
				Plugin.Instance.PluginLogger.LogInfo((object)("Player " + playerIndex + " died of " + AdvancedDeathTracker.StringifyCauseOfDeath(causeOfDeath)));
				AdvancedDeathTracker.SetCauseOfDeath(playerIndex, causeOfDeath, broadcast: false);
			}
		}

		public static void BroadcastCauseOfDeath(int playerId, AdvancedCauseOfDeath causeOfDeath)
		{
			AttemptBroadcast(BuildData(playerId, causeOfDeath), "com.elitemastereric.coroner.death");
		}

		private static string BuildData(int playerId, AdvancedCauseOfDeath causeOfDeath)
		{
			string text = playerId.ToString();
			int num = (int)causeOfDeath;
			return text + "|" + num;
		}

		private static void AttemptBroadcast(string data, string signature)
		{
			if (Plugin.Instance.IsLC_APIPresent)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"LC_API is present! Broadcasting...");
				Networking.Broadcast(data, signature);
			}
			else
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"LC_API is not present! Skipping broadcast...");
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_ID = "Coroner";

		public const string PLUGIN_NAME = "Coroner";

		public const string PLUGIN_VERSION = "1.0.0";

		public const string PLUGIN_GUID = "com.elitemastereric.coroner";
	}
	[BepInPlugin("com.elitemastereric.coroner", "Coroner", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public ManualLogSource PluginLogger;

		public PluginConfig PluginConfig;

		public bool IsLC_APIPresent = false;

		public static Plugin Instance { get; private set; }

		private void Awake()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			Instance = this;
			PluginLogger = ((BaseUnityPlugin)this).Logger;
			Harmony val = new Harmony("com.elitemastereric.coroner");
			val.PatchAll();
			PluginLogger.LogInfo((object)"Plugin Coroner (com.elitemastereric.coroner) is loaded!");
			LoadConfig();
			QueryLC_API();
			DeathBroadcaster.Initialize();
		}

		private void QueryLC_API()
		{
			PluginLogger.LogInfo((object)"Checking for LC_API...");
			if (Chainloader.PluginInfos.ContainsKey("LC_API"))
			{
				Chainloader.PluginInfos.TryGetValue("LC_API", out var value);
				if (value == null)
				{
					PluginLogger.LogError((object)"Detected LC_API, but could not get plugin info!");
					IsLC_APIPresent = false;
				}
				else
				{
					PluginLogger.LogInfo((object)("LCAPI is present! " + value.Metadata.GUID + ":" + value.Metadata.Version));
					IsLC_APIPresent = true;
				}
			}
			else
			{
				PluginLogger.LogInfo((object)"LCAPI is not present.");
				IsLC_APIPresent = false;
			}
		}

		private void LoadConfig()
		{
			PluginConfig = new PluginConfig();
			PluginConfig.BindConfig(((BaseUnityPlugin)this).Config);
		}
	}
	public class PluginConfig
	{
		private ConfigEntry<bool> DisplayCauseOfDeath;

		private ConfigEntry<bool> DisplayFunnyNotes;

		private ConfigEntry<bool> DeathReplacesNotes;

		public void BindConfig(ConfigFile _config)
		{
			DisplayCauseOfDeath = _config.Bind<bool>("General", "DisplayCauseOfDeath", true, "Display the cause of death in the player notes.");
			DisplayFunnyNotes = _config.Bind<bool>("General", "DisplayFunnyNotes", true, "Display a random note when the player has no notes.");
			DeathReplacesNotes = _config.Bind<bool>("General", "DeathReplacesNotes", true, "True to replace notes when the player dies, false to append.");
		}

		public bool ShouldDisplayCauseOfDeath()
		{
			return DisplayCauseOfDeath.Value;
		}

		public bool ShouldDisplayFunnyNotes()
		{
			return DisplayFunnyNotes.Value;
		}

		public bool ShouldDeathReplaceNotes()
		{
			return DeathReplacesNotes.Value;
		}
	}
}
namespace Coroner.Patch
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	[HarmonyPatch("KillPlayer")]
	internal class PlayerControllerBKillPlayerPatch
	{
		public static void Prefix(PlayerControllerB __instance, ref CauseOfDeath causeOfDeath)
		{
			if ((int)causeOfDeath == 300)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player died from item dropship! Setting special cause of death...");
				AdvancedDeathTracker.SetCauseOfDeath(__instance, AdvancedCauseOfDeath.Player_Dropship);
				causeOfDeath = (CauseOfDeath)8;
			}
			else if (__instance.isSinking && (int)causeOfDeath == 5)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player died of suffociation while sinking in quicksand! Setting special cause of death...");
				AdvancedDeathTracker.SetCauseOfDeath(__instance, AdvancedCauseOfDeath.Player_Quicksand);
			}
			else
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player is dying! No cause of death...");
			}
		}
	}
	[HarmonyPatch(typeof(DepositItemsDesk))]
	[HarmonyPatch("AnimationGrabPlayer")]
	internal class DepositItemsDeskAnimationGrabPlayerPatch
	{
		public static void Postfix(int playerID)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Accessing state after tentacle devouring...");
			PlayerControllerB playerController = StartOfRound.Instance.allPlayerScripts[playerID];
			Plugin.Instance.PluginLogger.LogInfo((object)"Player is dying! Setting special cause of death...");
			AdvancedDeathTracker.SetCauseOfDeath(playerController, AdvancedCauseOfDeath.Player_DepositItemsDesk);
		}
	}
	[HarmonyPatch(typeof(JesterAI))]
	[HarmonyPatch("killPlayerAnimation")]
	internal class JesterAIKillPlayerAnimationPatch
	{
		public static void Postfix(JesterAI __instance, int playerId)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Accessing state after Jester mauling...");
			PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId];
			if ((Object)(object)val == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after death!");
				return;
			}
			Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
			AdvancedDeathTracker.SetCauseOfDeath(val, AdvancedCauseOfDeath.Enemy_Jester);
		}
	}
	[HarmonyPatch(typeof(SandWormAI))]
	[HarmonyPatch("EatPlayer")]
	internal class SandWormAIEatPlayerPatch
	{
		public static void Postfix(PlayerControllerB playerScript)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Accessing state after Sand Worm devouring...");
			if ((Object)(object)playerScript == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after death!");
				return;
			}
			Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
			AdvancedDeathTracker.SetCauseOfDeath(playerScript, AdvancedCauseOfDeath.Enemy_EarthLeviathan);
		}
	}
	[HarmonyPatch(typeof(RedLocustBees))]
	[HarmonyPatch("BeeKillPlayerOnLocalClient")]
	internal class RedLocustBeesBeeKillPlayerOnLocalClientPatch
	{
		public static void Postfix(int playerId)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Accessing state after Circuit Bee electrocution...");
			PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId];
			if ((Object)(object)val == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after death!");
			}
			else if (val.isPlayerDead)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
				AdvancedDeathTracker.SetCauseOfDeath(val, AdvancedCauseOfDeath.Enemy_CircuitBees);
			}
			else
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Player is somehow still alive! Skipping...");
			}
		}
	}
	[HarmonyPatch(typeof(DressGirlAI))]
	[HarmonyPatch("OnCollideWithPlayer")]
	internal class DressGirlAIOnCollideWithPlayerPatch
	{
		public static void Postfix(DressGirlAI __instance, Collider other)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Processing Ghost Girl player collision...");
			if ((Object)(object)__instance.hauntingPlayer == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after collision!");
			}
			else if (__instance.hauntingPlayer.isPlayerDead)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
				AdvancedDeathTracker.SetCauseOfDeath(__instance.hauntingPlayer, AdvancedCauseOfDeath.Enemy_GhostGirl);
			}
		}
	}
	[HarmonyPatch(typeof(FlowermanAI))]
	[HarmonyPatch("killAnimation")]
	internal class FlowermanAIKillAnimationPatch
	{
		public static void Postfix(FlowermanAI __instance)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Accessing state after Bracken snapping neck...");
			if ((Object)(object)((EnemyAI)__instance).inSpecialAnimationWithPlayer == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after snapping neck!");
				return;
			}
			Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
			AdvancedDeathTracker.SetCauseOfDeath(((EnemyAI)__instance).inSpecialAnimationWithPlayer, AdvancedCauseOfDeath.Enemy_Bracken);
		}
	}
	[HarmonyPatch(typeof(ForestGiantAI))]
	[HarmonyPatch("EatPlayerAnimation")]
	internal class ForestGiantAIEatPlayerAnimationPatch
	{
		public static void Postfix(PlayerControllerB playerBeingEaten)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Accessing state after Forest Giant devouring...");
			if ((Object)(object)playerBeingEaten == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after death!");
				return;
			}
			Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
			AdvancedDeathTracker.SetCauseOfDeath(playerBeingEaten, AdvancedCauseOfDeath.Enemy_ForestGiant);
		}
	}
	[HarmonyPatch(typeof(MouthDogAI))]
	[HarmonyPatch("KillPlayer")]
	internal class MouthDogAIKillPlayerPatch
	{
		public static void Postfix(int playerId)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Accessing state after dog devouring...");
			PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId];
			if ((Object)(object)val == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after death!");
				return;
			}
			Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
			AdvancedDeathTracker.SetCauseOfDeath(val, AdvancedCauseOfDeath.Enemy_EyelessDog);
		}
	}
	[HarmonyPatch(typeof(CentipedeAI))]
	[HarmonyPatch("DamagePlayerOnIntervals")]
	internal class CentipedeAIDamagePlayerOnIntervalsPatch
	{
		public static void Postfix(CentipedeAI __instance)
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Invalid comparison between Unknown and I4
			Plugin.Instance.PluginLogger.LogInfo((object)"Handling Snare Flea damage...");
			if ((Object)(object)__instance.clingingToPlayer == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player being clung to!");
			}
			else if (__instance.clingingToPlayer.isPlayerDead && (int)__instance.clingingToPlayer.causeOfDeath == 5)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
				AdvancedDeathTracker.SetCauseOfDeath(__instance.clingingToPlayer, AdvancedCauseOfDeath.Enemy_SnareFlea);
			}
			else if (__instance.clingingToPlayer.isPlayerDead)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Player died while attacked by Snare Flea! Skipping...");
			}
		}
	}
	[HarmonyPatch(typeof(BaboonBirdAI))]
	[HarmonyPatch("OnCollideWithPlayer")]
	internal class BaboonBirdAIOnCollideWithPlayerPatch
	{
		public static void Postfix(BaboonBirdAI __instance, Collider other)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Handling Baboon Hawk damage...");
			bool value = Traverse.Create((object)__instance).Field("doingKillAnimation").GetValue<bool>();
			PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, ((EnemyAI)__instance).inSpecialAnimation || value, false);
			if ((Object)(object)val == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access player after death!");
			}
			else if (val.isPlayerDead)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
				AdvancedDeathTracker.SetCauseOfDeath(val, AdvancedCauseOfDeath.Enemy_BaboonHawk);
			}
			else
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Player is somehow still alive! Skipping...");
			}
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	[HarmonyPatch("DamagePlayerFromOtherClientClientRpc")]
	internal class PlayerControllerBDamagePlayerFromOtherClientClientRpcPatch
	{
		public static void Postfix(PlayerControllerB __instance, int playerWhoHit)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Handling friendly fire damage...");
			if ((Object)(object)__instance == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Could not access victim after death!");
			}
			else if (__instance.isPlayerDead)
			{
				Plugin.Instance.PluginLogger.LogInfo((object)"Player is now dead! Setting special cause of death...");
				AdvancedDeathTracker.SetCauseOfDeath(__instance, AdvancedCauseOfDeath.Player_Murder);
			}
			else
			{
				Plugin.Instance.PluginLogger.LogWarning((object)"Player is somehow still alive! Skipping...");
			}
		}
	}
	[HarmonyPatch(typeof(ExtensionLadderItem))]
	[HarmonyPatch("StartLadderAnimation")]
	internal class ExtensionLadderItemStartLadderAnimationPatch
	{
		public static void Postfix(ExtensionLadderItem __instance)
		{
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			Plugin.Instance.PluginLogger.LogInfo((object)"Extension ladder started animation! Modifying kill trigger...");
			GameObject gameObject = ((Component)__instance).gameObject;
			if ((Object)(object)gameObject == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch GameObject from ExtensionLadderItem.");
			}
			Transform val = gameObject.transform.Find("AnimContainer/MeshContainer/LadderMeshContainer/BaseLadder/LadderSecondPart/KillTrigger");
			if ((Object)(object)val == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch KillTrigger Transform from ExtensionLadderItem.");
			}
			GameObject gameObject2 = ((Component)val).gameObject;
			if ((Object)(object)gameObject2 == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch KillTrigger GameObject from ExtensionLadderItem.");
			}
			KillLocalPlayer component = gameObject2.GetComponent<KillLocalPlayer>();
			if ((Object)(object)component == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch KillLocalPlayer from KillTrigger GameObject.");
			}
			component.causeOfDeath = (CauseOfDeath)8;
		}
	}
	[HarmonyPatch(typeof(ItemDropship))]
	[HarmonyPatch("Start")]
	internal class ItemDropshipStartPatch
	{
		public static void Postfix(ItemDropship __instance)
		{
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			Plugin.Instance.PluginLogger.LogInfo((object)"Item dropship spawned! Modifying kill trigger...");
			GameObject gameObject = ((Component)__instance).gameObject;
			if ((Object)(object)gameObject == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch GameObject from ItemDropship.");
			}
			Transform val = gameObject.transform.Find("ItemShip/KillTrigger");
			if ((Object)(object)val == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch KillTrigger Transform from ItemDropship.");
			}
			GameObject gameObject2 = ((Component)val).gameObject;
			if ((Object)(object)gameObject2 == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch KillTrigger GameObject from ItemDropship.");
			}
			KillLocalPlayer component = gameObject2.GetComponent<KillLocalPlayer>();
			if ((Object)(object)component == (Object)null)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Could not fetch KillLocalPlayer from KillTrigger GameObject.");
			}
			component.causeOfDeath = (CauseOfDeath)300;
		}
	}
	[HarmonyPatch(typeof(HUDManager))]
	[HarmonyPatch("FillEndGameStats")]
	internal class HUDManagerFillEndGameStatsPatch
	{
		public static readonly string[] FUNNY_NOTES = new string[20]
		{
			"* The goofiest goober.\n", "* The cutest employee.\n", "* Had the most fun.\n", "* Had the least fun.\n", "* The bravest employee.\n", "* Did a sick flip.\n", "* Stubbed their toe.\n", "* The most likely to die next time.\n", "* The least likely to die next time.\n", "* Dislikes smoke.\n",
			"* A team player.\n", "* A real go-getter.\n", "* Ate the most snacks.\n", "* Passed GO and collected $200.\n", "* Got freaky on a Friday night.\n", "* I think this one's a serial killer.\n", "* Perfectly unremarkable.\n", "* Hasn't called their mother in a while.\n", "* Has IP address 127.0.0.1.\n", "* Secretly a lizard.\n"
		};

		private static readonly Random RANDOM = new Random();

		public static void Postfix(HUDManager __instance)
		{
			try
			{
				OverridePerformanceReport(__instance);
			}
			catch (Exception ex)
			{
				Plugin.Instance.PluginLogger.LogError((object)"Coroner threw an exception while Caught an exception overriding performance report: ");
				Plugin.Instance.PluginLogger.LogError((object)ex.ToString());
				Plugin.Instance.PluginLogger.LogError((object)ex.StackTrace.ToString());
			}
		}

		private static void OverridePerformanceReport(HUDManager __instance)
		{
			Plugin.Instance.PluginLogger.LogInfo((object)"Applying Coroner patches to player notes...");
			for (int i = 0; i < __instance.statsUIElements.playerNotesText.Length; i++)
			{
				PlayerControllerB val = __instance.playersManager.allPlayerScripts[i];
				if (!val.disconnectedMidGame && !val.isPlayerDead && !val.isPlayerControlled)
				{
					Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " is not controlled by a player. Skipping..."));
					continue;
				}
				TextMeshProUGUI val2 = __instance.statsUIElements.playerNotesText[i];
				if (val.isPlayerDead)
				{
					if (Plugin.Instance.PluginConfig.ShouldDisplayCauseOfDeath())
					{
						AdvancedCauseOfDeath causeOfDeath = AdvancedDeathTracker.GetCauseOfDeath(val);
						string text = AdvancedDeathTracker.StringifyCauseOfDeath(causeOfDeath);
						if (Plugin.Instance.PluginConfig.ShouldDeathReplaceNotes())
						{
							Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " is dead! Replacing notes with Cause of Death..."));
							((TMP_Text)val2).text = "Notes: \n";
						}
						else
						{
							Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " is dead! Appending notes with Cause of Death..."));
						}
						((TMP_Text)val2).text = ((TMP_Text)val2).text + "* " + text + "\n";
					}
					else
					{
						Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " is dead, but Config says leave it be..."));
					}
					continue;
				}
				Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " is not dead!"));
				if (((TMP_Text)val2).text == "Notes: \n")
				{
					if (Plugin.Instance.PluginConfig.ShouldDisplayFunnyNotes())
					{
						Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " has no notes! Injecting something funny..."));
						((TMP_Text)val2).text = "Notes: \n";
						((TMP_Text)val2).text = ((TMP_Text)val2).text + ChooseFunnyNote();
					}
					else
					{
						Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " has no notes, but Config says leave it be..."));
					}
				}
				else
				{
					Plugin.Instance.PluginLogger.LogInfo((object)("Player " + i + " has notes! Let's leave it be..."));
				}
			}
			AdvancedDeathTracker.ClearDeathTracker();
		}

		private static string ChooseFunnyNote()
		{
			return FUNNY_NOTES[RANDOM.Next(FUNNY_NOTES.Length)];
		}
	}
}

plugins/Evaisa-LethalLib/LethalLib/LethalLib.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.Logging;
using DunGen;
using DunGen.Graph;
using LethalLib.Extras;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using On;
using Unity.Netcode;
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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LethalLib")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Mod for Lethal Company")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+e7321654f18d099d8e031c0306f3943a859016c7")]
[assembly: AssemblyProduct("LethalLib")]
[assembly: AssemblyTitle("LethalLib")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LethalLib
{
	[BepInPlugin("evaisa.lethallib", "LethalLib", "0.6.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string ModGUID = "evaisa.lethallib";

		public const string ModName = "LethalLib";

		public const string ModVersion = "0.6.0";

		public static AssetBundle MainAssets;

		public static ManualLogSource logger;

		private void Awake()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			logger = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Logger.LogInfo((object)"LethalLib loaded!!");
			new ILHook((MethodBase)typeof(StackTrace).GetMethod("AddFrames", BindingFlags.Instance | BindingFlags.NonPublic), new Manipulator(IlHook));
			Enemies.Init();
			Items.Init();
			Unlockables.Init();
			MapObjects.Init();
			Dungeon.Init();
			NetworkPrefabs.Init();
		}

		private void IlHook(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			val.GotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, (MethodBase)typeof(StackFrame).GetMethod("GetFileLineNumber", BindingFlags.Instance | BindingFlags.Public))
			});
			val.RemoveRange(2);
			val.EmitDelegate<Func<StackFrame, string>>((Func<StackFrame, string>)GetLineOrIL);
		}

		private static string GetLineOrIL(StackFrame instance)
		{
			int fileLineNumber = instance.GetFileLineNumber();
			if (fileLineNumber == -1 || fileLineNumber == 0)
			{
				return "IL_" + instance.GetILOffset().ToString("X4");
			}
			return fileLineNumber.ToString();
		}
	}
}
namespace LethalLib.Modules
{
	public class Dungeon
	{
		public class CustomDungeonArchetype
		{
			public DungeonArchetype archeType;

			public Levels.LevelTypes LevelTypes;

			public int lineIndex = -1;
		}

		public class CustomGraphLine
		{
			public GraphLine graphLine;

			public Levels.LevelTypes LevelTypes;
		}

		public class CustomDungeon
		{
			public int rarity;

			public DungeonFlow dungeonFlow;

			public Levels.LevelTypes LevelTypes;

			public int dungeonIndex = -1;

			public AudioClip firstTimeDungeonAudio;
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static hook_GenerateNewFloor <0>__RoundManager_GenerateNewFloor;

			public static hook_Start <1>__RoundManager_Start;

			public static hook_Start <2>__StartOfRound_Start;
		}

		public static List<CustomDungeonArchetype> customDungeonArchetypes = new List<CustomDungeonArchetype>();

		public static List<CustomGraphLine> customGraphLines = new List<CustomGraphLine>();

		public static Dictionary<string, TileSet> extraTileSets = new Dictionary<string, TileSet>();

		public static Dictionary<string, GameObjectChance> extraRooms = new Dictionary<string, GameObjectChance>();

		public static List<CustomDungeon> customDungeons = new List<CustomDungeon>();

		public static void Init()
		{
			//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_001c: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			object obj = <>O.<0>__RoundManager_GenerateNewFloor;
			if (obj == null)
			{
				hook_GenerateNewFloor val = RoundManager_GenerateNewFloor;
				<>O.<0>__RoundManager_GenerateNewFloor = val;
				obj = (object)val;
			}
			RoundManager.GenerateNewFloor += (hook_GenerateNewFloor)obj;
			object obj2 = <>O.<1>__RoundManager_Start;
			if (obj2 == null)
			{
				hook_Start val2 = RoundManager_Start;
				<>O.<1>__RoundManager_Start = val2;
				obj2 = (object)val2;
			}
			RoundManager.Start += (hook_Start)obj2;
			object obj3 = <>O.<2>__StartOfRound_Start;
			if (obj3 == null)
			{
				hook_Start val3 = StartOfRound_Start;
				<>O.<2>__StartOfRound_Start = val3;
				obj3 = (object)val3;
			}
			StartOfRound.Start += (hook_Start)obj3;
		}

		private static void StartOfRound_Start(orig_Start orig, StartOfRound self)
		{
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Expected O, but got Unknown
			foreach (CustomDungeon dungeon in customDungeons)
			{
				SelectableLevel[] levels = self.levels;
				foreach (SelectableLevel val in levels)
				{
					string name = ((Object)val).name;
					if (Enum.IsDefined(typeof(Levels.LevelTypes), name))
					{
						Levels.LevelTypes levelTypes = (Levels.LevelTypes)Enum.Parse(typeof(Levels.LevelTypes), name);
						if (dungeon.LevelTypes.HasFlag(levelTypes) && !val.dungeonFlowTypes.Any((IntWithRarity rarityInt) => rarityInt.id == dungeon.dungeonIndex))
						{
							List<IntWithRarity> list = val.dungeonFlowTypes.ToList();
							list.Add(new IntWithRarity
							{
								id = dungeon.dungeonIndex,
								rarity = dungeon.rarity
							});
							val.dungeonFlowTypes = list.ToArray();
						}
					}
				}
			}
			Plugin.logger.LogInfo((object)"Added custom dungeons to levels");
			orig.Invoke(self);
		}

		private static void RoundManager_Start(orig_Start orig, RoundManager self)
		{
			foreach (CustomDungeon customDungeon in customDungeons)
			{
				if (self.dungeonFlowTypes.Contains(customDungeon.dungeonFlow))
				{
					continue;
				}
				List<DungeonFlow> list = self.dungeonFlowTypes.ToList();
				list.Add(customDungeon.dungeonFlow);
				self.dungeonFlowTypes = list.ToArray();
				int dungeonIndex = self.dungeonFlowTypes.Length - 1;
				customDungeon.dungeonIndex = dungeonIndex;
				List<AudioClip> list2 = self.firstTimeDungeonAudios.ToList();
				if (list2.Count != self.dungeonFlowTypes.Length - 1)
				{
					while (list2.Count < self.dungeonFlowTypes.Length - 1)
					{
						list2.Add(null);
					}
				}
				list2.Add(customDungeon.firstTimeDungeonAudio);
				self.firstTimeDungeonAudios = list2.ToArray();
			}
			orig.Invoke(self);
		}

		private static void RoundManager_GenerateNewFloor(orig_GenerateNewFloor orig, RoundManager self)
		{
			string name = ((Object)self.currentLevel).name;
			if (Enum.IsDefined(typeof(Levels.LevelTypes), name))
			{
				Levels.LevelTypes levelEnum = (Levels.LevelTypes)Enum.Parse(typeof(Levels.LevelTypes), name);
				int index = 0;
				self.dungeonGenerator.Generator.DungeonFlow.Lines.ForEach(delegate(GraphLine line)
				{
					foreach (CustomDungeonArchetype customDungeonArchetype in customDungeonArchetypes)
					{
						if (customDungeonArchetype.LevelTypes.HasFlag(levelEnum) && !line.DungeonArchetypes.Contains(customDungeonArchetype.archeType) && (customDungeonArchetype.lineIndex == -1 || customDungeonArchetype.lineIndex == index))
						{
							line.DungeonArchetypes.Add(customDungeonArchetype.archeType);
							Plugin.logger.LogInfo((object)("Added " + ((Object)customDungeonArchetype.archeType).name + " to " + name));
						}
					}
					foreach (DungeonArchetype dungeonArchetype in line.DungeonArchetypes)
					{
						string name2 = ((Object)dungeonArchetype).name;
						if (extraTileSets.ContainsKey(name2))
						{
							TileSet val = extraTileSets[name2];
							if (!dungeonArchetype.TileSets.Contains(val))
							{
								dungeonArchetype.TileSets.Add(val);
								Plugin.logger.LogInfo((object)("Added " + ((Object)val).name + " to " + name));
							}
						}
						foreach (TileSet tileSet in dungeonArchetype.TileSets)
						{
							string name3 = ((Object)tileSet).name;
							if (extraRooms.ContainsKey(name3))
							{
								GameObjectChance item = extraRooms[name3];
								if (!tileSet.TileWeights.Weights.Contains(item))
								{
									tileSet.TileWeights.Weights.Add(item);
								}
							}
						}
					}
					index++;
				});
				foreach (CustomGraphLine customGraphLine in customGraphLines)
				{
					if (customGraphLine.LevelTypes.HasFlag(levelEnum) && !self.dungeonGenerator.Generator.DungeonFlow.Lines.Contains(customGraphLine.graphLine))
					{
						self.dungeonGenerator.Generator.DungeonFlow.Lines.Add(customGraphLine.graphLine);
					}
				}
			}
			orig.Invoke(self);
		}

		public static void AddArchetype(DungeonArchetype archetype, Levels.LevelTypes levelFlags, int lineIndex = -1)
		{
			CustomDungeonArchetype customDungeonArchetype = new CustomDungeonArchetype();
			customDungeonArchetype.archeType = archetype;
			customDungeonArchetype.LevelTypes = levelFlags;
			customDungeonArchetype.lineIndex = lineIndex;
			customDungeonArchetypes.Add(customDungeonArchetype);
		}

		public static void AddLine(GraphLine line, Levels.LevelTypes levelFlags)
		{
			CustomGraphLine customGraphLine = new CustomGraphLine();
			customGraphLine.graphLine = line;
			customGraphLine.LevelTypes = levelFlags;
			customGraphLines.Add(customGraphLine);
		}

		public static void AddLine(DungeonGraphLineDef line, Levels.LevelTypes levelFlags)
		{
			AddLine(line.graphLine, levelFlags);
		}

		public static void AddTileSet(TileSet set, string archetypeName)
		{
			extraTileSets.Add(archetypeName, set);
		}

		public static void AddRoom(GameObjectChance room, string tileSetName)
		{
			extraRooms.Add(tileSetName, room);
		}

		public static void AddRoom(GameObjectChanceDef room, string tileSetName)
		{
			AddRoom(room.gameObjectChance, tileSetName);
		}

		public static void AddDungeon(DungeonDef dungeon, Levels.LevelTypes levelFlags)
		{
			AddDungeon(dungeon.dungeonFlow, dungeon.rarity, levelFlags, dungeon.firstTimeDungeonAudio);
		}

		public static void AddDungeon(DungeonFlow dungeon, int rarity, Levels.LevelTypes levelFlags, AudioClip firstTimeDungeonAudio = null)
		{
			customDungeons.Add(new CustomDungeon
			{
				dungeonFlow = dungeon,
				rarity = rarity,
				LevelTypes = levelFlags,
				firstTimeDungeonAudio = firstTimeDungeonAudio
			});
		}
	}
	public class Enemies
	{
		public enum SpawnType
		{
			Default,
			Daytime,
			Outside
		}

		public class SpawnableEnemy
		{
			public EnemyType enemy;

			public int rarity;

			public Levels.LevelTypes spawnLevels;

			public SpawnType spawnType;

			public TerminalNode terminalNode;

			public TerminalKeyword infoKeyword;

			public string modName;

			public SpawnableEnemy(EnemyType enemy, int rarity, Levels.LevelTypes spawnLevels, SpawnType spawnType)
			{
				this.enemy = enemy;
				this.rarity = rarity;
				this.spawnLevels = spawnLevels;
				this.spawnType = spawnType;
			}
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Awake <0>__RegisterLevelEnemies;

			public static hook_Start <1>__Terminal_Start;
		}

		public static List<SpawnableEnemy> spawnableEnemies = new List<SpawnableEnemy>();

		public static void Init()
		{
			//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_001c: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			object obj = <>O.<0>__RegisterLevelEnemies;
			if (obj == null)
			{
				hook_Awake val = RegisterLevelEnemies;
				<>O.<0>__RegisterLevelEnemies = val;
				obj = (object)val;
			}
			StartOfRound.Awake += (hook_Awake)obj;
			object obj2 = <>O.<1>__Terminal_Start;
			if (obj2 == null)
			{
				hook_Start val2 = Terminal_Start;
				<>O.<1>__Terminal_Start = val2;
				obj2 = (object)val2;
			}
			Terminal.Start += (hook_Start)obj2;
		}

		private static void Terminal_Start(orig_Start orig, Terminal self)
		{
			//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_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Expected O, but got Unknown
			TerminalKeyword val = self.terminalNodes.allKeywords.First((TerminalKeyword keyword) => keyword.word == "info");
			List<string> list = new List<string>();
			foreach (SpawnableEnemy spawnableEnemy in spawnableEnemies)
			{
				if (list.Contains(spawnableEnemy.enemy.enemyName))
				{
					Plugin.logger.LogInfo((object)("Skipping " + spawnableEnemy.enemy.enemyName + " because it was already added"));
					continue;
				}
				if ((Object)(object)spawnableEnemy.terminalNode == (Object)null)
				{
					spawnableEnemy.terminalNode = ScriptableObject.CreateInstance<TerminalNode>();
					spawnableEnemy.terminalNode.displayText = spawnableEnemy.enemy.enemyName + "\n\nDanger level: Unknown\n\n[No information about this creature was found.]\n\n";
					spawnableEnemy.terminalNode.clearPreviousText = true;
					spawnableEnemy.terminalNode.maxCharactersToType = 35;
					spawnableEnemy.terminalNode.creatureName = spawnableEnemy.enemy.enemyName;
				}
				TerminalKeyword val2 = (((Object)(object)spawnableEnemy.infoKeyword != (Object)null) ? spawnableEnemy.infoKeyword : TerminalUtils.CreateTerminalKeyword(spawnableEnemy.terminalNode.creatureName.ToLowerInvariant().Replace(" ", "-"), isVerb: false, null, null, val));
				val2.defaultVerb = val;
				List<TerminalKeyword> list2 = self.terminalNodes.allKeywords.ToList();
				list2.Add(val2);
				self.terminalNodes.allKeywords = list2.ToArray();
				List<CompatibleNoun> list3 = val.compatibleNouns.ToList();
				list3.Add(new CompatibleNoun
				{
					noun = val2,
					result = spawnableEnemy.terminalNode
				});
				val.compatibleNouns = list3.ToArray();
				spawnableEnemy.terminalNode.creatureFileID = self.enemyFiles.Count;
				self.enemyFiles.Add(spawnableEnemy.terminalNode);
				spawnableEnemy.enemy.enemyPrefab.GetComponentInChildren<ScanNodeProperties>().creatureScanID = spawnableEnemy.terminalNode.creatureFileID;
			}
			orig.Invoke(self);
		}

		private static void RegisterLevelEnemies(orig_Awake orig, StartOfRound self)
		{
			//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)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Expected O, but got Unknown
			orig.Invoke(self);
			SelectableLevel[] levels = self.levels;
			foreach (SelectableLevel val in levels)
			{
				string name = ((Object)val).name;
				if (!Enum.IsDefined(typeof(Levels.LevelTypes), name))
				{
					continue;
				}
				Levels.LevelTypes levelTypes = (Levels.LevelTypes)Enum.Parse(typeof(Levels.LevelTypes), name);
				foreach (SpawnableEnemy spawnableEnemy in spawnableEnemies)
				{
					if (!spawnableEnemy.spawnLevels.HasFlag(levelTypes))
					{
						continue;
					}
					SpawnableEnemyWithRarity item = new SpawnableEnemyWithRarity
					{
						enemyType = spawnableEnemy.enemy,
						rarity = spawnableEnemy.rarity
					};
					switch (spawnableEnemy.spawnType)
					{
					case SpawnType.Default:
						if (!val.Enemies.Any((SpawnableEnemyWithRarity x) => (Object)(object)x.enemyType == (Object)(object)spawnableEnemy.enemy))
						{
							val.Enemies.Add(item);
							Plugin.logger.LogInfo((object)("Added " + ((Object)spawnableEnemy.enemy).name + " to " + name + " with SpawnType [Default]"));
						}
						break;
					case SpawnType.Daytime:
						if (!val.DaytimeEnemies.Any((SpawnableEnemyWithRarity x) => (Object)(object)x.enemyType == (Object)(object)spawnableEnemy.enemy))
						{
							val.DaytimeEnemies.Add(item);
							Plugin.logger.LogInfo((object)("Added " + ((Object)spawnableEnemy.enemy).name + " to " + name + " with SpawnType [Daytime]"));
						}
						break;
					case SpawnType.Outside:
						if (!val.OutsideEnemies.Any((SpawnableEnemyWithRarity x) => (Object)(object)x.enemyType == (Object)(object)spawnableEnemy.enemy))
						{
							val.OutsideEnemies.Add(item);
							Plugin.logger.LogInfo((object)("Added " + ((Object)spawnableEnemy.enemy).name + " to " + name + " with SpawnType [Outside]"));
						}
						break;
					}
				}
			}
		}

		public static void RegisterEnemy(EnemyType enemy, int rarity, Levels.LevelTypes levelFlags, SpawnType spawnType, TerminalNode infoNode = null, TerminalKeyword infoKeyword = null)
		{
			SpawnableEnemy spawnableEnemy = new SpawnableEnemy(enemy, rarity, levelFlags, spawnType);
			spawnableEnemy.terminalNode = infoNode;
			spawnableEnemy.infoKeyword = infoKeyword;
			Assembly callingAssembly = Assembly.GetCallingAssembly();
			string name = callingAssembly.GetName().Name;
			spawnableEnemy.modName = name;
			spawnableEnemies.Add(spawnableEnemy);
		}

		public static void RegisterEnemy(EnemyType enemy, int rarity, Levels.LevelTypes levelFlags, TerminalNode infoNode = null, TerminalKeyword infoKeyword = null)
		{
			SpawnableEnemy spawnableEnemy = new SpawnableEnemy(enemy, rarity, levelFlags, enemy.isDaytimeEnemy ? SpawnType.Daytime : (enemy.isOutsideEnemy ? SpawnType.Outside : SpawnType.Default));
			spawnableEnemy.terminalNode = infoNode;
			spawnableEnemy.infoKeyword = infoKeyword;
			Assembly callingAssembly = Assembly.GetCallingAssembly();
			string name = callingAssembly.GetName().Name;
			spawnableEnemy.modName = name;
			spawnableEnemies.Add(spawnableEnemy);
		}
	}
	public class Items
	{
		public class ScrapItem
		{
			public Item item;

			public int rarity;

			public Levels.LevelTypes spawnLevels;

			public string modName;

			public ScrapItem(Item item, int rarity, Levels.LevelTypes spawnLevels)
			{
				this.item = item;
				this.rarity = rarity;
				this.spawnLevels = spawnLevels;
			}
		}

		public class ShopItem
		{
			public Item item;

			public TerminalNode buyNode1;

			public TerminalNode buyNode2;

			public TerminalNode itemInfo;

			public int price;

			public string modName;

			public ShopItem(Item item, TerminalNode buyNode1 = null, TerminalNode buyNode2 = null, TerminalNode itemInfo = null, int price = 0)
			{
				this.item = item;
				this.price = price;
				if ((Object)(object)buyNode1 != (Object)null)
				{
					this.buyNode1 = buyNode1;
				}
				if ((Object)(object)buyNode2 != (Object)null)
				{
					this.buyNode2 = buyNode2;
				}
				if ((Object)(object)itemInfo != (Object)null)
				{
					this.itemInfo = itemInfo;
				}
			}
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Awake <0>__StartOfRound_Awake;

			public static hook_Awake <1>__Terminal_Awake;
		}

		public static List<ScrapItem> scrapItems = new List<ScrapItem>();

		public static List<ShopItem> shopItems = new List<ShopItem>();

		public static void Init()
		{
			//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_001c: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			object obj = <>O.<0>__StartOfRound_Awake;
			if (obj == null)
			{
				hook_Awake val = StartOfRound_Awake;
				<>O.<0>__StartOfRound_Awake = val;
				obj = (object)val;
			}
			StartOfRound.Awake += (hook_Awake)obj;
			object obj2 = <>O.<1>__Terminal_Awake;
			if (obj2 == null)
			{
				hook_Awake val2 = Terminal_Awake;
				<>O.<1>__Terminal_Awake = val2;
				obj2 = (object)val2;
			}
			Terminal.Awake += (hook_Awake)obj2;
		}

		private static void Terminal_Awake(orig_Awake orig, Terminal self)
		{
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Expected O, but got Unknown
			//IL_0343: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0385: Expected O, but got Unknown
			//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Expected O, but got Unknown
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_049c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: Expected O, but got Unknown
			List<Item> list = self.buyableItemsList.ToList();
			TerminalKeyword val = self.terminalNodes.allKeywords.First((TerminalKeyword keyword) => keyword.word == "buy");
			TerminalNode result = val.compatibleNouns[0].result.terminalOptions[1].result;
			TerminalKeyword val2 = self.terminalNodes.allKeywords.First((TerminalKeyword keyword) => keyword.word == "info");
			Plugin.logger.LogInfo((object)$"Adding {shopItems.Count} items to terminal");
			foreach (ShopItem item in shopItems)
			{
				if (list.Any((Item x) => x.itemName == item.item.itemName))
				{
					Plugin.logger.LogInfo((object)("Item " + item.item.itemName + " already exists in terminal, skipping"));
					continue;
				}
				if (item.price == -1)
				{
					item.price = item.item.creditsWorth;
				}
				else
				{
					item.item.creditsWorth = item.price;
				}
				list.Add(item.item);
				string itemName = item.item.itemName;
				char c = itemName[itemName.Length - 1];
				string text = itemName;
				TerminalNode val3 = item.buyNode2;
				if ((Object)(object)val3 == (Object)null)
				{
					val3 = ScriptableObject.CreateInstance<TerminalNode>();
					((Object)val3).name = itemName.Replace(" ", "-") + "BuyNode2";
					val3.displayText = "Ordered [variableAmount] " + text + ". Your new balance is [playerCredits].\n\nOur contractors enjoy fast, free shipping while on the job! Any purchased items will arrive hourly at your approximate location.\r\n\r\n";
					val3.clearPreviousText = true;
					val3.maxCharactersToType = 15;
				}
				val3.buyItemIndex = list.Count - 1;
				val3.isConfirmationNode = false;
				val3.itemCost = item.price;
				val3.playSyncedClip = 0;
				TerminalNode val4 = item.buyNode1;
				if ((Object)(object)val4 == (Object)null)
				{
					val4 = ScriptableObject.CreateInstance<TerminalNode>();
					((Object)val4).name = itemName.Replace(" ", "-") + "BuyNode1";
					val4.displayText = "You have requested to order " + text + ". Amount: [variableAmount].\nTotal cost of items: [totalCost].\n\nPlease CONFIRM or DENY.\r\n\r\n";
					val4.clearPreviousText = true;
					val4.maxCharactersToType = 35;
				}
				val4.buyItemIndex = list.Count - 1;
				val4.isConfirmationNode = true;
				val4.overrideOptions = true;
				val4.itemCost = item.price;
				val4.terminalOptions = (CompatibleNoun[])(object)new CompatibleNoun[2]
				{
					new CompatibleNoun
					{
						noun = self.terminalNodes.allKeywords.First((TerminalKeyword keyword2) => keyword2.word == "confirm"),
						result = val3
					},
					new CompatibleNoun
					{
						noun = self.terminalNodes.allKeywords.First((TerminalKeyword keyword2) => keyword2.word == "deny"),
						result = result
					}
				};
				TerminalKeyword val5 = TerminalUtils.CreateTerminalKeyword(itemName.ToLowerInvariant().Replace(" ", "-"), isVerb: false, null, null, val);
				List<TerminalKeyword> list2 = self.terminalNodes.allKeywords.ToList();
				list2.Add(val5);
				self.terminalNodes.allKeywords = list2.ToArray();
				List<CompatibleNoun> list3 = val.compatibleNouns.ToList();
				list3.Add(new CompatibleNoun
				{
					noun = val5,
					result = val4
				});
				val.compatibleNouns = list3.ToArray();
				TerminalNode val6 = item.itemInfo;
				if ((Object)(object)val6 == (Object)null)
				{
					val6 = ScriptableObject.CreateInstance<TerminalNode>();
					((Object)val6).name = itemName.Replace(" ", "-") + "InfoNode";
					val6.displayText = "[No information about this object was found.]\n\n";
					val6.clearPreviousText = true;
					val6.maxCharactersToType = 25;
				}
				self.terminalNodes.allKeywords = list2.ToArray();
				List<CompatibleNoun> list4 = val2.compatibleNouns.ToList();
				list4.Add(new CompatibleNoun
				{
					noun = val5,
					result = val6
				});
				val2.compatibleNouns = list4.ToArray();
				Plugin.logger.LogInfo((object)(item.modName + " registered item: " + item.item.itemName));
			}
			self.buyableItemsList = list.ToArray();
			orig.Invoke(self);
		}

		private static void StartOfRound_Awake(orig_Awake orig, StartOfRound self)
		{
			//IL_00a1: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Expected O, but got Unknown
			orig.Invoke(self);
			SelectableLevel[] levels = self.levels;
			foreach (SelectableLevel val in levels)
			{
				string name = ((Object)val).name;
				if (!Enum.IsDefined(typeof(Levels.LevelTypes), name))
				{
					continue;
				}
				Levels.LevelTypes levelTypes = (Levels.LevelTypes)Enum.Parse(typeof(Levels.LevelTypes), name);
				foreach (ScrapItem scrapItem in scrapItems)
				{
					if (scrapItem.spawnLevels.HasFlag(levelTypes))
					{
						SpawnableItemWithRarity item = new SpawnableItemWithRarity
						{
							spawnableItem = scrapItem.item,
							rarity = scrapItem.rarity
						};
						if (!val.spawnableScrap.Any((SpawnableItemWithRarity x) => (Object)(object)x.spawnableItem == (Object)(object)scrapItem.item))
						{
							val.spawnableScrap.Add(item);
						}
					}
				}
			}
			foreach (ScrapItem scrapItem2 in scrapItems)
			{
				if (!self.allItemsList.itemsList.Contains(scrapItem2.item))
				{
					Plugin.logger.LogInfo((object)(scrapItem2.modName + " registered item: " + scrapItem2.item.itemName));
					self.allItemsList.itemsList.Add(scrapItem2.item);
				}
			}
			foreach (ShopItem shopItem in shopItems)
			{
				if (!self.allItemsList.itemsList.Contains(shopItem.item))
				{
					Plugin.logger.LogInfo((object)(shopItem.modName + " registered item: " + shopItem.item.itemName));
					self.allItemsList.itemsList.Add(shopItem.item);
				}
			}
		}

		public static void RegisterScrap(Item spawnableItem, int rarity, Levels.LevelTypes levelFlags)
		{
			ScrapItem scrapItem = new ScrapItem(spawnableItem, rarity, levelFlags);
			Assembly callingAssembly = Assembly.GetCallingAssembly();
			string name = callingAssembly.GetName().Name;
			scrapItem.modName = name;
			scrapItems.Add(scrapItem);
		}

		public static void RegisterShopItem(Item shopItem, TerminalNode buyNode1 = null, TerminalNode buyNode2 = null, TerminalNode itemInfo = null, int price = -1)
		{
			ShopItem shopItem2 = new ShopItem(shopItem, buyNode1, buyNode2, itemInfo, price);
			Assembly callingAssembly = Assembly.GetCallingAssembly();
			string name = callingAssembly.GetName().Name;
			shopItem2.modName = name;
			shopItems.Add(shopItem2);
		}

		public static void RegisterShopItem(Item shopItem, int price = -1)
		{
			ShopItem shopItem2 = new ShopItem(shopItem, null, null, null, price);
			Assembly callingAssembly = Assembly.GetCallingAssembly();
			string name = callingAssembly.GetName().Name;
			shopItem2.modName = name;
			shopItems.Add(shopItem2);
		}
	}
	public class Levels
	{
		[Flags]
		public enum LevelTypes
		{
			None = 1,
			ExperimentationLevel = 2,
			AssuranceLevel = 4,
			VowLevel = 8,
			OffenseLevel = 0x10,
			MarchLevel = 0x20,
			RendLevel = 0x40,
			DineLevel = 0x80,
			TitanLevel = 0x100,
			All = 0x1FE
		}
	}
	public class MapObjects
	{
		public class RegisteredMapObject
		{
			public SpawnableMapObject mapObject;

			public SpawnableOutsideObjectWithRarity outsideObject;

			public Levels.LevelTypes levels;

			public Func<SelectableLevel, AnimationCurve> spawnRateFunction;
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Awake <0>__StartOfRound_Awake;

			public static hook_SpawnMapObjects <1>__RoundManager_SpawnMapObjects;
		}

		public static List<RegisteredMapObject> mapObjects = new List<RegisteredMapObject>();

		public static void Init()
		{
			//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_001c: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			object obj = <>O.<0>__StartOfRound_Awake;
			if (obj == null)
			{
				hook_Awake val = StartOfRound_Awake;
				<>O.<0>__StartOfRound_Awake = val;
				obj = (object)val;
			}
			StartOfRound.Awake += (hook_Awake)obj;
			object obj2 = <>O.<1>__RoundManager_SpawnMapObjects;
			if (obj2 == null)
			{
				hook_SpawnMapObjects val2 = RoundManager_SpawnMapObjects;
				<>O.<1>__RoundManager_SpawnMapObjects = val2;
				obj2 = (object)val2;
			}
			RoundManager.SpawnMapObjects += (hook_SpawnMapObjects)obj2;
		}

		private static void RoundManager_SpawnMapObjects(orig_SpawnMapObjects orig, RoundManager self)
		{
			RandomMapObject[] array = Object.FindObjectsOfType<RandomMapObject>();
			RandomMapObject[] array2 = array;
			foreach (RandomMapObject val in array2)
			{
				foreach (RegisteredMapObject mapObject in mapObjects)
				{
					if (mapObject.mapObject != null && !val.spawnablePrefabs.Any((GameObject prefab) => (Object)(object)prefab == (Object)(object)mapObject.mapObject.prefabToSpawn))
					{
						val.spawnablePrefabs.Add(mapObject.mapObject.prefabToSpawn);
					}
				}
			}
			orig.Invoke(self);
		}

		private static void StartOfRound_Awake(orig_Awake orig, StartOfRound self)
		{
			orig.Invoke(self);
			SelectableLevel[] levels = self.levels;
			foreach (SelectableLevel val in levels)
			{
				string name = ((Object)val).name;
				if (!Enum.IsDefined(typeof(Levels.LevelTypes), name))
				{
					continue;
				}
				Levels.LevelTypes levelTypes = (Levels.LevelTypes)Enum.Parse(typeof(Levels.LevelTypes), name);
				foreach (RegisteredMapObject mapObject in mapObjects)
				{
					if (!mapObject.levels.HasFlag(levelTypes))
					{
						continue;
					}
					if (mapObject.mapObject != null)
					{
						if (!val.spawnableMapObjects.Any((SpawnableMapObject x) => (Object)(object)x.prefabToSpawn == (Object)(object)mapObject.mapObject.prefabToSpawn))
						{
							List<SpawnableMapObject> list = val.spawnableMapObjects.ToList();
							list.RemoveAll((SpawnableMapObject x) => (Object)(object)x.prefabToSpawn == (Object)(object)mapObject.mapObject.prefabToSpawn);
							val.spawnableMapObjects = list.ToArray();
						}
						SpawnableMapObject mapObject2 = mapObject.mapObject;
						if (mapObject.spawnRateFunction != null)
						{
							mapObject2.numberToSpawn = mapObject.spawnRateFunction(val);
						}
						List<SpawnableMapObject> list2 = val.spawnableMapObjects.ToList();
						list2.Add(mapObject2);
						val.spawnableMapObjects = list2.ToArray();
						Plugin.logger.LogInfo((object)("Added " + ((Object)mapObject2.prefabToSpawn).name + " to " + name));
					}
					else
					{
						if (mapObject.outsideObject == null)
						{
							continue;
						}
						if (!val.spawnableOutsideObjects.Any((SpawnableOutsideObjectWithRarity x) => (Object)(object)x.spawnableObject.prefabToSpawn == (Object)(object)mapObject.outsideObject.spawnableObject.prefabToSpawn))
						{
							List<SpawnableOutsideObjectWithRarity> list3 = val.spawnableOutsideObjects.ToList();
							list3.RemoveAll((SpawnableOutsideObjectWithRarity x) => (Object)(object)x.spawnableObject.prefabToSpawn == (Object)(object)mapObject.outsideObject.spawnableObject.prefabToSpawn);
							val.spawnableOutsideObjects = list3.ToArray();
						}
						SpawnableOutsideObjectWithRarity outsideObject = mapObject.outsideObject;
						if (mapObject.spawnRateFunction != null)
						{
							outsideObject.randomAmount = mapObject.spawnRateFunction(val);
						}
						List<SpawnableOutsideObjectWithRarity> list4 = val.spawnableOutsideObjects.ToList();
						list4.Add(outsideObject);
						val.spawnableOutsideObjects = list4.ToArray();
						Plugin.logger.LogInfo((object)("Added " + ((Object)outsideObject.spawnableObject.prefabToSpawn).name + " to " + name));
					}
				}
			}
		}

		public static void RegisterMapObject(SpawnableMapObjectDef mapObject, Levels.LevelTypes levels, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null)
		{
			RegisterMapObject(mapObject.spawnableMapObject, levels, spawnRateFunction);
		}

		public static void RegisterMapObject(SpawnableMapObject mapObject, Levels.LevelTypes levels, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null)
		{
			mapObjects.Add(new RegisteredMapObject
			{
				mapObject = mapObject,
				levels = levels,
				spawnRateFunction = spawnRateFunction
			});
		}

		public static void RegisterOutsideObject(SpawnableOutsideObjectDef mapObject, Levels.LevelTypes levels, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null)
		{
			RegisterOutsideObject(mapObject.spawnableMapObject, levels, spawnRateFunction);
		}

		public static void RegisterOutsideObject(SpawnableOutsideObjectWithRarity mapObject, Levels.LevelTypes levels, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null)
		{
			mapObjects.Add(new RegisteredMapObject
			{
				outsideObject = mapObject,
				levels = levels,
				spawnRateFunction = spawnRateFunction
			});
		}
	}
	public class NetworkPrefabs
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Start <0>__GameNetworkManager_Start;
		}

		private static List<GameObject> _networkPrefabs = new List<GameObject>();

		internal static void Init()
		{
			//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_001c: Expected O, but got Unknown
			object obj = <>O.<0>__GameNetworkManager_Start;
			if (obj == null)
			{
				hook_Start val = GameNetworkManager_Start;
				<>O.<0>__GameNetworkManager_Start = val;
				obj = (object)val;
			}
			GameNetworkManager.Start += (hook_Start)obj;
		}

		public static void RegisterNetworkPrefab(GameObject prefab)
		{
			_networkPrefabs.Add(prefab);
		}

		private static void GameNetworkManager_Start(orig_Start orig, GameNetworkManager self)
		{
			orig.Invoke(self);
			foreach (GameObject networkPrefab in _networkPrefabs)
			{
				((Component)self).GetComponent<NetworkManager>().AddNetworkPrefab(networkPrefab);
			}
		}
	}
	public class Shaders
	{
		public static void FixShaders(GameObject gameObject)
		{
			Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>();
			foreach (Renderer val in componentsInChildren)
			{
				Material[] materials = val.materials;
				foreach (Material val2 in materials)
				{
					if (((Object)val2.shader).name.Contains("Standard"))
					{
						val2.shader = Shader.Find("HDRP/Lit");
					}
				}
			}
		}
	}
	public class TerminalUtils
	{
		public static TerminalKeyword CreateTerminalKeyword(string word, bool isVerb = false, CompatibleNoun[] compatibleNouns = null, TerminalNode specialKeywordResult = null, TerminalKeyword defaultVerb = null, bool accessTerminalObjects = false)
		{
			TerminalKeyword val = ScriptableObject.CreateInstance<TerminalKeyword>();
			((Object)val).name = word;
			val.word = word;
			val.isVerb = isVerb;
			val.compatibleNouns = compatibleNouns;
			val.specialKeywordResult = specialKeywordResult;
			val.defaultVerb = defaultVerb;
			val.accessTerminalObjects = accessTerminalObjects;
			return val;
		}
	}
	public enum StoreType
	{
		None,
		ShipUpgrade,
		Decor
	}
	public class Unlockables
	{
		public class RegisteredUnlockable
		{
			public UnlockableItem unlockable;

			public StoreType StoreType;

			public TerminalNode buyNode1;

			public TerminalNode buyNode2;

			public TerminalNode itemInfo;

			public int price;

			public string modName;

			public RegisteredUnlockable(UnlockableItem unlockable, TerminalNode buyNode1 = null, TerminalNode buyNode2 = null, TerminalNode itemInfo = null, int price = -1)
			{
				this.unlockable = unlockable;
				this.buyNode1 = buyNode1;
				this.buyNode2 = buyNode2;
				this.itemInfo = itemInfo;
				this.price = price;
			}
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Awake <0>__StartOfRound_Awake;

			public static hook_Awake <1>__Terminal_Awake;

			public static hook_TextPostProcess <2>__Terminal_TextPostProcess;
		}

		public static List<RegisteredUnlockable> registeredUnlockables = new List<RegisteredUnlockable>();

		public static void Init()
		{
			//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_001c: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			object obj = <>O.<0>__StartOfRound_Awake;
			if (obj == null)
			{
				hook_Awake val = StartOfRound_Awake;
				<>O.<0>__StartOfRound_Awake = val;
				obj = (object)val;
			}
			StartOfRound.Awake += (hook_Awake)obj;
			object obj2 = <>O.<1>__Terminal_Awake;
			if (obj2 == null)
			{
				hook_Awake val2 = Terminal_Awake;
				<>O.<1>__Terminal_Awake = val2;
				obj2 = (object)val2;
			}
			Terminal.Awake += (hook_Awake)obj2;
			object obj3 = <>O.<2>__Terminal_TextPostProcess;
			if (obj3 == null)
			{
				hook_TextPostProcess val3 = Terminal_TextPostProcess;
				<>O.<2>__Terminal_TextPostProcess = val3;
				obj3 = (object)val3;
			}
			Terminal.TextPostProcess += (hook_TextPostProcess)obj3;
		}

		private static string Terminal_TextPostProcess(orig_TextPostProcess orig, Terminal self, string modifiedDisplayText, TerminalNode node)
		{
			if (modifiedDisplayText.Contains("[buyableItemsList]") && modifiedDisplayText.Contains("[unlockablesSelectionList]"))
			{
				int num = modifiedDisplayText.IndexOf(":");
				foreach (RegisteredUnlockable registeredUnlockable in registeredUnlockables)
				{
					if (registeredUnlockable.StoreType == StoreType.ShipUpgrade)
					{
						string unlockableName = registeredUnlockable.unlockable.unlockableName;
						int price = registeredUnlockable.price;
						string value = $"\n* {unlockableName}    //    Price: ${price}";
						modifiedDisplayText = modifiedDisplayText.Insert(num + 1, value);
					}
				}
			}
			return orig.Invoke(self, modifiedDisplayText, node);
		}

		private static void Terminal_Awake(orig_Awake orig, Terminal self)
		{
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_037b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b9: Expected O, but got Unknown
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fd: Expected O, but got Unknown
			//IL_0484: Unknown result type (might be due to invalid IL or missing references)
			//IL_0489: Unknown result type (might be due to invalid IL or missing references)
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a3: Expected O, but got Unknown
			//IL_0537: Unknown result type (might be due to invalid IL or missing references)
			//IL_053c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0549: Unknown result type (might be due to invalid IL or missing references)
			//IL_0556: Expected O, but got Unknown
			orig.Invoke(self);
			TerminalKeyword val = self.terminalNodes.allKeywords.First((TerminalKeyword keyword) => keyword.word == "buy");
			TerminalNode result = val.compatibleNouns[0].result.terminalOptions[1].result;
			TerminalKeyword val2 = self.terminalNodes.allKeywords.First((TerminalKeyword keyword) => keyword.word == "info");
			List<RegisteredUnlockable> list = registeredUnlockables.FindAll((RegisteredUnlockable unlockable) => unlockable.price != -1).ToList();
			Plugin.logger.LogInfo((object)$"Adding {list.Count} items to terminal");
			foreach (RegisteredUnlockable item in list)
			{
				string unlockableName = item.unlockable.unlockableName;
				TerminalKeyword keyword3 = TerminalUtils.CreateTerminalKeyword(unlockableName.ToLowerInvariant().Replace(" ", "-"), isVerb: false, null, null, val);
				if (self.terminalNodes.allKeywords.Any((TerminalKeyword kw) => kw.word == keyword3.word))
				{
					Plugin.logger.LogInfo((object)("Keyword " + keyword3.word + " already registed, skipping."));
					continue;
				}
				int shipUnlockableID = StartOfRound.Instance.unlockablesList.unlockables.FindIndex((UnlockableItem unlockable) => unlockable.unlockableName == item.unlockable.unlockableName);
				if (item.price == -1 && (Object)(object)item.buyNode1 != (Object)null)
				{
					item.price = item.buyNode1.itemCost;
				}
				char c = unlockableName[unlockableName.Length - 1];
				string text = unlockableName;
				TerminalNode val3 = item.buyNode2;
				if ((Object)(object)val3 == (Object)null)
				{
					val3 = ScriptableObject.CreateInstance<TerminalNode>();
					((Object)val3).name = unlockableName.Replace(" ", "-") + "BuyNode2";
					val3.displayText = "Ordered [variableAmount] " + text + ". Your new balance is [playerCredits].\n\nOur contractors enjoy fast, free shipping while on the job! Any purchased items will arrive hourly at your approximate location.\r\n\r\n";
					val3.clearPreviousText = true;
					val3.maxCharactersToType = 15;
				}
				val3.buyItemIndex = -1;
				val3.shipUnlockableID = shipUnlockableID;
				val3.buyUnlockable = true;
				val3.creatureName = unlockableName;
				val3.isConfirmationNode = false;
				val3.itemCost = item.price;
				val3.playSyncedClip = 0;
				TerminalNode val4 = item.buyNode1;
				if ((Object)(object)val4 == (Object)null)
				{
					val4 = ScriptableObject.CreateInstance<TerminalNode>();
					((Object)val4).name = unlockableName.Replace(" ", "-") + "BuyNode1";
					val4.displayText = "You have requested to order " + text + ". Amount: [variableAmount].\nTotal cost of items: [totalCost].\n\nPlease CONFIRM or DENY.\r\n\r\n";
					val4.clearPreviousText = true;
					val4.maxCharactersToType = 35;
				}
				val4.buyItemIndex = -1;
				val4.shipUnlockableID = shipUnlockableID;
				val4.creatureName = unlockableName;
				val4.isConfirmationNode = true;
				val4.overrideOptions = true;
				val4.itemCost = item.price;
				val4.terminalOptions = (CompatibleNoun[])(object)new CompatibleNoun[2]
				{
					new CompatibleNoun
					{
						noun = self.terminalNodes.allKeywords.First((TerminalKeyword keyword2) => keyword2.word == "confirm"),
						result = val3
					},
					new CompatibleNoun
					{
						noun = self.terminalNodes.allKeywords.First((TerminalKeyword keyword2) => keyword2.word == "deny"),
						result = result
					}
				};
				if (item.StoreType == StoreType.Decor)
				{
					item.unlockable.shopSelectionNode = val4;
				}
				else
				{
					item.unlockable.shopSelectionNode = null;
				}
				List<TerminalKeyword> list2 = self.terminalNodes.allKeywords.ToList();
				list2.Add(keyword3);
				self.terminalNodes.allKeywords = list2.ToArray();
				List<CompatibleNoun> list3 = val.compatibleNouns.ToList();
				list3.Add(new CompatibleNoun
				{
					noun = keyword3,
					result = val4
				});
				val.compatibleNouns = list3.ToArray();
				TerminalNode val5 = item.itemInfo;
				if ((Object)(object)val5 == (Object)null)
				{
					val5 = ScriptableObject.CreateInstance<TerminalNode>();
					((Object)val5).name = unlockableName.Replace(" ", "-") + "InfoNode";
					val5.displayText = "[No information about this object was found.]\n\n";
					val5.clearPreviousText = true;
					val5.maxCharactersToType = 25;
				}
				self.terminalNodes.allKeywords = list2.ToArray();
				List<CompatibleNoun> list4 = val2.compatibleNouns.ToList();
				list4.Add(new CompatibleNoun
				{
					noun = keyword3,
					result = val5
				});
				val2.compatibleNouns = list4.ToArray();
				Plugin.logger.LogInfo((object)(item.modName + " registered item: " + item.unlockable.unlockableName));
			}
			orig.Invoke(self);
		}

		private static void StartOfRound_Awake(orig_Awake orig, StartOfRound self)
		{
			orig.Invoke(self);
			Plugin.logger.LogInfo((object)$"Adding {registeredUnlockables.Count} unlockables to unlockables list");
			foreach (RegisteredUnlockable unlockable in registeredUnlockables)
			{
				if (self.unlockablesList.unlockables.Any((UnlockableItem x) => x.unlockableName == unlockable.unlockable.unlockableName))
				{
					Plugin.logger.LogInfo((object)("Unlockable " + unlockable.unlockable.unlockableName + " already exists in unlockables list, skipping"));
					continue;
				}
				if ((Object)(object)unlockable.unlockable.prefabObject != (Object)null)
				{
					PlaceableShipObject componentInChildren = unlockable.unlockable.prefabObject.GetComponentInChildren<PlaceableShipObject>();
					if ((Object)(object)componentInChildren != (Object)null)
					{
						componentInChildren.unlockableID = self.unlockablesList.unlockables.Count;
					}
				}
				self.unlockablesList.unlockables.Add(unlockable.unlockable);
			}
		}

		public static void RegisterUnlockable(UnlockableItemDef unlockable, int price = -1, StoreType storeType = StoreType.None)
		{
			RegisterUnlockable(unlockable.unlockable, storeType, null, null, null, price);
		}

		public static void RegisterUnlockable(UnlockableItem unlockable, int price = -1, StoreType storeType = StoreType.None)
		{
			RegisterUnlockable(unlockable, storeType, null, null, null, price);
		}

		public static void RegisterUnlockable(UnlockableItemDef unlockable, StoreType storeType = StoreType.None, TerminalNode buyNode1 = null, TerminalNode buyNode2 = null, TerminalNode itemInfo = null, int price = -1)
		{
			RegisterUnlockable(unlockable.unlockable, storeType, buyNode1, buyNode2, itemInfo, price);
		}

		public static void RegisterUnlockable(UnlockableItem unlockable, StoreType storeType = StoreType.None, TerminalNode buyNode1 = null, TerminalNode buyNode2 = null, TerminalNode itemInfo = null, int price = -1)
		{
			RegisteredUnlockable registeredUnlockable = new RegisteredUnlockable(unlockable, buyNode1, buyNode2, itemInfo, price);
			Assembly callingAssembly = Assembly.GetCallingAssembly();
			string name = callingAssembly.GetName().Name;
			registeredUnlockable.modName = name;
			registeredUnlockable.StoreType = storeType;
			registeredUnlockables.Add(registeredUnlockable);
		}
	}
}
namespace LethalLib.Extras
{
	[CreateAssetMenu(menuName = "ScriptableObjects/DungeonDef")]
	public class DungeonDef : ScriptableObject
	{
		public DungeonFlow dungeonFlow;

		[Range(0f, 300f)]
		public int rarity;

		public AudioClip firstTimeDungeonAudio;
	}
	[CreateAssetMenu(menuName = "ScriptableObjects/DungeonGraphLine")]
	public class DungeonGraphLineDef : ScriptableObject
	{
		public GraphLine graphLine;
	}
	[CreateAssetMenu(menuName = "ScriptableObjects/GameObjectChance")]
	public class GameObjectChanceDef : ScriptableObject
	{
		public GameObjectChance gameObjectChance;
	}
	[CreateAssetMenu(menuName = "ScriptableObjects/SpawnableMapObject")]
	public class SpawnableMapObjectDef : ScriptableObject
	{
		public SpawnableMapObject spawnableMapObject;
	}
	[CreateAssetMenu(menuName = "ScriptableObjects/SpawnableOutsideObject")]
	public class SpawnableOutsideObjectDef : ScriptableObject
	{
		public SpawnableOutsideObjectWithRarity spawnableMapObject;
	}
	[CreateAssetMenu(menuName = "ScriptableObjects/UnlockableItem")]
	public class UnlockableItemDef : ScriptableObject
	{
		public StoreType storeType = StoreType.None;

		public UnlockableItem unlockable;
	}
}

plugins/Evaisa-LethalThings/LethalThings/LethalThings.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 System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using LethalLib.Extras;
using LethalLib.Modules;
using LethalThings.Extensions;
using LethalThings.MonoBehaviours;
using LethalThings.Patches;
using Microsoft.CodeAnalysis;
using On;
using On.GameNetcodeStuff;
using TMPro;
using Unity.Netcode;
using Unity.Netcode.Components;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LethalThings")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Mod for Lethal Company")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+bba4b7501761a6784cb1d7d51c90637fec00fc9e")]
[assembly: AssemblyProduct("LethalThings")]
[assembly: AssemblyTitle("LethalThings")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
internal class <Module>
{
	static <Module>()
	{
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>();
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<HackingTool.HackState>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedValueEquals<HackingTool.HackState>();
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<float>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<float>();
	}
}
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 LethalThings
{
	public class Config
	{
		public static ConfigEntry<int> arsonSpawnWeight;

		public static ConfigEntry<int> dirtyArsonSpawnWeight;

		public static ConfigEntry<int> toimariSpawnWeight;

		public static ConfigEntry<int> hamisSpawnWeight;

		public static ConfigEntry<int> cookieSpawnWeight;

		public static ConfigEntry<int> maxwellSpawnWeight;

		public static ConfigEntry<float> evilMaxwellChance;

		public static ConfigEntry<bool> maxwellPlayMusicDefault;

		public static ConfigEntry<bool> toyHammerEnabled;

		public static ConfigEntry<int> toyHammerPrice;

		public static ConfigEntry<bool> pouchyBeltEnabled;

		public static ConfigEntry<int> pouchyBeltPrice;

		public static ConfigEntry<bool> remoteRadarEnabled;

		public static ConfigEntry<int> remoteRadarPrice;

		public static ConfigEntry<bool> rocketLauncherEnabled;

		public static ConfigEntry<int> rocketLauncherPrice;

		public static ConfigEntry<bool> hackingToolEnabled;

		public static ConfigEntry<int> hackingToolPrice;

		public static ConfigEntry<int> boombaSpawnWeight;

		public static ConfigEntry<bool> rugsEnabled;

		public static ConfigEntry<int> smallRugPrice;

		public static ConfigEntry<int> largeRugPrice;

		public static ConfigEntry<bool> fatalitiesSignEnabled;

		public static ConfigEntry<int> fatalitiesSignPrice;

		public static ConfigEntry<bool> teleporterTrapsEnabled;

		public static ConfigEntry<bool> enableItemChargerElectrocution;

		public static ConfigEntry<int> itemChargerElectrocutionDamage;

		public static ConfigEntry<bool> disableOverlappingModContent;

		public static ConfigFile VolumeConfig;

		public static void Load()
		{
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Expected O, but got Unknown
			arsonSpawnWeight = Plugin.config.Bind<int>("Scrap", "Arson", 10, "How much does Arson spawn, higher = more common");
			dirtyArsonSpawnWeight = Plugin.config.Bind<int>("Scrap", "DirtyArson", 10, "How much does Arson (Dirty) spawn, higher = more common");
			toimariSpawnWeight = Plugin.config.Bind<int>("Scrap", "Toimari", 20, "How much does Toimari spawn, higher = more common");
			hamisSpawnWeight = Plugin.config.Bind<int>("Scrap", "Hamis", 20, "How much does Hamis spawn, higher = more common");
			cookieSpawnWeight = Plugin.config.Bind<int>("Scrap", "Cookie", 20, "How much does Cookie spawn, higher = more common");
			maxwellSpawnWeight = Plugin.config.Bind<int>("Scrap", "Maxwell", 3, "How much does Maxwell spawn, higher = more common");
			evilMaxwellChance = Plugin.config.Bind<float>("Scrap", "MaxwellEvilChance", 10f, "Chance for maxwell to be evil, percentage.");
			maxwellPlayMusicDefault = Plugin.config.Bind<bool>("Scrap", "MaxwellPlayMusicDefault", true, "Does Maxwell play music by default?");
			toyHammerEnabled = Plugin.config.Bind<bool>("Items", "ToyHammer", true, "Is Toy Hammer enabled?");
			toyHammerPrice = Plugin.config.Bind<int>("Items", "ToyHammerPrice", 80, "How much does Toy Hammer cost?");
			pouchyBeltEnabled = Plugin.config.Bind<bool>("Items", "PouchyBelt", true, "Is Pouchy Belt enabled?");
			pouchyBeltPrice = Plugin.config.Bind<int>("Items", "PouchyBeltPrice", 290, "How much does Pouchy Belt cost?");
			remoteRadarEnabled = Plugin.config.Bind<bool>("Items", "RemoteRadar", true, "Is Remote Radar enabled?");
			remoteRadarPrice = Plugin.config.Bind<int>("Items", "RemoteRadarPrice", 240, "How much does Remote Radar cost?");
			rocketLauncherEnabled = Plugin.config.Bind<bool>("Items", "RocketLauncher", true, "Is Rocket Launcher enabled?");
			rocketLauncherPrice = Plugin.config.Bind<int>("Items", "RocketLauncherPrice", 260, "How much does Rocket Launcher cost?");
			hackingToolEnabled = Plugin.config.Bind<bool>("Items", "HackingTool", true, "Is Hacking Tool enabled?");
			hackingToolPrice = Plugin.config.Bind<int>("Items", "HackingToolPrice", 190, "How much does Hacking Tool cost?");
			boombaSpawnWeight = Plugin.config.Bind<int>("Enemies", "Boomba", 20, "How much does Boomba spawn, higher = more common");
			rugsEnabled = Plugin.config.Bind<bool>("Decor", "Rugs", true, "Are rugs enabled?");
			smallRugPrice = Plugin.config.Bind<int>("Decor", "SmallRugPrice", 80, "How much does a small rug cost?");
			largeRugPrice = Plugin.config.Bind<int>("Decor", "LargeRugPrice", 110, "How much does a large rug cost?");
			fatalitiesSignEnabled = Plugin.config.Bind<bool>("Decor", "FatalitiesSign", true, "Is Fatalities Sign enabled?");
			fatalitiesSignPrice = Plugin.config.Bind<int>("Decor", "FatalitiesSignPrice", 100, "How much does Fatalities Sign cost?");
			teleporterTrapsEnabled = Plugin.config.Bind<bool>("Traps", "TeleporterTraps", true, "Are teleporter traps enabled?");
			enableItemChargerElectrocution = Plugin.config.Bind<bool>("Misc", "EnableItemChargerElectrocution", true, "Do players get electrocuted when stuffing conductive objects in the item charger.");
			itemChargerElectrocutionDamage = Plugin.config.Bind<int>("Misc", "ItemChargerElectrocutionDamage", 20, "How much damage does the item charger electrocution do.");
			disableOverlappingModContent = Plugin.config.Bind<bool>("Misc", "DisableOverlappingModContent", true, "Disable content from other mods which exists in this one (e.g. maxwell).");
			VolumeConfig = new ConfigFile(Paths.ConfigPath + "\\LethalThings.AudioVolume.cfg", true);
		}
	}
	public class Content
	{
		public class CustomItem
		{
			public string name = "";

			public string itemPath = "";

			public string infoPath = "";

			public Action<Item> itemAction = delegate
			{
			};

			public bool enabled = true;

			public CustomItem(string name, string itemPath, string infoPath, Action<Item> action = null)
			{
				this.name = name;
				this.itemPath = itemPath;
				this.infoPath = infoPath;
				if (action != null)
				{
					itemAction = action;
				}
			}

			public static CustomItem Add(string name, string itemPath, string infoPath = null, Action<Item> action = null)
			{
				return new CustomItem(name, itemPath, infoPath, action);
			}
		}

		public class CustomUnlockable
		{
			public string name = "";

			public string unlockablePath = "";

			public string infoPath = "";

			public Action<UnlockableItem> unlockableAction = delegate
			{
			};

			public bool enabled = true;

			public int unlockCost = -1;

			public CustomUnlockable(string name, string unlockablePath, string infoPath, Action<UnlockableItem> action = null, int unlockCost = -1)
			{
				this.name = name;
				this.unlockablePath = unlockablePath;
				this.infoPath = infoPath;
				if (action != null)
				{
					unlockableAction = action;
				}
				this.unlockCost = unlockCost;
			}

			public static CustomUnlockable Add(string name, string unlockablePath, string infoPath = null, Action<UnlockableItem> action = null, int unlockCost = -1, bool enabled = true)
			{
				return new CustomUnlockable(name, unlockablePath, infoPath, action, unlockCost)
				{
					enabled = enabled
				};
			}
		}

		public class CustomShopItem : CustomItem
		{
			public int itemPrice;

			public CustomShopItem(string name, string itemPath, string infoPath = null, int itemPrice = 0, Action<Item> action = null)
				: base(name, itemPath, infoPath, action)
			{
				this.itemPrice = itemPrice;
			}

			public static CustomShopItem Add(string name, string itemPath, string infoPath = null, int itemPrice = 0, Action<Item> action = null, bool enabled = true)
			{
				return new CustomShopItem(name, itemPath, infoPath, itemPrice, action)
				{
					enabled = enabled
				};
			}
		}

		public class CustomScrap : CustomItem
		{
			public LevelTypes levelType = (LevelTypes)510;

			public int rarity;

			public CustomScrap(string name, string itemPath, LevelTypes levelType, int rarity, Action<Item> action = null)
				: base(name, itemPath, null, action)
			{
				//IL_0006: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				this.levelType = levelType;
				this.rarity = rarity;
			}

			public static CustomScrap Add(string name, string itemPath, LevelTypes levelType, int rarity, Action<Item> action = null)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				return new CustomScrap(name, itemPath, levelType, rarity, action);
			}
		}

		public class CustomEnemy
		{
			public string name;

			public string enemyPath;

			public int rarity;

			public LevelTypes levelFlags;

			public SpawnType spawnType;

			public string infoKeyword;

			public string infoNode;

			public bool enabled = true;

			public CustomEnemy(string name, string enemyPath, int rarity, LevelTypes levelFlags, SpawnType spawnType, string infoKeyword, string infoNode)
			{
				//IL_0023: 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_002b: 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)
				this.name = name;
				this.enemyPath = enemyPath;
				this.rarity = rarity;
				this.levelFlags = levelFlags;
				this.spawnType = spawnType;
				this.infoKeyword = infoKeyword;
				this.infoNode = infoNode;
			}

			public static CustomEnemy Add(string name, string enemyPath, int rarity, LevelTypes levelFlags, SpawnType spawnType, string infoKeyword, string infoNode, bool enabled = true)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0004: Unknown result type (might be due to invalid IL or missing references)
				return new CustomEnemy(name, enemyPath, rarity, levelFlags, spawnType, infoKeyword, infoNode)
				{
					enabled = enabled
				};
			}
		}

		public class CustomMapObject
		{
			public string name;

			public string objectPath;

			public LevelTypes levelFlags;

			public Func<SelectableLevel, AnimationCurve> spawnRateFunction;

			public bool enabled = true;

			public CustomMapObject(string name, string objectPath, LevelTypes levelFlags, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null, bool enabled = false)
			{
				//IL_001c: 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)
				this.name = name;
				this.objectPath = objectPath;
				this.levelFlags = levelFlags;
				this.spawnRateFunction = spawnRateFunction;
				this.enabled = enabled;
			}

			public static CustomMapObject Add(string name, string objectPath, LevelTypes levelFlags, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null, bool enabled = false)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				return new CustomMapObject(name, objectPath, levelFlags, spawnRateFunction, enabled);
			}
		}

		public static AssetBundle MainAssets;

		public static Dictionary<string, GameObject> Prefabs = new Dictionary<string, GameObject>();

		public static List<CustomUnlockable> customUnlockables;

		public static List<CustomItem> customItems;

		public static List<CustomEnemy> customEnemies;

		public static List<CustomMapObject> customMapObjects;

		public static GameObject ConfigManagerPrefab;

		public static void TryLoadAssets()
		{
			if ((Object)(object)MainAssets == (Object)null)
			{
				MainAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "lethalthings"));
				Plugin.logger.LogInfo((object)"Loaded asset bundle");
			}
		}

		public static void Load()
		{
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_057f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0586: Unknown result type (might be due to invalid IL or missing references)
			//IL_0615: Unknown result type (might be due to invalid IL or missing references)
			TryLoadAssets();
			customItems = new List<CustomItem>
			{
				CustomScrap.Add("Arson", "Assets/Custom/LethalThings/Scrap/Arson/ArsonPlush.asset", (LevelTypes)510, Config.arsonSpawnWeight.Value),
				CustomScrap.Add("Cookie", "Assets/Custom/LethalThings/Scrap/Cookie/CookieFumo.asset", (LevelTypes)510, Config.cookieSpawnWeight.Value),
				CustomScrap.Add("Bilka", "Assets/Custom/LethalThings/Scrap/Toimari/ToimariPlush.asset", (LevelTypes)510, Config.toimariSpawnWeight.Value),
				CustomScrap.Add("Hamis", "Assets/Custom/LethalThings/Scrap/Hamis/HamisPlush.asset", (LevelTypes)510, Config.hamisSpawnWeight.Value),
				CustomScrap.Add("ArsonDirty", "Assets/Custom/LethalThings/Scrap/Arson/ArsonPlushDirty.asset", (LevelTypes)510, Config.dirtyArsonSpawnWeight.Value),
				CustomScrap.Add("Maxwell", "Assets/Custom/LethalThings/Scrap/Maxwell/Dingus.asset", (LevelTypes)510, Config.maxwellSpawnWeight.Value),
				CustomShopItem.Add("RocketLauncher", "Assets/Custom/LethalThings/Items/RocketLauncher/RocketLauncher.asset", "Assets/Custom/LethalThings/Items/RocketLauncher/RocketLauncherInfo.asset", Config.rocketLauncherPrice.Value, delegate(Item item)
				{
					NetworkPrefabs.RegisterNetworkPrefab(item.spawnPrefab.GetComponent<RocketLauncher>().missilePrefab);
				}, Config.rocketLauncherEnabled.Value),
				CustomShopItem.Add("ToyHammer", "Assets/Custom/LethalThings/Items/ToyHammer/ToyHammer.asset", "Assets/Custom/LethalThings/Items/ToyHammer/ToyHammerInfo.asset", Config.toyHammerPrice.Value, null, Config.toyHammerEnabled.Value),
				CustomShopItem.Add("RemoteRadar", "Assets/Custom/LethalThings/Items/Radar/HandheldRadar.asset", "Assets/Custom/LethalThings/Items/Radar/HandheldRadarInfo.asset", Config.remoteRadarPrice.Value, null, Config.remoteRadarEnabled.Value),
				CustomShopItem.Add("PouchyBelt", "Assets/Custom/LethalThings/Items/Pouch/Pouch.asset", "Assets/Custom/LethalThings/Items/Pouch/PouchInfo.asset", Config.pouchyBeltPrice.Value, null, Config.pouchyBeltEnabled.Value),
				CustomShopItem.Add("HackingTool", "Assets/Custom/LethalThings/Items/HackingTool/HackingTool.asset", "Assets/Custom/LethalThings/Items/HackingTool/HackingToolInfo.asset", Config.hackingToolPrice.Value, null, Config.hackingToolEnabled.Value)
			};
			customEnemies = new List<CustomEnemy> { CustomEnemy.Add("Boomba", "Assets/Custom/LethalThings/Enemies/Roomba/Boomba.asset", Config.boombaSpawnWeight.Value, (LevelTypes)510, (SpawnType)0, null, "Assets/Custom/LethalThings/Enemies/Roomba/BoombaFile.asset") };
			customUnlockables = new List<CustomUnlockable>
			{
				CustomUnlockable.Add("SmallRug", "Assets/Custom/LethalThings/Unlockables/Rug/SmallRug.asset", "Assets/Custom/LethalThings/Unlockables/Rug/RugInfo.asset", null, Config.smallRugPrice.Value, Config.rugsEnabled.Value),
				CustomUnlockable.Add("LargeRug", "Assets/Custom/LethalThings/Unlockables/Rug/LargeRug.asset", "Assets/Custom/LethalThings/Unlockables/Rug/RugInfo.asset", null, Config.largeRugPrice.Value, Config.rugsEnabled.Value),
				CustomUnlockable.Add("FatalitiesSign", "Assets/Custom/LethalThings/Unlockables/Sign/Sign.asset", "Assets/Custom/LethalThings/Unlockables/Sign/SignInfo.asset", null, Config.fatalitiesSignPrice.Value, Config.fatalitiesSignEnabled.Value)
			};
			customMapObjects = new List<CustomMapObject> { CustomMapObject.Add("TeleporterTrap", "Assets/Custom/LethalThings/hazards/TeleporterTrap/TeleporterTrap.asset", (LevelTypes)510, (SelectableLevel level) => new AnimationCurve((Keyframe[])(object)new Keyframe[2]
			{
				new Keyframe(0f, 0f),
				new Keyframe(1f, 4f)
			}), Config.teleporterTrapsEnabled.Value) };
			foreach (CustomItem customItem in customItems)
			{
				if (customItem.enabled)
				{
					Item val = MainAssets.LoadAsset<Item>(customItem.itemPath);
					if ((Object)(object)val.spawnPrefab.GetComponent<NetworkTransform>() == (Object)null)
					{
						val.spawnPrefab.AddComponent<NetworkTransform>();
					}
					Prefabs.Add(customItem.name, val.spawnPrefab);
					NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
					customItem.itemAction(val);
					if (customItem is CustomShopItem)
					{
						TerminalNode val2 = MainAssets.LoadAsset<TerminalNode>(customItem.infoPath);
						Plugin.logger.LogInfo((object)$"Registering shop item {customItem.name} with price {((CustomShopItem)customItem).itemPrice}");
						Items.RegisterShopItem(val, (TerminalNode)null, (TerminalNode)null, val2, ((CustomShopItem)customItem).itemPrice);
					}
					else if (customItem is CustomScrap)
					{
						Items.RegisterScrap(val, ((CustomScrap)customItem).rarity, ((CustomScrap)customItem).levelType);
					}
				}
			}
			foreach (CustomUnlockable customUnlockable in customUnlockables)
			{
				if (customUnlockable.enabled)
				{
					UnlockableItem unlockable = MainAssets.LoadAsset<UnlockableItemDef>(customUnlockable.unlockablePath).unlockable;
					if ((Object)(object)unlockable.prefabObject != (Object)null)
					{
						NetworkPrefabs.RegisterNetworkPrefab(unlockable.prefabObject);
					}
					Prefabs.Add(customUnlockable.name, unlockable.prefabObject);
					TerminalNode val3 = null;
					if (customUnlockable.infoPath != null)
					{
						val3 = MainAssets.LoadAsset<TerminalNode>(customUnlockable.infoPath);
					}
					Unlockables.RegisterUnlockable(unlockable, (StoreType)2, (TerminalNode)null, (TerminalNode)null, val3, customUnlockable.unlockCost);
				}
			}
			foreach (CustomEnemy customEnemy in customEnemies)
			{
				if (customEnemy.enabled)
				{
					EnemyType val4 = MainAssets.LoadAsset<EnemyType>(customEnemy.enemyPath);
					TerminalNode val5 = MainAssets.LoadAsset<TerminalNode>(customEnemy.infoNode);
					TerminalKeyword val6 = null;
					if (customEnemy.infoKeyword != null)
					{
						val6 = MainAssets.LoadAsset<TerminalKeyword>(customEnemy.infoKeyword);
					}
					NetworkPrefabs.RegisterNetworkPrefab(val4.enemyPrefab);
					Prefabs.Add(customEnemy.name, val4.enemyPrefab);
					Enemies.RegisterEnemy(val4, customEnemy.rarity, customEnemy.levelFlags, customEnemy.spawnType, val5, val6);
				}
			}
			foreach (CustomMapObject customMapObject in customMapObjects)
			{
				if (customMapObject.enabled)
				{
					SpawnableMapObjectDef val7 = MainAssets.LoadAsset<SpawnableMapObjectDef>(customMapObject.objectPath);
					NetworkPrefabs.RegisterNetworkPrefab(val7.spawnableMapObject.prefabToSpawn);
					Prefabs.Add(customMapObject.name, val7.spawnableMapObject.prefabToSpawn);
					MapObjects.RegisterMapObject(val7, customMapObject.levelFlags, customMapObject.spawnRateFunction);
				}
			}
			foreach (KeyValuePair<string, GameObject> prefab in Prefabs)
			{
				GameObject value = prefab.Value;
				string key = prefab.Key;
				AudioSource[] componentsInChildren = value.GetComponentsInChildren<AudioSource>();
				if (componentsInChildren.Length != 0)
				{
					ConfigEntry<float> val8 = Config.VolumeConfig.Bind<float>("Volume", key ?? "", 100f, "Audio volume for " + key + " (0 - 100)");
					AudioSource[] array = componentsInChildren;
					foreach (AudioSource obj in array)
					{
						obj.volume *= val8.Value / 100f;
					}
				}
			}
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			for (int i = 0; i < types.Length; i++)
			{
				MethodInfo[] methods = types[i].GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				foreach (MethodInfo methodInfo in methods)
				{
					if (methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false).Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
			Plugin.logger.LogInfo((object)"Custom content loaded!");
		}
	}
	public class Dingus : GrabbableObject
	{
		public AudioSource noiseAudio;

		public AudioSource noiseAudioFar;

		public AudioSource musicAudio;

		public AudioSource musicAudioFar;

		[Space(3f)]
		public AudioClip[] noiseSFX;

		public AudioClip[] noiseSFXFar;

		public AudioClip evilNoise;

		[Space(3f)]
		public float noiseRange;

		public float maxLoudness;

		public float minLoudness;

		public float minPitch;

		public float maxPitch;

		private Random noisemakerRandom;

		public Animator triggerAnimator;

		private int timesPlayedWithoutTurningOff;

		private RoundManager roundManager;

		private float noiseInterval = 1f;

		public Animator danceAnimator;

		private NetworkVariable<bool> isEvil = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

		public GameObject evilObject;

		public NetworkVariable<bool> isPlayingMusic = new NetworkVariable<bool>(Config.maxwellPlayMusicDefault.Value, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)1);

		public override void Start()
		{
			((GrabbableObject)this).Start();
			roundManager = Object.FindObjectOfType<RoundManager>();
			noisemakerRandom = new Random(StartOfRound.Instance.randomMapSeed + 85);
			if (((NetworkBehaviour)this).IsOwner)
			{
				isPlayingMusic.Value = Config.maxwellPlayMusicDefault.Value;
			}
			if (((NetworkBehaviour)this).IsHost)
			{
				isEvil.Value = Random.Range(0f, 100f) <= Config.evilMaxwellChance.Value;
			}
			Debug.Log((object)"Making the dingus dance");
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null))
			{
				int num = noisemakerRandom.Next(0, noiseSFX.Length);
				float num2 = (float)noisemakerRandom.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f;
				float pitch = (float)noisemakerRandom.Next((int)(minPitch * 100f), (int)(maxPitch * 100f)) / 100f;
				noiseAudio.pitch = pitch;
				noiseAudio.PlayOneShot(noiseSFX[num], num2);
				if ((Object)(object)noiseAudioFar != (Object)null)
				{
					noiseAudioFar.pitch = pitch;
					noiseAudioFar.PlayOneShot(noiseSFXFar[num], num2);
				}
				if ((Object)(object)triggerAnimator != (Object)null)
				{
					triggerAnimator.SetTrigger("playAnim");
				}
				WalkieTalkie.TransmitOneShotAudio(noiseAudio, noiseSFX[num], num2);
				RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num2, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
			}
		}

		public override void DiscardItem()
		{
			if ((Object)(object)base.playerHeldBy != (Object)null)
			{
				base.playerHeldBy.equippedUsableItemQE = false;
			}
			base.isBeingUsed = false;
			((GrabbableObject)this).DiscardItem();
		}

		public override void EquipItem()
		{
			((GrabbableObject)this).EquipItem();
			base.playerHeldBy.equippedUsableItemQE = true;
			danceAnimator.Play("dingusIdle");
			Debug.Log((object)"Making the dingus idle");
			if (((NetworkBehaviour)this).IsOwner)
			{
				HUDManager.Instance.DisplayTip("Maxwell acquired", "Press Q to toggle music.", false, true, "LCTip_UseManual");
			}
		}

		public override void ItemInteractLeftRight(bool right)
		{
			((GrabbableObject)this).ItemInteractLeftRight(right);
			if (!right && ((NetworkBehaviour)this).IsOwner)
			{
				isPlayingMusic.Value = !isPlayingMusic.Value;
			}
		}

		public override void InteractItem()
		{
			((GrabbableObject)this).InteractItem();
			if (isEvil.Value)
			{
				if (((NetworkBehaviour)this).IsOwner)
				{
					isPlayingMusic.Value = false;
				}
				danceAnimator.Play("dingusIdle");
				if (musicAudio.isPlaying)
				{
					musicAudio.Pause();
					musicAudioFar.Pause();
				}
				((MonoBehaviour)this).StartCoroutine(evilMaxwellMoment());
			}
		}

		public IEnumerator evilMaxwellMoment()
		{
			yield return (object)new WaitForSeconds(1f);
			noiseAudio.PlayOneShot(evilNoise, 1f);
			evilObject.SetActive(true);
			((Renderer)base.mainObjectRenderer).enabled = false;
			if ((Object)(object)noiseAudioFar != (Object)null)
			{
				noiseAudioFar.PlayOneShot(evilNoise, 1f);
			}
			if ((Object)(object)triggerAnimator != (Object)null)
			{
				triggerAnimator.SetTrigger("playAnim");
			}
			WalkieTalkie.TransmitOneShotAudio(noiseAudio, evilNoise, 1f);
			RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, 1f, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
			yield return (object)new WaitForSeconds(1.5f);
			Utilities.CreateExplosion(((Component)this).transform.position, spawnExplosionEffect: true, 100, 0f, 6.4f, 6, (CauseOfDeath)3);
			Rigidbody[] componentsInChildren = evilObject.GetComponentsInChildren<Rigidbody>();
			foreach (Rigidbody obj in componentsInChildren)
			{
				obj.isKinematic = false;
				obj.AddExplosionForce(1000f, evilObject.transform.position, 100f);
			}
			yield return (object)new WaitForSeconds(2f);
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}

		public override void Update()
		{
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).Update();
			if (isEvil.Value)
			{
				base.grabbable = false;
				base.grabbableToEnemies = false;
			}
			if (isPlayingMusic.Value)
			{
				if (!musicAudio.isPlaying)
				{
					musicAudio.Play();
					musicAudioFar.Play();
				}
				if (!base.isHeld)
				{
					danceAnimator.Play("dingusDance");
				}
				else
				{
					danceAnimator.Play("dingusIdle");
				}
				if (noiseInterval <= 0f)
				{
					noiseInterval = 1f;
					timesPlayedWithoutTurningOff++;
					roundManager.PlayAudibleNoise(((Component)this).transform.position, 16f, 0.9f, timesPlayedWithoutTurningOff, false, 5);
				}
				else
				{
					noiseInterval -= Time.deltaTime;
				}
			}
			else
			{
				timesPlayedWithoutTurningOff = 0;
				danceAnimator.Play("dingusIdle");
				if (musicAudio.isPlaying)
				{
					musicAudio.Pause();
					musicAudioFar.Pause();
				}
			}
		}

		protected override void __initializeVariables()
		{
			if (isEvil == null)
			{
				throw new Exception("Dingus.isEvil cannot be null. All NetworkVariableBase instances must be initialized.");
			}
			((NetworkVariableBase)isEvil).Initialize((NetworkBehaviour)(object)this);
			((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)isEvil, "isEvil");
			((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)isEvil);
			if (isPlayingMusic == null)
			{
				throw new Exception("Dingus.isPlayingMusic cannot be null. All NetworkVariableBase instances must be initialized.");
			}
			((NetworkVariableBase)isPlayingMusic).Initialize((NetworkBehaviour)(object)this);
			((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)isPlayingMusic, "isPlayingMusic");
			((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)isPlayingMusic);
			((GrabbableObject)this).__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "Dingus";
		}
	}
	public class Missile : NetworkBehaviour
	{
		public int damage = 50;

		public float maxDistance = 10f;

		public float minDistance;

		public float gravity = 2.4f;

		public float flightDelay = 0.5f;

		public float flightForce = 150f;

		public float flightTime = 2f;

		public float autoDestroyTime = 3f;

		private float timeAlive;

		public float LobForce = 100f;

		public ParticleSystem particleSystem;

		private void OnCollisionEnter(Collision collision)
		{
			if (((NetworkBehaviour)this).IsHost)
			{
				Boom();
				BoomClientRpc();
			}
			else
			{
				BoomServerRpc();
			}
		}

		private void Start()
		{
			//IL_0020: 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)
			((Component)this).GetComponent<Rigidbody>().useGravity = false;
			if (((NetworkBehaviour)this).IsHost)
			{
				((Component)this).GetComponent<Rigidbody>().AddForce(((Component)this).transform.forward * LobForce, (ForceMode)1);
			}
		}

		[ClientRpc]
		public void BoomClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3331368301u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3331368301u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Boom();
				}
			}
		}

		[ServerRpc]
		public void BoomServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Invalid comparison between Unknown and I4
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: 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)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(452316787u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 452316787u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				Boom();
				BoomClientRpc();
			}
		}

		public void CreateExplosion()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			PlayerControllerB attacker = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB x) => ((NetworkBehaviour)x).OwnerClientId == ((NetworkBehaviour)this).OwnerClientId));
			Utilities.CreateExplosion(((Component)this).transform.position, spawnExplosionEffect: true, damage, minDistance, maxDistance, 10, (CauseOfDeath)3, attacker);
		}

		public void Boom()
		{
			//IL_005b: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: 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)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)particleSystem == (Object)null)
			{
				Debug.LogError((object)"No particle system set on missile, destruction time!!");
				CreateExplosion();
				if (((NetworkBehaviour)this).IsHost)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				return;
			}
			particleSystem.Stop(true, (ParticleSystemStopBehavior)1);
			((Component)particleSystem).transform.SetParent((Transform)null);
			((Component)particleSystem).transform.localScale = Vector3.one;
			GameObject gameObject = ((Component)particleSystem).gameObject;
			MainModule main = particleSystem.main;
			float duration = ((MainModule)(ref main)).duration;
			main = particleSystem.main;
			MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime;
			Object.Destroy((Object)(object)gameObject, duration + ((MinMaxCurve)(ref startLifetime)).constant);
			CreateExplosion();
			if (((NetworkBehaviour)this).IsHost)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}

		private void FixedUpdate()
		{
			//IL_001d: 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_005a: 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)
			if (!((NetworkBehaviour)this).IsHost)
			{
				return;
			}
			((Component)this).GetComponent<Rigidbody>().useGravity = false;
			((Component)this).GetComponent<Rigidbody>().AddForce(Vector3.down * gravity);
			if (timeAlive <= flightTime && timeAlive >= flightDelay)
			{
				((Component)this).GetComponent<Rigidbody>().AddForce(((Component)this).transform.forward * flightForce);
			}
			timeAlive += Time.fixedDeltaTime;
			if (timeAlive > autoDestroyTime)
			{
				if (((NetworkBehaviour)this).IsHost)
				{
					Boom();
					BoomClientRpc();
				}
				else
				{
					BoomServerRpc();
				}
			}
			else
			{
				Debug.Log((object)("Time alive: " + timeAlive + " / " + autoDestroyTime));
			}
		}

		protected override void __initializeVariables()
		{
			((NetworkBehaviour)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_Missile()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3331368301u, new RpcReceiveHandler(__rpc_handler_3331368301));
			NetworkManager.__rpc_func_table.Add(452316787u, new RpcReceiveHandler(__rpc_handler_452316787));
		}

		private static void __rpc_handler_3331368301(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Missile)(object)target).BoomClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_452316787(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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)
			//IL_0055: Invalid comparison between Unknown and I4
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
			{
				if ((int)networkManager.LogLevel <= 1)
				{
					Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
				}
			}
			else
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Missile)(object)target).BoomServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "Missile";
		}
	}
	public class PouchyBelt : GrabbableObject
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_SetHoverTipAndCurrentInteractTrigger <0>__PlayerControllerB_SetHoverTipAndCurrentInteractTrigger;

			public static hook_BeginGrabObject <1>__PlayerControllerB_BeginGrabObject;
		}

		public Transform beltCosmetic;

		public Vector3 beltCosmeticPositionOffset = new Vector3(0f, 0f, 0f);

		public Vector3 beltCosmeticRotationOffset = new Vector3(0f, 0f, 0f);

		public int beltCapacity = 3;

		private PlayerControllerB previousPlayerHeldBy;

		public static void Initialize()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_0030: 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)
			//IL_003b: Expected O, but got Unknown
			object obj = <>O.<0>__PlayerControllerB_SetHoverTipAndCurrentInteractTrigger;
			if (obj == null)
			{
				hook_SetHoverTipAndCurrentInteractTrigger val = PlayerControllerB_SetHoverTipAndCurrentInteractTrigger;
				<>O.<0>__PlayerControllerB_SetHoverTipAndCurrentInteractTrigger = val;
				obj = (object)val;
			}
			PlayerControllerB.SetHoverTipAndCurrentInteractTrigger += (hook_SetHoverTipAndCurrentInteractTrigger)obj;
			object obj2 = <>O.<1>__PlayerControllerB_BeginGrabObject;
			if (obj2 == null)
			{
				hook_BeginGrabObject val2 = PlayerControllerB_BeginGrabObject;
				<>O.<1>__PlayerControllerB_BeginGrabObject = val2;
				obj2 = (object)val2;
			}
			PlayerControllerB.BeginGrabObject += (hook_BeginGrabObject)obj2;
		}

		private static void PlayerControllerB_BeginGrabObject(orig_BeginGrabObject orig, PlayerControllerB self)
		{
			//IL_000c: 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)
			//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_002c: Unknown result type (might be due to invalid IL or missing references)
			self.interactRay = new Ray(((Component)self.gameplayCamera).transform.position, ((Component)self.gameplayCamera).transform.forward);
			if (!Physics.Raycast(self.interactRay, ref self.hit, self.grabDistance, self.interactableObjectsMask) || ((Component)((RaycastHit)(ref self.hit)).collider).gameObject.layer == 8 || !(((Component)((RaycastHit)(ref self.hit)).collider).tag == "PhysicsProp") || self.twoHanded || self.sinkingValue > 0.73f)
			{
				return;
			}
			self.currentlyGrabbingObject = ((Component)((Component)((RaycastHit)(ref self.hit)).collider).transform).gameObject.GetComponent<GrabbableObject>();
			if ((!GameNetworkManager.Instance.gameHasStarted && !self.currentlyGrabbingObject.itemProperties.canBeGrabbedBeforeGameStart && !StartOfRound.Instance.testRoom.activeSelf) || (Object)(object)self.currentlyGrabbingObject == (Object)null || self.inSpecialInteractAnimation || self.currentlyGrabbingObject.isHeld || self.currentlyGrabbingObject.isPocketed)
			{
				return;
			}
			NetworkObject networkObject = ((NetworkBehaviour)self.currentlyGrabbingObject).NetworkObject;
			if (!((Object)(object)networkObject == (Object)null) && networkObject.IsSpawned)
			{
				if (self.currentlyGrabbingObject is PouchyBelt && self.ItemSlots.Any((GrabbableObject x) => (Object)(object)x != (Object)null && x is PouchyBelt))
				{
					self.currentlyGrabbingObject.grabbable = false;
				}
				orig.Invoke(self);
				if (self.currentlyGrabbingObject is PouchyBelt)
				{
					self.currentlyGrabbingObject.grabbable = true;
				}
			}
		}

		private static void PlayerControllerB_SetHoverTipAndCurrentInteractTrigger(orig_SetHoverTipAndCurrentInteractTrigger orig, PlayerControllerB self)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!Physics.Raycast(self.interactRay, ref self.hit, self.grabDistance, self.interactableObjectsMask) || ((Component)((RaycastHit)(ref self.hit)).collider).gameObject.layer == 8 || !(((Component)((RaycastHit)(ref self.hit)).collider).tag == "PhysicsProp"))
			{
				return;
			}
			if (self.FirstEmptyItemSlot() == -1)
			{
				((TMP_Text)self.cursorTip).text = "Inventory full!";
			}
			else if (((Component)((RaycastHit)(ref self.hit)).collider).gameObject.GetComponent<GrabbableObject>() is PouchyBelt)
			{
				if (self.ItemSlots.Any((GrabbableObject x) => (Object)(object)x != (Object)null && x is PouchyBelt))
				{
					((TMP_Text)self.cursorTip).text = "(Cannot hold more than 1 belt)";
				}
				else
				{
					((TMP_Text)self.cursorTip).text = "Pick up belt";
				}
			}
		}

		public override void LateUpdate()
		{
			//IL_005d: 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_0073: 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_007b: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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)
			((GrabbableObject)this).LateUpdate();
			if ((Object)(object)previousPlayerHeldBy != (Object)null)
			{
				((Component)beltCosmetic).gameObject.SetActive(true);
				beltCosmetic.SetParent((Transform)null);
				((Renderer)((Component)beltCosmetic).GetComponent<MeshRenderer>()).enabled = true;
				Transform parent = previousPlayerHeldBy.lowerSpine.parent;
				beltCosmetic.position = parent.position + beltCosmeticPositionOffset;
				Quaternion rotation = parent.rotation;
				Quaternion rotation2 = Quaternion.Euler(((Quaternion)(ref rotation)).eulerAngles + beltCosmeticRotationOffset);
				beltCosmetic.rotation = rotation2;
				((Renderer)base.mainObjectRenderer).enabled = false;
				((Component)this).gameObject.SetActive(true);
			}
			else
			{
				((Component)beltCosmetic).gameObject.SetActive(false);
				((Renderer)base.mainObjectRenderer).enabled = true;
				beltCosmetic.SetParent(((Component)this).transform);
			}
		}

		public void UpdateHUD(bool add)
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_00b4: 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_00c1: 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_010a: 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_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			HUDManager instance = HUDManager.Instance;
			if (add)
			{
				int num = 0;
				GrabbableObject[] itemSlots = GameNetworkManager.Instance.localPlayerController.ItemSlots;
				for (int i = 0; i < itemSlots.Length; i++)
				{
					if (itemSlots[i] is PouchyBelt)
					{
						num++;
					}
				}
				Image val = instance.itemSlotIconFrames[0];
				Image val2 = instance.itemSlotIcons[0];
				int num2 = instance.itemSlotIconFrames.Length;
				((Component)val).GetComponentInParent<CanvasScaler>();
				((Component)val).GetComponentInParent<AspectRatioFitter>();
				float x = ((Graphic)val).rectTransform.sizeDelta.x;
				float y = ((Graphic)val).rectTransform.sizeDelta.y;
				float num3 = ((Graphic)val).rectTransform.anchoredPosition.y + 1.125f * y * (float)num;
				Vector3 localEulerAngles = ((Transform)((Graphic)val).rectTransform).localEulerAngles;
				Vector3 localEulerAngles2 = ((Transform)((Graphic)val2).rectTransform).localEulerAngles;
				List<Image> list = instance.itemSlotIconFrames.ToList();
				List<Image> list2 = instance.itemSlotIcons.ToList();
				Debug.Log((object)$"Adding {beltCapacity} item slots! Surely this will go well..");
				for (int j = 0; j < beltCapacity; j++)
				{
					float num4 = ((Graphic)val).rectTransform.anchoredPosition.x + (float)(j + 1) * x;
					Image val3 = Object.Instantiate<Image>(list[num2 - 1], ((Component)val).transform.parent);
					((Object)val3).name = $"Slot{num2 + j}[LethalThingsBelt]";
					((Graphic)val3).rectTransform.anchoredPosition = new Vector2(num4, num3);
					((Transform)((Graphic)val3).rectTransform).eulerAngles = localEulerAngles;
					Image component = ((Component)((Component)val3).transform.GetChild(0)).GetComponent<Image>();
					((Object)component).name = "icon";
					((Behaviour)component).enabled = false;
					((Transform)((Graphic)component).rectTransform).eulerAngles = localEulerAngles2;
					((Transform)((Graphic)component).rectTransform).Rotate(new Vector3(0f, 0f, -90f));
					list.Add(val3);
					list2.Add(component);
				}
				instance.itemSlotIconFrames = list.ToArray();
				instance.itemSlotIcons = list2.ToArray();
				Debug.Log((object)$"Added {beltCapacity} item slots!");
				return;
			}
			List<Image> list3 = instance.itemSlotIconFrames.ToList();
			List<Image> list4 = instance.itemSlotIcons.ToList();
			int count = list3.Count;
			int num5 = 0;
			for (int num6 = count - 1; num6 >= 0; num6--)
			{
				if (((Object)list3[num6]).name.Contains("[LethalThingsBelt]"))
				{
					num5++;
					Image obj = list3[num6];
					list3.RemoveAt(num6);
					list4.RemoveAt(num6);
					Object.Destroy((Object)(object)((Component)obj).gameObject);
					if (num5 >= beltCapacity)
					{
						break;
					}
				}
			}
			instance.itemSlotIconFrames = list3.ToArray();
			instance.itemSlotIcons = list4.ToArray();
			Debug.Log((object)$"Removed {beltCapacity} item slots!");
		}

		public void AddItemSlots()
		{
			if ((Object)(object)base.playerHeldBy != (Object)null)
			{
				List<GrabbableObject> list = base.playerHeldBy.ItemSlots.ToList();
				base.playerHeldBy.ItemSlots = (GrabbableObject[])(object)new GrabbableObject[list.Count + beltCapacity];
				for (int i = 0; i < list.Count; i++)
				{
					base.playerHeldBy.ItemSlots[i] = list[i];
				}
				if ((Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController)
				{
					UpdateHUD(add: true);
				}
			}
		}

		public void RemoveItemSlots()
		{
			if (!((Object)(object)base.playerHeldBy != (Object)null))
			{
				return;
			}
			int num = base.playerHeldBy.ItemSlots.Length - beltCapacity;
			int currentItemSlot = base.playerHeldBy.currentItemSlot;
			for (int i = 0; i < beltCapacity; i++)
			{
				GrabbableObject val = base.playerHeldBy.ItemSlots[num + i];
				if ((Object)(object)val != (Object)null)
				{
					base.playerHeldBy.DropItem(val, num + i);
				}
			}
			int currentItemSlot2 = base.playerHeldBy.currentItemSlot;
			currentItemSlot2 = ((currentItemSlot < base.playerHeldBy.ItemSlots.Length) ? currentItemSlot : 0);
			List<GrabbableObject> list = base.playerHeldBy.ItemSlots.ToList();
			base.playerHeldBy.ItemSlots = (GrabbableObject[])(object)new GrabbableObject[list.Count - beltCapacity];
			for (int j = 0; j < base.playerHeldBy.ItemSlots.Length; j++)
			{
				base.playerHeldBy.ItemSlots[j] = list[j];
			}
			if ((Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				UpdateHUD(add: false);
			}
			base.playerHeldBy.SwitchItemSlots(currentItemSlot2);
		}

		public override void DiscardItem()
		{
			RemoveItemSlots();
			previousPlayerHeldBy = null;
			((GrabbableObject)this).DiscardItem();
		}

		public void GrabItemOnClient()
		{
			((GrabbableObject)this).GrabItemOnClient();
		}

		public override void EquipItem()
		{
			((GrabbableObject)this).EquipItem();
			if ((Object)(object)base.playerHeldBy != (Object)null)
			{
				if ((Object)(object)base.playerHeldBy != (Object)(object)previousPlayerHeldBy)
				{
					AddItemSlots();
				}
				previousPlayerHeldBy = base.playerHeldBy;
			}
		}

		protected override void __initializeVariables()
		{
			((GrabbableObject)this).__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "PouchyBelt";
		}
	}
	public class PowerOutletStun : NetworkBehaviour
	{
		private Coroutine electrocutionCoroutine;

		public AudioSource strikeAudio;

		public ParticleSystem strikeParticle;

		private NetworkVariable<int> damage = new NetworkVariable<int>(20, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

		public void Electrocute(ItemCharger socket)
		{
			Debug.Log((object)"Attempting electrocution");
			if (electrocutionCoroutine != null)
			{
				((MonoBehaviour)this).StopCoroutine(electrocutionCoroutine);
			}
			electrocutionCoroutine = ((MonoBehaviour)this).StartCoroutine(electrocutionDelayed(socket));
		}

		public void Awake()
		{
			//IL_0035: 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)
			StormyWeather val = Object.FindObjectOfType<StormyWeather>(true);
			GameObject gameObject = ((Component)val.targetedStrikeAudio).gameObject;
			strikeAudio = Object.Instantiate<GameObject>(gameObject, ((Component)this).transform).GetComponent<AudioSource>();
			((Component)strikeAudio).transform.localPosition = Vector3.zero;
			((Component)strikeAudio).gameObject.SetActive(true);
			strikeParticle = Object.Instantiate<GameObject>(((Component)val.explosionEffectParticle).gameObject, ((Component)this).transform).GetComponent<ParticleSystem>();
			((Component)strikeParticle).transform.localPosition = Vector3.zero;
			((Component)strikeParticle).gameObject.SetActive(true);
			if (((NetworkBehaviour)this).IsHost)
			{
				damage.Value = Config.itemChargerElectrocutionDamage.Value;
			}
		}

		private IEnumerator electrocutionDelayed(ItemCharger socket)
		{
			Debug.Log((object)"Electrocution started");
			socket.zapAudio.Play();
			yield return (object)new WaitForSeconds(0.75f);
			socket.chargeStationAnimator.SetTrigger("zap");
			Debug.Log((object)"Electrocution finished");
			if (((NetworkBehaviour)this).NetworkObject.IsOwner && !((NetworkBehaviour)this).NetworkObject.IsOwnedByServer)
			{
				Debug.Log((object)"Sending stun to server!!");
				ElectrocutedServerRpc(((Component)this).transform.position);
			}
			else if (((NetworkBehaviour)this).NetworkObject.IsOwner && ((NetworkBehaviour)this).NetworkObject.IsOwnedByServer)
			{
				Debug.Log((object)"Sending stun to clients!!");
				ElectrocutedClientRpc(((Component)this).transform.position);
				Electrocuted(((Component)this).transform.position);
			}
		}

		[ClientRpc]
		private void ElectrocutedClientRpc(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(328188188u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 328188188u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Debug.Log((object)"Stun received!!");
					Electrocuted(position);
				}
			}
		}

		private void Electrocuted(Vector3 position)
		{
			//IL_0006: 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)
			StormyWeather obj = Object.FindObjectOfType<StormyWeather>(true);
			Utilities.CreateExplosion(position, spawnExplosionEffect: false, 20, 0f, 5f, 3, (CauseOfDeath)11);
			strikeParticle.Play();
			obj.PlayThunderEffects(position, strikeAudio);
		}

		[ServerRpc]
		private void ElectrocutedServerRpc(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Invalid comparison between Unknown and I4
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: 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)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2844681185u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2844681185u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ElectrocutedClientRpc(position);
			}
		}

		protected override void __initializeVariables()
		{
			if (damage == null)
			{
				throw new Exception("PowerOutletStun.damage cannot be null. All NetworkVariableBase instances must be initialized.");
			}
			((NetworkVariableBase)damage).Initialize((NetworkBehaviour)(object)this);
			((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)damage, "damage");
			base.NetworkVariableFields.Add((NetworkVariableBase)(object)damage);
			((NetworkBehaviour)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_PowerOutletStun()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(328188188u, new RpcReceiveHandler(__rpc_handler_328188188));
			NetworkManager.__rpc_func_table.Add(2844681185u, new RpcReceiveHandler(__rpc_handler_2844681185));
		}

		private static void __rpc_handler_328188188(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((PowerOutletStun)(object)target).ElectrocutedClientRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2844681185(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: 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)
			//IL_0055: Invalid comparison between Unknown and I4
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
			{
				if ((int)networkManager.LogLevel <= 1)
				{
					Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
				}
			}
			else
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((PowerOutletStun)(object)target).ElectrocutedServerRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "PowerOutletStun";
		}
	}
	public class RocketLauncher : GrabbableObject
	{
		public Light laserPointer;

		public Transform lightSource;

		public AudioSource mainAudio;

		public AudioClip[] activateClips;

		public AudioClip[] noAmmoSounds;

		public Transform aimDirection;

		public int maxAmmo = 4;

		private int currentAmmo;

		public GameObject missilePrefab;

		private float timeSinceLastShot;

		private PlayerControllerB previousPlayerHeldBy;

		public Material[] ammoLampMaterials;

		public Animator Animator;

		public ParticleSystem particleSystem;

		public override void Start()
		{
			//IL_0056: 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_0026: 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)
			currentAmmo = maxAmmo;
			for (int i = 0; i < ammoLampMaterials.Length; i++)
			{
				if (i >= currentAmmo)
				{
					ammoLampMaterials[i].SetColor("_BaseColor", Color.red);
					ammoLampMaterials[i].SetColor("_EmissiveColorMap", Color.red);
				}
				else
				{
					ammoLampMaterials[i].SetColor("_BaseColor", Color.green);
					ammoLampMaterials[i].SetColor("_EmissiveColorMap", Color.green);
				}
			}
			((GrabbableObject)this).Start();
		}

		public override void OnDestroy()
		{
			((NetworkBehaviour)this).OnDestroy();
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			//IL_0082: 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)
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (currentAmmo > 0)
			{
				currentAmmo--;
				PlayRandomAudio(mainAudio, activateClips);
				Animator.Play("fire");
				particleSystem.Play();
				for (int i = 0; i < ammoLampMaterials.Length; i++)
				{
					if (i >= currentAmmo)
					{
						ammoLampMaterials[i].SetColor("_BaseColor", Color.red);
					}
					else
					{
						ammoLampMaterials[i].SetColor("_BaseColor", Color.green);
					}
				}
				if (((NetworkBehaviour)this).IsOwner)
				{
					if (((NetworkBehaviour)this).IsHost)
					{
						MissileSpawner();
					}
					else
					{
						SpawnMissileServerRpc();
					}
				}
			}
			else
			{
				PlayRandomAudio(mainAudio, noAmmoSounds);
			}
		}

		[ServerRpc]
		private void SpawnMissileServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Invalid comparison between Unknown and I4
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: 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)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(336477477u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 336477477u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				MissileSpawner();
			}
		}

		private void MissileSpawner()
		{
			//IL_000c: 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)
			Object.Instantiate<GameObject>(missilePrefab, aimDirection.position, aimDirection.rotation).GetComponent<NetworkObject>().SpawnWithOwnership(((NetworkBehaviour)this).OwnerClientId, false);
		}

		private void PlayRandomAudio(AudioSource audioSource, AudioClip[] audioClips)
		{
			if (audioClips.Length != 0)
			{
				audioSource.PlayOneShot(audioClips[Random.Range(0, audioClips.Length)]);
			}
		}

		public override void LateUpdate()
		{
			//IL_000c: 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)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).LateUpdate();
			RaycastHit val = default(RaycastHit);
			if (Physics.Raycast(lightSource.position, lightSource.forward, ref val, 100f, 8))
			{
				((Component)laserPointer).transform.position = ((RaycastHit)(ref val)).point;
				((Behaviour)laserPointer).enabled = true;
			}
			else
			{
				((Behaviour)laserPointer).enabled = false;
			}
		}

		private void OnEnable()
		{
		}

		private void OnDisable()
		{
		}

		public override void EquipItem()
		{
			((GrabbableObject)this).EquipItem();
			if ((Object)(object)base.playerHeldBy != (Object)null)
			{
				previousPlayerHeldBy = base.playerHeldBy;
			}
		}

		protected override void __initializeVariables()
		{
			((GrabbableObject)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_RocketLauncher()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(336477477u, new RpcReceiveHandler(__rpc_handler_336477477));
		}

		private static void __rpc_handler_336477477(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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)
			//IL_0055: Invalid comparison between Unknown and I4
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
			{
				if ((int)networkManager.LogLevel <= 1)
				{
					Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
				}
			}
			else
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RocketLauncher)(object)target).SpawnMissileServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "RocketLauncher";
		}
	}
	public class RoombaAI : EnemyAI
	{
		private float angeredTimer;

		[Header("Behaviors")]
		public AISearchRoutine searchForPlayers;

		public bool investigating;

		public bool hasBegunInvestigating;

		public Vector3 investigatePosition;

		[Header("Landmine")]
		private bool mineActivated = true;

		public bool hasExploded;

		public AudioSource mineAudio;

		public AudioSource mineFarAudio;

		public AudioSource idleSound;

		public AudioClip mineDetonate;

		public AudioClip mineTrigger;

		public AudioClip mineDetonateFar;

		public AudioClip beepNoise;

		public AudioClip minePress;

		private bool sendingExplosionRPC;

		private RaycastHit hit;

		private RoundManager roundManager;

		private bool localPlayerOnMine;

		private MeshRenderer meshRenderer;

		public Rigidbody Rigidbody;

		private List<Light> lights = new List<Light>();

		public float lightInterval = 1f;

		public float lightTimer;

		public float lightOnDuration = 0.1f;

		public override void Start()
		{
			((EnemyAI)this).Start();
			Transform val = ((Component)this).transform.Find("BoombaModel/Roomba/Cube");
			meshRenderer = ((Component)val).GetComponent<MeshRenderer>();
			lights = ((Component)val.parent).GetComponentsInChildren<Light>().ToList();
		}

		public override void DoAIInterval()
		{
			//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_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: 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)
			((EnemyAI)this).DoAIInterval();
			if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead)
			{
				return;
			}
			Vector3 velocity = Rigidbody.velocity;
			float magnitude = ((Vector3)(ref velocity)).magnitude;
			idleSound.pitch = Mathf.Lerp(0.8f, 1.2f, magnitude / 2f);
			if (((EnemyAI)this).TargetClosestPlayer(4f, true, 70f))
			{
				((EnemyAI)this).StopSearch(searchForPlayers, true);
				base.movingTowardsTargetPlayer = true;
				hasBegunInvestigating = false;
				investigating = false;
			}
			else if (investigating)
			{
				if (!hasBegunInvestigating)
				{
					hasBegunInvestigating = true;
					((EnemyAI)this).StopSearch(base.currentSearch, false);
					((EnemyAI)this).SetDestinationToPosition(investigatePosition, false);
				}
				if (Vector3.Distance(((Component)this).transform.position, investigatePosition) < 5f)
				{
					investigating = false;
					hasBegunInvestigating = false;
				}
			}
			else if (!searchForPlayers.inProgress)
			{
				base.movingTowardsTargetPlayer = false;
				((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers);
			}
		}

		private void FixedUpdate()
		{
			_ = base.ventAnimationFinished;
		}

		public IEnumerator disableLights(float timer)
		{
			yield return (object)new WaitForSeconds(timer);
			foreach (Light light in lights)
			{
				((Behaviour)light).enabled = false;
			}
		}

		public override void Update()
		{
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).Update();
			if (lightTimer > 0f)
			{
				lightTimer -= Time.deltaTime;
				if (lightTimer <= 0f)
				{
					foreach (Light light in lights)
					{
						((Behaviour)light).enabled = true;
					}
					((MonoBehaviour)this).StartCoroutine(disableLights(lightOnDuration));
					mineAudio.PlayOneShot(beepNoise);
					WalkieTalkie.TransmitOneShotAudio(mineAudio, beepNoise, 1f);
				}
			}
			else
			{
				lightTimer = lightInterval;
			}
			if (!base.ventAnimationFinished || !((Object)(object)base.creatureAnimator != (Object)null))
			{
				return;
			}
			((Behaviour)base.creatureAnimator).enabled = false;
			if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead)
			{
				return;
			}
			_ = base.serverPosition;
			if (base.stunNormalizedTimer > 0f)
			{
				base.agent.speed = 0f;
				angeredTimer = 7f;
			}
			else if (angeredTimer > 0f)
			{
				angeredTimer -= Time.deltaTime;
				if (((NetworkBehaviour)this).IsOwner)
				{
					base.agent.stoppingDistance = 0.1f;
					base.agent.speed = 1f;
				}
			}
			else if (((NetworkBehaviour)this).IsOwner)
			{
				base.agent.stoppingDistance = 5f;
				base.agent.speed = 0.8f;
			}
		}

		private IEnumerator StartIdleAnimation()
		{
			roundManager = Object.FindObjectOfType<RoundManager>();
			if (!((Object)(object)roundManager == (Object)null))
			{
				if (roundManager.BreakerBoxRandom != null)
				{
					yield return (object)new WaitForSeconds((float)roundManager.BreakerBoxRandom.NextDouble() + 0.5f);
				}
				mineAudio.pitch = Random.Range(0.9f, 1.1f);
			}
		}

		private void OnTriggerEnter(Collider other)
		{
			if (hasExploded)
			{
				return;
			}
			Plugin.logger.LogInfo((object)("[Boomba] Trigger enter, tag: " + ((Component)other).tag + ", name: " + ((Object)other).name));
			if (((Component)other).CompareTag("Player") || ((Component)((Component)other).transform.parent).CompareTag("Player"))
			{
				PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
				if (!((Component)other).CompareTag("Player"))
				{
					component = ((Component)((Component)other).transform.parent).GetComponent<PlayerControllerB>();
				}
				if (!((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController) && (Object)(object)component != (Object)null && !component.isPlayerDead)
				{
					localPlayerOnMine = true;
					PressMineServerRpc();
					((MonoBehaviour)this).StartCoroutine(TriggerMine(other));
				}
			}
			else
			{
				if (!((Component)other).CompareTag("PlayerRagdoll"))
				{
					return;
				}
				if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<DeadBodyInfo>()))
				{
					if ((Object)(object)((Component)other).GetComponent<DeadBodyInfo>().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController)
					{
						return;
					}
				}
				else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<GrabbableObject>()) && !((NetworkBehaviour)((Component)other).GetComponent<GrabbableObject>()).NetworkObject.IsOwner)
				{
					return;
				}
				PressMineServerRpc();
				((MonoBehaviour)this).StartCoroutine(TriggerMine(other));
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void PressMineServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3418551494u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3418551494u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					PressMineClientRpc();
				}
			}
		}

		[ClientRpc]
		public void PressMineClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2561781742u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2561781742u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					mineAudio.PlayOneShot(minePress);
					WalkieTalkie.TransmitOneShotAudio(mineAudio, minePress, 1f);
				}
			}
		}

		public IEnumerator TriggerMine(Collider other)
		{
			Debug.Log((object)("Object entering mine trigger, gameobject name: " + ((Object)((Component)other).gameObject).name));
			yield return (object)new WaitForSeconds(0.5f);
			MineGoesBoom(other);
		}

		public void MineGoesBoom(Collider other)
		{
			if (hasExploded)
			{
				return;
			}
			Debug.Log((object)("Object leaving mine trigger, gameobject name: " + ((Object)((Component)other).gameObject).name));
			if (((Component)other).CompareTag("Player") || ((Component)((Component)other).transform.parent).CompareTag("Player"))
			{
				PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
				if (!((Component)other).CompareTag("Player"))
				{
					component = ((Component)((Component)other).transform.parent).GetComponent<PlayerControllerB>();
				}
				if ((Object)(object)component != (Object)null && !component.isPlayerDead && !((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController))
				{
					localPlayerOnMine = false;
					TriggerMineOnLocalClientByExiting();
				}
			}
			else
			{
				if (!((Component)other).CompareTag("PlayerRagdoll"))
				{
					return;
				}
				if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<DeadBodyInfo>()))
				{
					if ((Object)(object)((Component)other).GetComponent<DeadBodyInfo>().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController)
					{
						return;
					}
				}
				else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<GrabbableObject>()) && !((NetworkBehaviour)((Component)other).GetComponent<GrabbableObject>()).NetworkObject.IsOwner)
				{
					return;
				}
				TriggerMineOnLocalClientByExiting();
			}
		}

		private void TriggerMineOnLocalClientByExiting()
		{
			if (!hasExploded)
			{
				hasExploded = true;
				SetOffMineAnimation();
				sendingExplosionRPC = true;
				ExplodeMineServerRpc();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ExplodeMineServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2745793768u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2745793768u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					hasExploded = true;
					ExplodeMineClientRpc();
				}
			}
		}

		[ClientRpc]
		public void ExplodeMineClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2242285281u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2242285281u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (sendingExplosionRPC)
				{
					sendingExplosionRPC = false;
				}
				else
				{
					SetOffMineAnimation();
				}
			}
		}

		public void SetOffMineAnimation()
		{
			hasExploded = true;
			mineAudio.PlayOneShot(mineTrigger, 1f);
			((MonoBehaviour)this).StartCoroutine(detonateMineDelayed());
		}

		private IEnumerator detonateMineDelayed()
		{
			yield return (object)new WaitForSeconds(0.5f);
			Detonate();
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}

		public void Detonate()
		{
			//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)
			mineAudio.pitch = Random.Range(0.93f, 1.07f);
			mineAudio.PlayOneShot(mineDetonate, 1f);
			Utilities.CreateExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: true, 100, 5.7f, 6.4f, 6, (CauseOfDeath)3);
		}

		public bool MineHasLineOfSight(Vector3 pos)
		{
			//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)
			return !Physics.Linecast(((Component)this).transform.position, pos, ref hit, 256);
		}

		public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false)
		{
			((EnemyAI)this).HitEnemy(force, playerWhoHit, false);
			angeredTimer = 18f;
			SetOffMineAnimation();
			sendingExplosionRPC = true;
			ExplodeMineServerRpc();
		}

		public override void DetectNoise(Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot = 0, int noiseID = 0)
		{
			//IL_0001: 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_0012: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).DetectNoise(noisePosition, noiseLoudness, timesPlayedInOneSpot, noiseID);
			if (!(Vector3.Distance(noisePosition, ((Component)this).transform.position) > 15f) && !base.movingTowardsTargetPlayer)
			{
				investigatePosition = noisePosition;
			}
		}

		public void InvestigatePosition(Vector3 position)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			if (!hasBegunInvestigating)
			{
				investigatePosition = position;
				investigating = true;
			}
		}

		protected override void __initializeVariables()
		{
			((EnemyAI)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_RoombaAI()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3418551494u, new RpcReceiveHandler(__rpc_handler_3418551494));
			NetworkManager.__rpc_func_table.Add(2561781742u, new RpcReceiveHandler(__rpc_handler_2561781742));
			NetworkManager.__rpc_func_table.Add(2745793768u, new RpcReceiveHandler(__rpc_handler_2745793768));
			NetworkManager.__rpc_func_table.Add(2242285281u, new RpcReceiveHandler(__rpc_handler_2242285281));
		}

		private static void __rpc_handler_3418551494(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RoombaAI)(object)target).PressMineServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2561781742(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RoombaAI)(object)target).PressMineClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2745793768(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RoombaAI)(object)target).ExplodeMineServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2242285281(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RoombaAI)(object)target).ExplodeMineClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "RoombaAI";
		}
	}
	internal class ToyHammer : GrabbableObject
	{
		public int hammerHitForce = 1;

		public float hammerHitPercentage = 1f;

		public bool reelingUp;

		public bool isHoldingButton;

		private RaycastHit rayHit;

		private Coroutine reelingUpCoroutine;

		private RaycastHit[] objectsHitByHammer;

		private List<RaycastHit> objectsHitByHammerList = new List<RaycastHit>();

		public AudioClip reelUp;

		public AudioClip swing;

		public AudioClip[] hitSFX;

		public AudioSource hammerAudio;

		private PlayerControllerB previousPlayerHeldBy;

		private int hammerMask = 11012424;

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			if ((Object)(object)base.playerHeldBy == (Object)null)
			{
				return;
			}
			isHoldingButton = buttonDown;
			if (!reelingUp && buttonDown)
			{
				reelingUp = true;
				previousPlayerHeldBy = base.playerHeldBy;
				if (reelingUpCoroutine != null)
				{
					((MonoBehaviour)this).StopCoroutine(reelingUpCoroutine);
				}
				reelingUpCoroutine = ((MonoBehaviour)this).StartCoroutine(reelUpHammer());
			}
		}

		private IEnumerator reelUpHammer()
		{
			base.playerHeldBy.activatingItem = true;
			base.playerHeldBy.twoHanded = true;
			base.playerHeldBy.playerBodyAnimator.ResetTrigger("hammerHit");
			base.playerHeldBy.playerBodyAnimator.SetBool("reelingUp", true);
			hammerAudio.PlayOneShot(reelUp);
			ReelUpSFXServerRpc();
			yield return (object)new WaitForSeconds(0.35f);
			yield return (object)new WaitUntil((Func<bool>)(() => !isHoldingButton || !base.isHeld));
			SwingHammer(!base.isHeld);
			yield return (object)new WaitForSeconds(0.13f);
			HitHammer(!base.isHeld);
			yield return (object)new WaitForSeconds(0.3f);
			reelingUp = false;
			reelingUpCoroutine = null;
		}

		[ServerRpc]
		public void ReelUpSFXServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Invalid comparison between Unknown and I4
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: 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)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3129286724u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3129286724u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ReelUpSFXClientRpc();
			}
		}

		[ClientRpc]
		public void ReelUpSFXClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4160876605u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4160876605u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					hammerAudio.PlayOneShot(reelUp);
				}
			}
		}

		public override void DiscardItem()
		{
			base.playerHeldBy.activatingItem = false;
			((GrabbableObject)this).DiscardItem();
		}

		public void SwingHammer(bool cancel = false)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			previousPlayerHeldBy.playerBodyAnimator.SetBool("reelingUp", false);
			if (!cancel)
			{
				hammerAudio.PlayOneShot(swing);
				previousPlayerHeldBy.UpdateSpecialAnimationValue(true, (short)((Component)previousPlayerHeldBy).transform.localEulerAngles.y, 0.4f, false);
			}
		}

		public void HitHammer(bool cancel = false)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: 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_0063: 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_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_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: 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)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: 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_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: 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_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: 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_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)previousPlayerHeldBy == (Object)null)
			{
				return;
			}
			previousPlayerHeldBy.activatingItem = false;
			bool flag = false;
			if (!cancel)
			{
				previousPlayerHeldBy.twoHanded = false;
				Debug.DrawRay(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward * 1.85f, Color.blue, 5f);
				objectsHitByHammer = Physics.SphereCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, 0.75f, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, 1.85f, hammerMask, (QueryTriggerInteraction)2);
				objectsHitByHammerList = objectsHitByHammer.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToList();
				Vector3 val = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position;
				IHittable val3 = default(IHittable);
				RaycastHit val5 = default(RaycastHit);
				for (int i = 0; i < objectsHitByHammerList.Count; i++)
				{
					RaycastHit val2 = objectsHitByHammerList[i];
					if (((Component)((RaycastHit)(ref val2)).transform).gameObject.layer != 8)
					{
						val2 = objectsHitByHammerList[i];
						if (((Component)((RaycastHit)(ref val2)).transform).gameObject.layer != 11)
						{
							val2 = objectsHitByHammerList[i];
							if (!((Component)((RaycastHit)(ref val2)).transform).TryGetComponent<IHittable>(ref val3))
							{
								continue;
							}
							val2 = objectsHitByHammerList[i];
							if ((Object)(object)((RaycastHit)(ref val2)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform)
							{
								continue;
							}
							val2 = objectsHitByHammerList[i];
							if (!(((RaycastHit)(ref val2)).point == Vector3.zero))
							{
								Vector3 val4 = val;
								val2 = objectsHitByHammerList[i];
								if (Physics.Linecast(val4, ((RaycastHit)(ref val2)).point, ref val5, StartOfRound.Instance.collidersAndRoomMaskAndDefault))
								{
									continue;
								}
							}
							flag = true;
							Vector3 forward = ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward;
							if (Random.Range(0f, 100f) < hammerHitPercentage)
							{
								val3.Hit(hammerHitForce, forward, previousPlayerHeldBy, true);
			

plugins/FlipMods-FasterItemDropship/FasterItemDropship.dll

Decompiled a year ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Unity.Netcode;
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("FasterItemDropship")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("Mod made by flipf17")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FasterItemDropship")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a5a250fd-b706-48b9-9be9-da360fd939dc")]
[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 FasterItemDropship
{
	public static class ConfigSettings
	{
		public static ConfigEntry<int> dropshipDeliveryTime;

		public static ConfigEntry<int> dropshipMaxStayDuration;

		public static ConfigEntry<int> dropshipLeaveAfterSecondsOpenDoors;

		public static void BindConfigSettings()
		{
			Plugin.Log("BindingConfigs");
			dropshipDeliveryTime = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("FasterItemDropship", "DeliveryTime", 10, "How long it takes (in seconds) for the item dropship to arrive.");
			dropshipMaxStayDuration = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("FasterItemDropship", "MaxLandDuration", 40, "The max duration (in seconds) the item dropship will stay.");
			dropshipLeaveAfterSecondsOpenDoors = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("FasterItemDropship", "LeaveAfterSecondsOpenDoors", 3, "How long (in seconds) the item dropship will stay for after opening its doors.");
		}
	}
	[BepInPlugin("FlipMods.FasterItemDropship", "FasterItemDropship", "1.2.0")]
	public class Plugin : BaseUnityPlugin
	{
		private Harmony _harmony;

		public static Plugin instance;

		private void Awake()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			instance = this;
			ConfigSettings.BindConfigSettings();
			_harmony = new Harmony("FasterItemDropship");
			_harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"FasterItemDropship loaded");
		}

		public static void Log(string message)
		{
			((BaseUnityPlugin)instance).Logger.LogInfo((object)message);
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "FlipMods.FasterItemDropship";

		public const string PLUGIN_NAME = "FasterItemDropship";

		public const string PLUGIN_VERSION = "1.2.0";
	}
}
namespace FasterItemDropship.Patches
{
	[HarmonyPatch]
	internal class FasterItemDropshipPatcher
	{
		private static Terminal terminalScript;

		private static StartOfRound playersManager;

		private static List<int> itemsToDeliver;

		private static List<int> orderedItemsFromTerminal;

		[HarmonyPatch(typeof(ItemDropship), "Start")]
		[HarmonyPrefix]
		public static void InitializeDropship(ItemDropship __instance)
		{
			playersManager = Object.FindObjectOfType<StartOfRound>();
			terminalScript = Object.FindObjectOfType<Terminal>();
			itemsToDeliver = (List<int>)Traverse.Create((object)__instance).Field("itemsToDeliver").GetValue();
		}

		[HarmonyPatch(typeof(Terminal), "Start")]
		[HarmonyPrefix]
		public static void InitializeTerminal(Terminal __instance)
		{
			orderedItemsFromTerminal = __instance.orderedItemsFromTerminal;
		}

		[HarmonyPatch(typeof(ItemDropship), "Update")]
		[HarmonyPrefix]
		public static void DropshipUpdate(ItemDropship __instance)
		{
			if (((NetworkBehaviour)__instance).IsServer && !__instance.deliveringOrder && terminalScript.orderedItemsFromTerminal.Count > 0 && !playersManager.shipHasLanded)
			{
				__instance.shipTimer += Time.deltaTime;
			}
		}

		[HarmonyPatch(typeof(ItemDropship), "Update")]
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Ldc_R4)
				{
					if ((float)list[i].operand == 20f)
					{
						list[i].operand = (float)ConfigSettings.dropshipMaxStayDuration.Value;
					}
					else if ((float)list[i].operand == 40f)
					{
						list[i].operand = (float)(ConfigSettings.dropshipMaxStayDuration.Value + ConfigSettings.dropshipDeliveryTime.Value);
					}
					else if ((float)list[i].operand == 30f)
					{
						list[i].operand = (float)ConfigSettings.dropshipMaxStayDuration.Value;
						break;
					}
				}
			}
			return list.AsEnumerable();
		}

		[HarmonyPatch(typeof(ItemDropship), "OpenShipDoorsOnServer")]
		[HarmonyPostfix]
		public static void OnOpenShipDoors(ItemDropship __instance)
		{
			if (((NetworkBehaviour)__instance).IsServer)
			{
				__instance.shipTimer = Mathf.Max(__instance.shipTimer, (float)(ConfigSettings.dropshipMaxStayDuration.Value - ConfigSettings.dropshipLeaveAfterSecondsOpenDoors.Value));
			}
		}

		[HarmonyPatch(typeof(ItemDropship), "ShipLandedAnimationEvent")]
		[HarmonyPrefix]
		public static void AddLateItemsServer(ItemDropship __instance)
		{
			if (((NetworkBehaviour)__instance).IsServer && __instance.shipLanded && !__instance.shipDoorsOpened)
			{
				while (orderedItemsFromTerminal.Count > 0 && itemsToDeliver.Count < 12)
				{
					itemsToDeliver.Add(orderedItemsFromTerminal[0]);
					orderedItemsFromTerminal.RemoveAt(0);
				}
			}
		}
	}
}

plugins/FlipMods-MoreBlood/MoreBlood.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.Configuration;
using GameNetcodeStuff;
using HarmonyLib;
using MoreBlood.Config;
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("MoreBlood")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MoreBlood")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d1f1321d-30a3-4600-9bf8-1e69fe1abf8c")]
[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 MoreBlood
{
	[BepInPlugin("FlipMods.MoreBlood", "MoreBlood", "1.0.2")]
	public class Plugin : BaseUnityPlugin
	{
		public static Plugin instance;

		private Harmony _harmony;

		private void Awake()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			instance = this;
			_harmony = new Harmony("MoreBlood");
			ConfigSettings.BindConfigSettings();
			_harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"MoreBlood loaded");
		}

		public static void Log(string message)
		{
			((BaseUnityPlugin)instance).Logger.LogInfo((object)message);
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "FlipMods.MoreBlood";

		public const string PLUGIN_NAME = "MoreBlood";

		public const string PLUGIN_VERSION = "1.0.2";
	}
}
namespace MoreBlood.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class MoreBloodPatcher
	{
		private static int bloodCount;

		[HarmonyPatch("DropBlood")]
		[HarmonyPostfix]
		public static void MoreBlood(PlayerControllerB __instance, Vector3 direction = default(Vector3), bool leaveBlood = true, bool leaveFootprint = false)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			bloodCount++;
			if (bloodCount < ConfigSettings.numBloodPools.Value)
			{
				__instance.DropBlood(direction, leaveBlood, leaveFootprint);
			}
			else
			{
				bloodCount = 0;
			}
		}

		[HarmonyPatch("RandomizeBloodRotationAndScale")]
		[HarmonyPostfix]
		public static void RandomizeBloodScale(ref Transform blood, PlayerControllerB __instance)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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)
			Transform obj = blood;
			obj.localScale *= ConfigSettings.bloodScale.Value;
			blood.position += new Vector3((float)Random.Range(-1, 1) * ConfigSettings.bloodScale.Value, 0.55f, (float)Random.Range(-1, 1) * ConfigSettings.bloodScale.Value);
		}
	}
}
namespace MoreBlood.Config
{
	public static class ConfigSettings
	{
		public static ConfigEntry<float> bloodScale;

		public static ConfigEntry<int> numBloodPools;

		public static void BindConfigSettings()
		{
			Plugin.Log("BindingConfigs");
			bloodScale = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("MoreBlood", "BloodScale", 4f, "The size of the blood pools");
			numBloodPools = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("MoreBlood", "NumberOfBloodPools", 4, "Max number of blood pools spread around the blood source.");
		}
	}
}

plugins/GoldenGuy1000-Align_Menu_Buttons/AlignMenuButtons.dll

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

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("AlignMenuButtons")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AlignMenuButtons")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e70cdc45-29b2-4699-a182-55b3a711ad2f")]
[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 System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}
namespace AlignMenuButtons
{
	[HarmonyPatch(typeof(MenuManager), "OnEnable")]
	internal class AlignMenuPatch
	{
		private static void Postfix(MenuManager __instance)
		{
			//IL_001a: 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_005f: 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)
			if (!((Object)(object)__instance.startHostButton == (Object)null))
			{
				float x = ((Component)__instance.startHostButton).transform.localPosition.x;
				float z = ((Component)__instance.startHostButton).transform.localPosition.z;
				Button[] componentsInChildren = __instance.menuButtons.GetComponentsInChildren<Button>();
				foreach (Button val in componentsInChildren)
				{
					((Component)val).transform.localPosition = new Vector3(x, ((Component)val).transform.localPosition.y, z);
				}
			}
		}
	}
	[BepInPlugin("GoldenGuy1000.AlignMenuButtons", "AlignMenuButtons", "1.0.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string MODNAME = "AlignMenuButtons";

		public const string AUTHOR = "GoldenGuy1000";

		public const string GUID = "GoldenGuy1000.AlignMenuButtons";

		public const string VERSION = "1.0.0.0";

		internal readonly Harmony harmony;

		internal readonly Assembly assembly;

		public Plugin()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			harmony = new Harmony("GoldenGuy1000.AlignMenuButtons");
			assembly = Assembly.GetExecutingAssembly();
			harmony.PatchAll(assembly);
		}
	}
}

plugins/Hexnet111-SuitSaver/Suit Saver.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 BepInEx;
using GameNetcodeStuff;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Suit Saver")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Suit Saver")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("cb7cfb30-b06e-4e41-9de7-03640e1662ea")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SuitSaver
{
	[BepInPlugin("Hexnet.lethalcompany.suitsaver", "Suit Saver", "1.0.2")]
	public class SuitSaver : BaseUnityPlugin
	{
		private const string modGUID = "Hexnet.lethalcompany.suitsaver";

		private const string modName = "Suit Saver";

		private const string modVersion = "1.0.2";

		private readonly Harmony harmony = new Harmony("Hexnet.lethalcompany.suitsaver");

		private void Awake()
		{
			harmony.PatchAll();
			Debug.Log((object)"[SS]: Suit Saver loaded successfully!");
		}
	}
}
namespace SuitSaver.Patches
{
	internal class Patches
	{
		[HarmonyPatch(typeof(StartOfRound))]
		internal class StartPatch
		{
			[HarmonyPatch("ResetShip")]
			[HarmonyPostfix]
			private static void ResetShipPatch()
			{
				Debug.Log((object)"[SS]: Ship has been reset!");
				Debug.Log((object)"[SS]: Reloading suit...");
				LoadSuitFromFile();
			}
		}

		[HarmonyPatch(typeof(UnlockableSuit))]
		internal class SuitPatch
		{
			[HarmonyPatch("SwitchSuitToThis")]
			[HarmonyPostfix]
			private static void EquipSuitPatch()
			{
				PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
				string unlockableName = StartOfRound.Instance.unlockablesList.unlockables[localPlayerController.currentSuitID].unlockableName;
				SaveToFile(unlockableName);
				Debug.Log((object)("[SS]: Successfully saved current suit. (" + unlockableName + ")"));
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB))]
		internal class EquipPatch
		{
			[HarmonyPatch("ConnectClientToPlayerObject")]
			[HarmonyPostfix]
			private static void LoadSuitPatch(ref PlayerControllerB __instance)
			{
				LoadSuitFromFile();
			}
		}

		public static string SavePath = Application.persistentDataPath + "\\suitsaver.txt";

		private static void SaveToFile(string suitName)
		{
			File.WriteAllText(SavePath, suitName);
		}

		private static string LoadFromFile()
		{
			if (File.Exists(SavePath))
			{
				return File.ReadAllText(SavePath);
			}
			return "-1";
		}

		private static UnlockableSuit GetSuitByName(string Name)
		{
			List<UnlockableItem> unlockables = StartOfRound.Instance.unlockablesList.unlockables;
			UnlockableSuit[] array = Object.FindObjectsOfType<UnlockableSuit>();
			foreach (UnlockableSuit val in array)
			{
				string unlockableName = unlockables[val.suitID].unlockableName;
				if (unlockableName == Name)
				{
					return val;
				}
			}
			return null;
		}

		private static void LoadSuitFromFile()
		{
			string text = LoadFromFile();
			PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
			if (!(text == "-1"))
			{
				UnlockableSuit suitByName = GetSuitByName(text);
				if ((Object)(object)suitByName != (Object)null)
				{
					UnlockableSuit.SwitchSuitForPlayer(localPlayerController, suitByName.suitID, false);
					suitByName.SwitchSuitServerRpc((int)localPlayerController.playerClientId);
					Debug.Log((object)("[SS]: Successfully loaded saved suit. (" + text + ")"));
				}
				else
				{
					Debug.Log((object)("[SS]: Failed to load saved suit. Perhaps it's locked? (" + text + ")"));
				}
			}
		}
	}
}

plugins/KodiCraft-TermSpeak/TermSpeak.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.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("TermSpeak")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Automatically speak on talkie-walkies in your inventory while you're in the terminal")]
[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: AssemblyInformationalVersion("1.0.3")]
[assembly: AssemblyProduct("TermSpeak")]
[assembly: AssemblyTitle("TermSpeak")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.3.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 TermMacros
{
	[BepInPlugin("me.kdcf.termspeak", "TermSpeak", "1.0.3")]
	[BepInProcess("Lethal Company.exe")]
	[HarmonyPatch(typeof(Terminal))]
	public class TermSpeak : BaseUnityPlugin
	{
		private Harmony _harmony = new Harmony("me.kdcf.termspeak");

		private static ManualLogSource _log = Logger.CreateLogSource("TermSpeak");

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin me.kdcf.termspeak is loaded!");
			_harmony.PatchAll(typeof(TermSpeak));
		}

		[HarmonyPatch("BeginUsingTerminal")]
		[HarmonyPostfix]
		public static void OpenTerminal(Terminal __instance)
		{
			SetWalkieMode(enabled: true);
		}

		[HarmonyPatch("QuitTerminal")]
		[HarmonyPostfix]
		public static void CloseTerminal(Terminal __instance)
		{
			SetWalkieMode(enabled: false);
		}

		public static void SetWalkieMode(bool enabled)
		{
			_log.LogInfo((object)"Terminal opened! Trying to find walkie talkie...");
			PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
			_log.LogInfo((object)$"There are {localPlayerController.ItemSlots.Length} item slots to check.");
			GrabbableObject val = null;
			for (int i = 0; i < localPlayerController.ItemSlots.Length; i++)
			{
				if (localPlayerController.ItemSlots[i] is WalkieTalkie && (!enabled || localPlayerController.ItemSlots[i].isBeingUsed))
				{
					val = localPlayerController.ItemSlots[i];
					break;
				}
			}
			if ((Object)(object)val == (Object)null)
			{
				_log.LogInfo((object)"No walkie talkie found!");
				return;
			}
			_log.LogInfo((object)"Found walkie talkie! Trying to set its mode...");
			val.UseItemOnClient(enabled);
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "TermSpeak";

		public const string PLUGIN_NAME = "TermSpeak";

		public const string PLUGIN_VERSION = "1.0.3";
	}
}

plugins/LethalKit-LethalKit/LethalKitModelReplacement.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModelReplacement;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LethalKitModelReplacement")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LethalKitModelReplacement")]
[assembly: AssemblyTitle("LethalKitModelReplacement")]
[assembly: AssemblyVersion("1.0.0.0")]
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;
		}
	}
}
[AddComponentMenu("Dynamic Bone/Dynamic Bone")]
public class DynamicBone : MonoBehaviour
{
	public enum FreezeAxis
	{
		None,
		X,
		Y,
		Z
	}

	private class Particle
	{
		public Transform m_Transform;

		public int m_ParentIndex = -1;

		public float m_Damping;

		public float m_Elasticity;

		public float m_Stiffness;

		public float m_Inert;

		public float m_Radius;

		public float m_BoneLength;

		public Vector3 m_Position = Vector3.zero;

		public Vector3 m_PrevPosition = Vector3.zero;

		public Vector3 m_EndOffset = Vector3.zero;

		public Vector3 m_InitLocalPosition = Vector3.zero;

		public Quaternion m_InitLocalRotation = Quaternion.identity;
	}

	public Transform m_Root;

	public float m_UpdateRate = 60f;

	[Range(0f, 1f)]
	public float m_Damping = 0.1f;

	public AnimationCurve m_DampingDistrib;

	[Range(0f, 1f)]
	public float m_Elasticity = 0.1f;

	public AnimationCurve m_ElasticityDistrib;

	[Range(0f, 1f)]
	public float m_Stiffness = 0.1f;

	public AnimationCurve m_StiffnessDistrib;

	[Range(0f, 1f)]
	public float m_Inert;

	public AnimationCurve m_InertDistrib;

	public float m_Radius;

	public AnimationCurve m_RadiusDistrib;

	public float m_EndLength;

	public Vector3 m_EndOffset = Vector3.zero;

	public Vector3 m_Gravity = Vector3.zero;

	public Vector3 m_Force = Vector3.zero;

	public List<DynamicBoneCollider> m_Colliders;

	public List<Transform> m_Exclusions;

	public FreezeAxis m_FreezeAxis;

	public bool m_DistantDisable;

	public Transform m_ReferenceObject;

	public float m_DistanceToObject = 20f;

	private Vector3 m_LocalGravity = Vector3.zero;

	private Vector3 m_ObjectMove = Vector3.zero;

	private Vector3 m_ObjectPrevPosition = Vector3.zero;

	private float m_BoneTotalLength;

	private float m_ObjectScale = 1f;

	private float m_Time;

	private float m_Weight = 1f;

	private bool m_DistantDisabled;

	private List<Particle> m_Particles = new List<Particle>();

	private void Start()
	{
		SetupParticles();
	}

	private void Update()
	{
		if (m_Weight > 0f && (!m_DistantDisable || !m_DistantDisabled))
		{
			InitTransforms();
		}
	}

	private void LateUpdate()
	{
		if (m_DistantDisable)
		{
			CheckDistance();
		}
		if (m_Weight > 0f && (!m_DistantDisable || !m_DistantDisabled))
		{
			UpdateDynamicBones(Time.deltaTime);
		}
	}

	private void CheckDistance()
	{
		//IL_0032: 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_0042: 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)
		Transform val = m_ReferenceObject;
		if ((Object)(object)val == (Object)null && (Object)(object)Camera.main != (Object)null)
		{
			val = ((Component)Camera.main).transform;
		}
		if (!((Object)(object)val != (Object)null))
		{
			return;
		}
		Vector3 val2 = val.position - ((Component)this).transform.position;
		bool flag = ((Vector3)(ref val2)).sqrMagnitude > m_DistanceToObject * m_DistanceToObject;
		if (flag != m_DistantDisabled)
		{
			if (!flag)
			{
				ResetParticlesPosition();
			}
			m_DistantDisabled = flag;
		}
	}

	private void OnEnable()
	{
		ResetParticlesPosition();
	}

	private void OnDisable()
	{
		InitTransforms();
	}

	private void OnValidate()
	{
		m_UpdateRate = Mathf.Max(m_UpdateRate, 0f);
		m_Damping = Mathf.Clamp01(m_Damping);
		m_Elasticity = Mathf.Clamp01(m_Elasticity);
		m_Stiffness = Mathf.Clamp01(m_Stiffness);
		m_Inert = Mathf.Clamp01(m_Inert);
		m_Radius = Mathf.Max(m_Radius, 0f);
		if (Application.isEditor && Application.isPlaying)
		{
			InitTransforms();
			SetupParticles();
		}
	}

	private void OnDrawGizmosSelected()
	{
		//IL_003e: 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_007b: 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)
		if (!((Behaviour)this).enabled || (Object)(object)m_Root == (Object)null)
		{
			return;
		}
		if (Application.isEditor && !Application.isPlaying && ((Component)this).transform.hasChanged)
		{
			InitTransforms();
			SetupParticles();
		}
		Gizmos.color = Color.white;
		for (int i = 0; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			if (particle.m_ParentIndex >= 0)
			{
				Particle particle2 = m_Particles[particle.m_ParentIndex];
				Gizmos.DrawLine(particle.m_Position, particle2.m_Position);
			}
			if (particle.m_Radius > 0f)
			{
				Gizmos.DrawWireSphere(particle.m_Position, particle.m_Radius * m_ObjectScale);
			}
		}
	}

	public void SetWeight(float w)
	{
		if (m_Weight != w)
		{
			if (w == 0f)
			{
				InitTransforms();
			}
			else if (m_Weight == 0f)
			{
				ResetParticlesPosition();
			}
			m_Weight = w;
		}
	}

	public float GetWeight()
	{
		return m_Weight;
	}

	private void UpdateDynamicBones(float t)
	{
		//IL_0016: 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_0037: 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_004d: 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_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)(object)m_Root == (Object)null)
		{
			return;
		}
		m_ObjectScale = Mathf.Abs(((Component)this).transform.lossyScale.x);
		m_ObjectMove = ((Component)this).transform.position - m_ObjectPrevPosition;
		m_ObjectPrevPosition = ((Component)this).transform.position;
		int num = 1;
		if (m_UpdateRate > 0f)
		{
			float num2 = 1f / m_UpdateRate;
			m_Time += t;
			num = 0;
			while (m_Time >= num2)
			{
				m_Time -= num2;
				if (++num >= 3)
				{
					m_Time = 0f;
					break;
				}
			}
		}
		if (num > 0)
		{
			for (int i = 0; i < num; i++)
			{
				UpdateParticles1();
				UpdateParticles2();
				m_ObjectMove = Vector3.zero;
			}
		}
		else
		{
			SkipUpdateParticles();
		}
		ApplyParticlesToTransforms();
	}

	private void SetupParticles()
	{
		//IL_0022: 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)
		//IL_0038: 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)
		//IL_0053: 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)
		m_Particles.Clear();
		if ((Object)(object)m_Root == (Object)null)
		{
			return;
		}
		m_LocalGravity = m_Root.InverseTransformDirection(m_Gravity);
		m_ObjectScale = ((Component)this).transform.lossyScale.x;
		m_ObjectPrevPosition = ((Component)this).transform.position;
		m_ObjectMove = Vector3.zero;
		m_BoneTotalLength = 0f;
		AppendParticles(m_Root, -1, 0f);
		for (int i = 0; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			particle.m_Damping = m_Damping;
			particle.m_Elasticity = m_Elasticity;
			particle.m_Stiffness = m_Stiffness;
			particle.m_Inert = m_Inert;
			particle.m_Radius = m_Radius;
			if (m_BoneTotalLength > 0f)
			{
				float num = particle.m_BoneLength / m_BoneTotalLength;
				if (m_DampingDistrib != null && m_DampingDistrib.keys.Length != 0)
				{
					particle.m_Damping *= m_DampingDistrib.Evaluate(num);
				}
				if (m_ElasticityDistrib != null && m_ElasticityDistrib.keys.Length != 0)
				{
					particle.m_Elasticity *= m_ElasticityDistrib.Evaluate(num);
				}
				if (m_StiffnessDistrib != null && m_StiffnessDistrib.keys.Length != 0)
				{
					particle.m_Stiffness *= m_StiffnessDistrib.Evaluate(num);
				}
				if (m_InertDistrib != null && m_InertDistrib.keys.Length != 0)
				{
					particle.m_Inert *= m_InertDistrib.Evaluate(num);
				}
				if (m_RadiusDistrib != null && m_RadiusDistrib.keys.Length != 0)
				{
					particle.m_Radius *= m_RadiusDistrib.Evaluate(num);
				}
			}
			particle.m_Damping = Mathf.Clamp01(particle.m_Damping);
			particle.m_Elasticity = Mathf.Clamp01(particle.m_Elasticity);
			particle.m_Stiffness = Mathf.Clamp01(particle.m_Stiffness);
			particle.m_Inert = Mathf.Clamp01(particle.m_Inert);
			particle.m_Radius = Mathf.Max(particle.m_Radius, 0f);
		}
	}

	private void AppendParticles(Transform b, int parentIndex, float boneLength)
	{
		//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_0026: 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)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: 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_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: 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_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_010a: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: 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)
		//IL_0083: 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_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_009e: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: 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_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_020d: Unknown result type (might be due to invalid IL or missing references)
		Particle particle = new Particle();
		particle.m_Transform = b;
		particle.m_ParentIndex = parentIndex;
		Vector3 val;
		if ((Object)(object)b != (Object)null)
		{
			val = (particle.m_Position = (particle.m_PrevPosition = b.position));
			particle.m_InitLocalPosition = b.localPosition;
			particle.m_InitLocalRotation = b.localRotation;
		}
		else
		{
			Transform transform = m_Particles[parentIndex].m_Transform;
			if (m_EndLength > 0f)
			{
				Transform parent = transform.parent;
				if ((Object)(object)parent != (Object)null)
				{
					particle.m_EndOffset = transform.InverseTransformPoint(transform.position * 2f - parent.position) * m_EndLength;
				}
				else
				{
					particle.m_EndOffset = new Vector3(m_EndLength, 0f, 0f);
				}
			}
			else
			{
				particle.m_EndOffset = transform.InverseTransformPoint(((Component)this).transform.TransformDirection(m_EndOffset) + transform.position);
			}
			val = (particle.m_Position = (particle.m_PrevPosition = transform.TransformPoint(particle.m_EndOffset)));
		}
		if (parentIndex >= 0)
		{
			float num = boneLength;
			val = m_Particles[parentIndex].m_Transform.position - particle.m_Position;
			boneLength = num + ((Vector3)(ref val)).magnitude;
			particle.m_BoneLength = boneLength;
			m_BoneTotalLength = Mathf.Max(m_BoneTotalLength, boneLength);
		}
		int count = m_Particles.Count;
		m_Particles.Add(particle);
		if (!((Object)(object)b != (Object)null))
		{
			return;
		}
		for (int i = 0; i < b.childCount; i++)
		{
			bool flag = false;
			if (m_Exclusions != null)
			{
				for (int j = 0; j < m_Exclusions.Count; j++)
				{
					if ((Object)(object)m_Exclusions[j] == (Object)(object)b.GetChild(i))
					{
						flag = true;
						break;
					}
				}
			}
			if (!flag)
			{
				AppendParticles(b.GetChild(i), count, boneLength);
			}
		}
		if (b.childCount == 0 && (m_EndLength > 0f || m_EndOffset != Vector3.zero))
		{
			AppendParticles(null, count, boneLength);
		}
	}

	private void InitTransforms()
	{
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 0; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			if ((Object)(object)particle.m_Transform != (Object)null)
			{
				particle.m_Transform.localPosition = particle.m_InitLocalPosition;
				particle.m_Transform.localRotation = particle.m_InitLocalRotation;
			}
		}
	}

	private void ResetParticlesPosition()
	{
		//IL_0086: 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_0056: 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_0061: 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_0067: 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_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)
		//IL_002d: 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)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 0; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			if ((Object)(object)particle.m_Transform != (Object)null)
			{
				particle.m_Position = (particle.m_PrevPosition = particle.m_Transform.position);
				continue;
			}
			Transform transform = m_Particles[particle.m_ParentIndex].m_Transform;
			particle.m_Position = (particle.m_PrevPosition = transform.TransformPoint(particle.m_EndOffset));
		}
		m_ObjectPrevPosition = ((Component)this).transform.position;
	}

	private void UpdateParticles1()
	{
		//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_000d: 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_001a: Unknown result type (might be due to invalid IL or missing references)
		//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_0025: 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_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: 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_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: 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_0057: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: 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)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: 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)
		//IL_0094: 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_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: 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_00e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		Vector3 gravity = m_Gravity;
		Vector3 normalized = ((Vector3)(ref m_Gravity)).normalized;
		Vector3 val = m_Root.TransformDirection(m_LocalGravity);
		Vector3 val2 = normalized * Mathf.Max(Vector3.Dot(val, normalized), 0f);
		gravity -= val2;
		gravity = (gravity + m_Force) * m_ObjectScale;
		for (int i = 0; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			if (particle.m_ParentIndex >= 0)
			{
				Vector3 val3 = particle.m_Position - particle.m_PrevPosition;
				Vector3 val4 = m_ObjectMove * particle.m_Inert;
				particle.m_PrevPosition = particle.m_Position + val4;
				particle.m_Position += val3 * (1f - particle.m_Damping) + gravity + val4;
			}
			else
			{
				particle.m_PrevPosition = particle.m_Position;
				particle.m_Position = particle.m_Transform.position;
			}
		}
	}

	private void UpdateParticles2()
	{
		//IL_0002: 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)
		//IL_006f: 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_0079: 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_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: 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_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: 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)
		//IL_00d0: 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_010b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_0115: 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_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0123: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_0135: 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_0146: 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_0297: Unknown result type (might be due to invalid IL or missing references)
		//IL_029d: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0176: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Unknown result type (might be due to invalid IL or missing references)
		//IL_018a: Unknown result type (might be due to invalid IL or missing references)
		//IL_018f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0228: Unknown result type (might be due to invalid IL or missing references)
		//IL_022e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0242: Unknown result type (might be due to invalid IL or missing references)
		//IL_0248: 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_0262: Unknown result type (might be due to invalid IL or missing references)
		//IL_026e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0275: Unknown result type (might be due to invalid IL or missing references)
		//IL_027d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0287: Unknown result type (might be due to invalid IL or missing references)
		//IL_028c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0291: Unknown result type (might be due to invalid IL or missing references)
		Plane val = default(Plane);
		for (int i = 1; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			Particle particle2 = m_Particles[particle.m_ParentIndex];
			Vector3 val2;
			float magnitude;
			if ((Object)(object)particle.m_Transform != (Object)null)
			{
				val2 = particle2.m_Transform.position - particle.m_Transform.position;
				magnitude = ((Vector3)(ref val2)).magnitude;
			}
			else
			{
				Matrix4x4 localToWorldMatrix = particle2.m_Transform.localToWorldMatrix;
				val2 = ((Matrix4x4)(ref localToWorldMatrix)).MultiplyVector(particle.m_EndOffset);
				magnitude = ((Vector3)(ref val2)).magnitude;
			}
			float num = Mathf.Lerp(1f, particle.m_Stiffness, m_Weight);
			if (num > 0f || particle.m_Elasticity > 0f)
			{
				Matrix4x4 localToWorldMatrix2 = particle2.m_Transform.localToWorldMatrix;
				((Matrix4x4)(ref localToWorldMatrix2)).SetColumn(3, Vector4.op_Implicit(particle2.m_Position));
				Vector3 val3 = ((!((Object)(object)particle.m_Transform != (Object)null)) ? ((Matrix4x4)(ref localToWorldMatrix2)).MultiplyPoint3x4(particle.m_EndOffset) : ((Matrix4x4)(ref localToWorldMatrix2)).MultiplyPoint3x4(particle.m_Transform.localPosition));
				Vector3 val4 = val3 - particle.m_Position;
				particle.m_Position += val4 * particle.m_Elasticity;
				if (num > 0f)
				{
					val4 = val3 - particle.m_Position;
					float magnitude2 = ((Vector3)(ref val4)).magnitude;
					float num2 = magnitude * (1f - num) * 2f;
					if (magnitude2 > num2)
					{
						particle.m_Position += val4 * ((magnitude2 - num2) / magnitude2);
					}
				}
			}
			if (m_Colliders != null)
			{
				float particleRadius = particle.m_Radius * m_ObjectScale;
				for (int j = 0; j < m_Colliders.Count; j++)
				{
					DynamicBoneCollider dynamicBoneCollider = m_Colliders[j];
					if ((Object)(object)dynamicBoneCollider != (Object)null && ((Behaviour)dynamicBoneCollider).enabled)
					{
						dynamicBoneCollider.Collide(ref particle.m_Position, particleRadius);
					}
				}
			}
			if (m_FreezeAxis != 0)
			{
				switch (m_FreezeAxis)
				{
				case FreezeAxis.X:
					((Plane)(ref val)).SetNormalAndPosition(particle2.m_Transform.right, particle2.m_Position);
					break;
				case FreezeAxis.Y:
					((Plane)(ref val)).SetNormalAndPosition(particle2.m_Transform.up, particle2.m_Position);
					break;
				case FreezeAxis.Z:
					((Plane)(ref val)).SetNormalAndPosition(particle2.m_Transform.forward, particle2.m_Position);
					break;
				}
				particle.m_Position -= ((Plane)(ref val)).normal * ((Plane)(ref val)).GetDistanceToPoint(particle.m_Position);
			}
			Vector3 val5 = particle2.m_Position - particle.m_Position;
			float magnitude3 = ((Vector3)(ref val5)).magnitude;
			if (magnitude3 > 0f)
			{
				particle.m_Position += val5 * ((magnitude3 - magnitude) / magnitude3);
			}
		}
	}

	private void SkipUpdateParticles()
	{
		//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ea: 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_002c: 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_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: 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_004b: 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_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)
		//IL_00ae: 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)
		//IL_00b8: 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_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: 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)
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b2: 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_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: 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_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: 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_013a: 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_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_0147: 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)
		//IL_0172: Unknown result type (might be due to invalid IL or missing references)
		//IL_017c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_0186: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 0; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			if (particle.m_ParentIndex >= 0)
			{
				Vector3 val = m_ObjectMove * particle.m_Inert;
				particle.m_PrevPosition += val;
				particle.m_Position += val;
				Particle particle2 = m_Particles[particle.m_ParentIndex];
				Vector3 val2;
				float magnitude;
				if ((Object)(object)particle.m_Transform != (Object)null)
				{
					val2 = particle2.m_Transform.position - particle.m_Transform.position;
					magnitude = ((Vector3)(ref val2)).magnitude;
				}
				else
				{
					Matrix4x4 localToWorldMatrix = particle2.m_Transform.localToWorldMatrix;
					val2 = ((Matrix4x4)(ref localToWorldMatrix)).MultiplyVector(particle.m_EndOffset);
					magnitude = ((Vector3)(ref val2)).magnitude;
				}
				float num = Mathf.Lerp(1f, particle.m_Stiffness, m_Weight);
				if (num > 0f)
				{
					Matrix4x4 localToWorldMatrix2 = particle2.m_Transform.localToWorldMatrix;
					((Matrix4x4)(ref localToWorldMatrix2)).SetColumn(3, Vector4.op_Implicit(particle2.m_Position));
					Vector3 val3 = ((!((Object)(object)particle.m_Transform != (Object)null)) ? ((Matrix4x4)(ref localToWorldMatrix2)).MultiplyPoint3x4(particle.m_EndOffset) : ((Matrix4x4)(ref localToWorldMatrix2)).MultiplyPoint3x4(particle.m_Transform.localPosition));
					Vector3 val4 = val3 - particle.m_Position;
					float magnitude2 = ((Vector3)(ref val4)).magnitude;
					float num2 = magnitude * (1f - num) * 2f;
					if (magnitude2 > num2)
					{
						particle.m_Position += val4 * ((magnitude2 - num2) / magnitude2);
					}
				}
				Vector3 val5 = particle2.m_Position - particle.m_Position;
				float magnitude3 = ((Vector3)(ref val5)).magnitude;
				if (magnitude3 > 0f)
				{
					particle.m_Position += val5 * ((magnitude3 - magnitude) / magnitude3);
				}
			}
			else
			{
				particle.m_PrevPosition = particle.m_Position;
				particle.m_Position = particle.m_Transform.position;
			}
		}
	}

	private void ApplyParticlesToTransforms()
	{
		//IL_00ad: 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_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: 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_005e: 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_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: 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_0079: 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_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 1; i < m_Particles.Count; i++)
		{
			Particle particle = m_Particles[i];
			Particle particle2 = m_Particles[particle.m_ParentIndex];
			if (particle2.m_Transform.childCount <= 1)
			{
				Vector3 val = ((!((Object)(object)particle.m_Transform != (Object)null)) ? particle.m_EndOffset : particle.m_Transform.localPosition);
				Quaternion val2 = Quaternion.FromToRotation(particle2.m_Transform.TransformDirection(val), particle.m_Position - particle2.m_Position);
				particle2.m_Transform.rotation = val2 * particle2.m_Transform.rotation;
			}
			if ((Object)(object)particle.m_Transform != (Object)null)
			{
				particle.m_Transform.position = particle.m_Position;
			}
		}
	}
}
[AddComponentMenu("Dynamic Bone/Dynamic Bone Collider")]
public class DynamicBoneCollider : MonoBehaviour
{
	public enum Direction
	{
		X,
		Y,
		Z
	}

	public enum Bound
	{
		Outside,
		Inside
	}

	public Vector3 m_Center = Vector3.zero;

	public float m_Radius = 0.5f;

	public float m_Height;

	public Direction m_Direction;

	public Bound m_Bound;

	private void OnValidate()
	{
		m_Radius = Mathf.Max(m_Radius, 0f);
		m_Height = Mathf.Max(m_Height, 0f);
	}

	public void Collide(ref Vector3 particlePosition, float particleRadius)
	{
		//IL_000c: 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_0078: 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_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_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: 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_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		float num = m_Radius * Mathf.Abs(((Component)this).transform.lossyScale.x);
		float num2 = m_Height * 0.5f - num;
		if (num2 <= 0f)
		{
			if (m_Bound == Bound.Outside)
			{
				OutsideSphere(ref particlePosition, particleRadius, ((Component)this).transform.TransformPoint(m_Center), num);
			}
			else
			{
				InsideSphere(ref particlePosition, particleRadius, ((Component)this).transform.TransformPoint(m_Center), num);
			}
			return;
		}
		Vector3 center = m_Center;
		Vector3 center2 = m_Center;
		switch (m_Direction)
		{
		case Direction.X:
			center.x -= num2;
			center2.x += num2;
			break;
		case Direction.Y:
			center.y -= num2;
			center2.y += num2;
			break;
		case Direction.Z:
			center.z -= num2;
			center2.z += num2;
			break;
		}
		if (m_Bound == Bound.Outside)
		{
			OutsideCapsule(ref particlePosition, particleRadius, ((Component)this).transform.TransformPoint(center), ((Component)this).transform.TransformPoint(center2), num);
		}
		else
		{
			InsideCapsule(ref particlePosition, particleRadius, ((Component)this).transform.TransformPoint(center), ((Component)this).transform.TransformPoint(center2), num);
		}
	}

	private static void OutsideSphere(ref Vector3 particlePosition, float particleRadius, Vector3 sphereCenter, float sphereRadius)
	{
		//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_0014: 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_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: 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_0042: Unknown result type (might be due to invalid IL or missing references)
		float num = sphereRadius + particleRadius;
		float num2 = num * num;
		Vector3 val = particlePosition - sphereCenter;
		float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude;
		if (sqrMagnitude > 0f && sqrMagnitude < num2)
		{
			float num3 = Mathf.Sqrt(sqrMagnitude);
			particlePosition = sphereCenter + val * (num / num3);
		}
	}

	private static void InsideSphere(ref Vector3 particlePosition, float particleRadius, Vector3 sphereCenter, float sphereRadius)
	{
		//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_0014: 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_002b: 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_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		float num = sphereRadius + particleRadius;
		float num2 = num * num;
		Vector3 val = particlePosition - sphereCenter;
		float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude;
		if (sqrMagnitude > num2)
		{
			float num3 = Mathf.Sqrt(sqrMagnitude);
			particlePosition = sphereCenter + val * (num / num3);
		}
	}

	private static void OutsideCapsule(ref Vector3 particlePosition, float particleRadius, Vector3 capsuleP0, Vector3 capsuleP1, float capsuleRadius)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//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_0010: 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)
		//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)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: 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_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_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: 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_00e1: 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_0058: 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_0062: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: 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)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_0111: Unknown result type (might be due to invalid IL or missing references)
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		float num = capsuleRadius + particleRadius;
		float num2 = num * num;
		Vector3 val = capsuleP1 - capsuleP0;
		Vector3 val2 = particlePosition - capsuleP0;
		float num3 = Vector3.Dot(val2, val);
		if (num3 <= 0f)
		{
			float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude;
			if (sqrMagnitude > 0f && sqrMagnitude < num2)
			{
				float num4 = Mathf.Sqrt(sqrMagnitude);
				particlePosition = capsuleP0 + val2 * (num / num4);
			}
			return;
		}
		float sqrMagnitude2 = ((Vector3)(ref val)).sqrMagnitude;
		if (num3 >= sqrMagnitude2)
		{
			val2 = particlePosition - capsuleP1;
			float sqrMagnitude3 = ((Vector3)(ref val2)).sqrMagnitude;
			if (sqrMagnitude3 > 0f && sqrMagnitude3 < num2)
			{
				float num5 = Mathf.Sqrt(sqrMagnitude3);
				particlePosition = capsuleP1 + val2 * (num / num5);
			}
		}
		else if (sqrMagnitude2 > 0f)
		{
			num3 /= sqrMagnitude2;
			val2 -= val * num3;
			float sqrMagnitude4 = ((Vector3)(ref val2)).sqrMagnitude;
			if (sqrMagnitude4 > 0f && sqrMagnitude4 < num2)
			{
				float num6 = Mathf.Sqrt(sqrMagnitude4);
				particlePosition += val2 * ((num - num6) / num6);
			}
		}
	}

	private static void InsideCapsule(ref Vector3 particlePosition, float particleRadius, Vector3 capsuleP0, Vector3 capsuleP1, float capsuleRadius)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//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_0010: 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)
		//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)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: 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_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_004b: 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_0056: 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_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: 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_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_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		float num = capsuleRadius + particleRadius;
		float num2 = num * num;
		Vector3 val = capsuleP1 - capsuleP0;
		Vector3 val2 = particlePosition - capsuleP0;
		float num3 = Vector3.Dot(val2, val);
		if (num3 <= 0f)
		{
			float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude;
			if (sqrMagnitude > num2)
			{
				float num4 = Mathf.Sqrt(sqrMagnitude);
				particlePosition = capsuleP0 + val2 * (num / num4);
			}
			return;
		}
		float sqrMagnitude2 = ((Vector3)(ref val)).sqrMagnitude;
		if (num3 >= sqrMagnitude2)
		{
			val2 = particlePosition - capsuleP1;
			float sqrMagnitude3 = ((Vector3)(ref val2)).sqrMagnitude;
			if (sqrMagnitude3 > num2)
			{
				float num5 = Mathf.Sqrt(sqrMagnitude3);
				particlePosition = capsuleP1 + val2 * (num / num5);
			}
		}
		else if (sqrMagnitude2 > 0f)
		{
			num3 /= sqrMagnitude2;
			val2 -= val * num3;
			float sqrMagnitude4 = ((Vector3)(ref val2)).sqrMagnitude;
			if (sqrMagnitude4 > num2)
			{
				float num6 = Mathf.Sqrt(sqrMagnitude4);
				particlePosition += val2 * ((num - num6) / num6);
			}
		}
	}

	private void OnDrawGizmosSelected()
	{
		//IL_001d: 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_0033: 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_0079: 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)
		//IL_0062: 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_00f0: 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_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		if (!((Behaviour)this).enabled)
		{
			return;
		}
		if (m_Bound == Bound.Outside)
		{
			Gizmos.color = Color.yellow;
		}
		else
		{
			Gizmos.color = Color.magenta;
		}
		float num = m_Radius * Mathf.Abs(((Component)this).transform.lossyScale.x);
		float num2 = m_Height * 0.5f - num;
		if (num2 <= 0f)
		{
			Gizmos.DrawWireSphere(((Component)this).transform.TransformPoint(m_Center), num);
			return;
		}
		Vector3 center = m_Center;
		Vector3 center2 = m_Center;
		switch (m_Direction)
		{
		case Direction.X:
			center.x -= num2;
			center2.x += num2;
			break;
		case Direction.Y:
			center.y -= num2;
			center2.y += num2;
			break;
		case Direction.Z:
			center.z -= num2;
			center2.z += num2;
			break;
		}
		Gizmos.DrawWireSphere(((Component)this).transform.TransformPoint(center), num);
		Gizmos.DrawWireSphere(((Component)this).transform.TransformPoint(center2), num);
	}
}
namespace LethalKitModelReplacement
{
	public class BodyReplacementKit : BodyReplacementBase
	{
		public override string boneMapFileName => "boneMapKit.json";

		public override GameObject LoadAssetsAndReturnModel()
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			GameObject obj = Assets.MainAssetBundle.LoadAsset<GameObject>("LethalFox");
			Texture2D val = Assets.MainAssetBundle.LoadAsset<Texture2D>("LethalFox_D");
			Assets.MainAssetBundle.LoadAsset<Texture2D>("LethalFox_N");
			Assets.MainAssetBundle.LoadAsset<Texture2D>("LethalFox_R");
			Assets.MainAssetBundle.LoadAsset<Texture2D>("LethalFox_Emit");
			SkinnedMeshRenderer componentInChildren = obj.GetComponentInChildren<SkinnedMeshRenderer>();
			((Renderer)componentInChildren).materials[0] = new Material(((Renderer)componentInChildren).material.shader);
			((Renderer)componentInChildren).material.SetTexture("_MainTex", (Texture)(object)val);
			return obj;
		}

		public override void AddModelScripts()
		{
		}
	}
	[BepInPlugin("meow.LethalKitModelReplacement", "Kitsune Model", "1.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(PlayerControllerB))]
		public class PlayerControllerBPatch
		{
			[HarmonyPatch("Update")]
			[HarmonyPostfix]
			public static void UpdatePatch(ref PlayerControllerB __instance)
			{
				_ = __instance.playerSteamId;
			}
		}

		private void Awake()
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			ModelReplacementAPI.RegisterSuitModelReplacement("Green Suit", typeof(BodyReplacementKit));
			ModelReplacementAPI.RegisterSuitModelReplacement("Default", typeof(BodyReplacementKit));
			ModelReplacementAPI.RegisterSuitModelReplacement("Orange suit", typeof(BodyReplacementKit));
			ModelReplacementAPI.RegisterSuitModelReplacement("Pajama suit", typeof(BodyReplacementKit));
			Assets.PopulateAssets();
			new Harmony("meow.LethalKitModelReplacement").PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin meow.LethalKitModelReplacement is loaded!");
		}
	}
	public static class Assets
	{
		public static string mainAssetBundleName = "kbundle";

		public static AssetBundle MainAssetBundle = null;

		private static string GetAssemblyName()
		{
			return Assembly.GetExecutingAssembly().FullName.Split(',')[0];
		}

		public static void PopulateAssets()
		{
			if ((Object)(object)MainAssetBundle == (Object)null)
			{
				using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName))
				{
					MainAssetBundle = AssetBundle.LoadFromStream(stream);
				}
			}
		}
	}
}

plugins/malco-Lategame_Upgrades/MoreShipUpgrades/MoreShipUpgrades.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 BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalLib.Modules;
using MoreShipUpgrades.Managers;
using MoreShipUpgrades.Misc;
using MoreShipUpgrades.UpgradeComponents;
using Newtonsoft.Json;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyVersion("0.0.0.0")]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace MoreShipUpgrades
{
	[BepInPlugin("com.malco.lethalcompany.moreshipupgrades", "More Ship Upgrades", "2.1.0")]
	public class Plugin : BaseUnityPlugin
	{
		private readonly Harmony harmony = new Harmony("com.malco.lethalcompany.moreshipupgrades");

		public static Plugin instance;

		public static ManualLogSource mls;

		public static PluginConfig cfg { get; private set; }

		private void Awake()
		{
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Expected O, but got Unknown
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Expected O, but got Unknown
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Expected O, but got Unknown
			cfg = new PluginConfig(((BaseUnityPlugin)this).Config);
			cfg.InitBindings();
			mls = Logger.CreateLogSource("More Ship Upgrades");
			instance = this;
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "shipupgrades");
			AssetBundle val = AssetBundle.LoadFromFile(text);
			GameObject val2 = new GameObject("UpgradeBus");
			val2.AddComponent<UpgradeBus>();
			GameObject val3 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/LGUStore.prefab");
			val3.AddComponent<LGUStore>();
			NetworkPrefabs.RegisterNetworkPrefab(val3);
			UpgradeBus.instance.modStorePrefab = val3;
			AudioClip itemBreak = val.LoadAsset<AudioClip>("Assets/ShipUpgrades/break.mp3");
			AudioClip error = val.LoadAsset<AudioClip>("Assets/ShipUpgrades/error.mp3");
			AudioClip buttonPress = val.LoadAsset<AudioClip>("Assets/ShipUpgrades/ButtonPress2.ogg");
			Item val4 = val.LoadAsset<Item>("Assets/ShipUpgrades/TpButton.asset");
			val4.itemName = "Portable Tele";
			TPButtonScript tPButtonScript = val4.spawnPrefab.AddComponent<TPButtonScript>();
			((GrabbableObject)tPButtonScript).itemProperties = val4;
			((GrabbableObject)tPButtonScript).grabbable = true;
			((GrabbableObject)tPButtonScript).grabbableToEnemies = true;
			tPButtonScript.ItemBreak = itemBreak;
			((GrabbableObject)tPButtonScript).useCooldown = 2f;
			tPButtonScript.error = error;
			tPButtonScript.buttonPress = buttonPress;
			val4.creditsWorth = cfg.WEAK_TELE_PRICE;
			NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab);
			if (cfg.WEAK_TELE_ENABLED)
			{
				TerminalNode val5 = new TerminalNode();
				val5.displayText = "A button that when pressed teleports you and your loot back to the ship. Must have Ship Teleporter unlocked!!!\n\nHas a 90% chance to self destruct on use.";
				Items.RegisterShopItem(val4, (TerminalNode)null, (TerminalNode)null, val5, val4.creditsWorth);
			}
			Item val6 = val.LoadAsset<Item>("Assets/ShipUpgrades/TpButtonAdv.asset");
			val6.creditsWorth = cfg.ADVANCED_TELE_PRICE;
			val6.itemName = "Advanced Portable Tele";
			AdvTPButtonScript advTPButtonScript = val6.spawnPrefab.AddComponent<AdvTPButtonScript>();
			((GrabbableObject)advTPButtonScript).itemProperties = val6;
			((GrabbableObject)advTPButtonScript).grabbable = true;
			((GrabbableObject)advTPButtonScript).useCooldown = 2f;
			((GrabbableObject)advTPButtonScript).grabbableToEnemies = true;
			advTPButtonScript.ItemBreak = itemBreak;
			advTPButtonScript.error = error;
			advTPButtonScript.buttonPress = buttonPress;
			NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab);
			if (cfg.ADVANCED_TELE_ENABLED)
			{
				TerminalNode val7 = new TerminalNode();
				val7.displayText = "A button that when pressed teleports you and your loot back to the ship. Must have Ship Teleporter unlocked!!!";
				Items.RegisterShopItem(val6, (TerminalNode)null, (TerminalNode)null, val7, val6.creditsWorth);
			}
			GameObject val8 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/beekeeper.prefab");
			val8.AddComponent<beekeeperScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val8);
			if (cfg.BEEKEEPER_ENABLED)
			{
				CustomTerminalNode item = new CustomTerminalNode("Beekeeper", cfg.BEEKEEPER_PRICE, $"Circuit bees do %{Mathf.Round(100f * cfg.BEEKEEPER_DAMAGE_MULTIPLIER)} of their base damage.", val8, 3);
				UpgradeBus.instance.terminalNodes.Add(item);
			}
			GameObject val9 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/BiggerLungs.prefab");
			val9.AddComponent<biggerLungScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val9);
			if (cfg.BIGGER_LUNGS_ENABLED)
			{
				CustomTerminalNode item2 = new CustomTerminalNode("Bigger Lungs", cfg.BIGGER_LUNGS_PRICE, $"Stamina Time is {UpgradeBus.instance.cfg.SPRINT_TIME_INCREASE - 11f} units longer", val9, 3);
				UpgradeBus.instance.terminalNodes.Add(item2);
			}
			GameObject val10 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/runningShoes.prefab");
			val10.AddComponent<runningShoeScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val10);
			if (cfg.RUNNING_SHOES_ENABLED)
			{
				CustomTerminalNode item3 = new CustomTerminalNode("Running Shoes", cfg.RUNNING_SHOES_PRICE, $"You can run {UpgradeBus.instance.cfg.MOVEMENT_SPEED - 4.6f} units faster", val10, 3);
				UpgradeBus.instance.terminalNodes.Add(item3);
			}
			GameObject val11 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/strongLegs.prefab");
			val11.AddComponent<strongLegsScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val11);
			if (cfg.STRONG_LEGS_ENABLED)
			{
				CustomTerminalNode item4 = new CustomTerminalNode("Strong Legs", cfg.STRONG_LEGS_PRICE, $"Jump {cfg.JUMP_FORCE - 13f} units higher.", val11, 3);
				UpgradeBus.instance.terminalNodes.Add(item4);
			}
			GameObject val12 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/destructiveCodes.prefab");
			val12.AddComponent<trapDestroyerScript>();
			string text2 = "";
			text2 = ((!cfg.DESTROY_TRAP) ? $"Broadcasted codes now disable map hazards for {cfg.DISARM_TIME} seconds." : ((!cfg.EXPLODE_TRAP) ? "Broadcasted codes now destroy map hazards." : "Broadcasted codes now explode map hazards."));
			NetworkPrefabs.RegisterNetworkPrefab(val12);
			if (cfg.MALWARE_BROADCASTER_ENABLED)
			{
				CustomTerminalNode item5 = new CustomTerminalNode("Malware Broadcaster", cfg.MALWARE_BROADCASTER_PRICE, text2, val12);
				UpgradeBus.instance.terminalNodes.Add(item5);
			}
			GameObject val13 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/lightFooted.prefab");
			val13.AddComponent<lightFootedScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val13);
			if (cfg.LIGHT_FOOTED_ENABLED)
			{
				CustomTerminalNode item6 = new CustomTerminalNode("Light Footed", cfg.LIGHT_FOOTED_PRICE, $"Audible Noise Distance is reduced by {UpgradeBus.instance.cfg.NOISE_REDUCTION} units. \nApplies to both sprinting and walking.", val13, 3);
				UpgradeBus.instance.terminalNodes.Add(item6);
			}
			GameObject val14 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/nightVision.prefab");
			val14.AddComponent<nightVisionScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val14);
			if (cfg.NIGHT_VISION_ENABLED)
			{
				CustomTerminalNode item7 = new CustomTerminalNode("Night Vision", cfg.NIGHT_VISION_PRICE, $"Allows you to see in the dark. Press Left-Alt to turn on.  \nDrain speed is {cfg.NIGHT_VIS_DRAIN_SPEED}  \nRegen speed is {cfg.NIGHT_VIS_REGEN_SPEED}", val14);
				UpgradeBus.instance.terminalNodes.Add(item7);
			}
			GameObject val15 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/terminalFlash.prefab");
			AudioClip flashNoise = val.LoadAsset<AudioClip>("Assets/ShipUpgrades/flashbangsfx.ogg");
			UpgradeBus.instance.flashNoise = flashNoise;
			val15.AddComponent<terminalFlashScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val15);
			if (cfg.DISCOMBOBULATOR_ENABLED)
			{
				CustomTerminalNode item8 = new CustomTerminalNode("Discombobulator", cfg.DISCOMBOBULATOR_PRICE, $"Stun enemies around your ship in a {cfg.DISCOMBOBULATOR_RADIUS} unit radius.", val15, 3);
				UpgradeBus.instance.terminalNodes.Add(item8);
			}
			GameObject val16 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/strongScanner.prefab");
			val16.AddComponent<strongerScannerScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val16);
			if (cfg.BETTER_SCANNER_ENABLED)
			{
				string text3 = (cfg.REQUIRE_LINE_OF_SIGHT ? "Does not remove" : "Removes");
				string text4 = $"Increase distance nodes can be scanned by {cfg.NODE_DISTANCE_INCREASE} units.  \nIncrease distance Ship and Entrance can be scanned by {cfg.SHIP_AND_ENTRANCE_DISTANCE_INCREASE} units.  \n";
				text4 = text4 + text3 + " LOS requirement";
				CustomTerminalNode item9 = new CustomTerminalNode("Better Scanner", cfg.BETTER_SCANNER_PRICE, text4, val16);
				UpgradeBus.instance.terminalNodes.Add(item9);
			}
			GameObject val17 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/exoskeleton.prefab");
			val17.AddComponent<exoskeletonScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val17);
			if (cfg.BACK_MUSCLES_ENABLED)
			{
				CustomTerminalNode item10 = new CustomTerminalNode("Back Muscles", cfg.BACK_MUSCLES_PRICE, $"Carry weight becomes %{Mathf.Round(cfg.CARRY_WEIGHT_REDUCTION * 100f)} of original", val17, 3);
				UpgradeBus.instance.terminalNodes.Add(item10);
			}
			GameObject val18 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/Pager.prefab");
			val18.AddComponent<pagerScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val18);
			if (cfg.PAGER_ENABLED)
			{
				CustomTerminalNode item11 = new CustomTerminalNode("Pager", cfg.PAGER_PRICE, "Type `page <message>` to send a message to each team members chat", val18);
				UpgradeBus.instance.terminalNodes.Add(item11);
			}
			GameObject val19 = val.LoadAsset<GameObject>("Assets/ShipUpgrades/LockSmith.prefab");
			val19.AddComponent<lockSmithScript>();
			NetworkPrefabs.RegisterNetworkPrefab(val19);
			if (cfg.LOCKSMITH_ENABLED)
			{
				CustomTerminalNode item12 = new CustomTerminalNode("Locksmith", cfg.LOCKSMITH_PRICE, "Allows you to pick door locks by completing a minigame.", val19);
				UpgradeBus.instance.terminalNodes.Add(item12);
			}
			UpgradeBus.instance.CreateDeepNodeCopy();
			harmony.PatchAll();
			mls.LogInfo((object)"More Ship Upgrades has been patched");
		}

		public void sendModInfo()
		{
			foreach (KeyValuePair<string, PluginInfo> pluginInfo in Chainloader.PluginInfos)
			{
				if (pluginInfo.Value.Metadata.GUID.Contains("ModSync"))
				{
					try
					{
						List<string> list = new List<string> { "malco", "LateGameUpgrades" };
						((Component)pluginInfo.Value.Instance).BroadcastMessage("getModInfo", (object)list, (SendMessageOptions)1);
						break;
					}
					catch (Exception)
					{
						mls.LogInfo((object)"Failed to send info to ModSync, go yell at Minx");
						break;
					}
				}
			}
		}
	}
}
namespace MoreShipUpgrades.UpgradeComponents
{
	internal class AdvTPButtonScript : GrabbableObject
	{
		public AudioClip ItemBreak;

		public AudioClip error;

		public AudioClip buttonPress;

		private AudioSource audio;

		public override void Start()
		{
			((GrabbableObject)this).Start();
			audio = ((Component)this).GetComponent<AudioSource>();
			((Component)this).gameObject.GetComponent<NetworkObject>().Spawn(false);
		}

		public override void DiscardItem()
		{
			base.playerHeldBy.activatingItem = false;
			((GrabbableObject)this).DiscardItem();
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (!Mouse.current.leftButton.isPressed)
			{
				return;
			}
			audio.PlayOneShot(buttonPress);
			if (!base.itemUsedUp)
			{
				ShipTeleporter[] array = Object.FindObjectsOfType<ShipTeleporter>();
				ShipTeleporter val = null;
				ShipTeleporter[] array2 = array;
				foreach (ShipTeleporter val2 in array2)
				{
					if (!val2.isInverseTeleporter)
					{
						val = val2;
						break;
					}
				}
				if ((Object)(object)val == (Object)null)
				{
					audio.PlayOneShot(error);
					return;
				}
				int num = -1;
				for (int j = 0; j < StartOfRound.Instance.mapScreen.radarTargets.Count(); j++)
				{
					if ((Object)(object)((Component)StartOfRound.Instance.mapScreen.radarTargets[j].transform).gameObject.GetComponent<PlayerControllerB>() == (Object)(object)base.playerHeldBy)
					{
						num = j;
					}
				}
				if (num == -1)
				{
					StartOfRound.Instance.mapScreen.targetedPlayer = base.playerHeldBy;
					UpgradeBus.instance.TPButtonPressed = true;
					val.PressTeleportButtonOnLocalClient();
				}
				else
				{
					StartOfRound.Instance.mapScreen.SwitchRadarTargetAndSync(num);
					((MonoBehaviour)this).StartCoroutine(WaitToTP(val));
				}
			}
			else
			{
				audio.PlayOneShot(error);
			}
		}

		private IEnumerator WaitToTP(ShipTeleporter tele)
		{
			yield return (object)new WaitForSeconds(0.15f);
			ReqUpdateTpDropStatusServerRpc();
			tele.PressTeleportButtonOnLocalClient();
			if (Random.Range(0f, 1f) < UpgradeBus.instance.cfg.ADV_CHANCE_TO_BREAK)
			{
				audio.PlayOneShot(ItemBreak);
				base.itemUsedUp = true;
				TextMeshProUGUI chatText = HUDManager.Instance.chatText;
				((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>The teleporter button has suffered irreparable damage and destroyed itself!</color>";
				base.playerHeldBy.DespawnHeldObject();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReqUpdateTpDropStatusServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3988692149u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3988692149u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ChangeTPButtonPressedClientRpc();
				}
			}
		}

		[ClientRpc]
		private void ChangeTPButtonPressedClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2793166939u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2793166939u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					UpgradeBus.instance.TPButtonPressed = true;
				}
			}
		}

		protected override void __initializeVariables()
		{
			((GrabbableObject)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_AdvTPButtonScript()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3988692149u, new RpcReceiveHandler(__rpc_handler_3988692149));
			NetworkManager.__rpc_func_table.Add(2793166939u, new RpcReceiveHandler(__rpc_handler_2793166939));
		}

		private static void __rpc_handler_3988692149(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((AdvTPButtonScript)(object)target).ReqUpdateTpDropStatusServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2793166939(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((AdvTPButtonScript)(object)target).ChangeTPButtonPressedClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "AdvTPButtonScript";
		}
	}
	internal class beekeeperScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void Increment()
		{
			UpgradeBus.instance.beeLevel++;
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "beekeeper")
				{
					terminalNode.Description = $"Circuit bees do %{Mathf.Round(100f * (UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER - (float)UpgradeBus.instance.beeLevel * UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER_INCREMENT))} of their base damage.";
				}
			}
		}

		public override void load()
		{
			UpgradeBus.instance.beekeeper = true;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Beekeeper is active!</color>";
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "beekeeper" && terminalNode.Price > 0)
				{
					terminalNode.Price /= 2;
				}
			}
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Beekeeper"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Beekeeper", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Locksmith key is already present in upgrade dict.");
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "beekeeperScript";
		}
	}
	internal class biggerLungScript : BaseUpgrade
	{
		private PlayerControllerB[] players;

		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(LateApply());
		}

		private IEnumerator LateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void Increment()
		{
			UpgradeBus.instance.lungLevel++;
			players = Object.FindObjectsOfType<PlayerControllerB>();
			PlayerControllerB[] array = players;
			foreach (PlayerControllerB val in array)
			{
				val.sprintTime += UpgradeBus.instance.cfg.SPRINT_TIME_INCREMENT;
			}
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "bigger lungs")
				{
					terminalNode.Description = $"Stamina Time is {UpgradeBus.instance.cfg.SPRINT_TIME_INCREASE - 11f + (float)UpgradeBus.instance.lungLevel * UpgradeBus.instance.cfg.SPRINT_TIME_INCREMENT} units longer";
				}
			}
		}

		public override void load()
		{
			players = Object.FindObjectsOfType<PlayerControllerB>();
			PlayerControllerB[] array = players;
			foreach (PlayerControllerB val in array)
			{
				val.sprintTime = UpgradeBus.instance.cfg.SPRINT_TIME_INCREASE;
			}
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "Bigger Lungs" && terminalNode.Price > 0)
				{
					terminalNode.Price /= 2;
				}
			}
			UpgradeBus.instance.biggerLungs = true;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Bigger Lungs is active!</color>";
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Bigger Lungs"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Bigger Lungs", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Bigger Lungs is already in upgrade dict.");
			}
			float num = 0f;
			for (int j = 0; j < UpgradeBus.instance.lungLevel; j++)
			{
				num += UpgradeBus.instance.cfg.SPRINT_TIME_INCREMENT;
			}
			PlayerControllerB[] array2 = players;
			foreach (PlayerControllerB val2 in array2)
			{
				val2.sprintTime += num;
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "biggerLungScript";
		}
	}
	internal class exoskeletonScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void Increment()
		{
			UpgradeBus.instance.backLevel++;
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "back muscles")
				{
					terminalNode.Description = $"Carry weight becomes %{Mathf.Round((UpgradeBus.instance.cfg.CARRY_WEIGHT_REDUCTION - UpgradeBus.instance.cfg.CARRY_WEIGHT_INCREMENT * (float)UpgradeBus.instance.backLevel) * 100f)} of original";
				}
			}
		}

		public override void load()
		{
			UpgradeBus.instance.exoskeleton = true;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Back Muscles is active!</color>";
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "back muscles" && terminalNode.Price > 0)
				{
					terminalNode.Price /= 2;
				}
			}
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Back Muscles"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Back Muscles", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Back Muscles is already in upgrade dict.");
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "exoskeletonScript";
		}
	}
	internal class lightFootedScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void Increment()
		{
			UpgradeBus.instance.lightLevel++;
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "light footed")
				{
					terminalNode.Description = $"Audible Noise Distance is reduced by {UpgradeBus.instance.cfg.NOISE_REDUCTION + UpgradeBus.instance.cfg.NOISE_REDUCTION_INCREMENT * (float)UpgradeBus.instance.lightLevel} units. \nApplies to both sprinting and walking.";
				}
			}
		}

		public override void load()
		{
			UpgradeBus.instance.softSteps = true;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Light Footed is active!</color>";
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "light footed" && terminalNode.Price > 0)
				{
					terminalNode.Price /= 2;
				}
			}
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Light Footed"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Light Footed", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Light Footed is already in upgrade dict.");
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "lightFootedScript";
		}
	}
	public class lockSmithScript : BaseUpgrade
	{
		private GameObject pin1;

		private GameObject pin2;

		private GameObject pin3;

		private GameObject pin4;

		private GameObject pin5;

		private List<GameObject> pins;

		private List<int> order = new List<int> { 0, 1, 2, 3, 4 };

		private int currentPin = 0;

		public DoorLock currentDoor = null;

		private bool canPick = false;

		public int timesStruck;

		private void Start()
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Expected O, but got Unknown
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Expected O, but got Unknown
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Expected O, but got Unknown
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Expected O, but got Unknown
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Expected O, but got Unknown
			((MonoBehaviour)this).StartCoroutine(lateApply());
			Transform child = ((Component)this).transform.GetChild(0).GetChild(0).GetChild(0);
			pin1 = ((Component)child.GetChild(0)).gameObject;
			pin2 = ((Component)child.GetChild(1)).gameObject;
			pin3 = ((Component)child.GetChild(2)).gameObject;
			pin4 = ((Component)child.GetChild(3)).gameObject;
			pin5 = ((Component)child.GetChild(4)).gameObject;
			((UnityEvent)((Component)pin1.transform.GetChild(0)).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
			{
				StrikePin(0);
			});
			((UnityEvent)((Component)pin2.transform.GetChild(0)).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
			{
				StrikePin(1);
			});
			((UnityEvent)((Component)pin3.transform.GetChild(0)).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
			{
				StrikePin(2);
			});
			((UnityEvent)((Component)pin4.transform.GetChild(0)).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
			{
				StrikePin(3);
			});
			((UnityEvent)((Component)pin5.transform.GetChild(0)).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
			{
				StrikePin(4);
			});
			pins = new List<GameObject> { pin1, pin2, pin3, pin4, pin5 };
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			load();
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
		}

		public override void load()
		{
			UpgradeBus.instance.lockSmith = true;
			UpgradeBus.instance.lockScript = this;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Locksmith is active!</color>";
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Locksmith"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Locksmith", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Locksmith key is already present in upgrade dict.");
			}
		}

		private void Update()
		{
			if (((ButtonControl)Keyboard.current[(Key)60]).wasPressedThisFrame && ((Component)((Component)this).transform.GetChild(0)).gameObject.activeInHierarchy)
			{
				((Component)((Component)this).transform.GetChild(0)).gameObject.SetActive(false);
				Cursor.visible = false;
				Cursor.lockState = (CursorLockMode)1;
			}
		}

		public void BeginLockPick()
		{
			//IL_006c: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			((Component)((Component)this).transform.GetChild(0)).gameObject.SetActive(true);
			Cursor.visible = true;
			Cursor.lockState = (CursorLockMode)0;
			canPick = false;
			currentPin = 0;
			for (int i = 0; i < pins.Count; i++)
			{
				float num = Random.Range(40f, 90f);
				pins[i].transform.localPosition = new Vector3(pins[i].transform.localPosition.x, num, pins[i].transform.localPosition.z);
			}
			RandomizeListOrder(order);
			((MonoBehaviour)this).StartCoroutine(CommunicateOrder(order));
		}

		public void StrikePin(int i)
		{
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: 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)
			if (!canPick)
			{
				return;
			}
			timesStruck++;
			if (i == order[currentPin])
			{
				currentPin++;
				pins[i].transform.localPosition = new Vector3(pins[i].transform.localPosition.x, 35f, pins[i].transform.localPosition.z);
				if (currentPin == 5)
				{
					Cursor.visible = false;
					Cursor.lockState = (CursorLockMode)1;
					((Component)((Component)this).transform.GetChild(0)).gameObject.SetActive(false);
					currentDoor.UnlockDoorSyncWithServer();
				}
				RoundManager.Instance.PlayAudibleNoise(((Component)currentDoor).transform.position, 10f, 0.65f, timesStruck, false, 0);
			}
			else
			{
				BeginLockPick();
				RoundManager.Instance.PlayAudibleNoise(((Component)currentDoor).transform.position, 30f, 0.65f, timesStruck, false, 0);
			}
		}

		private void RandomizeListOrder<T>(List<T> list)
		{
			int num = list.Count;
			Random random = new Random();
			while (num > 1)
			{
				num--;
				int index = random.Next(num + 1);
				T value = list[index];
				list[index] = list[num];
				list[num] = value;
			}
		}

		private IEnumerator CommunicateOrder(List<int> lst)
		{
			yield return (object)new WaitForSeconds(0.75f);
			for (int i = 0; i < lst.Count; i++)
			{
				((Graphic)pins[lst[i]].GetComponent<Image>()).color = Color.green;
				yield return (object)new WaitForSeconds(0.25f);
				((Graphic)pins[lst[i]].GetComponent<Image>()).color = Color.white;
			}
			canPick = true;
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "lockSmithScript";
		}
	}
	internal class nightVisionScript : BaseUpgrade
	{
		private float nightBattery;

		private Transform batteryBar;

		private PlayerControllerB client;

		private bool batteryExhaustion;

		private Key toggle = (Key)53;

		private void Start()
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			((MonoBehaviour)this).StartCoroutine(lateApply());
			batteryBar = ((Component)((Component)this).transform.GetChild(0).GetChild(0)).transform;
			if (Enum.TryParse<Key>(UpgradeBus.instance.cfg.TOGGLE_NIGHT_VISION_KEY, out Key result))
			{
				toggle = result;
			}
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void load()
		{
			UpgradeBus.instance.nightVision = true;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Press " + UpgradeBus.instance.cfg.TOGGLE_NIGHT_VISION_KEY + " to toggle Night Vision!!!</color>";
			client = GameNetworkManager.Instance.localPlayerController;
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Night Vision"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Night Vision", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Night Vision is already in upgrade dict.");
			}
		}

		private void LateUpdate()
		{
			//IL_001d: 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_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)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_037b: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)client == (Object)null)
			{
				return;
			}
			if (((ButtonControl)Keyboard.current[toggle]).wasPressedThisFrame && !batteryExhaustion)
			{
				UpgradeBus.instance.nightVisionActive = !UpgradeBus.instance.nightVisionActive;
				if (UpgradeBus.instance.nightVisionActive)
				{
					UpgradeBus.instance.nightVisColor = client.nightVision.color;
					UpgradeBus.instance.nightVisRange = client.nightVision.range;
					UpgradeBus.instance.nightVisIntensity = client.nightVision.intensity;
					client.nightVision.color = UpgradeBus.instance.cfg.NIGHT_VIS_COLOR;
					client.nightVision.range = UpgradeBus.instance.cfg.NIGHT_VIS_RANGE;
					client.nightVision.intensity = UpgradeBus.instance.cfg.NIGHT_VIS_INTENSITY;
					nightBattery -= UpgradeBus.instance.cfg.NIGHT_VIS_STARTUP;
				}
				else
				{
					client.nightVision.color = UpgradeBus.instance.nightVisColor;
					client.nightVision.range = UpgradeBus.instance.nightVisRange;
					client.nightVision.intensity = UpgradeBus.instance.nightVisIntensity;
				}
			}
			if (UpgradeBus.instance.nightVisionActive)
			{
				nightBattery -= Time.deltaTime * UpgradeBus.instance.cfg.NIGHT_VIS_DRAIN_SPEED;
				nightBattery = Mathf.Clamp(nightBattery, 0f, 1f);
				((Component)batteryBar.parent).gameObject.SetActive(true);
				if (nightBattery <= 0f)
				{
					UpgradeBus.instance.nightVisionActive = false;
					client.nightVision.color = UpgradeBus.instance.nightVisColor;
					client.nightVision.range = UpgradeBus.instance.nightVisRange;
					client.nightVision.intensity = UpgradeBus.instance.nightVisIntensity;
					batteryExhaustion = true;
					((MonoBehaviour)this).StartCoroutine(BatteryRecovery());
				}
			}
			else if (!batteryExhaustion)
			{
				nightBattery += Time.deltaTime * UpgradeBus.instance.cfg.NIGHT_VIS_REGEN_SPEED;
				nightBattery = Mathf.Clamp(nightBattery, 0f, 1f);
				if (nightBattery >= 1f)
				{
					((Component)batteryBar.parent).gameObject.SetActive(false);
				}
				else
				{
					((Component)batteryBar.parent).gameObject.SetActive(true);
				}
			}
			if (client.isInsideFactory || UpgradeBus.instance.nightVisionActive)
			{
				((Behaviour)client.nightVision).enabled = true;
			}
			else
			{
				((Behaviour)client.nightVision).enabled = false;
			}
			batteryBar.localScale = new Vector3(nightBattery, 1f, 1f);
		}

		private IEnumerator BatteryRecovery()
		{
			yield return (object)new WaitForSeconds(UpgradeBus.instance.cfg.NIGHT_VIS_EXHAUST);
			batteryExhaustion = false;
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "nightVisionScript";
		}
	}
	public class pagerScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void load()
		{
			UpgradeBus.instance.pager = true;
			UpgradeBus.instance.pageScript = this;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Pager is active!</color>";
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Pager"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Pager", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Pager is already in upgrade dict.");
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReqBroadcastChatServerRpc(string msg)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Invalid comparison between Unknown and I4
			//IL_005f: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(797180313u, val, (RpcDelivery)0);
				bool flag = msg != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(msg, false);
				}
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 797180313u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ReceiveChatClientRpc(msg);
			}
		}

		[ClientRpc]
		public void ReceiveChatClientRpc(string msg)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Invalid comparison between Unknown and I4
			//IL_005f: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(58640511u, val, (RpcDelivery)0);
				bool flag = msg != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(msg, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 58640511u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				TextMeshProUGUI chatText = HUDManager.Instance.chatText;
				((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Terminal</color><color=#0000FF>:</color> <color=#FF00FF>" + msg + "</color>";
				HUDManager.Instance.PingHUDElement(HUDManager.Instance.Chat, 4f, 1f, 0.2f);
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_pagerScript()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(797180313u, new RpcReceiveHandler(__rpc_handler_797180313));
			NetworkManager.__rpc_func_table.Add(58640511u, new RpcReceiveHandler(__rpc_handler_58640511));
		}

		private static void __rpc_handler_797180313(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: 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)
			//IL_0061: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string msg = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref msg, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((pagerScript)(object)target).ReqBroadcastChatServerRpc(msg);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_58640511(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: 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)
			//IL_0061: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string msg = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref msg, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((pagerScript)(object)target).ReceiveChatClientRpc(msg);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "pagerScript";
		}
	}
	internal class runningShoeScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(LateApply());
		}

		private IEnumerator LateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			load();
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
		}

		public override void Increment()
		{
			PlayerControllerB[] array = Object.FindObjectsOfType<PlayerControllerB>();
			PlayerControllerB[] array2 = array;
			foreach (PlayerControllerB val in array2)
			{
				val.movementSpeed += UpgradeBus.instance.cfg.MOVEMENT_INCREMENT;
			}
			UpgradeBus.instance.runningLevel++;
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "running shoes")
				{
					terminalNode.Description = $"You can run {UpgradeBus.instance.cfg.MOVEMENT_SPEED - 4.6f + UpgradeBus.instance.cfg.MOVEMENT_INCREMENT * (float)UpgradeBus.instance.runningLevel} units faster";
				}
			}
		}

		public override void load()
		{
			UpgradeBus.instance.runningShoes = true;
			PlayerControllerB[] array = Object.FindObjectsOfType<PlayerControllerB>();
			PlayerControllerB[] array2 = array;
			foreach (PlayerControllerB val in array2)
			{
				val.movementSpeed = UpgradeBus.instance.cfg.MOVEMENT_SPEED;
			}
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Running Shoes is active!</color>";
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "running shoes" && terminalNode.Price > 0)
				{
					terminalNode.Price /= 2;
				}
			}
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Running Shoes"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Running Shoes", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Running Shoes is already in upgrade dict.");
			}
			float num = 0f;
			for (int j = 0; j < UpgradeBus.instance.runningLevel; j++)
			{
				num += UpgradeBus.instance.cfg.MOVEMENT_INCREMENT;
			}
			PlayerControllerB[] array3 = array;
			foreach (PlayerControllerB val2 in array3)
			{
				val2.movementSpeed += num;
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "runningShoeScript";
		}
	}
	internal class strongerScannerScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void load()
		{
			UpgradeBus.instance.scannerUpgrade = true;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Better Scanner is active!</color>";
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Better Scanner"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Better Scanner", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Better Scanner is already in upgrade dict.");
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "strongerScannerScript";
		}
	}
	internal class strongLegsScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void Increment()
		{
			UpgradeBus.instance.legLevel++;
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "strong legs")
				{
					terminalNode.Description = $"Can jump an additional {UpgradeBus.instance.cfg.JUMP_FORCE - 13f + (float)UpgradeBus.instance.legLevel * UpgradeBus.instance.cfg.JUMP_FORCE_INCREMENT} units high.";
					PlayerControllerB[] array = Object.FindObjectsOfType<PlayerControllerB>();
					PlayerControllerB[] array2 = array;
					foreach (PlayerControllerB val in array2)
					{
						val.jumpForce += UpgradeBus.instance.cfg.JUMP_FORCE_INCREMENT;
					}
				}
			}
		}

		public override void load()
		{
			UpgradeBus.instance.strongLegs = true;
			PlayerControllerB[] array = Object.FindObjectsOfType<PlayerControllerB>();
			PlayerControllerB[] array2 = array;
			foreach (PlayerControllerB val in array2)
			{
				val.jumpForce = UpgradeBus.instance.cfg.JUMP_FORCE;
			}
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Strong Legs is active!</color>";
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "strong legs" && terminalNode.Price > 0)
				{
					terminalNode.Price /= 2;
				}
			}
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Strong Legs"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Strong Legs", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Strong Legs is already in upgrade dict.");
			}
			float num = 0f;
			for (int j = 0; j < UpgradeBus.instance.legLevel; j++)
			{
				num += UpgradeBus.instance.cfg.JUMP_FORCE_INCREMENT;
			}
			PlayerControllerB[] array3 = array;
			foreach (PlayerControllerB val2 in array3)
			{
				val2.jumpForce += num;
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "strongLegsScript";
		}
	}
	public class terminalFlashScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void load()
		{
			UpgradeBus.instance.terminalFlash = true;
			UpgradeBus.instance.flashScript = this;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Discombobulator is active!\nType 'cooldown' into the terminal for info!!!</color>";
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "discombobulator" && terminalNode.Price > 0)
				{
					terminalNode.Price /= 2;
				}
			}
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Discombobulator"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Discombobulator", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Discombobulator is already in upgrade dict.");
			}
		}

		public override void Increment()
		{
			UpgradeBus.instance.discoLevel++;
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (terminalNode.Name.ToLower() == "discombobulator")
				{
					terminalNode.Description = $"Enemies are stunned for {UpgradeBus.instance.cfg.DISCOMBOBULATOR_STUN_DURATION + (float)UpgradeBus.instance.discoLevel * UpgradeBus.instance.cfg.DISCOMBOBULATOR_INCREMENT} seconds.";
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void PlayAudioAndUpdateCooldownServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1135781697u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1135781697u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					PlayAudioAndUpdateCooldownClientRpc();
				}
			}
		}

		[ClientRpc]
		private void PlayAudioAndUpdateCooldownClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1412806528u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1412806528u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			Terminal component = GameObject.Find("TerminalScript").GetComponent<Terminal>();
			component.terminalAudio.maxDistance = 100f;
			component.terminalAudio.PlayOneShot(UpgradeBus.instance.flashNoise);
			((MonoBehaviour)this).StartCoroutine(ResetRange(component));
			UpgradeBus.instance.flashCooldown = UpgradeBus.instance.cfg.DISCOMBOBULATOR_COOLDOWN;
			Collider[] array = Physics.OverlapSphere(((Component)component).transform.position, UpgradeBus.instance.cfg.DISCOMBOBULATOR_RADIUS, 524288);
			if (array.Length == 0)
			{
				return;
			}
			for (int i = 0; i < array.Length; i++)
			{
				EnemyAICollisionDetect component2 = ((Component)array[i]).GetComponent<EnemyAICollisionDetect>();
				if ((Object)(object)component2 != (Object)null)
				{
					component2.mainScript.SetEnemyStunned(true, UpgradeBus.instance.cfg.DISCOMBOBULATOR_STUN_DURATION + UpgradeBus.instance.cfg.DISCOMBOBULATOR_INCREMENT * (float)UpgradeBus.instance.discoLevel, (PlayerControllerB)null);
				}
			}
		}

		private IEnumerator ResetRange(Terminal terminal)
		{
			yield return (object)new WaitForSeconds(2f);
			terminal.terminalAudio.maxDistance = 17f;
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_terminalFlashScript()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(1135781697u, new RpcReceiveHandler(__rpc_handler_1135781697));
			NetworkManager.__rpc_func_table.Add(1412806528u, new RpcReceiveHandler(__rpc_handler_1412806528));
		}

		private static void __rpc_handler_1135781697(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((terminalFlashScript)(object)target).PlayAudioAndUpdateCooldownServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1412806528(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((terminalFlashScript)(object)target).PlayAudioAndUpdateCooldownClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "terminalFlashScript";
		}
	}
	internal class TPButtonScript : GrabbableObject
	{
		public AudioClip ItemBreak;

		public AudioClip error;

		public AudioClip buttonPress;

		private AudioSource audio;

		public override void Start()
		{
			((GrabbableObject)this).Start();
			audio = ((Component)this).GetComponent<AudioSource>();
			((Component)this).gameObject.GetComponent<NetworkObject>().Spawn(false);
		}

		public override void DiscardItem()
		{
			base.playerHeldBy.activatingItem = false;
			((GrabbableObject)this).DiscardItem();
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (!Mouse.current.leftButton.isPressed)
			{
				return;
			}
			audio.PlayOneShot(buttonPress);
			if (!base.itemUsedUp)
			{
				ShipTeleporter[] array = Object.FindObjectsOfType<ShipTeleporter>();
				ShipTeleporter val = null;
				ShipTeleporter[] array2 = array;
				foreach (ShipTeleporter val2 in array2)
				{
					if (!val2.isInverseTeleporter)
					{
						val = val2;
						break;
					}
				}
				if ((Object)(object)val == (Object)null)
				{
					audio.PlayOneShot(error);
					return;
				}
				int num = -1;
				for (int j = 0; j < StartOfRound.Instance.mapScreen.radarTargets.Count(); j++)
				{
					if ((Object)(object)((Component)StartOfRound.Instance.mapScreen.radarTargets[j].transform).gameObject.GetComponent<PlayerControllerB>() == (Object)(object)base.playerHeldBy)
					{
						num = j;
					}
				}
				if (num == -1)
				{
					StartOfRound.Instance.mapScreen.targetedPlayer = base.playerHeldBy;
					UpgradeBus.instance.TPButtonPressed = true;
					val.PressTeleportButtonOnLocalClient();
					if (Random.Range(0f, 1f) > UpgradeBus.instance.cfg.CHANCE_TO_BREAK)
					{
						audio.PlayOneShot(ItemBreak);
						base.itemUsedUp = true;
						base.playerHeldBy.DespawnHeldObject();
					}
				}
				else
				{
					StartOfRound.Instance.mapScreen.SwitchRadarTargetAndSync(num);
					((MonoBehaviour)this).StartCoroutine(WaitToTP(val));
				}
			}
			else
			{
				audio.PlayOneShot(error);
			}
		}

		private IEnumerator WaitToTP(ShipTeleporter tele)
		{
			yield return (object)new WaitForSeconds(0.15f);
			ReqUpdateTpDropStatusServerRpc();
			tele.PressTeleportButtonOnLocalClient();
			if (Random.Range(0f, 1f) < UpgradeBus.instance.cfg.CHANCE_TO_BREAK)
			{
				audio.PlayOneShot(ItemBreak);
				base.itemUsedUp = true;
				TextMeshProUGUI chatText = HUDManager.Instance.chatText;
				((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>The teleporter button has suffered irreparable damage and destroyed itself!</color>";
				base.playerHeldBy.DespawnHeldObject();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReqUpdateTpDropStatusServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3777354640u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3777354640u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ChangeTPButtonPressedClientRpc();
				}
			}
		}

		[ClientRpc]
		private void ChangeTPButtonPressedClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3413730949u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3413730949u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					UpgradeBus.instance.TPButtonPressed = true;
				}
			}
		}

		protected override void __initializeVariables()
		{
			((GrabbableObject)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_TPButtonScript()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3777354640u, new RpcReceiveHandler(__rpc_handler_3777354640));
			NetworkManager.__rpc_func_table.Add(3413730949u, new RpcReceiveHandler(__rpc_handler_3413730949));
		}

		private static void __rpc_handler_3777354640(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((TPButtonScript)(object)target).ReqUpdateTpDropStatusServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3413730949(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((TPButtonScript)(object)target).ChangeTPButtonPressedClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "TPButtonScript";
		}
	}
	public class trapDestroyerScript : BaseUpgrade
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(lateApply());
		}

		private IEnumerator lateApply()
		{
			yield return (object)new WaitForSeconds(1f);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			load();
		}

		public override void load()
		{
			UpgradeBus.instance.DestroyTraps = true;
			UpgradeBus.instance.trapHandler = this;
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n<color=#FF0000>Malware Broadcaster is active!</color>";
			if (!UpgradeBus.instance.UpgradeObjects.ContainsKey("Malware Broadcaster"))
			{
				UpgradeBus.instance.UpgradeObjects.Add("Malware Broadcaster", ((Component)this).gameObject);
			}
			else
			{
				Plugin.mls.LogWarning((object)"Malware Broadcaster is already in upgrade dict.");
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReqDestroyObjectServerRpc(NetworkObjectReference go)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: 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_007d: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1254388238u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref go, default(ForNetworkSerializable));
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1254388238u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			((NetworkObjectReference)(ref go)).TryGet(ref val3, (NetworkManager)null);
			if ((Object)(object)val3 == (Object)null)
			{
				HUDManager.Instance.AddTextToChatOnServer("Can't retrieve obj", 0);
			}
			else if (((Object)((Component)val3).gameObject).name == "Landmine(Clone)" || ((Object)((Component)val3).gameObject).name == "TurretContainer(Clone)")
			{
				if (UpgradeBus.instance.cfg.EXPLODE_TRAP)
				{
					SpawnExplosionClientRpc(((Component)val3).gameObject.transform.position);
				}
				Object.Destroy((Object)(object)((Component)val3).gameObject);
			}
		}

		[ClientRpc]
		private void SpawnExplosionClientRpc(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: 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_00e3: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3507995715u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3507995715u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && UpgradeBus.instance.cfg.EXPLODE_TRAP)
				{
					Landmine.SpawnExplosion(position + Vector3.up, true, 5.7f, 6.4f);
				}
			}
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_trapDestroyerScript()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(1254388238u, new RpcReceiveHandler(__rpc_handler_1254388238));
			NetworkManager.__rpc_func_table.Add(3507995715u, new RpcReceiveHandler(__rpc_handler_3507995715));
		}

		private static void __rpc_handler_1254388238(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: 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)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				NetworkObjectReference go = default(NetworkObjectReference);
				((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref go, default(ForNetworkSerializable));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((trapDestroyerScript)(object)target).ReqDestroyObjectServerRpc(go);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3507995715(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((trapDestroyerScript)(object)target).SpawnExplosionClientRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "trapDestroyerScript";
		}
	}
}
namespace MoreShipUpgrades.Patches
{
	[HarmonyPatch(typeof(DeleteFileButton))]
	internal class DeleteButtonPatcher
	{
		[HarmonyPostfix]
		[HarmonyPatch("DeleteFile")]
		private static void deleteLGUFile(DeleteFileButton __instance)
		{
			string path = Path.Combine(Application.persistentDataPath, $"LGU_{__instance.fileToDelete}.json");
			if (File.Exists(path))
			{
				File.Delete(path);
			}
		}
	}
	[HarmonyPatch(typeof(GameNetworkManager))]
	internal class GameNetworkManagerPatcher
	{
		[HarmonyPostfix]
		[HarmonyPatch("Disconnect")]
		private static void ResetUpgradeBus()
		{
			UpgradeBus.instance.ResetAllValues();
		}

		[HarmonyPrefix]
		[HarmonyPatch("SaveGame")]
		private static void saveLGU(GameNetworkManager __instance)
		{
			if (__instance.isHostingGame)
			{
				LGUStore.instance.ServerSaveFileServerRpc();
			}
		}
	}
	[HarmonyPatch(typeof(HUDManager))]
	internal class HUDManagerPatcher
	{
		[HarmonyPostfix]
		[HarmonyPatch("MeetsScanNodeRequirements")]
		private static void alterReqs(ScanNodeProperties node, ref bool __result, PlayerControllerB playerScript)
		{
			//IL_0089: 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_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			if (UpgradeBus.instance.scannerUpgrade)
			{
				if ((Object)(object)node == (Object)null)
				{
					__result = false;
				}
				float num = ((node.headerText == "Main entrance" || node.headerText == "Ship") ? UpgradeBus.instance.cfg.SHIP_AND_ENTRANCE_DISTANCE_INCREASE : UpgradeBus.instance.cfg.NODE_DISTANCE_INCREASE);
				if (UpgradeBus.instance.cfg.REQUIRE_LINE_OF_SIGHT && Physics.Linecast(((Component)playerScript.gameplayCamera).transform.position, ((Component)node).transform.position, 256, (QueryTriggerInteraction)1))
				{
					__result = false;
					return;
				}
				float num2 = Vector3.Distance(((Component)playerScript).transform.position, ((Component)node).transform.position);
				__result = num2 < (float)node.maxRange + num && num2 > (float)node.minRange;
			}
		}
	}
	[HarmonyPatch(typeof(InteractTrigger))]
	internal class InteractTriggerPatcher
	{
		[HarmonyPrefix]
		[HarmonyPatch("OnTriggerEnter")]
		private static bool pickDoor(InteractTrigger __instance, Collider other)
		{
			if (!UpgradeBus.instance.lockSmith)
			{
				return true;
			}
			if (!((NetworkBehaviour)((Component)other).gameObject.GetComponent<PlayerControllerB>()).IsOwner)
			{
				return true;
			}
			if ((Object)(object)((Component)__instance).gameObject.GetComponent<DoorLock>() == (Object)null)
			{
				return true;
			}
			if (!((Component)__instance).gameObject.GetComponent<DoorLock>().isLocked)
			{
				return true;
			}
			if (((Component)((Component)UpgradeBus.instance.lockScript).gameObject.transform.GetChild(0)).gameObject.activeInHierarchy)
			{
				return true;
			}
			UpgradeBus.instance.lockScript.currentDoor = ((Component)__instance).gameObject.GetComponent<DoorLock>();
			UpgradeBus.instance.lockScript.BeginLockPick();
			UpgradeBus.instance.lockScript.timesStruck = 0;
			return false;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatcher
	{
		[HarmonyPrefix]
		[HarmonyPatch("DamagePlayer")]
		private static void beekeeperReduceDamage(ref int damageNumber, CauseOfDeath causeOfDeath)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Invalid comparison between Unknown and I4
			if (UpgradeBus.instance.beekeeper && (int)causeOfDeath == 11 && damageNumber == 10)
			{
				damageNumber = Mathf.Clamp((int)((float)damageNumber * (UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER - (float)UpgradeBus.instance.beeLevel * UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER_INCREMENT)), 0, 100);
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch("DamagePlayerServerRpc")]
		private static void beekeeperReduceDamageServer(ref int damageNumber)
		{
			if (UpgradeBus.instance.beekeeper && damageNumber == 10)
			{
				damageNumber = Mathf.Clamp((int)((float)damageNumber * (UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER - (float)UpgradeBus.instance.beeLevel * UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER_INCREMENT)), 0, 100);
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch("DamagePlayerClientRpc")]
		private static void beekeeperReduceDamageClient(ref int damageNumber)
		{
			if (UpgradeBus.instance.beekeeper && damageNumber == 10)
			{
				damageNumber = Mathf.Clamp((int)((float)damageNumber * (UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER - (float)UpgradeBus.instance.beeLevel * UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER_INCREMENT)), 0, 100);
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch("DamageOnOtherClients")]
		private static void beekeeperReduceDamageOther(ref int damageNumber)
		{
			if (UpgradeBus.instance.beekeeper && damageNumber == 10)
			{
				damageNumber = Mathf.Clamp((int)((float)damageNumber * (UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER - (float)UpgradeBus.instance.beeLevel * UpgradeBus.instance.cfg.BEEKEEPER_DAMAGE_MULTIPLIER_INCREMENT)), 0, 100);
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch("DropAllHeldItems")]
		private static bool DontDropItems(PlayerControllerB __instance)
		{
			if (UpgradeBus.instance.TPButtonPressed)
			{
				UpgradeBus.instance.TPButtonPressed = false;
				return false;
			}
			return true;
		}

		[HarmonyPrefix]
		[HarmonyPatch("Update")]
		private static void noCarryWeight(ref PlayerControllerB __instance)
		{
			if (!UpgradeBus.instance.exoskeleton || __instance.ItemSlots.Length == 0 || !((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)__instance))
			{
				return;
			}
			UpgradeBus.instance.alteredWeight = 1f;
			for (int i = 0; i < __instance.ItemSlots.Length; i++)
			{
				GrabbableObject val = __instance.ItemSlots[i];
				if ((Object)(object)val != (Object)null)
				{
					UpgradeBus.instance.alteredWeight += Mathf.Clamp(val.itemProperties.weight - 1f, 0f, 10f) * (UpgradeBus.instance.cfg.CARRY_WEIGHT_REDUCTION - (float)UpgradeBus.instance.backLevel * UpgradeBus.instance.cfg.CARRY_WEIGHT_INCREMENT);
				}
			}
			__instance.carryWeight = UpgradeBus.instance.alteredWeight;
			if (__instance.carryWeight < 1f)
			{
				__instance.carryWeight = 1f;
			}
		}
	}
	[HarmonyPatch(typeof(RoundManager))]
	internal class RoundManagerPatcher
	{
		[HarmonyPrefix]
		[HarmonyPatch("PlayAudibleNoise")]
		private static void MakeFootstepsQuiet(ref float noiseRange)
		{
			if (UpgradeBus.instance.softSteps)
			{
				noiseRange -= UpgradeBus.instance.cfg.NOISE_REDUCTION;
			}
		}
	}
	[HarmonyPatch(typeof(StartOfRound))]
	internal class StartOfRoundPatcher
	{
		[HarmonyPrefix]
		[HarmonyPatch("Start")]
		private static void InitLGUStore(PlayerControllerB __instance)
		{
			if (((NetworkBehaviour)__instance).NetworkManager.IsHost || ((NetworkBehaviour)__instance).NetworkManager.IsServer)
			{
				GameObject val = Object.Instantiate<GameObject>(UpgradeBus.instance.modStorePrefab);
				val.GetComponent<NetworkObject>().Spawn(false);
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch("playersFiredGameOver")]
		private static void GameOverResetUpgradeManager(StartOfRound __instance)
		{
			if (((NetworkBehaviour)__instance).NetworkManager.IsHost || ((NetworkBehaviour)__instance).NetworkManager.IsServer)
			{
				LGUStore.instance.PlayersFiredServerRpc();
			}
		}
	}
	[HarmonyPatch(typeof(TerminalAccessibleObject))]
	internal class TerminalAccessibleObjectPatcher
	{
		[HarmonyPrefix]
		[HarmonyPatch("CallFunctionFromTerminal")]
		private static bool DestroyObject(ref TerminalAccessibleObject __instance, ref float ___currentCooldownTimer, ref bool ___inCooldown)
		{
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			if (!UpgradeBus.instance.DestroyTraps || ((Component)__instance).gameObject.layer != LayerMask.NameToLayer("MapHazards"))
			{
				return true;
			}
			if (UpgradeBus.instance.cfg.DESTROY_TRAP)
			{
				UpgradeBus.instance.trapHandler.ReqDestroyObjectServerRpc(new NetworkObjectReference(((Component)((Component)__instance).gameObject.transform.parent).gameObject.GetComponent<NetworkObject>()));
				return false;
			}
			if (!___inCooldown)
			{
				___currentCooldownTimer = UpgradeBus.instance.cfg.DISARM_TIME;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Terminal))]
	internal class TerminalPatcher
	{
		[HarmonyPostfix]
		[HarmonyPatch("Update")]
		private static void Counter()
		{
			if (UpgradeBus.instance.flashCooldown > 0f)
			{
				UpgradeBus.instance.flashCooldown -= Time.deltaTime;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("ParsePlayerSentence")]
		private static void CustomParser(ref Terminal __instance, ref TerminalNode __result)
		{
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_00ee: 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_0121: Expected O, but got Unknown
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Expected O, but got Unknown
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Expected O, but got Unknown
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Expected O, but got Unknown
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a4: Expected O, but got Unknown
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Expected O, but got Unknown
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Expected O, but got Unknown
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0374: Expected O, but got Unknown
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Expected O, but got Unknown
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ba: Expected O, but got Unknown
			//IL_052a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0531: Expected O, but got Unknown
			//IL_0592: Unknown result type (might be due to invalid IL or missing references)
			//IL_0599: Expected O, but got Unknown
			//IL_075c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0763: Expected O, but got Unknown
			string text = __instance.screenText.text.Substring(__instance.screenText.text.Length - __instance.textAdded);
			if (text.ToLower() == "initattack" || text.ToLower() == "atk")
			{
				if (!UpgradeBus.instance.terminalFlash)
				{
					TerminalNode val = new TerminalNode();
					val.displayText = "You don't have access to this command yet. Purchase the 'Discombobulator'.";
					val.clearPreviousText = true;
					__result = val;
					return;
				}
				if (UpgradeBus.instance.flashCooldown > 0f)
				{
					TerminalNode val2 = new TerminalNode();
					val2.displayText = $"You can discombobulate again in {Mathf.Round(UpgradeBus.instance.flashCooldown)} seconds.\nType 'cooldown' or 'cd' to check discombobulation cooldown.";
					val2.clearPreviousText = true;
					__result = val2;
					return;
				}
				RoundManager.Instance.PlayAudibleNoise(((Component)__instance).transform.position, 60f, 0.8f, 0, false, 14155);
				UpgradeBus.instance.flashScript.PlayAudioAndUpdateCooldownServerRpc();
				TerminalNode val3 = new TerminalNode();
				Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, UpgradeBus.instance.cfg.DISCOMBOBULATOR_RADIUS, 524288);
				if (array.Length != 0)
				{
					val3.displayText = $"Stun grenade hit {array.Length} enemies.";
					val3.clearPreviousText = true;
					__result = val3;
					if (UpgradeBus.instance.cfg.DISCOMBOBULATOR_NOTIFY_CHAT)
					{
						((MonoBehaviour)__instance).StartCoroutine(CountDownChat(UpgradeBus.instance.cfg.DISCOMBOBULATOR_STUN_DURATION + UpgradeBus.instance.cfg.DISCOMBOBULATOR_INCREMENT * (float)UpgradeBus.instance.discoLevel));
					}
				}
				else
				{
					val3.displayText = "No stunned enemies detected.";
					val3.clearPreviousText = true;
					__result = val3;
				}
				return;
			}
			if (text.ToLower() == "cooldown" || text.ToLower() == "cd")
			{
				if (!UpgradeBus.instance.terminalFlash)
				{
					TerminalNode val4 = new TerminalNode();
					val4.displayText = "You don't have access to this command yet. Purchase 'Discombobulator'.";
					val4.clearPreviousText = true;
					__result = val4;
				}
				else if (UpgradeBus.instance.flashCooldown > 0f)
				{
					TerminalNode val5 = new TerminalNode();
					val5.displayText = $"You can discombobulate again in {Mathf.Round(UpgradeBus.instance.flashCooldown)} seconds.";
					val5.clearPreviousText = true;
					__result = val5;
				}
				else
				{
					TerminalNode val6 = new TerminalNode();
					val6.displayText = "Discombobulate is ready, Type 'initattack' or 'atk' to execute.";
					val6.clearPreviousText = true;
					__result = val6;
				}
				return;
			}
			if (text.Split()[0].ToLower() == "page")
			{
				string[] array2 = text.Split();
				if (UpgradeBus.instance.pager)
				{
					if (array2.Length == 1)
					{
						TerminalNode val7 = new TerminalNode();
						val7.displayText = "You have to enter a message to broadcast\nEX: `page get back to the ship!`";
						val7.clearPreviousText = true;
						__result = val7;
					}
					else
					{
						string text2 = string.Join(" ", array2.Skip(1));
						UpgradeBus.instance.pageScript.ReqBroadcastChatServerRpc(text2);
						TerminalNode val8 = new TerminalNode();
						val8.displayText = "Broadcasted message: '" + text2 + "'";
						val8.clearPreviousText = true;
						__result = val8;
					}
				}
				else
				{
					TerminalNode val9 = new TerminalNode();
					val9.displayText = "You don't have access to this command.\nPurchase the pager from lategame store.";
					val9.clearPreviousText = true;
					__result = val9;
				}
				return;
			}
			if (text.ToLower() == "lategame")
			{
				TerminalNode val10 = new TerminalNode();
				val10.clearPreviousText = true;
				val10.displayText = "Late Game Upgrades\n\nType `lategame store` or `lgu` to view upgrades.\n\nMost of the mod is configurable via the config file in `BepInEx/config/`.";
				val10.displayText += "\n\nUse the info command to get info about an item. EX: `info beekeeper`.";
				val10.displayText += "\n\nYou must type the exact name of the upgrade (case insensitve).";
				val10.displayText += "\n\nTo force wipe an lgu save file type `reset lgu`.";
				val10.displayText += "\n\nIf using latecompany and your client doesn't have the upgrades, type `load lgu`.";
				__result = val10;
				return;
			}
			if (text.ToLower() == "lategame store" || text.ToLower() == "lgu")
			{
				__result = UpgradeBus.instance.ConstructNode();
				return;
			}
			if (text.ToLower() == "reset lgu")
			{
				TerminalNode val11 = new TerminalNode();
				val11.displayText = "LGU save has been wiped.";
				val11.clearPreviousText = true;
				__result = val11;
				LGUStore.instance.PlayersFiredServerRpc();
				return;
			}
			if (text.ToLower() == "load lgu")
			{
				BaseUpgrade[] array3 = Object.FindObjectsOfType<BaseUpgrade>();
				BaseUpgrade[] array4 = array3;
				foreach (BaseUpgrade baseUpgrade in array4)
				{
					baseUpgrade.load();
				}
				TerminalNode val12 = new TerminalNode();
				val12.clearPreviousText = true;
				val12.displayText = "Reapplied upgrade effects to this client. Only run this once.";
				__result = val12;
				return;
			}
			foreach (CustomTerminalNode terminalNode in UpgradeBus.instance.terminalNodes)
			{
				if (text.ToLower() == terminalNode.Name.ToLower())
				{
					TerminalNode val13 = new TerminalNode();
					val13.clearPreviousText = true;
					bool flag = __instance.groupCredits >= terminalNode.Price;
					if (flag && (!terminalNode.Unlocked || terminalNode.MaxUpgrade > terminalNode.CurrentUpgrade))
					{
						LGUStore.instance.SyncCreditsServerRpc(__instance.groupCredits - terminalNode.Price);
						if (!terminalNode.Unlocked)
						{
							LGUStore.instance.ReqSpawnServerRpc(terminalNode.Name);
							if (terminalNode.MaxUpgrade != 0)
							{
								val13.displayText = $"You Upgraded {terminalNode.Name} to level {terminalNode.CurrentUpgrade + 1}  \n";
							}
							else
							{
								val13.displayText = "You Purchased " + terminalNode.Name + "  \n";
							}
						}
						else if (terminalNode.Unlocked && terminalNode.MaxUpgrade > terminalNode.CurrentUpgrade)
						{
							LGUStore.instance.ReqSpawnServerRpc(terminalNode.Name, increment: true);
							val13.displayText = $"You Upgraded {terminalNode.Name} to level {terminalNode.CurrentUpgrade + 1} \n";
						}
					}
					else if (terminalNode.Unlocked && flag)
					{
						if (terminalNode.MaxUpgrade == 0)
						{
							val13.displayText = "You already unlocked this upgrade.  \n";
						}
						else
						{
							val13.displayText = "This upgrade is already max level  \n";
						}
					}
					else
					{
						val13.displayText = "You can't afford this item.  \n";
					}
					__result = val13;
				}
				else if (text.ToLower() == "info " + terminalNode.Name.ToLower())
				{
					TerminalNode val14 = new TerminalNode();
					val14.displayText = terminalNode.Description + "\n\n";
					val14.clearPreviousText = true;
					__result = val14;
				}
			}
		}

		private static IEnumerator CountDownChat(float count)
		{
			((TMP_Text)HUDManager.Instance.chatText).text = "";
			TextMeshProUGUI chatText = HUDManager.Instance.chatText;
			((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "<color=#FFFFFF>Stun Duration: " + count.ToString("F1") + " seconds.</color>";
			while (count > 0f)
			{
				yield return (object)new WaitForSeconds(1f);
				count -= 1f;
				((TMP_Text)HUDManager.Instance.chatText).text = "";
				TextMeshProUGUI chatText2 = HUDManager.Instance.chatText;
				((TMP_Text)chatText2).text = ((TMP_Text)chatText2).text + "<color=#FFFFFF>Stun Duration: " + count.ToString("F1") + " seconds.</color>";
			}
			((TMP_Text)HUDManager.Instance.chatText).text = "";
			TextMeshProUGUI chatText3 = HUDManager.Instance.chatText;
			((TMP_Text)chatText3).text = ((TMP_Text)chatText3).text + "\n<color=#FF0000>Effected enemies are no longer stunned!</color>";
		}
	}
}
namespace MoreShipUpgrades.Misc
{
	public class BaseUpgrade : NetworkBehaviour
	{
		public virtual void Increment()
		{
		}

		public virtual void load()
		{
		}

		protected override void __initializeVariables()
		{
			((NetworkBehaviour)this).__initializeVariables();
		}

		protected internal override string __getTypeName()
		{
			return "BaseUpgrade";
		}
	}
	public class CustomTerminalNode
	{
		public string Name;

		public int Price;

		public string Description;

		public GameObject Prefab;

		public bool Unlocked = false;

		public int MaxUpgrade;

		public int CurrentUpgrade { get; set; }

		public CustomTerminalNode(string name, int price, string description, GameObject prefab, int maxUpgrade = 0)
		{
			Name = name;
			Price = price;
			Description = description;
			Prefab = prefab;
			MaxUpgrade = maxUpgrade;
		}

		public CustomTerminalNode Copy()
		{
			return new CustomTerminalNode(Name = Name, Price = Price, Description = Description, Prefab = Prefab, MaxUpgrade = MaxUpgrade);
		}
	}
	public class PluginConfig
	{
		private readonly ConfigFile configFile;

		public bool ADVANCED_TELE_ENABLED { get; set; }

		public bool WEAK_TELE_ENABLED { get; set; }

		public bool BEEKEEPER_ENABLED { get; set; }

		public bool BIGGER_LUNGS_ENABLED { get; set; }

		public bool BACK_MUSCLES_ENABLED { get; set; }

		public bool LIGHT_FOOTED_ENABLED { get; set; }

		public bool NIGHT_VISION_ENABLED { get; set; }

		public bool RUNNING_SHOES_ENABLED { get; set; }

		public bool BETTER_SCANNER_ENABLED { get; set; }

		public bool STRONG_LEGS_ENABLED { get; set; }

		public bool DISCOMBOBULATOR_ENABLED { get; set; }

		public bool MALWARE_BROADCASTER_ENABLED { get; set; }

		public int ADVANCED_TELE_PRICE { get; set; }

		public int WEAK_TELE_PRICE { get; set; }

		public int BEEKEEPER_PRICE { get; set; }

		public int BIGGER_LUNGS_PRICE { get; set; }

		public int BACK_MUSCLES_PRICE { get; set; }

		public int LIGHT_FOOTED_PRICE { get; set; }

		public int NIGHT_VISION_PRICE { get; set; }

		public int RUNNING_SHOES_PRICE { get; set; }

		public int BETTER_SCANNER_PRICE { get; set; }

		public int STRONG_LEGS_PRICE { get; set; }

		public int DISCOMBOBULATOR_PRICE { get; set; }

		public int MALWARE_BROADCASTER_PRICE { get; set; }

		public bool KEEP_ITEMS_ON_TELE { get; set; }

		public float SPRINT_TIME_INCREASE { get; set; }

		public float MOVEMENT_SPEED { get; set; }

		public float JUMP_FORCE { get; set; }

		public bool DESTROY_TRAP { get; set; }

		public float DISARM_TIME { get; set; }

		public bool EXPLODE_TRAP { get; set; }

		public bool REQUIRE_LINE_OF_SIGHT { get; set; }

		public float CARRY_WEIGHT_REDUCTION { get; set; }

		public float NODE_DISTANCE_INCREASE { get; set; }

		public float SHIP_AND_ENTRANCE_DISTANCE_INCREASE { get; set; }

		public float NOISE_REDUCTION { get; set; }

		public float DISCOMBOBULATOR_COOLDOWN { get; set; }

		public float ADV_CHANCE_TO_BREAK { get; set; }

		public float CHANCE_TO_BREAK { get; set; }

		public float BEEKEEPER_DAMAGE_MULTIPLIER { get; set; }

		public float BEEKEEPER_DAMAGE_MULTIPLIER_INCREMENT { get; set; }

		public float NIGHT_VIS_DRAIN_SPEED { get; set; }

		public float NIGHT_VIS_REGEN_SPEED { get; set; }

		public float DISCOMBOBULATOR_RADIUS { get; set; }

		public float DISCOMBOBULATOR_STUN_DURATION { get; set; }

		public bool DISCOMBOBULATOR_NOTIFY_CHAT { get; set; }

		public Color NIGHT_VIS_COLOR { get; set; }

		public float NIGHT_VIS_RANGE { get; set; }

		public float NIGHT_VIS_INTENSITY { get; set; }

		public float NIGHT_VIS_STARTUP { get; set; }

		public float NIGHT_VIS_EXHAUST { get; set; }

		public float CARRY_WEIGHT_INCREMENT { get; set; }

		public float MOVEMENT_INCREMENT { get; set; }

		public float SPRINT_TIME_INCREMENT { get; set; }

		public float NOISE_REDUCTION_INCREMENT { get; set; }

		public float JUMP_FORCE_INCREMENT { get; set; }

		public float DISCOMBOBULATOR_INCREMENT { get; set; }

		public int PAGER_PRICE { get; set; }

		public int LOCKSMITH_PRICE { get; set; }

		public bool PAGER_ENABLED { get; set; }

		public bool LOCKSMITH_ENABLED { get; set; }

		public string TOGGLE_NIGHT_VISION_KEY { get; set; }

		public PluginConfig(ConfigFile cfg)
		{
			configFile = cfg;
		}

		private T ConfigEntry<T>(string section, string key, T defaultVal, string description)
		{
			return configFile.Bind<T>(section, key, defaultVal, description).Value;
		}

		public void InitBindings()
		{
			//IL_0481: Unknown result type (might be due to invalid IL or missing references)
			//IL_048b: Unknown result type (might be due to invalid IL or missing references)
			ADVANCED_TELE_ENABLED = ConfigEntry("Advanced Portable Teleporter", "Enable Advanced Portable Teleporter", defaultVal: true, "");
			ADVANCED_TELE_PRICE = ConfigEntry("Advanced Portable Teleporter", "Price of Advanced Portable Teleporter", 1750, "");
			ADV_CHANCE_TO_BREAK = ConfigEntry("Advanced Portable Teleporter", "Chance to break on use", 0.1f, "value should be 0.00 - 1.00");
			WEAK_TELE_ENABLED = ConfigEntry("Portable Teleporter", "Enable Portable Teleporter", defaultVal: true, "");
			WEAK_TELE_PRICE = ConfigEntry("Portable Teleporter", "Price of Portable Teleporter", 300, "");
			CHANCE_TO_BREAK = ConfigEntry("Portable Teleporter", "Chance to break on use", 0.9f, "value should be 0.00 - 1.00");
			KEEP_ITEMS_ON_TELE = ConfigEntry("Portable Teleporter", "Keep Items When Using Portable Teleporters", defaultVal: true, "If set to false you will drop your items like when using the vanilla TP.");
			BEEKEEPER_ENABLED = ConfigEntry("Beekeeper", "Enable Beekeeper Upgrade", defaultVal: true, "Take no damage from bees");
			BEEKEEPER_PRICE = ConfigEntry("Beekeeper", "Price of Beekeeper Upgrade", 450, "");
			BEEKEEPER_DAMAGE_MULTIPLIER = ConfigEntry("Beekeeper", "Multiplied to incoming damage (rounded to int)", 0.64f, "Incoming damage from bees is 10.");
			BEEKEEPER_DAMAGE_MULTIPLIER_INCREMENT = ConfigEntry("Beekeeper", "Additional % Reduced per level", 0.15f, "Every time beekeeper is upgraded this value will be subtracted to the base multiplier above.");
			BIGGER_LUNGS_ENABLED = ConfigEntry("Bigger Lungs", "Enable Bigger Lungs Upgrade", defaultVal: true, "More Stamina");
			BIGGER_LUNGS_PRICE = ConfigEntry("Bigger Lungs", "Price of Bigger Lungs Upgrade", 700, "");
			SPRINT_TIME_INCREASE = ConfigEntry("Bigger Lungs", "SprintTime value", 17f, "Vanilla value is 11");
			SPRINT_TIME_INCREMENT = ConfigEntry("Bigger Lungs", "SprintTime Increment", 1.25f, "How much the above value is increased on upgrade.");
			RUNNING_SHOES_ENABLED = ConfigEntry("Running Shoes", "Enable Running Shoes Upgrade", defaultVal: true, "Run Faster");
			RUNNING_SHOES_PRICE = ConfigEntry("Running Shoes", "Price of Running Shoes Upgrade", 1000, "");
			MOVEMENT_SPEED = ConfigEntry("Running Shoes", "Movement Speed Value", 6f, "Vanilla value is 4.6");
			MOVEMENT_INCREMENT = ConfigEntry("Running Shoes", "Movement Speed Increment", 0.5f, "How much the above value is increased on upgrade.");
			STRONG_LEGS_ENABLED = ConfigEntry("Strong Legs", "Enable Strong Legs Upgrade", defaultVal: true, "Jump Higher");
			STRONG_LEGS_PRICE = ConfigEntry("Strong Legs", "Price of Strong Legs Upgrade", 300, "");
			JUMP_FORCE = ConfigEntry("Strong Legs", "Jump Force", 16f, "Vanilla value is 13");
			JUMP_FORCE_INCREMENT = ConfigEntry("Strong Legs", "Jump Force Increment", 0.75f, "How much the above value is increased on upgrade.");
			MALWARE_BROADCASTER_ENABLED = ConfigEntry("Malware Broadcaster", "Enable Malware Broadcaster Upgrade", defaultVal: true, "Explode Map Hazards");
			MALWARE_BROADCASTER_PRICE = ConfigEntry("Malware Broadcaster", "Price of Malware Broadcaster Upgrade", 650, "");
			DESTROY_TRAP = ConfigEntry("Malware Broadcaster", "Destroy Trap", defaultVal: true, "If false Malware Broadcaster will disable the trap for a long time instead of destroying.");
			DISARM_TIME = ConfigEntry("Malware Broadcaster", "Disarm Time", 7f, "If `Destroy Trap` is false this is the duration traps will be disabled.");
			EXPLODE_TRAP = ConfigEntry("Malware Broadcaster", "Explode Trap", defaultVal: true, "Destroy Trap must be true! If this is true when destroying a trap it will also explode.");
			LIGHT_FOOTED_ENABLED = ConfigEntry("Light Footed", "Enable Light Footed Upgrade", defaultVal: true, "Make less noise moving.");
			LIGHT_FOOTED_PRICE = ConfigEntry("Light Footed", "Price of Light Footed Upgrade", 350, "");
			NOISE_REDUCTION = ConfigEntry("Light Footed", "Noise Reduction", 7f, "Distance units to subtract from footstep noise.");
			NOISE_REDUCTION_INCREMENT = ConfigEntry("Light Footed", "Noise Reduction Increment", 1f, "The amount added to above value on upgrade.");
			NIGHT_VISION_ENABLED = ConfigEntry("Night Vision", "Enable Night Vision Upgrade", defaultVal: true, "Toggleable night vision.");
			NIGHT_VISION_PRICE = ConfigEntry("Night Vision", "Price of Night Vision Upgrade", 700, "");
			NIGHT_VIS_DRAIN_SPEED = ConfigEntry("Night Vision", "Multiplier for night vis battery drain", 0.1f, "Multiplied by timedelta. A value of 0.1 will result in a 10 second battery life.");
			NIGHT_VIS_REGEN_SPEED = ConfigEntry("Night Vision", "Multipl

plugins/MetalPipeSFX-HornMoan/HornMoan.dll

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

[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("HornMoan")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HornMoan")]
[assembly: AssemblyTitle("HornMoan")]
[assembly: AssemblyVersion("1.0.0.0")]
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;
		}
	}
}
namespace HornMoan
{
	[BepInPlugin("MetalPipeSFX.HornMoan", "HornMoan", "2.0.0")]
	public class HornMoanBase : BaseUnityPlugin
	{
		private const string modGUID = "MetalPipeSFX.HornMoan";

		private const string modName = "HornMoan";

		private const string modVersion = "2.0.0";

		private static HornMoanBase Instance;

		private readonly Harmony harmony = new Harmony("MetalPipeSFX.HornMoan");

		internal ManualLogSource mls = null;

		public void Awake()
		{
			mls = Logger.CreateLogSource("MetalPipeSFX.HornMoan");
			mls.LogInfo((object)"The Moaning is Loading");
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			harmony.PatchAll();
			mls.LogInfo((object)"Loaded The Moaning Successfully");
		}
	}
	[HarmonyPatch(typeof(GrabbableObject))]
	internal class PipePatch
	{
		private static List<string> audios = new List<string> { "Moaning1.mp3", "MoaningFar.mp3" };

		private static List<AudioClip> clips = new List<AudioClip>();

		private static string uPath = Path.Combine(Paths.PluginPath + "\\MetalPipeSFX-HornMoan\\");

		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void AudioPatch(GrabbableObject __instance)
		{
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.HornMoan");
			for (int i = 0; i < audios.Count; i++)
			{
				LoadAudioClip(uPath + audios[i]);
			}
			if ((Object)(object)__instance != (Object)null && (Object)(object)((Component)__instance).GetComponent<NoisemakerProp>() != (Object)null && ((Object)__instance.itemProperties).name == "Airhorn")
			{
				val.LogMessage((object)"We found an Airhorn!!");
				((Component)__instance).GetComponent<NoisemakerProp>().noiseSFX[0] = clips[0];
				((Component)__instance).GetComponent<NoisemakerProp>().noiseSFXFar[0] = clips[1];
				val.LogMessage((object)((Object)((Component)__instance).GetComponent<NoisemakerProp>().noiseSFX[0]).name);
				val.LogMessage((object)((Object)((Component)__instance).GetComponent<NoisemakerProp>().noiseSFXFar[0]).name);
			}
		}

		private static void LoadAudioClip(string filepath)
		{
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Invalid comparison between Unknown and I4
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.HornMoan");
			UnityWebRequest audioClip = UnityWebRequestMultimedia.GetAudioClip(filepath, (AudioType)13);
			audioClip.SendWebRequest();
			while (!audioClip.isDone)
			{
			}
			if (audioClip.error != null)
			{
				val.LogError((object)("Error loading sounds: " + filepath + "\n" + audioClip.error));
			}
			AudioClip content = DownloadHandlerAudioClip.GetContent(audioClip);
			if (Object.op_Implicit((Object)(object)content) && (int)content.loadState == 2)
			{
				val.LogInfo((object)("Loaded " + filepath));
				((Object)content).name = Path.GetFileName(filepath);
				clips.Add(content);
			}
		}
	}
}

plugins/MetalPipeSFX-ModCompatibilityChecker/ModCompatabilityChecker.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.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Newtonsoft.Json;
using Steamworks;
using Steamworks.Data;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
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.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("ModCompatabilityChecker")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ModCompatabilityChecker")]
[assembly: AssemblyTitle("ModCompatabilityChecker")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
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;
		}
	}
}
namespace ModCompatabilityTools
{
	public static class ModUtilities
	{
		internal static GameObject CreateScrollRect(Transform template, Image scrollBackgroundImage)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: 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_006c: Expected O, but got Unknown
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: 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_00ce: Expected O, but got Unknown
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: 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_0156: Expected O, but got Unknown
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Expected O, but got Unknown
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Expected O, but got Unknown
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("Scroll View");
			ScrollRect val2 = val.AddComponent<ScrollRect>();
			val.transform.SetParent(((Component)template).transform, false);
			val.transform.localPosition = new Vector3(-113f, -50f, 0f);
			val.GetComponent<RectTransform>().sizeDelta = new Vector2(245f, 150f);
			GameObject val3 = new GameObject("Viewport");
			ApplyParentSize(val3, val.transform);
			val3.GetComponent<RectTransform>().pivot = new Vector2(0f, 1f);
			Image val4 = val3.AddComponent<Image>();
			val3.AddComponent<Mask>();
			((Graphic)val4).color = new Color(0f, 0f, 0f, 0.002f);
			GameObject val5 = new GameObject("Content");
			ApplyParentSize(val5, val3.transform);
			RectTransform component = val5.GetComponent<RectTransform>();
			component.pivot = new Vector2(0f, 1f);
			((Component)component).transform.localPosition = new Vector3(14f, 0f, 0f);
			ContentSizeFitter val6 = val5.AddComponent<ContentSizeFitter>();
			val6.verticalFit = (FitMode)1;
			VerticalLayoutGroup val7 = val5.AddComponent<VerticalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)val7).childControlHeight = false;
			((HorizontalOrVerticalLayoutGroup)val7).childControlWidth = false;
			GameObject val8 = new GameObject("Scrollbar Vertical");
			Scrollbar val9 = val8.AddComponent<Scrollbar>();
			Image val10 = val8.AddComponent<Image>();
			val10.sprite = scrollBackgroundImage.sprite;
			((Graphic)val10).material = ((Graphic)scrollBackgroundImage).material;
			ApplyParentSize(val8, ((Component)val2).transform);
			RectTransform component2 = val8.GetComponent<RectTransform>();
			component2.pivot = new Vector2(1f, 1f);
			component2.sizeDelta = new Vector2(10f, 0f);
			component2.anchorMin = new Vector2(1f, 0f);
			component2.anchorMax = new Vector2(1f, 1f);
			GameObject val11 = new GameObject("Sliding area");
			RectTransform val12 = ApplyParentSize(val11, val8.transform);
			val12.offsetMin = new Vector2(10f, 10f);
			val12.offsetMax = new Vector2(-10f, -10f);
			GameObject val13 = new GameObject("Handle");
			RectTransform val14 = ApplyParentSize(val13, val11.transform);
			val14.offsetMin = new Vector2(-10f, -10f);
			val14.offsetMax = new Vector2(10f, 10f);
			Image targetGraphic = val13.AddComponent<Image>();
			val9.handleRect = val14;
			((Selectable)val9).targetGraphic = (Graphic)(object)targetGraphic;
			val9.direction = (Direction)2;
			val2.content = component;
			val2.viewport = val3.GetComponent<RectTransform>();
			val2.horizontal = false;
			val2.vertical = true;
			val2.verticalScrollbar = val9;
			val2.verticalScrollbarVisibility = (ScrollbarVisibility)2;
			return val5;
		}

		private static RectTransform ApplyParentSize(GameObject uiElement, Transform parent)
		{
			//IL_002d: 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_0059: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: 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_0087: 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)
			RectTransform val = uiElement.GetComponent<RectTransform>();
			if ((Object)(object)val == (Object)null)
			{
				val = uiElement.AddComponent<RectTransform>();
			}
			((Transform)val).SetParent(parent);
			val.anchorMin = new Vector2(0f, 0f);
			val.anchorMax = new Vector2(1f, 1f);
			val.pivot = new Vector2(0.5f, 0.5f);
			RectTransform obj = val;
			Vector2 offsetMin = (val.offsetMax = Vector2.zero);
			obj.offsetMin = offsetMin;
			((Transform)val).localRotation = Quaternion.identity;
			((Transform)val).localScale = Vector3.one;
			((Transform)val).localPosition = Vector3.zero;
			return val;
		}
	}
}
namespace ModCompatabilityChecker
{
	[BepInPlugin("MetalPipeSFX.ModCompatibilityChecker", "ModCompatibilityChecker", "1.0.0")]
	public class ModCompatibilityCheckerBase : BaseUnityPlugin
	{
		public const char rareUnicode = '¦';

		public const string Name = "Mod Compatibility Checker";

		public const string Author = "MetalPipeSFX";

		public const string Version = "1.0.0";

		private static ModCompatibilityCheckerBase Instance;

		private readonly Harmony harmony = new Harmony("MetalPipeSFX.ModCompatibilityChecker");

		internal ManualLogSource mls = null;

		public void Awake()
		{
			mls = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			mls.LogInfo((object)"Loading Compatability Checker");
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			harmony.PatchAll();
			mls.LogInfo((object)"Loaded The Mod Successfully");
		}
	}
	public class Manifest
	{
		public string name = null;

		public string version_number = null;

		public string website_url = null;

		public string description = null;

		public List<string> dependencies = null;

		public string[] DecryptMasterKey(string data)
		{
			List<string> list = data.Split('¦').ToList();
			list.RemoveAll((string x) => x == "");
			return list.ToArray();
		}

		public override string ToString()
		{
			return name + "^" + version_number + "^" + website_url + "^" + description + "^" + dependenciesToString();
		}

		private string dependenciesToString()
		{
			string text = "";
			foreach (string dependency in dependencies)
			{
				text += "%";
			}
			return text;
		}

		public Manifest[] DataFromFiles()
		{
			List<Manifest> list = new List<Manifest>();
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			string[] directories = Directory.GetDirectories(Paths.PluginPath);
			foreach (string text in directories)
			{
				string[] files = Directory.GetFiles(text + "/");
				for (int j = 0; j < files.Length; j++)
				{
					files[j] = files[j].Replace(text + "/", "");
				}
				val.LogMessage((object)("Found Mod At " + text));
				if (files.Length != 0)
				{
					if (!files.Contains("manifest.json.old"))
					{
						if (!files.Contains("mm_v2_manifest.json.old") && !files.Contains("mm_v2_manifest.json"))
						{
							if (files.Contains("manifest.json"))
							{
								using StreamReader streamReader = new StreamReader(text + "/manifest.json");
								val.LogMessage((object)text);
								string text2 = streamReader.ReadToEnd();
								Manifest manifest = JsonConvert.DeserializeObject<Manifest>(text2);
								if (manifest != null)
								{
									list.Add(manifest);
								}
								val.LogWarning((object)(manifest.name + ": from json."));
							}
							else
							{
								val.LogWarning((object)"Mod is Not BeplInEx, Can't Check Yet, Skipping!");
								string[] array = files;
								foreach (string text3 in array)
								{
									val.LogWarning((object)text3);
								}
							}
						}
						else
						{
							val.LogWarning((object)"Local Mod Found, Can't Check Yet, Skipping!");
						}
					}
					else
					{
						val.LogWarning((object)"Mod Disabled, Skipping!");
					}
				}
				else
				{
					val.LogWarning((object)"Mod Folder Empty, Skipping!");
				}
			}
			val.LogMessage((object)$"Found This Many Usable Mods: {list.Count}");
			return list.ToArray();
		}

		public Manifest[] DecryptData(LobbySlot instance)
		{
			//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)
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			List<Manifest> list = new List<Manifest>();
			Lobby thisLobby = instance.thisLobby;
			string data = ((Lobby)(ref thisLobby)).GetData("ModCompatabilityMasterString");
			string[] array = DecryptMasterKey(data);
			val.LogMessage((object)("Found " + array.Length + " Mod Keys"));
			string[] array2 = array;
			foreach (string text in array2)
			{
				val.LogMessage((object)text);
				list.Add(FromString(text));
			}
			return list.ToArray();
		}

		public Manifest FromString(string decipher)
		{
			Manifest manifest = new Manifest();
			string[] array = decipher.Split(new char[1] { '^' });
			manifest.name = array[0];
			manifest.version_number = array[1];
			manifest.website_url = array[2];
			manifest.description = array[3];
			manifest.dependencies = new List<string>(array[5].Split(new char[1] { '%' }));
			return manifest;
		}
	}
	public static class Tools
	{
		private static IEnumerable<T> Add<T>(this IEnumerable<T> e, T value)
		{
			foreach (T item in e)
			{
				yield return item;
			}
			yield return value;
		}

		public static string ToMasterString(this Manifest[] manifest)
		{
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			string text = "";
			foreach (Manifest manifest2 in manifest)
			{
				text = text + manifest2.name + $"{'¦'}";
			}
			return text;
		}
	}
	public static class ReflectionExtensions
	{
		public static T GetFieldValue<T>(this object obj, string name)
		{
			BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
			return (T)(obj.GetType().GetField(name, bindingAttr)?.GetValue(obj));
		}

		public static void SetPrivateField<T, T2>(this T item, string fieldName, T2 newValue)
		{
			FieldInfo field = item.GetType().GetField(fieldName, BindingFlags.Instance | BindingFlags.NonPublic);
			field.SetValue(item, newValue);
		}
	}
	[HarmonyPatch(typeof(GameNetworkManager), "SteamMatchmaking_OnLobbyCreated")]
	internal class SendPatch
	{
		public static void Prefix(ref Result result, ref Lobby lobby)
		{
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			val.LogInfo((object)"Patching GameNetworkManager");
			Manifest manifest = new Manifest();
			Manifest[] array = manifest.DataFromFiles();
			string text = array.ToMasterString();
			val.LogMessage((object)("Master String: " + text));
			if (text.Length >= 8192)
			{
				val.LogError((object)$"Steam Lobby Data infrastructure only allows 8192 characters per key, current value: {text.Length}. Workaround planned.");
			}
			else if (!((Lobby)(ref lobby)).SetData("ModCompatabilityMasterString", text))
			{
				val.LogError((object)"Error posting data to Steam Lobby");
			}
			Manifest[] array2 = array;
			foreach (Manifest manifest2 in array2)
			{
				string text2 = manifest2.ToString();
				if (text2.Length >= 8192)
				{
					val.LogError((object)$"Steam Lobby Data infrastructure only allows 8192 characters per key, current value: {text2.Length}. Workaround planned.");
				}
				else if (!((Lobby)(ref lobby)).SetData(manifest2.name, text2))
				{
					val.LogError((object)"Error posting data to Steam Lobby");
				}
			}
			if (((Lobby)(ref lobby)).GetData("ModCompatabilityMasterString") != "")
			{
				val.LogMessage((object)((Lobby)(ref lobby)).GetData("ModCompatabilityMasterString"));
			}
		}
	}
	[HarmonyPatch(typeof(SteamLobbyManager))]
	internal class CompatibilityReceivePatch
	{
		[HarmonyPatch("LoadServerList")]
		[HarmonyPostfix]
		private static void DecryptPatch(SteamLobbyManager __instance, ref Lobby[] ___currentLobbyList)
		{
			while ((Object)(object)__instance == (Object)null && ___currentLobbyList == null)
			{
			}
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			val.LogInfo((object)"Found Lobby Data!");
			ModCompatabilityChecker modCompatabilityChecker = Object.FindAnyObjectByType<ModCompatabilityChecker>();
			if ((Object)(object)__instance != (Object)null)
			{
				val.LogInfo((object)"Decrypting Lobbies");
				modCompatabilityChecker.DecryptData(___currentLobbyList);
			}
		}
	}
	[HarmonyPatch(typeof(MenuManager))]
	internal class MenuPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPrefix]
		private static void InstantiatePatch(MenuManager __instance)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			val.LogInfo((object)"Patched Menu Manager");
			GameObject val2 = new GameObject();
			val2.AddComponent<ModCompatabilityChecker>();
			val2.GetComponent<ModCompatabilityChecker>();
		}

		[HarmonyPatch("EnableUIPanel")]
		[HarmonyPostfix]
		private static void PanelPatch(ref GameObject enablePanel)
		{
			if (((Object)enablePanel).name == "LobbyList")
			{
				ModCompatabilityChecker.Instance.LoadMainMenuScene();
			}
		}
	}
	[HarmonyPatch(typeof(LobbySlot))]
	internal class SlotPatch
	{
		[HarmonyPatch("Awake")]
		[HarmonyPrefix]
		private static void InstantiatePatch(LobbySlot __instance)
		{
			//IL_0047: 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)
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			GameObject gameObject = ((Component)((Component)__instance).transform.Find("JoinButton")).gameObject;
			GameObject val2 = Object.Instantiate<GameObject>(gameObject, ((Component)__instance).transform);
			((Object)val2).name = "ModCheckButton";
			val2.transform.localPosition = gameObject.transform.localPosition - new Vector3(75f, 0f, 0f);
			((TMP_Text)((Component)val2.transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).text = "Check";
			val.LogMessage((object)"Got Here");
			val2.AddComponent<ModCompatibilityButton>();
			val2.GetComponent<ModCompatibilityButton>().lobbySlot = __instance;
		}
	}
	public class ModCompatabilityChecker : MonoBehaviour
	{
		public bool hasPostedModInfo = false;

		public Dictionary<string, Lobby> currentLobbies = new Dictionary<string, Lobby>();

		public GameObject ModCompatSlot;

		public bool checkedModCompatibility = false;

		public static ModCompatabilityChecker Instance { get; private set; }

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			else
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
			Object.DontDestroyOnLoad((Object)(object)this);
		}

		private void Update()
		{
		}

		private void Start()
		{
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			SceneManager.activeSceneChanged += HostLoadNewLobby;
			val.LogMessage((object)"ModCompatibility MonoBehaviour Created!");
		}

		public void CreateModCompPanel()
		{
			//IL_017b: 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)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			GameObject serverListUIContainer = Object.FindObjectOfType<MenuManager>().serverListUIContainer;
			val.LogMessage((object)("Found LobbyList: " + ((Object)(object)serverListUIContainer != (Object)null)));
			GameObject gameObject = ((Component)serverListUIContainer.transform.Find("ListPanel")).gameObject;
			val.LogMessage((object)("Found ListPanel: " + ((Object)(object)gameObject != (Object)null)));
			Transform transform = Object.Instantiate<GameObject>(gameObject).transform;
			val.LogMessage((object)("Made New ListPanel: " + ((Object)(object)transform != (Object)null)));
			((Component)transform).transform.SetParent(serverListUIContainer.transform, false);
			((Object)transform).name = "ModCompatibilityPanel";
			Object.Destroy((Object)(object)((Component)((Component)transform).transform.Find("ListHeader")).gameObject);
			Object.Destroy((Object)(object)((Component)((Component)transform).transform.Find("RefreshButton")).gameObject);
			Object.Destroy((Object)(object)((Component)((Component)transform).transform.Find("Dropdown")).gameObject);
			Object.Destroy((Object)(object)((Component)((Component)transform).transform.Find("Scroll View")).gameObject);
			val.LogMessage((object)"Done Destroying children!");
			val.LogWarning((object)("Is NewListPanel Not Null: " + ((Object)(object)transform != (Object)null)));
			val.LogWarning((object)((Object)transform.parent).name);
			((Transform)((Component)transform).GetComponent<RectTransform>()).localScale = new Vector3(0.3f, 0.95f, 1f);
			((Transform)((Component)transform).GetComponent<RectTransform>()).localPosition = new Vector3(256f, -5.72f, 0.548f);
			ModCompatabilityPanel modCompatabilityPanel = ((Component)transform).gameObject.AddComponent<ModCompatabilityPanel>();
			Text val2 = CreateText(((Component)transform).transform);
			((Component)val2).transform.SetParent(((Component)transform).transform, false);
			((Component)val2).GetComponent<RectTransform>().pivot = new Vector2(1f, 1f);
			((Component)val2).GetComponent<RectTransform>().anchorMin = new Vector2(1f, 1f);
			((Component)val2).GetComponent<RectTransform>().anchorMax = new Vector2(1f, 1f);
			((Component)val2).GetComponent<RectTransform>().anchoredPosition = Vector2.op_Implicit(new Vector3(1f, 1f, 1f));
			val2.text = "Testing 1 2";
			Transform[] componentsInChildren = serverListUIContainer.GetComponentsInChildren<Transform>();
			Transform val3 = componentsInChildren.Where((Transform x) => ((Object)((Component)x).gameObject).name == "Scrollbar Vertical").FirstOrDefault();
			val3.localPosition = new Vector3(505.5655f, -0.002f, -0.003f);
		}

		private static Text CreateText(Transform parent)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			GameObject val = new GameObject();
			val.transform.parent = parent;
			return val.AddComponent<Text>();
		}

		public void DecryptData(Lobby[] instance)
		{
			//IL_0015: 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_004a: Unknown result type (might be due to invalid IL or missing references)
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			for (int i = 0; i < instance.Length; i++)
			{
				Lobby value = instance[i];
				val.LogInfo((object)(((Lobby)(ref value)).GetData("name") ?? ""));
				currentLobbies.Add(((Lobby)(ref value)).GetData("name"), value);
			}
		}

		public void LoadMainMenuScene()
		{
			CreateModCompPanel();
		}

		public void HostLoadNewLobby(Scene current, Scene next)
		{
			//IL_0024: 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)
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			val.LogError((object)("Changed Scene! " + ((Scene)(ref next)).name));
			if (next == SceneManager.GetSceneByName("SampleSceneRelay") && !hasPostedModInfo)
			{
				val.LogError((object)((Object)(object)GameNetworkManager.Instance != (Object)null));
			}
		}
	}
	public class ModCompatibilityButton : MonoBehaviour
	{
		public LobbySlot lobbySlot;

		public Lobby lobby;

		public void ShowCompatibilityPanel()
		{
			ManualLogSource val = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			val.LogMessage((object)("Checking Compatibility for Lobby: " + (object)lobbySlot.LobbyName));
			ModCompatabilityPanel.Instance.PrepModCompSlot(lobbySlot);
		}

		public void Start()
		{
			//IL_000d: 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_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Expected O, but got Unknown
			lobby = ((Component)this).gameObject.GetComponentInParent<LobbySlot>().thisLobby;
			Button component = ((Component)this).GetComponent<Button>();
			component.onClick = new ButtonClickedEvent();
			((UnityEvent)component.onClick).AddListener(new UnityAction(ShowCompatibilityPanel));
		}
	}
	public class ModCompatibilitySlot : MonoBehaviour
	{
		public TextMeshProUGUI modName;

		public TextMeshProUGUI modDescription;

		private ManualLogSource mls;

		public Lobby lobby;

		public LobbySlot lobbySlot;

		public Manifest modManifest;

		public void Awake()
		{
			mls = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
		}

		public void Start()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			lobby = ((Component)this).GetComponent<LobbySlot>().thisLobby;
			Object.Destroy((Object)(object)((Component)this).GetComponent<LobbySlot>());
			Object.Destroy((Object)(object)((Component)((Component)this).transform.Find("ModCheckButton")).gameObject);
			((TMP_Text)((Component)((Component)((Component)((Component)this).transform.Find("JoinButton")).GetComponent<Button>()).transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).text = "Check";
			Button component = ((Component)((Component)this).transform.Find("JoinButton")).GetComponent<Button>();
			component.onClick = new ButtonClickedEvent();
			((UnityEvent)component.onClick).AddListener(new UnityAction(DownloadMod));
			mls.LogMessage((object)"Removed Lobby Slot Component");
			LayoutElement val = ((Component)this).gameObject.AddComponent<LayoutElement>();
			val.minHeight = 35f;
			val.m_FlexibleHeight = 0f;
			ContentSizeFitter val2 = ((Component)this).gameObject.AddComponent<ContentSizeFitter>();
			val2.verticalFit = (FitMode)1;
		}

		public void SetManifest(Manifest manifest)
		{
			modManifest = manifest;
			((TMP_Text)((Component)((Component)this).transform.Find("ServerName")).GetComponent<TextMeshProUGUI>()).text = manifest.name;
			((TMP_Text)((Component)((Component)this).transform.Find("NumPlayers")).GetComponent<TextMeshProUGUI>()).text = manifest.description + "  " + manifest.version_number;
		}

		public void DownloadMod()
		{
			mls.LogMessage((object)((Lobby)(ref lobbySlot.thisLobby)).GetData("name"));
		}
	}
	public class ModCompatabilityPanel : MonoBehaviour
	{
		public static ModCompatabilityPanel Instance;

		public ManualLogSource mls;

		public Transform content;

		private void Awake()
		{
			mls = Logger.CreateLogSource("MetalPipeSFX.ModCompatibilityChecker");
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			else
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}

		private void Start()
		{
			AddRequiredComponents();
		}

		private void AddRequiredComponents()
		{
			VerticalLayoutGroup val = ((Component)this).gameObject.AddComponent<VerticalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)val).reverseArrangement = true;
			((HorizontalOrVerticalLayoutGroup)val).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val).childScaleHeight = true;
			((HorizontalOrVerticalLayoutGroup)val).childForceExpandHeight = false;
			((HorizontalOrVerticalLayoutGroup)val).spacing = 0f;
		}

		public void PrepModCompSlot(LobbySlot lobby)
		{
			Manifest manifest = new Manifest();
			Manifest[] array = manifest.DecryptData(lobby);
			if (array.Length != 0)
			{
				Manifest[] array2 = array;
				foreach (Manifest manifest2 in array2)
				{
					GameObject val = Object.Instantiate<GameObject>(Object.FindObjectOfType<SteamLobbyManager>().LobbySlotPrefab);
					ModCompatibilitySlot modCompatibilitySlot = val.AddComponent<ModCompatibilitySlot>();
					modCompatibilitySlot.lobbySlot = lobby;
					modCompatibilitySlot.SetManifest(manifest2);
					val.transform.SetParent(((Component)this).transform, false);
				}
			}
		}

		public void CalledCheckLobby(LobbySlot lobby)
		{
			mls.LogMessage((object)("Tried to get Mod Data On Lobby: " + ((Object)lobby).name));
		}
	}
}

plugins/MikeMediaStudios-MikesTweaks/MikesTweaks.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.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using MikesTweaks.Scripts.Configs;
using MikesTweaks.Scripts.Environment;
using MikesTweaks.Scripts.Input;
using MikesTweaks.Scripts.Inventory;
using MikesTweaks.Scripts.Items;
using MikesTweaks.Scripts.Moons;
using MikesTweaks.Scripts.Networking;
using MikesTweaks.Scripts.Player;
using MikesTweaks.Scripts.Systems;
using MikesTweaks.Scripts.World;
using Newtonsoft.Json;
using Unity.Collections;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("MikesTweaks")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Mod for Lethal Company with multiple configurable item weights, inventory slots amount, inventory/item slot keybinds, flashlight/walkie talkie keybinds, player stamina/sprint values and moons cost to travel to customize your own experience.")]
[assembly: AssemblyFileVersion("1.8.3.0")]
[assembly: AssemblyInformationalVersion("1.8.3")]
[assembly: AssemblyProduct("MikesTweaks")]
[assembly: AssemblyTitle("MikesTweaks")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.8.3.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 MikesTweaks
{
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "MikesTweaks";

		public const string PLUGIN_NAME = "MikesTweaks";

		public const string PLUGIN_VERSION = "1.8.3";
	}
}
namespace MikesTweaks.Scripts
{
	[BepInPlugin("mikes.lethalcompany.mikestweaks", "MikesTweaks", "1.8.3")]
	public class MikesTweaks : BaseUnityPlugin
	{
		public static class Compatibility
		{
			public static bool ReservedSlotsCompat;
		}

		public const string GUID = "mikes.lethalcompany.mikestweaks";

		public static ManualLogSource Log;

		public static MikesTweaks Instance { get; private set; }

		public void BindConfig<T>(ref ConfigEntrySettings<T> config, string SectionName)
		{
			config.Entry = ((BaseUnityPlugin)this).Config.Bind<T>(SectionName, config.ConfigName, config.DefaultValue, config.ConfigDesc);
		}

		public void LoadConfigs()
		{
			((BaseUnityPlugin)this).Config.Reload();
			ConfigsSynchronizer.ConfigsReceived = false;
		}

		private void Awake()
		{
			Instance = this;
			Log = ((BaseUnityPlugin)this).Logger;
			WorldTweaks.RegisterConfigs();
			MoonTweaks.RegisterConfigs();
			PlayerTweaks.RegisterConfigs();
			InventoryTweaks.RegisterConfigs();
			((BaseUnityPlugin)this).Config.SaveOnConfigSet = false;
			Harmony.CreateAndPatchAll(typeof(MenuManager_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(IngamePlayerSettings_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(HUDManager_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(NetworkManager_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(StartOfRound_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(TimeOfDay_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(InteractTrigger_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(Terminal_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(PlayerControllerB_Patches), (string)null);
			Harmony.CreateAndPatchAll(typeof(GrabbableObject_Patches), (string)null);
			CheckCompatibilities();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin mikes.lethalcompany.mikestweaks is loaded!");
		}

		private void CheckCompatibilities()
		{
			Compatibility.ReservedSlotsCompat = IsModPresent("ReservedItemSlotCore");
			if (Compatibility.ReservedSlotsCompat)
			{
				Log.LogInfo((object)"Found: ReservedItemSlotCore");
			}
		}

		public static bool IsModPresent(string name)
		{
			foreach (KeyValuePair<string, PluginInfo> pluginInfo in Chainloader.PluginInfos)
			{
				if (name == pluginInfo.Value.Metadata.Name)
				{
					return true;
				}
			}
			return false;
		}
	}
}
namespace MikesTweaks.Scripts.World
{
	public class WorldTweaks
	{
		public class Configs
		{
			public static ConfigEntrySettings<float> GlobalTimeSpeedMulti = new ConfigEntrySettings<float>("GlobalTimeSpeedMultiplier", 0.5f, 1f, "Think of this as a percentage, the lower it is, the slower the time goes by, the higher it is, the faster time passes.");

			public static ConfigEntrySettings<bool> AllowHotbarKeybinds = new ConfigEntrySettings<bool>("AllowHotbarKeybinds", defaultValue: true, vanillaValue: false, "Set this to false if you don't want people who join your lobby to be able to use the hotbar keybinds and to true if you want them to be able to.");

			public static ConfigEntrySettings<bool> AllowFlashlightKeybind = new ConfigEntrySettings<bool>("AllowFlashlightKeybind", defaultValue: true, vanillaValue: false, "Set this to false if you don't want people who join your lobby to be able to use the flashlight keybind and to true if you want them to be able to.");

			public static ConfigEntrySettings<bool> AllowWalkieTalkieKeybind = new ConfigEntrySettings<bool>("AllowWalkieTalkieKeybind", defaultValue: true, vanillaValue: false, "Set this to false if you don't want people who join your lobby to be able to use the flashlight keybind and to true if you want them to be able to.");

			public static ConfigEntrySettings<bool> AllowClientsToUseTerminal = new ConfigEntrySettings<bool>("AllowClientsToUseTerminal", defaultValue: true, vanillaValue: true, "Set this to false if you don't want people who join your lobby to be able to use the terminal and to true if you want them to be able to.\nYou probably want to set this to true if you're hosting a lobby with people you know and trust.");

			public static ConfigEntrySettings<bool> UseVanillaSprintSpeedValues = new ConfigEntrySettings<bool>("UseVanillaSprintSpeedValues", defaultValue: false, vanillaValue: true, "Set this to true if you want to use all the vanilla values tied to sprinting.\nStamina drain related configs not included.");

			public static ConfigEntrySettings<bool> UseVanillaStaminaValues = new ConfigEntrySettings<bool>("UseVanillaStaminaValues", defaultValue: false, vanillaValue: true, "Set this to true if you want to use all the vanilla values tied to stamina.\nSprint speed related configs not included.");

			public static ConfigEntrySettings<bool> UseVanillaTerminalItemWeights = new ConfigEntrySettings<bool>("UseVanillaTerminalItemWeights", defaultValue: false, vanillaValue: true, "Set this to true if you want to use all the vanilla values for the weight of every terminal item.");

			public static ConfigEntrySettings<bool> UseVanillaMoonCosts = new ConfigEntrySettings<bool>("UseVanillaMoonCosts", defaultValue: false, vanillaValue: true, "Set this to true if you want to use all the vanilla values for the cost of traveling to the moons.");

			public static string GameRulesSectionHeader => "GameRules";
		}

		public static Terminal TerminalInstance = null;

		public static InteractTrigger TerminalInteractTriggerInstance = null;

		private static readonly MethodInfo TerminalTriggerInUseRPC = typeof(InteractTrigger).GetMethod("UpdateUsedByPlayerServerRpc", BindingFlags.Instance | BindingFlags.NonPublic);

		public static void RegisterConfigs()
		{
			MikesTweaks.Instance.BindConfig(ref Configs.GlobalTimeSpeedMulti, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.AllowHotbarKeybinds, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.AllowFlashlightKeybind, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.AllowWalkieTalkieKeybind, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.AllowClientsToUseTerminal, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.UseVanillaSprintSpeedValues, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.UseVanillaStaminaValues, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.UseVanillaTerminalItemWeights, Configs.GameRulesSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.UseVanillaMoonCosts, Configs.GameRulesSectionHeader);
			ConfigsSynchronizer.OnConfigsChangedDelegate = (Action)Delegate.Combine(ConfigsSynchronizer.OnConfigsChangedDelegate, (Action)delegate
			{
				ReapplyConfigs(TimeOfDay.Instance);
			});
			ConfigsSynchronizer.Instance.AddConfigGetter(WriteConfigsToWriter);
			ConfigsSynchronizer.Instance.AddConfigSetter(ReadConfigChanges);
			ConfigsSynchronizer.Instance.AddConfigSizeGetter(() => 8);
		}

		public static FastBufferWriter WriteConfigsToWriter(FastBufferWriter writer)
		{
			//IL_0012: 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_0030: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: 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_0072: 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_0090: 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)
			float num = Configs.GlobalTimeSpeedMulti.Value();
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			bool flag = Configs.AllowFlashlightKeybind.Value();
			((FastBufferWriter)(ref writer)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
			flag = Configs.AllowWalkieTalkieKeybind.Value();
			((FastBufferWriter)(ref writer)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
			flag = Configs.AllowHotbarKeybinds.Value();
			((FastBufferWriter)(ref writer)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
			flag = Configs.UseVanillaMoonCosts.Value();
			((FastBufferWriter)(ref writer)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
			return writer;
		}

		public static FastBufferReader ReadConfigChanges(FastBufferReader payload)
		{
			//IL_0006: 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_0028: 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_004a: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: 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_00aa: Unknown result type (might be due to invalid IL or missing references)
			float value = default(float);
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.GlobalTimeSpeedMulti.Entry.Value = value;
			bool value2 = default(bool);
			((FastBufferReader)(ref payload)).ReadValue<bool>(ref value2, default(ForPrimitives));
			Configs.AllowFlashlightKeybind.Entry.Value = value2;
			((FastBufferReader)(ref payload)).ReadValue<bool>(ref value2, default(ForPrimitives));
			Configs.AllowWalkieTalkieKeybind.Entry.Value = value2;
			((FastBufferReader)(ref payload)).ReadValue<bool>(ref value2, default(ForPrimitives));
			Configs.AllowHotbarKeybinds.Entry.Value = value2;
			((FastBufferReader)(ref payload)).ReadValue<bool>(ref value2, default(ForPrimitives));
			Configs.UseVanillaMoonCosts.Entry.Value = value2;
			return payload;
		}

		public static void ReapplyConfigs(TimeOfDay timeOfDay)
		{
			timeOfDay.globalTimeSpeedMultiplier = Configs.GlobalTimeSpeedMulti.Value();
		}

		public static bool CanInteractWithTerminal(InteractTrigger __instance)
		{
			if (!NetworkManager.Singleton.IsServer)
			{
				return false;
			}
			if (Configs.AllowClientsToUseTerminal.Value())
			{
				return false;
			}
			return (Object)(object)TerminalInteractTriggerInstance == (Object)(object)__instance;
		}

		public static void MakeTerminalUnusableForAnyoneButHost()
		{
			if (NetworkManager.Singleton.IsServer && !Configs.AllowClientsToUseTerminal.Value())
			{
				object[] parameters = new object[1] { 0 };
				TerminalTriggerInUseRPC.Invoke(TerminalInteractTriggerInstance, parameters);
			}
		}

		public static void ResetValues(InteractTrigger trigger)
		{
			if (trigger.hidePlayerItem && (Object)(object)StartOfRound.Instance.allPlayerScripts[0].currentlyHeldObjectServer != (Object)null)
			{
				StartOfRound.Instance.allPlayerScripts[0].currentlyHeldObjectServer.EnableItemMeshes(true);
				typeof(InteractTrigger).GetField("playerUsingId", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(trigger, -1);
			}
			StartOfRound.Instance.allPlayerScripts[0].currentTriggerInAnimationWith = null;
			trigger.isPlayingSpecialAnimation = false;
		}
	}
}
namespace MikesTweaks.Scripts.Systems
{
	[HarmonyPatch(typeof(HUDManager))]
	public class HUDManager_Patches
	{
		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		public static void Awake(HUDManager __instance)
		{
			if (NetworkManager.Singleton.IsServer && !MikesTweaks.Compatibility.ReservedSlotsCompat)
			{
				InventoryTweaks.ChangeItemSlotsAmountUI();
			}
		}
	}
	[HarmonyPatch(typeof(IngamePlayerSettings))]
	public class IngamePlayerSettings_Patches
	{
		[HarmonyPatch("RebindKey")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> AllowMouseBinding(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				CodeInstruction val = list[i];
				if (!(val.opcode != OpCodes.Ldstr) && !((string)val.operand != "Mouse"))
				{
					list.RemoveAt(i + 1);
					list.RemoveAt(i);
				}
			}
			return list.AsEnumerable();
		}
	}
	[HarmonyPatch(typeof(MenuManager))]
	public class MenuManager_Patches
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void MenuManager_Start(MenuManager __instance)
		{
			MikesTweaks.Instance.LoadConfigs();
		}
	}
	[HarmonyPatch(typeof(NetworkManager))]
	public static class NetworkManager_Patches
	{
		[HarmonyPatch("StartHost")]
		[HarmonyPostfix]
		private static void StartHost_Post(GameNetworkManager __instance)
		{
			ConfigsSynchronizer.Instance.RegisterMessages();
		}

		[HarmonyPatch("StartClient")]
		[HarmonyPostfix]
		private static void StartClient_Post(GameNetworkManager __instance)
		{
			ConfigsSynchronizer.Instance.RegisterMessages();
		}
	}
	[HarmonyPatch(typeof(StartOfRound))]
	public static class StartOfRound_Patches
	{
		[HarmonyPatch("OnPlayerConnectedClientRpc")]
		[HarmonyPostfix]
		private static void OnPlayerConnectedClientRpc(StartOfRound __instance, ulong clientId, int assignedPlayerObjectId)
		{
			if (!NetworkManager.Singleton.IsServer)
			{
				ConfigsSynchronizer.Instance.RequestConfigs();
			}
		}
	}
	[HarmonyPatch(typeof(TimeOfDay))]
	public class TimeOfDay_Patches
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void ChangeTimeSpeedMultiplier(TimeOfDay __instance)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				WorldTweaks.ReapplyConfigs(__instance);
			}
		}
	}
}
namespace MikesTweaks.Scripts.Player
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	public static class PlayerControllerB_Patches
	{
		private static PlayerInputRedirection inputRedirection;

		public static void SetupKeybinds(PlayerControllerB __instance)
		{
			//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)
			//IL_001e: 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)
			MovementActions movement = __instance.playerActions.Movement;
			((MovementActions)(ref movement)).Emote1.Disable();
			movement = __instance.playerActions.Movement;
			((MovementActions)(ref movement)).Emote2.Disable();
			if (PlayerTweaks.IsLocallyControlled(__instance))
			{
				inputRedirection = ((Component)__instance).gameObject.GetComponent<PlayerInputRedirection>();
				inputRedirection.InitializeKeybinds();
			}
		}

		private static bool InsertStaminaRechargeMovementHinderedWalking(ref List<CodeInstruction> instructions, CodeInstruction instruction, int i, ref List<int> IndexesToRemove)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			if (instruction.opcode != OpCodes.Ldc_R4)
			{
				return false;
			}
			if (Math.Abs((float)instruction.operand - 0.5f) > 0.01f)
			{
				return false;
			}
			instructions[i - 7] = new CodeInstruction(OpCodes.Ldloc_0, (object)null);
			instructions[i - 6] = CodeInstruction.Call(typeof(PlayerTweaks), "StaminaRechargeMovementHinderedWalking", (Type[])null, (Type[])null);
			instructions[i - 5] = CodeInstruction.StoreField(typeof(PlayerControllerB), "sprintMeter");
			for (int j = i - 4; j <= i + 6; j++)
			{
				IndexesToRemove.Add(j);
			}
			return true;
		}

		private static bool InsertStaminaRechargeMovementNotHinderedWalking(ref List<CodeInstruction> instructions, CodeInstruction instruction, int i, ref List<int> IndexesToRemove)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			if (instruction.opcode != OpCodes.Ldc_R4)
			{
				return false;
			}
			if (Math.Abs((float)instruction.operand - 9f) > 0.01f)
			{
				return false;
			}
			instructions[i - 4] = new CodeInstruction(OpCodes.Ldloc_0, (object)null);
			instructions[i - 3] = CodeInstruction.Call(typeof(PlayerTweaks), "StaminaRechargeMovementNotHinderedWalking", (Type[])null, (Type[])null);
			instructions[i - 2] = CodeInstruction.StoreField(typeof(PlayerControllerB), "sprintMeter");
			for (int j = i - 1; j <= i + 9; j++)
			{
				IndexesToRemove.Add(j);
			}
			return true;
		}

		private static bool InsertStaminaRechargeMovementNotHinderedNotWalking(ref List<CodeInstruction> instructions, CodeInstruction instruction, int i, ref List<int> IndexesToRemove)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			if (instruction.opcode != OpCodes.Ldc_R4)
			{
				return false;
			}
			if (Math.Abs((float)instruction.operand - 4f) > 0.01f)
			{
				return false;
			}
			instructions[i - 4] = new CodeInstruction(OpCodes.Ldloc_0, (object)null);
			instructions[i - 3] = CodeInstruction.Call(typeof(PlayerTweaks), "StaminaRechargeMovementNotHinderedNotWalking", (Type[])null, (Type[])null);
			instructions[i - 2] = CodeInstruction.StoreField(typeof(PlayerControllerB), "sprintMeter");
			for (int j = i - 1; j <= i + 9; j++)
			{
				IndexesToRemove.Add(j);
			}
			return true;
		}

		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		private static void Awake(PlayerControllerB __instance)
		{
			((Component)__instance).gameObject.AddComponent<PlayerInputRedirection>();
			if (NetworkManager.Singleton.IsServer)
			{
				PlayerTweaks.ReapplyConfigs(__instance);
			}
		}

		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void Start(PlayerControllerB __instance)
		{
			PlayerTweaks.RegisterSwitchSlotMessage();
		}

		private static void ModifySprintMultiplierValues(ref List<CodeInstruction> instructions)
		{
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Expected O, but got Unknown
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Expected O, but got Unknown
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Expected O, but got Unknown
			//IL_0343: Unknown result type (might be due to invalid IL or missing references)
			//IL_034d: Expected O, but got Unknown
			float num = 2.25f;
			float num2 = 1f;
			float num3 = 1f;
			float num4 = 10f;
			int num5 = -1;
			bool flag = false;
			bool flag2 = false;
			bool flag3 = false;
			for (int i = 0; i < instructions.Count; i++)
			{
				CodeInstruction val = instructions[i];
				if (!(val.opcode != OpCodes.Ldc_R4) && !((double)Math.Abs((float)val.operand - num) > 0.1))
				{
					num5 = i;
					instructions[i] = CodeInstruction.Call(typeof(ConfigEntrySettings<float>), "Value", (Type[])null, (Type[])null);
					instructions.Insert(i, CodeInstruction.Call(typeof(ConfigEntrySettings<bool>), "Value", (Type[])null, (Type[])null));
					instructions.Insert(i, new CodeInstruction(OpCodes.Ldc_I4_0, (object)null));
					instructions.Insert(i, CodeInstruction.LoadField(typeof(WorldTweaks.Configs), "UseVanillaSprintSpeedValues", false));
					instructions.Insert(i, CodeInstruction.LoadField(typeof(PlayerTweaks.Configs), "MaxSprintSpeed", false));
					break;
				}
			}
			if (num5 == -1)
			{
				return;
			}
			for (int j = num5; j < instructions.Count; j++)
			{
				CodeInstruction val2 = instructions[j];
				if (val2.opcode == OpCodes.Ldc_R4)
				{
					if (flag2 && flag3 && flag)
					{
						break;
					}
					if (!flag && (double)Math.Abs((float)val2.operand - num2) < 0.1)
					{
						instructions[j] = CodeInstruction.Call(typeof(ConfigEntrySettings<float>), "Value", (Type[])null, (Type[])null);
						instructions.Insert(j, CodeInstruction.Call(typeof(ConfigEntrySettings<bool>), "Value", (Type[])null, (Type[])null));
						instructions.Insert(j, new CodeInstruction(OpCodes.Ldc_I4_0, (object)null));
						instructions.Insert(j, CodeInstruction.LoadField(typeof(WorldTweaks.Configs), "UseVanillaSprintSpeedValues", false));
						instructions.Insert(j, CodeInstruction.LoadField(typeof(PlayerTweaks.Configs), "SprintSpeedIncreasePerFrame", false));
						flag = true;
					}
					else if (!flag2 && (double)Math.Abs((float)val2.operand - num3) < 0.1)
					{
						instructions[j] = CodeInstruction.Call(typeof(ConfigEntrySettings<float>), "Value", (Type[])null, (Type[])null);
						instructions.Insert(j, CodeInstruction.Call(typeof(ConfigEntrySettings<bool>), "Value", (Type[])null, (Type[])null));
						instructions.Insert(j, new CodeInstruction(OpCodes.Ldc_I4_0, (object)null));
						instructions.Insert(j, CodeInstruction.LoadField(typeof(WorldTweaks.Configs), "UseVanillaSprintSpeedValues", false));
						instructions.Insert(j, CodeInstruction.LoadField(typeof(PlayerTweaks.Configs), "DefaultSprintSpeed", false));
						flag2 = true;
					}
					else if (!flag3 && (double)Math.Abs((float)val2.operand - num4) < 0.1)
					{
						instructions[j] = CodeInstruction.Call(typeof(ConfigEntrySettings<float>), "Value", (Type[])null, (Type[])null);
						instructions.Insert(j, CodeInstruction.Call(typeof(ConfigEntrySettings<bool>), "Value", (Type[])null, (Type[])null));
						instructions.Insert(j, new CodeInstruction(OpCodes.Ldc_I4_0, (object)null));
						instructions.Insert(j, CodeInstruction.LoadField(typeof(WorldTweaks.Configs), "UseVanillaSprintSpeedValues", false));
						instructions.Insert(j, CodeInstruction.LoadField(typeof(PlayerTweaks.Configs), "SprintSpeedDecreasePerFrame", false));
						flag3 = true;
					}
				}
			}
		}

		[HarmonyPatch("Update")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> Update_Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> instructions2 = new List<CodeInstruction>(instructions);
			ModifySprintMultiplierValues(ref instructions2);
			return instructions2.AsEnumerable();
		}

		[HarmonyPatch("ConnectClientToPlayerObject")]
		[HarmonyPostfix]
		private static void AddHotkeys(PlayerControllerB __instance)
		{
			SetupKeybinds(__instance);
		}

		[HarmonyPatch("LateUpdate")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> LateUpdate_Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			bool flag = false;
			bool flag2 = false;
			bool flag3 = false;
			List<int> IndexesToRemove = new List<int>();
			List<CodeInstruction> instructions2 = new List<CodeInstruction>(instructions);
			for (int i = 0; i < instructions2.Count; i++)
			{
				CodeInstruction instruction = instructions2[i];
				if (!flag)
				{
					flag = InsertStaminaRechargeMovementHinderedWalking(ref instructions2, instruction, i, ref IndexesToRemove);
				}
				if (!flag3)
				{
					flag3 = InsertStaminaRechargeMovementNotHinderedNotWalking(ref instructions2, instruction, i, ref IndexesToRemove);
				}
				if (!flag2)
				{
					flag2 = InsertStaminaRechargeMovementNotHinderedWalking(ref instructions2, instruction, i, ref IndexesToRemove);
				}
				if (flag && flag3 && flag2)
				{
					break;
				}
			}
			IndexesToRemove.Sort();
			for (int num = IndexesToRemove.Count - 1; num >= 0; num--)
			{
				instructions2.RemoveAt(IndexesToRemove[num]);
			}
			return instructions2.AsEnumerable();
		}

		[HarmonyPatch("Jump_performed")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> ModifyJumpDrain(IEnumerable<CodeInstruction> instructions)
		{
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Expected O, but got Unknown
			float num = 0.08f;
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				CodeInstruction val = list[i];
				if (!(val.opcode != OpCodes.Ldc_R4) && !(Math.Abs((float)val.operand - num) > 0.01f))
				{
					list[i] = CodeInstruction.Call(typeof(ConfigEntrySettings<float>), "Value", (Type[])null, (Type[])null);
					list.Insert(i, CodeInstruction.Call(typeof(ConfigEntrySettings<bool>), "Value", (Type[])null, (Type[])null));
					list.Insert(i, new CodeInstruction(OpCodes.Ldc_I4_0, (object)null));
					list.Insert(i, CodeInstruction.LoadField(typeof(WorldTweaks.Configs), "UseVanillaStaminaValues", false));
					list.Insert(i, CodeInstruction.LoadField(typeof(PlayerTweaks.Configs), "JumpStaminaDrain", false));
					break;
				}
			}
			return instructions.AsEnumerable();
		}

		[HarmonyPatch("SendNewPlayerValuesClientRpc")]
		[HarmonyPostfix]
		private static void ConnectClientToPlayerObject(PlayerControllerB __instance)
		{
			WorldTweaks.MakeTerminalUnusableForAnyoneButHost();
		}

		[HarmonyPatch("OnEnable")]
		[HarmonyPostfix]
		private static void OnEnable(PlayerControllerB __instance)
		{
			if (PlayerTweaks.IsLocallyControlled(__instance))
			{
				inputRedirection?.OnEnable();
			}
		}

		[HarmonyPatch("OnDisable")]
		[HarmonyPostfix]
		private static void OnDisable(PlayerControllerB __instance)
		{
			if (PlayerTweaks.IsLocallyControlled(__instance))
			{
				inputRedirection?.OnDisable();
			}
		}

		[HarmonyPatch("OnDestroy")]
		[HarmonyPrefix]
		public static void OnDestroy(PlayerControllerB __instance)
		{
			if (PlayerTweaks.IsLocallyControlled(__instance))
			{
				inputRedirection?.Destroy();
				inputRedirection = null;
			}
		}
	}
	public class PlayerInputRedirection : MonoBehaviour, MikesTweaksPlayerInput.IHotbarActions, MikesTweaksPlayerInput.IEmotesActions, MikesTweaksPlayerInput.IActionsActions
	{
		private PlayerControllerB owner;

		private MikesTweaksPlayerInput input;

		private MethodInfo SwitchToSlotMethod;

		private WalkieTalkie WalkieTalkieToStop;

		public void OnHotbar1(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3)
			{
				RequestSlotChange(0);
			}
		}

		public void OnHotbar2(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3)
			{
				RequestSlotChange(1);
			}
		}

		public void OnHotbar3(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3)
			{
				RequestSlotChange(2);
			}
		}

		public void OnHotbar4(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3)
			{
				RequestSlotChange(3);
			}
		}

		public void OnHotbar5(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3 && InventoryTweaks.HasEnoughSlots(4))
			{
				RequestSlotChange(4);
			}
		}

		public void OnHotbar6(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3 && InventoryTweaks.HasEnoughSlots(5))
			{
				RequestSlotChange(5);
			}
		}

		public void OnHotbar7(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3 && InventoryTweaks.HasEnoughSlots(6))
			{
				RequestSlotChange(6);
			}
		}

		public void OnHotbar8(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3 && InventoryTweaks.HasEnoughSlots(7))
			{
				RequestSlotChange(7);
			}
		}

		public void OnHotbar9(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3 && InventoryTweaks.HasEnoughSlots(8))
			{
				RequestSlotChange(8);
			}
		}

		public void OnEmote1(CallbackContext context)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			PlayerControllerB obj = owner;
			if (obj != null)
			{
				obj.PerformEmote(context, 1);
			}
		}

		public void OnEmote2(CallbackContext context)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			PlayerControllerB obj = owner;
			if (obj != null)
			{
				obj.PerformEmote(context, 2);
			}
		}

		public void OnFlashlightToggle(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((CallbackContext)(ref context)).phase == 3)
			{
				ToggleFlashlight();
			}
		}

		public void OnWalkieTalkieSpeak(CallbackContext context)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Invalid comparison between Unknown and I4
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Invalid comparison between Unknown and I4
			InputActionPhase phase = ((CallbackContext)(ref context)).phase;
			if ((int)phase != 3)
			{
				if ((int)phase == 4)
				{
					StopUsingWalkieTalkie();
				}
			}
			else
			{
				UseWalkieTalkie();
			}
		}

		public void OnEnable()
		{
			input?.Enable();
		}

		public void OnDisable()
		{
			input?.Disable();
		}

		private void ToggleFlashlight()
		{
			if (!WorldTweaks.Configs.AllowFlashlightKeybind.Value() || MikesTweaks.Compatibility.ReservedSlotsCompat || !PlayerTweaks.CanUseItem(owner))
			{
				return;
			}
			FieldInfo field = typeof(PlayerControllerB).GetField("timeSinceSwitchingSlots", BindingFlags.Instance | BindingFlags.NonPublic);
			if ((float)field.GetValue(owner) < 0.075f)
			{
				return;
			}
			GrabbableObject[] itemSlots = owner.ItemSlots;
			foreach (GrabbableObject obj in itemSlots)
			{
				FlashlightItem val = (FlashlightItem)(object)((obj is FlashlightItem) ? obj : null);
				if (!((Object)(object)val == (Object)null))
				{
					bool isPocketed = ((GrabbableObject)val).isPocketed;
					((GrabbableObject)val).UseItemOnClient(true);
					field.SetValue(owner, 0f);
					if (isPocketed)
					{
						((GrabbableObject)val).PocketItem();
					}
					break;
				}
			}
		}

		private void UseWalkieTalkie()
		{
			if (!WorldTweaks.Configs.AllowWalkieTalkieKeybind.Value() || MikesTweaks.Compatibility.ReservedSlotsCompat || !PlayerTweaks.CanUseItem(owner))
			{
				return;
			}
			FieldInfo field = typeof(PlayerControllerB).GetField("timeSinceSwitchingSlots", BindingFlags.Instance | BindingFlags.NonPublic);
			if ((float)field.GetValue(owner) < 0.075f)
			{
				return;
			}
			GrabbableObject[] itemSlots = owner.ItemSlots;
			foreach (GrabbableObject val in itemSlots)
			{
				WalkieTalkieToStop = (WalkieTalkie)(object)((val is WalkieTalkie) ? val : null);
				if (!((Object)(object)WalkieTalkieToStop == (Object)null))
				{
					((GrabbableObject)WalkieTalkieToStop).UseItemOnClient(true);
					field.SetValue(owner, 0f);
					break;
				}
			}
		}

		private void StopUsingWalkieTalkie()
		{
			WalkieTalkie walkieTalkieToStop = WalkieTalkieToStop;
			if (walkieTalkieToStop != null)
			{
				((GrabbableObject)walkieTalkieToStop).UseItemOnClient(false);
			}
		}

		public void Destroy()
		{
			input?.Dispose();
		}

		public void InitializeKeybinds()
		{
			owner = ((Component)this).gameObject.GetComponent<PlayerControllerB>();
			input = new MikesTweaksPlayerInput();
			input.Hotbar.SetCallbacks(this);
			input.Emotes.SetCallbacks(this);
			input.Actions.SetCallbacks(this);
			input.Enable();
			SetupKeybinds();
		}

		public void SetupKeybinds()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: 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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: 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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: 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_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: 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_015d: 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_0172: 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_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: 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_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: 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)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			BindingSyntax val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar1, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[0].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar2, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[1].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar3, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[2].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar4, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[3].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar5, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[4].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar6, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[5].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar7, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[6].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar8, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[7].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Hotbar.Hotbar9, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.SlotKeybinds[8].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Emotes.Emote1, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.EmoteKeybinds[0].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Emotes.Emote2, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.EmoteKeybinds[1].Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Actions.FlashlightToggle, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.FlashlightKeybind.Value());
			val = InputActionSetupExtensions.ChangeBinding(input.Actions.WalkieTalkieSpeak, 0);
			((BindingSyntax)(ref val)).WithPath(PlayerTweaks.Configs.WalkieTalkieKeybind.Value());
		}

		private void Awake()
		{
			owner = ((Component)this).gameObject.GetComponent<PlayerControllerB>();
			SwitchToSlotMethod = typeof(PlayerControllerB).GetMethod("SwitchToItemSlot", BindingFlags.Instance | BindingFlags.NonPublic);
		}

		private void RequestSlotChange(int slot)
		{
			//IL_003c: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			if (PlayerTweaks.CanSwitchSlot(owner) && WorldTweaks.Configs.AllowHotbarKeybinds.Value())
			{
				SwitchToSlot(slot);
				CustomMessagingManager customMessagingManager = NetworkManager.Singleton.CustomMessagingManager;
				FastBufferWriter val = default(FastBufferWriter);
				((FastBufferWriter)(ref val))..ctor(4, (Allocator)2, -1);
				((FastBufferWriter)(ref val)).WriteValueSafe<int>(ref slot, default(ForPrimitives));
				customMessagingManager.SendNamedMessage(PlayerTweaks.PlayerSwitchSlotRequestChannel, 0uL, val, (NetworkDelivery)2);
				typeof(PlayerControllerB).GetField("timeSinceSwitchingSlots", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(owner, 0f);
			}
		}

		public void SwitchToSlot(int slot)
		{
			ShipBuildModeManager.Instance.CancelBuildMode(true);
			_ = owner.currentItemSlot;
			owner.playerBodyAnimator.SetBool("GrabValidated", false);
			object[] parameters = new object[2] { slot, null };
			SwitchToSlotMethod.Invoke(owner, parameters);
		}
	}
	public class PlayerTweaks
	{
		public static class Configs
		{
			public static ConfigEntrySettings<float> MaxStamina = new ConfigEntrySettings<float>("MaxStamina", 15f, 11f, "This is the maximum amount of time you can run.\nThe higher the number, the longer you can run for.");

			public static ConfigEntrySettings<float> DefaultSprintSpeed = new ConfigEntrySettings<float>("DefaultSprintSpeed", 1.5f, 1f, "This is the floor of your sprint speed.\nEvery frame your sprint speed decreases when you don't run and this is as low as it can go.");

			public static ConfigEntrySettings<float> SprintSpeedIncreasePerFrame = new ConfigEntrySettings<float>("SprintSpeedIncreasePerFrame", 1f, 1f, "The higher this value is, the faster your sprint speed reaches the maximum sprint speed.\nYour sprint speed increments every frame you're running.");

			public static ConfigEntrySettings<float> SprintSpeedDecreasePerFrame = new ConfigEntrySettings<float>("SprintSpeedDecreasePerFrame", 10f, 10f, "The higher this value is, the faster your sprint speed goes to the default sprint speed.\nYour sprint speed decrements every frame you're not running.");

			public static ConfigEntrySettings<float> MaxSprintSpeed = new ConfigEntrySettings<float>("MaxSprintSpeed", 3f, 2.25f, "This is your sprint speed ceiling.\nEvery frame your sprint speed increases and this is how high it can go.");

			public static ConfigEntrySettings<float> StaminaRechargePerFrame = new ConfigEntrySettings<float>("StaminaRechargePerFrame", 5f, 1f, "The bigger number this is the faster your stamina recharges.");

			public static ConfigEntrySettings<float> StaminaWeightWhileWalking = new ConfigEntrySettings<float>("StaminaWeightWhileWalking", 9f, 9f, "The bigger number this is, the slower your stamina recharges while walking.");

			public static ConfigEntrySettings<float> StaminaWeightWhileStandingStill = new ConfigEntrySettings<float>("StaminaWeightWhileStandingStill", 4f, 4f, "The bigger number this is, the slower your stamina recharges while standing still");

			public static ConfigEntrySettings<float> JumpStaminaDrain = new ConfigEntrySettings<float>("JumpStaminaDrain", 0.04f, 0.08f, "The lower this amount is, the less stamina jumping drains.\n");

			public static ConfigEntrySettings<string>[] SlotKeybinds = new ConfigEntrySettings<string>[9]
			{
				new ConfigEntrySettings<string>("Slot1", "<Keyboard>/1", ""),
				new ConfigEntrySettings<string>("Slot2", "<Keyboard>/2", ""),
				new ConfigEntrySettings<string>("Slot3", "<Keyboard>/3", ""),
				new ConfigEntrySettings<string>("Slot4", "<Keyboard>/4", ""),
				new ConfigEntrySettings<string>("Slot5", "<Keyboard>/5", ""),
				new ConfigEntrySettings<string>("Slot6", "<Keyboard>/6", ""),
				new ConfigEntrySettings<string>("Slot7", "<Keyboard>/7", ""),
				new ConfigEntrySettings<string>("Slot8", "<Keyboard>/8", ""),
				new ConfigEntrySettings<string>("Slot9", "<Keyboard>/9", "")
			};

			public static ConfigEntrySettings<string>[] EmoteKeybinds = new ConfigEntrySettings<string>[2]
			{
				new ConfigEntrySettings<string>("Emote1", "<Keyboard>/y", "<Keyboard>/1"),
				new ConfigEntrySettings<string>("Emote2", "<Keyboard>/u", "<Keyboard>/2")
			};

			public static ConfigEntrySettings<string> FlashlightKeybind = new ConfigEntrySettings<string>("Flashlight", "<Keyboard>/f", "");

			public static ConfigEntrySettings<string> WalkieTalkieKeybind = new ConfigEntrySettings<string>("WalkieTalkieKeybind", "<Keyboard>/r", "");

			public static string PlayerTweaksSectionHeader => "PlayerTweaks";

			public static string KeybindsSectionHeader => "Keybinds";
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static Func<FastBufferWriter, FastBufferWriter> <0>__WriteConfigsToWriter;

			public static Func<FastBufferReader, FastBufferReader> <1>__ReadConfigChanges;

			public static HandleNamedMessageDelegate <2>__ReceiveSwitchSlot;

			public static HandleNamedMessageDelegate <3>__ReceiveSwitchSlotRequest;
		}

		public static PlayerControllerB LocalPlayerController => GameNetworkManager.Instance.localPlayerController;

		public static string PlayerSwitchSlotChannel => "PlayerChangeSlot";

		public static string PlayerSwitchSlotRequestChannel => "PlayerChangeSlotRequest";

		public static void RegisterConfigs()
		{
			MikesTweaks.Instance.BindConfig(ref Configs.MaxStamina, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.DefaultSprintSpeed, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.SprintSpeedIncreasePerFrame, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.SprintSpeedDecreasePerFrame, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.MaxSprintSpeed, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.StaminaRechargePerFrame, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.StaminaWeightWhileWalking, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.StaminaWeightWhileStandingStill, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.JumpStaminaDrain, Configs.PlayerTweaksSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.FlashlightKeybind, Configs.KeybindsSectionHeader);
			MikesTweaks.Instance.BindConfig(ref Configs.WalkieTalkieKeybind, Configs.KeybindsSectionHeader);
			for (int i = 0; i < Configs.SlotKeybinds.Length; i++)
			{
				MikesTweaks.Instance.BindConfig(ref Configs.SlotKeybinds[i], Configs.KeybindsSectionHeader);
			}
			for (int j = 0; j < Configs.EmoteKeybinds.Length; j++)
			{
				MikesTweaks.Instance.BindConfig(ref Configs.EmoteKeybinds[j], Configs.KeybindsSectionHeader);
			}
			ConfigsSynchronizer.OnConfigsChangedDelegate = (Action)Delegate.Combine(ConfigsSynchronizer.OnConfigsChangedDelegate, (Action)delegate
			{
				ReapplyConfigs(LocalPlayerController, applyToAllPlayers: true, force: true, updateHud: true);
			});
			ConfigsSynchronizer.Instance.AddConfigGetter(WriteConfigsToWriter);
			ConfigsSynchronizer.Instance.AddConfigSetter(ReadConfigChanges);
			ConfigsSynchronizer.Instance.AddConfigSizeGetter(() => 36);
		}

		public static FastBufferWriter WriteConfigsToWriter(FastBufferWriter writer)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: 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_0072: 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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: 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_0162: 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)
			float num = Configs.DefaultSprintSpeed.Value(WorldTweaks.Configs.UseVanillaSprintSpeedValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.SprintSpeedIncreasePerFrame.Value(WorldTweaks.Configs.UseVanillaSprintSpeedValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.SprintSpeedDecreasePerFrame.Value(WorldTweaks.Configs.UseVanillaSprintSpeedValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.MaxSprintSpeed.Value(WorldTweaks.Configs.UseVanillaSprintSpeedValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.MaxStamina.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.StaminaRechargePerFrame.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.StaminaWeightWhileWalking.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.StaminaWeightWhileStandingStill.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			num = Configs.JumpStaminaDrain.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value());
			((FastBufferWriter)(ref writer)).WriteValueSafe<float>(ref num, default(ForPrimitives));
			return writer;
		}

		public static FastBufferReader ReadConfigChanges(FastBufferReader payload)
		{
			//IL_0006: 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_0028: 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_004a: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: 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_0132: Unknown result type (might be due to invalid IL or missing references)
			float value = default(float);
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.DefaultSprintSpeed.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.SprintSpeedIncreasePerFrame.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.SprintSpeedDecreasePerFrame.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.MaxSprintSpeed.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.MaxStamina.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.StaminaRechargePerFrame.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.StaminaWeightWhileWalking.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.StaminaWeightWhileStandingStill.Entry.Value = value;
			((FastBufferReader)(ref payload)).ReadValue<float>(ref value, default(ForPrimitives));
			Configs.JumpStaminaDrain.Entry.Value = value;
			return payload;
		}

		public static void ReapplyConfigs(PlayerControllerB player, bool applyToAllPlayers = false, bool force = false, bool updateHud = false)
		{
			player.sprintTime = Configs.MaxStamina.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value());
			if (MikesTweaks.Compatibility.ReservedSlotsCompat)
			{
				return;
			}
			if (!applyToAllPlayers)
			{
				InventoryTweaks.ChangeItemSlotsAmount(player, force);
			}
			else
			{
				PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
				for (int i = 0; i < allPlayerScripts.Length; i++)
				{
					InventoryTweaks.ChangeItemSlotsAmount(allPlayerScripts[i], force);
				}
			}
			if (updateHud)
			{
				InventoryTweaks.ChangeItemSlotsAmountUI();
			}
		}

		public static void RegisterSwitchSlotMessage()
		{
			//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_002a: Expected O, but got Unknown
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			CustomMessagingManager customMessagingManager = NetworkManager.Singleton.CustomMessagingManager;
			string playerSwitchSlotChannel = PlayerSwitchSlotChannel;
			object obj = <>O.<2>__ReceiveSwitchSlot;
			if (obj == null)
			{
				HandleNamedMessageDelegate val = ReceiveSwitchSlot;
				<>O.<2>__ReceiveSwitchSlot = val;
				obj = (object)val;
			}
			customMessagingManager.RegisterNamedMessageHandler(playerSwitchSlotChannel, (HandleNamedMessageDelegate)obj);
			CustomMessagingManager customMessagingManager2 = NetworkManager.Singleton.CustomMessagingManager;
			string playerSwitchSlotRequestChannel = PlayerSwitchSlotRequestChannel;
			object obj2 = <>O.<3>__ReceiveSwitchSlotRequest;
			if (obj2 == null)
			{
				HandleNamedMessageDelegate val2 = ReceiveSwitchSlotRequest;
				<>O.<3>__ReceiveSwitchSlotRequest = val2;
				obj2 = (object)val2;
			}
			customMessagingManager2.RegisterNamedMessageHandler(playerSwitchSlotRequestChannel, (HandleNamedMessageDelegate)obj2);
		}

		public static void SwitchSlot_Server(int slot, ulong clientIDOfChagedSlot)
		{
			//IL_0028: 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_003a: 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_004b: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkManager.Singleton.IsServer)
			{
				CustomMessagingManager customMessagingManager = NetworkManager.Singleton.CustomMessagingManager;
				FastBufferWriter val = default(FastBufferWriter);
				((FastBufferWriter)(ref val))..ctor(12, (Allocator)2, -1);
				((FastBufferWriter)(ref val)).WriteValueSafe<int>(ref slot, default(ForPrimitives));
				((FastBufferWriter)(ref val)).WriteValueSafe<ulong>(ref clientIDOfChagedSlot, default(ForPrimitives));
				customMessagingManager.SendNamedMessageToAll(PlayerSwitchSlotChannel, val, (NetworkDelivery)2);
			}
		}

		public static void ReceiveSwitchSlotRequest(ulong senderID, FastBufferReader payload)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkManager.Singleton.IsServer)
			{
				int slot = default(int);
				((FastBufferReader)(ref payload)).ReadValueSafe<int>(ref slot, default(ForPrimitives));
				SwitchSlot_Server(slot, senderID);
			}
		}

		public static void ReceiveSwitchSlot(ulong senderID, FastBufferReader payload)
		{
			//IL_0006: 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_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			int slot = default(int);
			((FastBufferReader)(ref payload)).ReadValueSafe<int>(ref slot, default(ForPrimitives));
			ulong num = default(ulong);
			((FastBufferReader)(ref payload)).ReadValueSafe<ulong>(ref num, default(ForPrimitives));
			PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
			foreach (PlayerControllerB val in allPlayerScripts)
			{
				if (val.playerClientId == num)
				{
					((Component)val).gameObject.GetComponent<PlayerInputRedirection>().SwitchToSlot(slot);
					break;
				}
			}
		}

		public static float StaminaRechargeMovementHinderedWalking(PlayerControllerB player, float num2)
		{
			return Mathf.Clamp(player.sprintMeter - Time.deltaTime / player.sprintTime * num2 * 0.5f, 0f, 1f);
		}

		public static float StaminaRechargeMovementNotHinderedWalking(PlayerControllerB player, float num2)
		{
			return Mathf.Clamp(player.sprintMeter + Time.deltaTime * Configs.StaminaRechargePerFrame.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value()) / (player.sprintTime + Configs.StaminaWeightWhileWalking.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value())) * num2, 0f, 1f);
		}

		public static float StaminaRechargeMovementNotHinderedNotWalking(PlayerControllerB player, float num2)
		{
			return Mathf.Clamp(player.sprintMeter + Time.deltaTime * Configs.StaminaRechargePerFrame.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value()) / (player.sprintTime + Configs.StaminaWeightWhileStandingStill.Value(WorldTweaks.Configs.UseVanillaStaminaValues.Value())) * num2, 0f, 1f);
		}

		public static bool IsLocallyControlled(PlayerControllerB player)
		{
			return (Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController;
		}

		public static bool CanSwitchSlot(PlayerControllerB player)
		{
			Type typeFromHandle = typeof(PlayerControllerB);
			bool flag = (bool)typeFromHandle.GetField("throwingObject", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(player);
			float num = (float)typeFromHandle.GetField("timeSinceSwitchingSlots", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(player);
			if (((!((NetworkBehaviour)player).IsOwner || !player.isPlayerControlled || (((NetworkBehaviour)player).IsServer && !player.isHostPlayerObject)) && !player.isTestingPlayer) || num < 0.3f || player.isGrabbingObjectAnimation || player.inSpecialInteractAnimation || flag || player.isTypingChat || player.twoHanded || player.activatingItem || player.jetpackControls || player.disablingJetpackControls)
			{
				return false;
			}
			return true;
		}

		public static bool CanUseItem(PlayerControllerB player)
		{
			bool flag = true;
			if ((Object)(object)player.currentlyHeldObjectServer != (Object)null)
			{
				flag = player.currentlyHeldObjectServer.itemProperties.usableInSpecialAnimations;
			}
			if (((((NetworkBehaviour)player).IsOwner && player.isPlayerControlled && (!((NetworkBehaviour)player).IsServer || player.isHostPlayerObject)) || player.isTestingPlayer) && !player.quickMenuManager.isMenuOpen && !player.isPlayerDead)
			{
				if (!flag)
				{
					if (!player.isGrabbingObjectAnimation && !player.inTerminalMenu && !player.isTypingChat)
					{
						if (player.inSpecialInteractAnimation)
						{
							return player.inShockingMinigame;
						}
						return true;
					}
					return false;
				}
				return true;
			}
			return false;
		}
	}
}
namespace MikesTweaks.Scripts.Moons
{
	public class MoonTweaks
	{
		public static class Configs
		{
			public static readonly Dictionary<string, int> DefaultMoonCosts = new Dictionary<string, int>
			{
				{ "Experimentation", 0 },
				{ "Assurance", 0 },
				{ "Vow", 0 },
				{ "Offense", 0 },
				{ "March", 0 },
				{ "Rend", 550 },
				{ "Dine", 600 },
				{ "Titan", 700 }
			};

			public static ConfigEntrySettings<string> MoonPrices = new ConfigEntrySettings<string>("MoonPrices", JsonConvert.SerializeObject((object)DefaultMoonCosts), JsonConvert.SerializeObject((object)DefaultMoonCosts), "To change the cost to go to a planet you can change the amount corresponding to the moon you want to modify.\nYou can also modify the cost of moons from different mods here, by just adding another entry anywhere in the dictionary with the planet's name and the cost you want it to be\nThe value is a json string which is why you see \\ everywhere before \".\nTo add another moon, just add , after Titan's value and write it like so \\\"MoonName\\\":Value");

			public static Dictionary<string, int> MoonPricesDeserialized;

			public static string MoonPricesHeader => "MoonPrices";

			public static int MoonPricesSize => FastBufferWriter.GetWriteSize<byte>(ConfigsSynchronizer.ToBytes(JsonConvert.SerializeObject((object)MoonPricesDeserialized)), -1, 0);
		}

		public static void RegisterConfigs()
		{
			MikesTweaks.Instance.BindConfig(ref Configs.MoonPrices, Configs.MoonPricesHeader);
			((BaseUnityPlugin)MikesTweaks.Instance).Config.ConfigReloaded += delegate
			{
				ReadMoonPrices();
				ApplyVanillaMoonCosts(ref Configs.MoonPricesDeserialized, WorldTweaks.Configs.UseVanillaMoonCosts.Value());
			};
			ReadMoonPrices();
			ApplyVanillaMoonCosts(ref Configs.MoonPricesDeserialized, WorldTweaks.Configs.UseVanillaMoonCosts.Value());
			ConfigsSynchronizer.OnConfigsChangedDelegate = (Action)Delegate.Combine(ConfigsSynchronizer.OnConfigsChangedDelegate, (Action)delegate
			{
				ReapplyConfigs(WorldTweaks.TerminalInstance);
			});
			ConfigsSynchronizer.Instance.AddConfigSizeGetter(() => Configs.MoonPricesSize);
			ConfigsSynchronizer.Instance.AddConfigGetter(SendConfigs);
			ConfigsSynchronizer.Instance.AddConfigSetter(OnConfigsReceived);
		}

		public static FastBufferWriter SendConfigs(FastBufferWriter writer)
		{
			//IL_0015: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			byte[] array = ConfigsSynchronizer.ToBytes(JsonConvert.SerializeObject((object)Configs.MoonPricesDeserialized));
			((FastBufferWriter)(ref writer)).WriteValueSafe<byte>(array, default(ForPrimitives));
			return writer;
		}

		public static FastBufferReader OnConfigsReceived(FastBufferReader payload)
		{
			//IL_0006: 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_0027: Unknown result type (might be due to invalid IL or missing references)
			byte[] bytes = default(byte[]);
			((FastBufferReader)(ref payload)).ReadValueSafe<byte>(ref bytes, default(ForPrimitives));
			Configs.MoonPricesDeserialized = JsonConvert.DeserializeObject<Dictionary<string, int>>((string)ConfigsSynchronizer.ToObject(bytes));
			return payload;
		}

		public static void ReapplyConfigs(Terminal terminal)
		{
			if (!Object.op_Implicit((Object)(object)terminal))
			{
				return;
			}
			TerminalKeyword val = Array.Find(terminal.terminalNodes.allKeywords, (TerminalKeyword keyword) => ((Object)keyword).name == "Route");
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			Dictionary<string, int> dictionary = new Dictionary<string, int>(Configs.MoonPricesDeserialized);
			CompatibleNoun[] compatibleNouns = val.compatibleNouns;
			foreach (CompatibleNoun val2 in compatibleNouns)
			{
				foreach (KeyValuePair<string, int> item in dictionary)
				{
					if (!((Object)val2.noun).name.Contains(item.Key))
					{
						continue;
					}
					val2.result.itemCost = item.Value;
					CompatibleNoun[] terminalOptions = val2.result.terminalOptions;
					foreach (CompatibleNoun val3 in terminalOptions)
					{
						if (!((Object)val3.noun).name.ToLower().Contains("deny"))
						{
							val3.result.itemCost = item.Value;
							break;
						}
					}
					dictionary.Remove(item.Key);
					break;
				}
			}
		}

		private static void ApplyVanillaMoonCosts(ref Dictionary<string, int> MoonCosts, bool vanilla)
		{
			if (!vanilla)
			{
				return;
			}
			foreach (KeyValuePair<string, int> defaultMoonCost in Configs.DefaultMoonCosts)
			{
				MoonCosts[defaultMoonCost.Key] = defaultMoonCost.Value;
			}
		}

		private static void ReadMoonPrices()
		{
			Configs.MoonPricesDeserialized = JsonConvert.DeserializeObject<Dictionary<string, int>>(Configs.MoonPrices.Value());
		}
	}
}
namespace MikesTweaks.Scripts.Items
{
	[HarmonyPatch(typeof(GrabbableObject))]
	public class GrabbableObject_Patches
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void ChangeTerminalItemWeights(GrabbableObject __instance)
		{
			if (NetworkManager.Singleton.IsServer || ConfigsSynchronizer.ConfigsReceived)
			{
				InventoryTweaks.ModifyItemWeight(__instance);
			}
		}
	}
	[HarmonyPatch(typeof(Terminal))]
	public class Terminal_Patches
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void Start(Terminal __instance)
		{
			if (NetworkManager.Singleton.IsServer)
			{
				MoonTweaks.ReapplyConfigs(__instance);
			}
		}
	}
}
namespace MikesTweaks.Scripts.Inventory
{
	public class InventoryTweaks
	{
		public static class Configs
		{
			public static ConfigEntrySettings<int> ExtraItemSlotsAmount = new ConfigEntrySettings<int>("ExtraItemSlots", 2, 0, "This increases how many slots you have.\n0 Slots means you have the default 4 from the vanilla game, if you increase this number you get additional slots in addition to the original 4.");

			public static ConfigEntrySettings<int>[] TerminalItemWeights = new ConfigEntrySettings<int>[12]
			{
				new ConfigEntrySettings<int>("WalkieTalkie", 0, 0),
				new ConfigEntrySettings<int>("Flashlight", 0, 0),
				new ConfigEntrySettings<int>("Shovel", 5, 18),
				new ConfigEntrySettings<int>("LockPicker", 2, 15),
				new ConfigEntrySettings<int>("ProFlashlight", 0, 5),
				new ConfigEntrySettings<int>("StunGrenade", 2, 5),
				new ConfigEntrySettings<int>("Boombox", 5, 15),
				new ConfigEntrySettings<int>("TZPInhalant", 0, 0),
				new ConfigEntrySettings<int>("ZapGun", 4, 10),
				new ConfigEntrySettings<int>("Jetpack", 10, 50),
				new ConfigEntrySettings<int>("ExtensionLadder", 0, 0),
				new ConfigEntrySettings<int>("RadarBooster", 5, 18)
			};

			public static string InventoryTweaksSectionHeader => "InventoryTweaks";

			public static string TerminalItemWeightsSectionHeader => "TerminalItemWeights";
		}

		public static void RegisterConfigs()
		{
			MikesTweaks.Instance.BindConfig(ref Configs.ExtraItemSlotsAmount, Configs.InventoryTweaksSectionHeader);
			for (int i = 0; i < Configs.TerminalItemWeights.Length; i++)
			{
				MikesTweaks.Instance.BindConfig(ref Configs.TerminalItemWeights[i], Configs.TerminalItemWeightsSectionHeader);
			}
			ConfigsSynchronizer.OnConfigsChangedDelegate = (Action)Delegate.Combine(ConfigsSynchronizer.OnConfigsChangedDelegate, new Action(ReapplyConfigs));
			ConfigsSynchronizer.Instance.AddConfigGetter(WriteConfigsToWriter);
			ConfigsSynchronizer.Instance.AddConfigSetter(ReadConfigChanges);
			ConfigsSynchronizer.Instance.AddConfigSizeGetter(() => 4 + 4 * Configs.TerminalItemWeights.Length);
		}

		public static FastBufferWriter WriteConfigsToWriter(FastBufferWriter writer)
		{
			//IL_0012: 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_0045: 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)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			int num = Configs.ExtraItemSlotsAmount.Value();
			((FastBufferWriter)(ref writer)).WriteValueSafe<int>(ref num, default(ForPrimitives));
			ConfigEntrySettings<int>[] terminalItemWeights = Configs.TerminalItemWeights;
			foreach (ConfigEntrySettings<int> configEntrySettings in terminalItemWeights)
			{
				int num2 = configEntrySettings.Value(WorldTweaks.Configs.UseVanillaTerminalItemWeights.Value());
				((FastBufferWriter)(ref writer)).WriteValueSafe<int>(ref num2, default(ForPrimitives));
			}
			return writer;
		}

		public static FastBufferReader ReadConfigChanges(FastBufferReader payload)
		{
			//IL_0006: 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_0035: 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_0056: Unknown result type (might be due to invalid IL or missing references)
			int value = default(int);
			((FastBufferReader)(ref payload)).ReadValueSafe<int>(ref value, default(ForPrimitives));
			Configs.ExtraItemSlotsAmount.Entry.Value = value;
			ConfigEntrySettings<int>[] terminalItemWeights = Configs.TerminalItemWeights;
			foreach (ConfigEntrySettings<int> obj in terminalItemWeights)
			{
				((FastBufferReader)(ref payload)).ReadValueSafe<int>(ref value, default(ForPrimitives));
				obj.Entry.Value = value;
			}
			return payload;
		}

		public static bool HasEnoughSlots(int slotID)
		{
			return PlayerTweaks.LocalPlayerController.ItemSlots.Length - (slotID + 1) > -1;
		}

		public static void ChangeItemSlotsAmount(PlayerControllerB __instance, bool force = false)
		{
			if (force || Configs.ExtraItemSlotsAmount.Value() != 0)
			{
				List<GrabbableObject> list = new List<GrabbableObject>(__instance.ItemSlots);
				__instance.ItemSlots = (GrabbableObject[])(object)new GrabbableObject[4 + Configs.ExtraItemSlotsAmount.Value()];
				for (int i = 0; i < list.Count; i++)
				{
					__instance.ItemSlots[i] = list[i];
				}
			}
		}

		public static void ReapplyConfigs()
		{
			GrabbableObject[] array = Object.FindObjectsByType<GrabbableObject>((FindObjectsSortMode)0);
			for (int i = 0; i < array.Length; i++)
			{
				ModifyItemWeight(array[i]);
			}
		}

		public static void ModifyItemWeight(GrabbableObject item)
		{
			if (!((Object)(object)item == (Object)null))
			{
				string itemName = ((Object)item.itemProperties).name;
				int num = Array.FindIndex(Configs.TerminalItemWeights, (ConfigEntrySettings<int> config) => config.ConfigName == itemName);
				if (num != -1)
				{
					item.itemProperties.weight = (float)Configs.TerminalItemWeights[num].Value(WorldTweaks.Configs.UseVanillaTerminalItemWeights.Value()) / 100f + 1f;
				}
			}
		}

		public static void ChangeItemSlotsAmountUI()
		{
			//IL_0188: 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)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: 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)
			if (Configs.ExtraItemSlotsAmount.Value() == 0)
			{
				return;
			}
			GameObject val = GameObject.Find("Systems/UI/Canvas/IngamePlayerHUD/Inventory");
			List<string> list = new List<string> { "Slot0", "Slot1", "Slot2", "Slot3" };
			for (int i = 0; i < val.transform.childCount; i++)
			{
				Transform child = val.transform.GetChild(i);
				if (!list.Contains(((Object)((Component)child).gameObject).name))
				{
					Object.Destroy((Object)(object)((Component)child).gameObject);
				}
			}
			Image[] array = (Image[])(object)new Image[4 + Configs.ExtraItemSlotsAmount.Value()];
			array[0] = HUDManager.Instance.itemSlotIconFrames[0];
			array[1] = HUDManager.Instance.itemSlotIconFrames[1];
			array[2] = HUDManager.Instance.itemSlotIconFrames[2];
			array[3] = HUDManager.Instance.itemSlotIconFrames[3];
			Image[] array2 = (Image[])(object)new Image[4 + Configs.ExtraItemSlotsAmount.Value()];
			array2[0] = HUDManager.Instance.itemSlotIcons[0];
			array2[1] = HUDManager.Instance.itemSlotIcons[1];
			array2[2] = HUDManager.Instance.itemSlotIcons[2];
			array2[3] = HUDManager.Instance.itemSlotIcons[3];
			GameObject val2 = GameObject.Find("Systems/UI/Canvas/IngamePlayerHUD/Inventory/Slot3");
			GameObject val3 = val2;
			for (int j = 0; j < Configs.ExtraItemSlotsAmount.Value(); j++)
			{
				GameObject val4 = Object.Instantiate<GameObject>(val2);
				((Object)val4).name = $"Slot{3 + (j + 1)}";
				val4.transform.parent = val.transform;
				Vector3 localPosition = val3.transform.localPosition;
				val4.transform.SetLocalPositionAndRotation(new Vector3(localPosition.x + 50f, localPosition.y, localPosition.z), val3.transform.localRotation);
				val3 = val4;
				array[3 + (j + 1)] = val4.GetComponent<Image>();
				array2[3 + (j + 1)] = ((Component)val4.transform.GetChild(0)).GetComponent<Image>();
			}
			HUDManager.Instance.itemSlotIconFrames = array;
			HUDManager.Instance.itemSlotIcons = array2;
		}
	}
}
namespace MikesTweaks.Scripts.Input
{
	public class MikesTweaksPlayerInput : IInputActionCollection2, IInputActionCollection, IEnumerable<InputAction>, IEnumerable, IDisposable
	{
		public struct HotbarActions
		{
			private MikesTweaksPlayerInput m_Wrapper;

			public InputAction Hotbar1 => m_Wrapper.m_Hotbar_Hotbar1;

			public InputAction Hotbar2 => m_Wrapper.m_Hotbar_Hotbar2;

			public InputAction Hotbar3 => m_Wrapper.m_Hotbar_Hotbar3;

			public InputAction Hotbar4 => m_Wrapper.m_Hotbar_Hotbar4;

			public InputAction Hotbar5 => m_Wrapper.m_Hotbar_Hotbar5;

			public InputAction Hotbar6 => m_Wrapper.m_Hotbar_Hotbar6;

			public InputAction Hotbar7 => m_Wrapper.m_Hotbar_Hotbar7;

			public InputAction Hotbar8 => m_Wrapper.m_Hotbar_Hotbar8;

			public InputAction Hotbar9 => m_Wrapper.m_Hotbar_Hotbar9;

			public bool enabled => Get().enabled;

			public HotbarActions(MikesTweaksPlayerInput wrapper)
			{
				m_Wrapper = wrapper;
			}

			public InputActionMap Get()
			{
				return m_Wrapper.m_Hotbar;
			}

			public void Enable()
			{
				Get().Enable();
			}

			public void Disable()
			{
				Get().Disable();
			}

			public static implicit operator InputActionMap(HotbarActions set)
			{
				return set.Get();
			}

			public void AddCallbacks(IHotbarActions instance)
			{
				if (instance != null && !m_Wrapper.m_HotbarActionsCallbackInterfaces.Contains(instance))
				{
					m_Wrapper.m_HotbarActionsCallbackInterfaces.Add(instance);
					Hotbar1.started += instance.OnHotbar1;
					Hotbar1.performed += instance.OnHotbar1;
					Hotbar1.canceled += instance.OnHotbar1;
					Hotbar2.started += instance.OnHotbar2;
					Hotbar2.performed += instance.OnHotbar2;
					Hotbar2.canceled += instance.OnHotbar2;
					Hotbar3.started += instance.OnHotbar3;
					Hotbar3.performed += instance.OnHotbar3;
					Hotbar3.canceled += instance.OnHotbar3;
					Hotbar4.started += instance.OnHotbar4;
					Hotbar4.performed += instance.OnHotbar4;
					Hotbar4.canceled += instance.OnHotbar4;
					Hotbar5.started += instance.OnHotbar5;
					Hotbar5.performed += instance.OnHotbar5;
					Hotbar5.canceled += instance.OnHotbar5;
					Hotbar6.started += instance.OnHotbar6;
					Hotbar6.performed += instance.OnHotbar6;
					Hotbar6.canceled += instance.OnHotbar6;
					Hotbar7.started += instance.OnHotbar7;
					Hotbar7.performed += instance.OnHotbar7;
					Hotbar7.canceled += instance.OnHotbar7;
					Hotbar8.started += instance.OnHotbar8;
					Hotbar8.performed += instance.OnHotbar8;
					Hotbar8.canceled += instance.OnHotbar8;
					Hotbar9.started += instance.OnHotbar9;
					Hotbar9.performed += instance.OnHotbar9;
					Hotbar9.canceled += instance.OnHotbar9;
				}
			}

			private void UnregisterCallbacks(IHotbarActions instance)
			{
				Hotbar1.started -= instance.OnHotbar1;
				Hotbar1.performed -= instance.OnHotbar1;
				Hotbar1.canceled -= instance.OnHotbar1;
				Hotbar2.started -= instance.OnHotbar2;
				Hotbar2.performed -= instance.OnHotbar2;
				Hotbar2.canceled -= instance.OnHotbar2;
				Hotbar3.started -= instance.OnHotbar3;
				Hotbar3.performed -= instance.OnHotbar3;
				Hotbar3.canceled -= instance.OnHotbar3;
				Hotbar4.started -= instance.OnHotbar4;
				Hotbar4.performed -= instance.OnHotbar4;
				Hotbar4.canceled -= instance.OnHotbar4;
				Hotbar5.started -= instance.OnHotbar5;
				Hotbar5.performed -= instance.OnHotbar5;
				Hotbar5.canceled -= instance.OnHotbar5;
				Hotbar6.started -= instance.OnHotbar6;
				Hotbar6.performed -= instance.OnHotbar6;
				Hotbar6.canceled -= instance.OnHotbar6;
				Hotbar7.started -= instance.OnHotbar7;
				Hotbar7.performed -= instance.OnHotbar7;
				Hotbar7.canceled -= instance.OnHotbar7;
				Hotbar8.started -= instance.OnHotbar8;
				Hotbar8.performed -= instance.OnHotbar8;
				Hotbar8.canceled -= instance.OnHotbar8;
				Hotbar9.started -= instance.OnHotbar9;
				Hotbar9.performed -= instance.OnHotbar9;
				Hotbar9.canceled -= instance.OnHotbar9;
			}

			public void RemoveCallbacks(IHotbarActions instance)
			{
				if (m_Wrapper.m_HotbarActionsCallbackInterfaces.Remove(instance))
				{
					UnregisterCallbacks(instance);
				}
			}

			public void SetCallbacks(IHotbarActions instance)
			{
				foreach (IHotbarActions hotbarActionsCallbackInterface in m_Wrapper.m_HotbarActionsCallbackInterfaces)
				{
					UnregisterCallbacks(hotbarActionsCallbackInterface);
				}
				m_Wrapper.m_HotbarActionsCallbackInterfaces.Clear();
				AddCallbacks(instance);
			}
		}

		public struct EmotesActions
		{
			private MikesTweaksPlayerInput m_Wrapper;

			public InputAction Emote1 => m_Wrapper.m_Emotes_Emote1;

			public InputAction Emote2 => m_Wrapper.m_Emotes_Emote2;

			public bool enabled => Get().enabled;

			public EmotesActions(MikesTweaksPlayerInput wrapper)
			{
				m_Wrapper = wrapper;
			}

			public InputActionMap Get()
			{
				return m_Wrapper.m_Emotes;
			}

			public void Enable()
			{
				Get().Enable();
			}

			public void Disable()
			{
				Get().Disable();
			}

			public static implicit operator InputActionMap(EmotesActions set)
			{
				return set.Get();
			}

			public void AddCallbacks(IEmotesActions instance)
			{
				if (instance != null && !m_Wrapper.m_EmotesActionsCallbackInterfaces.Contains(instance))
				{
					m_Wrapper.m_EmotesActionsCallbackInterfaces.Add(instance);
					Emote1.started += instance.OnEmote1;
					Emote1.performed += instance.OnEmote1;
					Emote1.canceled += instance.OnEmote1;
					Emote2.started += instance.OnEmote2;
					Emote2.performed += instance.OnEmote2;
					Emote2.canceled += instance.OnEmote2;
				}
			}

			private void UnregisterCallbacks(IEmotesActions instance)
			{
				Emote1.started -= instance.OnEmote1;
				Emote1.performed -= instance.OnEmote1;
				Emote1.canceled -= instance.OnEmote1;
				Emote2.started -= instance.OnEmote2;
				Emote2.performed -= instance.OnEmote2;
				Emote2.canceled -= instance.OnEmote2;
			}

			public void RemoveCallbacks(IEmotesActions instance)
			{
				if (m_Wrapper.m_EmotesActionsCallbackInterfaces.Remove(instance))
				{
					UnregisterCallbacks(instance);
				}
			}

			public void SetCallbacks(IEmotesActions instance)
			{
				foreach (IEmotesActions emotesActionsCallbackInterface in m_Wrapper.m_EmotesActionsCallbackInterfaces)
				{
					UnregisterCallbacks(emotesActionsCallbackInterface);
				}
				m_Wrapper.m_EmotesActionsCallbackInterfaces.Clear();
				AddCallbacks(instance);
			}
		}

		public struct ActionsActions
		{
			private MikesTweaksPlayerInput m_Wrapper;

			public InputAction FlashlightToggle => m_Wrapper.m_Actions_FlashlightToggle;

			public InputAction WalkieTalkieSpeak => m_Wrapper.m_Actions_WalkieTalkieSpeak;

			public bool enabled => Get().enabled;

			public ActionsActions(MikesTweaksPlayerInput wrapper)
			{
				m_Wrapper = wrapper;
			}

			public InputActionMap Get()
			{
				return m_Wrapper.m_Actions;
			}

			public void Enable()
			{
				Get().Enable();
			}

			public void Disable()
			{
				Get().Disable();
			}

			public static implicit operator InputActionMap(ActionsActions set)
			{
				return set.Get();
			}

			public void AddCallbacks(IActionsActions instance)
			{
				if (instance != null && !m_Wrapper.m_ActionsActionsCallbackInterfaces.Contains(instance))
				{
					m_Wrapper.m_ActionsActionsCallbackInterfaces.Add(instance);
					FlashlightToggle.started += instance.OnFlashlightToggle;
					FlashlightToggle.performed += instance.OnFlashlightToggle;
					FlashlightToggle.canceled += instance.OnFlashlightToggle;
					WalkieTalkieSpeak.started += instance.OnWalkieTalkieSpeak;
					WalkieTalkieSpeak.performed += instance.OnWalkieTalkieSpeak;
					WalkieTalkieSpeak.canceled += instance.OnWalkieTalkieSpeak;
				}
			}

			private void UnregisterCallbacks(IActionsActions instance)
			{
				FlashlightToggle.started -= instance.OnFlashlightToggle;
				FlashlightToggle.performed -= instance.OnFlashlightToggle;
				FlashlightToggle.canceled -= instance.OnFlashlightToggle;
				WalkieTalkieSpeak.started -= instance.OnWalkieTalkieSpeak;
				WalkieTalkieSpeak.performed -= instance.OnWalkieTalkieSpeak;
				WalkieTalkieSpeak.canceled -= instance.OnWalkieTalkieSpeak;
			}

			public void RemoveCallbacks(IActionsActions instance)
			{
				if (m_Wrapper.m_ActionsActionsCallbackInterfaces.Remove(instance))
				{
					UnregisterCallbacks(instance);
				}
			}

			public void SetCallbacks(IActionsActions instance)
			{
				foreach (IActionsActions actionsActionsCallbackInterface in m_Wrapper.m_ActionsActionsCallbackInterfaces)
				{
					UnregisterCallbacks(actionsActionsCallbackInterface);
				}
				m_Wrapper.m_ActionsActionsCallbackInterfaces.Clear();
				AddCallbacks(instance);
			}
		}

		public interface IHotbarActions
		{
			void OnHotbar1(CallbackContext context);

			void OnHotbar2(CallbackContext context);

			void OnHotbar3(CallbackContext context);

			void OnHotbar4(CallbackContext context);

			void OnHotbar5(CallbackContext context);

			void OnHotbar6(CallbackContext context);

			void OnHotbar7(CallbackContext context);

			void OnHotbar8(CallbackContext context);

			void OnHotbar9(CallbackContext context);
		}

		public interface IEmotesActions
		{
			void OnEmote1(CallbackContext context);

			void OnEmote2(CallbackContext context);
		}

		public interface IActionsActions
		{
			void OnFlashlightToggle(CallbackContext context);

			void OnWalkieTalkieSpeak(CallbackContext context);
		}

		private readonly InputActionMap m_Hotbar;

		private List<IHotbarActions> m_HotbarActionsCallbackInterfaces = new List<IHotbarActions>();

		private readonly InputAction m_Hotbar_Hotbar1;

		private readonly InputAction m_Hotbar_Hotbar2;

		private readonly InputAction m_Hotbar_Hotbar3;

		private readonly InputAction m_Hotbar_Hotbar4;

		private readonly InputAction m_Hotbar_Hotbar5;

		private readonly InputAction m_Hotbar_Hotbar6;

		private readonly InputAction m_Hotbar_Hotbar7;

		private readonly InputAction m_Hotbar_Hotbar8;

		private readonly InputAction m_Hotbar_Hotbar9;

		private readonly InputActionMap m_Emotes;

		private List<IEmotesActions> m_EmotesActionsCallbackInterfaces = new List<IEmotesActions>();

		private readonly InputAction m_Emotes_Emote1;

		private readonly InputAction m_Emotes_Emote2;

		private readonly InputActionMap m_Actions;

		private List<IActionsActions> m_ActionsActionsCallbackInterfaces = new List<IActionsActions>();

		private readonly InputAction m_Actions_FlashlightToggle;

		private readonly InputAction m_Actions_WalkieTalkieSpeak;

		public InputActionAsset asset { get; }

		public InputBinding? bindingMask
		{
			get
			{
				return asset.bindingMask;
			}
			set
			{
				asset.bindingMask = value;
			}
		}

		public ReadOnlyArray<InputDevice>? devices
		{
			get
			{
				return asset.devices;
			}
			set
			{
				asset.devices = value;
			}
		}

		public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;

		public IEnumerable<InputBinding> bindings => asset.bindings;

		public HotbarActions Hotbar => new HotbarActions(this);

		public EmotesActions Emotes => new EmotesActions(this);

		public ActionsActions Actions => new ActionsActions(this);

		public MikesTweaksPlayerInput()
		{
			asset = InputActionAsset.FromJson("{\r\n    \"name\": \"MikesTweaksPlayerInput\",\r\n    \"maps\": [\r\n        {\r\n            \"name\": \"Hotbar\",\r\n            \"id\": \"acedaef2-b06f-4287-a2ed-00f0260b63da\",\r\n            \"actions\": [\r\n                {\r\n                    \"name\": \"Hotbar1\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"afdaf0de-d9cb-4835-93df-06ff8a407e18\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar2\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"1cf91964-9e69-4db5-90ae-65b813acbceb\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar3\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"9787ab53-1dcb-439c-91cb-683e0e6e0fc2\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar4\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"a63eb6ea-bced-4246-a625-439815fb3c86\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar5\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"8810962b-a9c4-4244-9202-05886a4dd217\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar6\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"4e4ccd85-b20d-422d-836a-6c30d64e8ada\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar7\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"cc6d7e8c-4c89-4a7f-8f69-07d40af41569\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar8\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"71e7f8d9-ddd6-45de-acdb-0e427b5cf883\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Hotbar9\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"9f3aee6a-4474-4e45-895f-4384d31e2651\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                }\r\n            ],\r\n            \"bindings\": [\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"75fed245-d23a-4c28-842f-5f5c2e244087\",\r\n                    \"path\": \"<Keyboard>/1\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar1\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"e3020d01-d049-4c17-98a4-c8e7b52e6f7e\",\r\n                    \"path\": \"<Keyboard>/2\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar2\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"fd0c3e9e-f967-4970-91eb-611774d404f3\",\r\n                    \"path\": \"<Keyboard>/3\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar3\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"201a61fa-e2d7-4c32-a293-89f48ce8b772\",\r\n                    \"path\": \"<Keyboard>/4\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar4\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"0b0ce1b1-d25e-4e30-97d3-24b67a08b018\",\r\n                    \"path\": \"<Keyboard>/5\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar5\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"91c0c96d-9e51-424c-a6ae-150e99cacde5\",\r\n                    \"path\": \"<Keyboard>/6\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar6\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"de949a83-e142-4d7e-96b4-885ec2abdd76\",\r\n                    \"path\": \"<Keyboard>/7\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar7\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"b40a6f2b-d2a4-4db7-8eb1-9d585882ff0e\",\r\n                    \"path\": \"<Keyboard>/8\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar8\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"7089d993-a703-4246-aef3-2bfa18bf49f1\",\r\n                    \"path\": \"<Keyboard>/9\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Hotbar9\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"name\": \"Emotes\",\r\n            \"id\": \"be4a715c-dafa-4ad6-a448-e3b0e60b12bc\",\r\n            \"actions\": [\r\n                {\r\n                    \"name\": \"Emote1\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"e84b4354-1c58-4917-9862-f895484d9d3c\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"Emote2\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"7b86f2b9-734b-40f9-a267-19a31d181491\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                }\r\n            ],\r\n            \"bindings\": [\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"e15911b8-3ebe-4adf-ae17-97bf2e9237ef\",\r\n                    \"path\": \"<Keyboard>/y\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Emote1\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"1a95399b-a1a2-444a-a5b3-0d6eb659f42c\",\r\n                    \"path\": \"<Keyboard>/u\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"Emote2\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"name\": \"Actions\",\r\n            \"id\": \"de0d727c-37c1-46d1-9b7a-adb3c2675175\",\r\n            \"actions\": [\r\n                {\r\n                    \"name\": \"FlashlightToggle\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"befb9e25-c679-450d-845b-6eb67b0f461d\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                },\r\n                {\r\n                    \"name\": \"WalkieTalkieSpeak\",\r\n                    \"type\": \"Button\",\r\n                    \"id\": \"a05eae20-5055-46a9-9f00-cfc154ae6d6c\",\r\n                    \"expectedControlType\": \"Button\",\r\n                    \"processors\": \"\",\r\n                    \"interactions\": \"\",\r\n                    \"initialStateCheck\": false\r\n                }\r\n            ],\r\n            \"bindings\": [\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"c65903ea-659d-479e-a117-62e4ce7954ed\",\r\n                    \"path\": \"<Keyboard>/f\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"FlashlightToggle\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                },\r\n                {\r\n                    \"name\": \"\",\r\n                    \"id\": \"2b96c07a-e84a-45e2-a17a-d4a9b8aa14a7\",\r\n                    \"path\": \"<Keyboard>/r\",\r\n                    \"interactions\": \"\",\r\n                    \"processors\": \"\",\r\n                    \"groups\": \"\",\r\n                    \"action\": \"WalkieTalkieSpeak\",\r\n                    \"isComposite\": false,\r\n                    \"isPartOfComposite\": false\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"controlSchemes\": []\r\n}");
			m_Hotbar = asset.FindActionMap("Hotbar", true);
			m_Hotbar_Hotbar1 = m_Hotbar.FindAction("Hotbar1", true);
			m_Hotbar_Hotbar2 = m_Hotbar.FindAction("Hotbar2", true);
			m_Hotbar_Hotbar3 = m_Hotbar.FindAction("Hotbar3", true);
			m_Hotbar_Hotbar4 = m_Hotbar.FindAction("Hotbar4", true);
			m_Hotbar_Hotbar5 = m_Hotbar.FindAction("Hotbar5", true);
			m_Hotbar_Hotbar6 = m_Hotbar.FindAction("Hotbar6", true);
			m_Hotbar_Hotbar7 = m_Hotbar.FindAction("Hotbar7", true);
			m_Hotbar_Hotbar8 = m_Hotbar.FindAction("Hotbar8", true);
			m_Hotbar_Hotbar9 = m_Hotbar.FindAction("Hotbar9", true);
			m_Emotes = asset.FindActionMap("Emotes", true);
			m_Emotes_Emote1 = m_Emotes.FindAction("Emote1", true);
			m_Emotes_Emote2 = m_Emotes.FindAction("Emote2", true);
			m_Actions = asset.FindActionMap("Actions", true);
			m_Actions_FlashlightToggle = m_Actions.FindAction("FlashlightToggle", true);
			m_Actions_WalkieTalkieSpeak = m_Actions.FindAction("WalkieTalkieSpeak", true);
		}

		public void Dispose()
		{
			Object.Destroy((Object)(object)asset);
		}

		public bool Contains(InputAction action)
		{
			return asset.Contains(action);
		}

		public IEnumerator<InputAction> GetEnumerator()
		{
			return asset.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		public void Enable()
		{
			asset.Enable();
		}

		public void Disable()
		{
			asset.Disable();
		}

		public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
		{
			return asset.FindAction(actionNameOrId, throwIfNotFound);
		}

		public int FindBinding(InputBinding bindingMask, out InputAction action)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return asset.FindBinding(bindingMask, ref action);
		}
	}
}
namespace MikesTweaks.Scripts.Environment
{
	[HarmonyPatch(typeof(EntranceTeleport))]
	public class EntranceTelepo

plugins/MMHOOK/MMHOOK_AmazingAssets.TerrainToMesh.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Text;
using AmazingAssets.TerrainToMesh;
using MonoMod.Cil;
using MonoMod.RuntimeDetour.HookGen;
using On;
using On.AmazingAssets.TerrainToMesh;
using UnityEngine;
using UnityEngine.Rendering;

[assembly: AssemblyVersion("0.0.0.0")]
namespace On
{
	public static class \u200f\u202b\u202b\u202c\u206d\u206e\u206e\u202b\u200d\u202b\u202d\u200e\u206f\u200b\u206a\u202d\u206e\u206d\u200b\u202b\u200d\u206f\u202e\u202b\u200c\u206c\u200b\u202c\u206e\u202d\u206e\u202d\u202a\u200e\u206c\u202d\u206c\u200b\u202c\u200f\u202e
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate object orig_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e(TerrainData P_0, bool P_1, bool P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate object hook_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e(orig_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e orig, TerrainData P_1, bool P_2, bool P_3);

		public static event hook_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e \u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e
		{
			add
			{
				HookEndpointManager.Add<hook_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class \u200f\u202b\u202b\u202c\u206d\u206e\u206e\u202b\u200d\u202b\u202d\u200e\u206f\u200b\u206a\u202d\u206e\u206d\u200b\u202b\u200d\u206f\u202e\u202b\u200c\u206c\u200b\u202c\u206e\u202d\u206e\u202d\u202a\u200e\u206c\u202d\u206c\u200b\u202c\u200f\u202e
	{
		public static event Manipulator \u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e
		{
			add
			{
				HookEndpointManager.Modify<On.\u200f\u202b\u202b\u202c\u206d\u206e\u206e\u202b\u200d\u202b\u202d\u200e\u206f\u200b\u206a\u202d\u206e\u206d\u200b\u202b\u200d\u206f\u202e\u202b\u200c\u206c\u200b\u202c\u206e\u202d\u206e\u202d\u202a\u200e\u206c\u202d\u206c\u200b\u202c\u200f\u202e.hook_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.\u200f\u202b\u202b\u202c\u206d\u206e\u206e\u202b\u200d\u202b\u202d\u200e\u206f\u200b\u206a\u202d\u206e\u206d\u200b\u202b\u200d\u206f\u202e\u202b\u200c\u206c\u200b\u202c\u206e\u202d\u206e\u202d\u202a\u200e\u206c\u202d\u206c\u200b\u202c\u200f\u202e.hook_\u206f\u202b\u200f\u206e\u206e\u202c\u202c\u206d\u206b\u206d\u206c\u206f\u202d\u200d\u206b\u200d\u202a\u206c\u200c\u206c\u206b\u200c\u200f\u202a\u202b\u200f\u202c\u206d\u200b\u202e\u202d\u206b\u206a\u200b\u200f\u206a\u200e\u200e\u200e\u202e>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On
{
	public static class \u200f\u202c\u202d\u202a\u206a\u200b\u200b\u202c\u200e\u200c\u200f\u206f\u200d\u200c\u206c\u206e\u200e\u206f\u206b\u206b\u202c\u200f\u206b\u200f\u200c\u206f\u200d\u202d\u206e\u206c\u202c\u200f\u202b\u202a\u200c\u202a\u202a\u206c\u200d\u206f\u202e
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(object self, TerrainData P_1, bool P_2, bool P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, object self, TerrainData P_2, bool P_3, bool P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202a\u200c\u206b\u206f\u202d\u200d\u200b\u200d\u206e\u202a\u202c\u206e\u200c\u200e\u206a\u202e\u202c\u200e\u206d\u200c\u200e\u200c\u202d\u200f\u206b\u202b\u206b\u206c\u206b\u206f\u202c\u202a\u200b\u202a\u200b\u206e\u202a\u202b\u206e\u206b\u202e(Texture P_0, RenderTexture P_1, bool P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202a\u200c\u206b\u206f\u202d\u200d\u200b\u200d\u206e\u202a\u202c\u206e\u200c\u200e\u206a\u202e\u202c\u200e\u206d\u200c\u200e\u200c\u202d\u200f\u206b\u202b\u206b\u206c\u206b\u206f\u202c\u202a\u200b\u202a\u200b\u206e\u202a\u202b\u206e\u206b\u202e(orig_\u202a\u200c\u206b\u206f\u202d\u200d\u200b\u200d\u206e\u202a\u202c\u206e\u200c\u200e\u206a\u202e\u202c\u200e\u206d\u200c\u200e\u200c\u202d\u200f\u206b\u202b\u206b\u206c\u206b\u206f\u202c\u202a\u200b\u202a\u200b\u206e\u202a\u202b\u206e\u206b\u202e orig, Texture P_1, RenderTexture P_2, bool P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u200c\u200b\u200b\u200e\u200b\u206d\u202e\u202c\u200b\u200e\u206b\u202b\u200e\u202e\u200b\u200f\u200f\u202e\u206f\u200e\u200c\u200f\u202c\u200f\u206a\u206a\u200c\u206d\u206b\u206d\u206c\u200f\u202a\u202a\u200c\u206d\u206e\u200f\u202b\u202a\u202e(Texture P_0, RenderTexture P_1, Material P_2, bool P_3, int P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u200c\u200b\u200b\u200e\u200b\u206d\u202e\u202c\u200b\u200e\u206b\u202b\u200e\u202e\u200b\u200f\u200f\u202e\u206f\u200e\u200c\u200f\u202c\u200f\u206a\u206a\u200c\u206d\u206b\u206d\u206c\u200f\u202a\u202a\u200c\u206d\u206e\u200f\u202b\u202a\u202e(orig_\u200c\u200b\u200b\u200e\u200b\u206d\u202e\u202c\u200b\u200e\u206b\u202b\u200e\u202e\u200b\u200f\u200f\u202e\u206f\u200e\u200c\u200f\u202c\u200f\u206a\u206a\u200c\u206d\u206b\u206d\u206c\u200f\u202a\u202a\u200c\u206d\u206e\u200f\u202b\u202a\u202e orig, Texture P_1, RenderTexture P_2, Material P_3, bool P_4, int P_5);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D orig_\u206a\u202b\u202b\u200b\u200d\u200e\u202e\u206e\u206b\u206e\u202d\u200d\u202c\u206c\u202b\u200b\u200c\u202b\u202c\u202a\u206f\u206c\u206d\u200e\u206b\u202b\u200f\u200d\u200d\u206c\u206e\u206c\u200d\u206e\u206d\u206f\u206f\u200d\u206c\u202e(Color P_0, TextureFormat P_1, bool P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D hook_\u206a\u202b\u202b\u200b\u200d\u200e\u202e\u206e\u206b\u206e\u202d\u200d\u202c\u206c\u202b\u200b\u200c\u202b\u202c\u202a\u206f\u206c\u206d\u200e\u206b\u202b\u200f\u200d\u200d\u206c\u206e\u206c\u200d\u206e\u206d\u206f\u206f\u200d\u206c\u202e(orig_\u206a\u202b\u202b\u200b\u200d\u200e\u202e\u206e\u206b\u206e\u202d\u200d\u202c\u206c\u202b\u200b\u200c\u202b\u202c\u202a\u206f\u206c\u206d\u200e\u206b\u202b\u200f\u200d\u200d\u206c\u206e\u206c\u200d\u206e\u206d\u206f\u206f\u200d\u206c\u202e orig, Color P_1, TextureFormat P_2, bool P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D orig_\u206f\u206f\u206b\u200e\u202c\u206b\u202c\u200c\u200f\u200c\u202e\u206e\u200c\u202c\u206c\u202c\u202b\u206b\u200f\u202c\u202b\u206a\u200f\u206c\u206f\u200c\u200b\u202e\u206d\u202a\u206a\u206c\u206f\u206b\u206a\u206c\u206d\u202b\u206a\u202b\u202e(int P_0, int P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D hook_\u206f\u206f\u206b\u200e\u202c\u206b\u202c\u200c\u200f\u200c\u202e\u206e\u200c\u202c\u206c\u202c\u202b\u206b\u200f\u202c\u202b\u206a\u200f\u206c\u206f\u200c\u200b\u202e\u206d\u202a\u206a\u206c\u206f\u206b\u206a\u206c\u206d\u202b\u206a\u202b\u202e(orig_\u206f\u206f\u206b\u200e\u202c\u206b\u202c\u200c\u200f\u200c\u202e\u206e\u200c\u202c\u206c\u202c\u202b\u206b\u200f\u202c\u202b\u206a\u200f\u206c\u206f\u200c\u200b\u202e\u206d\u202a\u206a\u206c\u206f\u206b\u206a\u206c\u206d\u202b\u206a\u202b\u202e orig, int P_1, int P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u200c\u206a\u206e\u206f\u200f\u206f\u202a\u200e\u206c\u202e\u202a\u200f\u206e\u202b\u206f\u200e\u200d\u200b\u202c\u202b\u202c\u206b\u200c\u202c\u200d\u202d\u200d\u200e\u202b\u206f\u200f\u206e\u200f\u200b\u206e\u200b\u202b\u202b\u202a\u206d\u202e(RenderTexture P_0, TextureFormat P_1, ref Texture2D P_2, bool P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u200c\u206a\u206e\u206f\u200f\u206f\u202a\u200e\u206c\u202e\u202a\u200f\u206e\u202b\u206f\u200e\u200d\u200b\u202c\u202b\u202c\u206b\u200c\u202c\u200d\u202d\u200d\u200e\u202b\u206f\u200f\u206e\u200f\u200b\u206e\u200b\u202b\u202b\u202a\u206d\u202e(orig_\u200c\u206a\u206e\u206f\u200f\u206f\u202a\u200e\u206c\u202e\u202a\u200f\u206e\u202b\u206f\u200e\u200d\u200b\u202c\u202b\u202c\u206b\u200c\u202c\u200d\u202d\u200d\u200e\u202b\u206f\u200f\u206e\u200f\u200b\u206e\u200b\u202b\u202b\u202a\u206d\u202e orig, RenderTexture P_1, TextureFormat P_2, ref Texture2D P_3, bool P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D orig_\u202d\u200d\u202e\u200b\u202e\u200e\u206b\u206d\u200b\u200f\u206e\u200d\u200e\u200f\u202e\u202a\u202d\u202c\u200e\u200b\u206a\u206e\u202b\u206c\u206f\u206c\u206c\u202c\u202d\u202d\u202c\u200d\u200b\u200e\u200b\u200c\u202d\u200c\u200c\u206c\u202e(Texture2D P_0, bool P_1, int P_2, int P_3, int P_4, int P_5);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D hook_\u202d\u200d\u202e\u200b\u202e\u200e\u206b\u206d\u200b\u200f\u206e\u200d\u200e\u200f\u202e\u202a\u202d\u202c\u200e\u200b\u206a\u206e\u202b\u206c\u206f\u206c\u206c\u202c\u202d\u202d\u202c\u200d\u200b\u200e\u200b\u200c\u202d\u200c\u200c\u206c\u202e(orig_\u202d\u200d\u202e\u200b\u202e\u200e\u206b\u206d\u200b\u200f\u206e\u200d\u200e\u200f\u202e\u202a\u202d\u202c\u200e\u200b\u206a\u206e\u202b\u206c\u206f\u206c\u206c\u202c\u202d\u202d\u202c\u200d\u200b\u200e\u200b\u200c\u202d\u200c\u200c\u206c\u202e orig, Texture2D P_1, bool P_2, int P_3, int P_4, int P_5, int P_6);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D[] orig_\u206f\u202e\u202b\u202b\u200e\u202b\u206e\u202e\u202d\u200e\u206c\u202c\u206c\u206f\u200b\u200b\u200d\u206a\u206f\u206b\u202e\u206e\u202a\u202b\u206b\u206e\u206c\u206f\u202c\u200d\u202d\u202c\u202d\u206b\u200c\u202a\u200e\u206b\u200e\u206e\u202e(Texture2D[] P_0, bool P_1, int P_2, int P_3, int P_4, int P_5);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D[] hook_\u206f\u202e\u202b\u202b\u200e\u202b\u206e\u202e\u202d\u200e\u206c\u202c\u206c\u206f\u200b\u200b\u200d\u206a\u206f\u206b\u202e\u206e\u202a\u202b\u206b\u206e\u206c\u206f\u202c\u200d\u202d\u202c\u202d\u206b\u200c\u202a\u200e\u206b\u200e\u206e\u202e(orig_\u206f\u202e\u202b\u202b\u200e\u202b\u206e\u202e\u202d\u200e\u206c\u202c\u206c\u206f\u200b\u200b\u200d\u206a\u206f\u206b\u202e\u206e\u202a\u202b\u206b\u206e\u206c\u206f\u202c\u200d\u202d\u202c\u202d\u206b\u200c\u202a\u200e\u206b\u200e\u206e\u202e orig, Texture2D[] P_1, bool P_2, int P_3, int P_4, int P_5, int P_6);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D[] orig_\u206f\u206a\u206d\u202c\u202c\u206f\u206f\u200f\u206b\u202a\u206a\u200c\u202a\u202d\u206c\u206d\u206d\u200e\u206d\u200b\u200e\u200b\u202a\u200c\u202d\u200f\u202b\u200e\u206b\u202d\u200d\u202b\u200f\u200b\u200f\u206e\u206f\u206c\u206b\u206d\u202e(Texture2D P_0, bool P_1, int P_2, int P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D[] hook_\u206f\u206a\u206d\u202c\u202c\u206f\u206f\u200f\u206b\u202a\u206a\u200c\u202a\u202d\u206c\u206d\u206d\u200e\u206d\u200b\u200e\u200b\u202a\u200c\u202d\u200f\u202b\u200e\u206b\u202d\u200d\u202b\u200f\u200b\u200f\u206e\u206f\u206c\u206b\u206d\u202e(orig_\u206f\u206a\u206d\u202c\u202c\u206f\u206f\u200f\u206b\u202a\u206a\u200c\u202a\u202d\u206c\u206d\u206d\u200e\u206d\u200b\u200e\u200b\u202a\u200c\u202d\u200f\u202b\u200e\u206b\u202d\u200d\u202b\u200f\u200b\u200f\u206e\u206f\u206c\u206b\u206d\u202e orig, Texture2D P_1, bool P_2, int P_3, int P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D[] orig_\u206a\u206a\u202b\u202b\u200d\u200b\u206f\u200d\u200c\u206a\u206b\u200f\u206c\u202a\u206b\u202a\u200d\u206d\u200f\u206e\u202a\u200e\u206a\u206d\u206b\u200c\u202a\u206c\u206d\u200e\u200f\u206a\u202d\u200d\u202e\u200c\u206d\u202b\u200b\u206d\u202e(Texture2D[] P_0, bool P_1, int P_2, int P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D[] hook_\u206a\u206a\u202b\u202b\u200d\u200b\u206f\u200d\u200c\u206a\u206b\u200f\u206c\u202a\u206b\u202a\u200d\u206d\u200f\u206e\u202a\u200e\u206a\u206d\u206b\u200c\u202a\u206c\u206d\u200e\u200f\u206a\u202d\u200d\u202e\u200c\u206d\u202b\u200b\u206d\u202e(orig_\u206a\u206a\u202b\u202b\u200d\u200b\u206f\u200d\u200c\u206a\u206b\u200f\u206c\u202a\u206b\u202a\u200d\u206d\u200f\u206e\u202a\u200e\u206a\u206d\u206b\u200c\u202a\u206c\u206d\u200e\u200f\u206a\u202d\u200d\u202e\u200c\u206d\u202b\u200b\u206d\u202e orig, Texture2D[] P_1, bool P_2, int P_3, int P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D orig_\u206c\u202c\u206e\u200d\u206e\u200c\u202e\u200f\u200e\u200f\u202b\u200c\u200d\u206f\u202b\u206d\u206d\u206c\u200f\u206f\u202e\u200b\u206b\u200f\u202a\u200e\u202c\u202d\u202b\u206d\u206d\u200b\u202e\u202e\u202d\u202a\u206f\u202a\u202e\u200e\u202e(Texture2D P_0, bool P_1, int P_2, int P_3, int P_4, int P_5);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D hook_\u206c\u202c\u206e\u200d\u206e\u200c\u202e\u200f\u200e\u200f\u202b\u200c\u200d\u206f\u202b\u206d\u206d\u206c\u200f\u206f\u202e\u200b\u206b\u200f\u202a\u200e\u202c\u202d\u202b\u206d\u206d\u200b\u202e\u202e\u202d\u202a\u206f\u202a\u202e\u200e\u202e(orig_\u206c\u202c\u206e\u200d\u206e\u200c\u202e\u200f\u200e\u200f\u202b\u200c\u200d\u206f\u202b\u206d\u206d\u206c\u200f\u206f\u202e\u200b\u206b\u200f\u202a\u200e\u202c\u202d\u202b\u206d\u206d\u200b\u202e\u202e\u202d\u202a\u206f\u202a\u202e\u200e\u202e orig, Texture2D P_1, bool P_2, int P_3, int P_4, int P_5, int P_6);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u206f\u206b\u206c\u200b\u200b\u200e\u200f\u200c\u206a\u200d\u200d\u206e\u206b\u202c\u202d\u206a\u200c\u202e\u200d\u202d\u200b\u202b\u200c\u206a\u200d\u200c\u206f\u206e\u206e\u200d\u206e\u206b\u206f\u206a\u202a\u206e\u206c\u206c\u200f\u200c\u202e(TerrainData P_0, int P_1, out int P_2, out int P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u206f\u206b\u206c\u200b\u200b\u200e\u200f\u200c\u206a\u200d\u200d\u206e\u206b\u202c\u202d\u206a\u200c\u202e\u200d\u202d\u200b\u202b\u200c\u206a\u200d\u200c\u206f\u206e\u206e\u200d\u206e\u206b\u206f\u206a\u202a\u206e\u206c\u206c\u200f\u200c\u202e(orig_\u206f\u206b\u206c\u200b\u200b\u200e\u200f\u200c\u206a\u200d\u200d\u206e\u206b\u202c\u202d\u206a\u200c\u202e\u200d\u202d\u200b\u202b\u200c\u206a\u200d\u200c\u206f\u206e\u206e\u200d\u206e\u206b\u206f\u206a\u202a\u206e\u206c\u206c\u200f\u200c\u202e orig, TerrainData P_1, int P_2, out int P_3, out int P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_\u206a\u200e\u206a\u202a\u200d\u206f\u202b\u206d\u200f\u202b\u206c\u200b\u200e\u202d\u206e\u206e\u206a\u206e\u200d\u202a\u206e\u206b\u200f\u206c\u200b\u200e\u200d\u200b\u202d\u202d\u200c\u206e\u200d\u200e\u206d\u200d\u202e\u202d\u200f\u206b\u202e(int P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_\u206a\u200e\u206a\u202a\u200d\u206f\u202b\u206d\u200f\u202b\u206c\u200b\u200e\u202d\u206e\u206e\u206a\u206e\u200d\u202a\u206e\u206b\u200f\u206c\u200b\u200e\u200d\u200b\u202d\u202d\u200c\u206e\u200d\u200e\u206d\u200d\u202e\u202d\u200f\u206b\u202e(orig_\u206a\u200e\u206a\u202a\u200d\u206f\u202b\u206d\u200f\u202b\u206c\u200b\u200e\u202d\u206e\u206e\u206a\u206e\u200d\u202a\u206e\u206b\u200f\u206c\u200b\u200e\u200d\u200b\u202d\u202d\u200c\u206e\u200d\u200e\u206d\u200d\u202e\u202d\u200f\u206b\u202e orig, int P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_cctor();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_cctor(orig_cctor orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ColorSpace orig_\u206e\u202a\u200f\u206c\u206a\u206c\u200d\u200e\u206b\u200b\u200d\u206c\u202c\u202a\u202c\u200d\u202b\u206b\u200e\u206f\u206b\u200b\u200e\u202b\u206e\u200c\u200d\u206e\u202e\u200e\u202c\u200d\u206d\u200c\u200c\u202c\u200e\u202d\u202c\u206c\u202e();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ColorSpace hook_\u206e\u202a\u200f\u206c\u206a\u206c\u200d\u200e\u206b\u200b\u200d\u206c\u202c\u202a\u202c\u200d\u202b\u206b\u200e\u206f\u206b\u200b\u200e\u202b\u206e\u200c\u200d\u206e\u202e\u200e\u202c\u200d\u206d\u200c\u200c\u202c\u200e\u202d\u202c\u206c\u202e(orig_\u206e\u202a\u200f\u206c\u206a\u206c\u200d\u200e\u206b\u200b\u200d\u206c\u202c\u202a\u202c\u200d\u202b\u206b\u200e\u206f\u206b\u200b\u200e\u202b\u206e\u200c\u200d\u206e\u202e\u200e\u202c\u200d\u206d\u200c\u200c\u202c\u200e\u202d\u202c\u206c\u202e orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u206c\u202d\u206f\u206f\u200d\u202c\u206a\u202b\u202c\u206e\u206b\u206d\u200f\u206b\u202d\u206b\u202e\u202b\u200b\u200f\u206c\u206c\u200f\u202e\u202c\u200c\u206c\u202c\u200b\u206a\u200b\u200e\u202b\u206f\u200d\u200b\u200e\u202c\u206c\u202b\u202e(bool P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u206c\u202d\u206f\u206f\u200d\u202c\u206a\u202b\u202c\u206e\u206b\u206d\u200f\u206b\u202d\u206b\u202e\u202b\u200b\u200f\u206c\u206c\u200f\u202e\u202c\u200c\u206c\u202c\u200b\u206a\u200b\u200e\u202b\u206f\u200d\u200b\u200e\u202c\u206c\u202b\u202e(orig_\u206c\u202d\u206f\u206f\u200d\u202c\u206a\u202b\u202c\u206e\u206b\u206d\u200f\u206b\u202d\u206b\u202e\u202b\u200b\u200f\u206c\u206c\u200f\u202e\u202c\u200c\u206c\u202c\u200b\u206a\u200b\u200e\u202b\u206f\u200d\u200b\u200e\u202c\u206c\u202b\u202e orig, bool P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_\u206c\u200b\u206c\u200b\u202d\u206a\u200e\u200b\u200f\u206e\u202b\u200e\u202a\u202a\u206c\u202c\u206f\u206b\u206c\u206a\u206c\u202a\u206a\u200b\u200b\u202e\u202c\u206e\u206d\u202c\u200c\u202a\u206a\u202d\u200d\u202b\u202c\u200d\u200c\u202b\u202e(Object P_0, Object P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_\u206c\u200b\u206c\u200b\u202d\u206a\u200e\u200b\u200f\u206e\u202b\u200e\u202a\u202a\u206c\u202c\u206f\u206b\u206c\u206a\u206c\u202a\u206a\u200b\u200b\u202e\u202c\u206e\u206d\u202c\u200c\u202a\u206a\u202d\u200d\u202b\u202c\u200d\u200c\u202b\u202e(orig_\u206c\u200b\u206c\u200b\u202d\u206a\u200e\u200b\u200f\u206e\u202b\u200e\u202a\u202a\u206c\u202c\u206f\u206b\u206c\u206a\u206c\u202a\u206a\u200b\u200b\u202e\u202c\u206e\u206d\u202c\u200c\u202a\u206a\u202d\u200d\u202b\u202c\u200d\u200c\u202b\u202e orig, Object P_1, Object P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u206c\u200e\u202a\u206a\u200e\u206d\u206c\u202a\u206e\u200d\u200f\u206e\u200b\u200f\u202d\u206c\u200c\u206f\u206c\u202d\u206b\u200f\u200f\u202b\u206f\u200d\u206c\u202e\u206b\u202c\u202b\u200e\u200b\u202c\u206b\u200c\u202c\u200e\u206d\u202e(Texture P_0, RenderTexture P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u206c\u200e\u202a\u206a\u200e\u206d\u206c\u202a\u206e\u200d\u200f\u206e\u200b\u200f\u202d\u206c\u200c\u206f\u206c\u202d\u206b\u200f\u200f\u202b\u206f\u200d\u206c\u202e\u206b\u202c\u202b\u200e\u200b\u202c\u206b\u200c\u202c\u200e\u206d\u202e(orig_\u206c\u200e\u202a\u206a\u200e\u206d\u206c\u202a\u206e\u200d\u200f\u206e\u200b\u200f\u202d\u206c\u200c\u206f\u206c\u202d\u206b\u200f\u200f\u202b\u206f\u200d\u206c\u202e\u206b\u202c\u202b\u200e\u200b\u202c\u206b\u200c\u202c\u200e\u206d\u202e orig, Texture P_1, RenderTexture P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u200f\u206f\u206c\u200d\u200f\u200c\u206c\u200e\u202a\u202a\u206e\u206a\u200b\u202b\u206d\u206f\u206c\u202c\u206f\u200c\u202b\u200f\u206e\u206b\u202c\u206b\u206b\u200f\u206b\u202b\u200f\u200d\u200e\u206e\u206d\u206e\u200b\u200f\u206b\u206d\u202e(Texture P_0, RenderTexture P_1, Material P_2, int P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u200f\u206f\u206c\u200d\u200f\u200c\u206c\u200e\u202a\u202a\u206e\u206a\u200b\u202b\u206d\u206f\u206c\u202c\u206f\u200c\u202b\u200f\u206e\u206b\u202c\u206b\u206b\u200f\u206b\u202b\u200f\u200d\u200e\u206e\u206d\u206e\u200b\u200f\u206b\u206d\u202e(orig_\u200f\u206f\u206c\u200d\u200f\u200c\u206c\u200e\u202a\u202a\u206e\u206a\u200b\u202b\u206d\u206f\u206c\u202c\u206f\u200c\u202b\u200f\u206e\u206b\u202c\u206b\u206b\u200f\u206b\u202b\u200f\u200d\u200e\u206e\u206d\u206e\u200b\u200f\u206b\u206d\u202e orig, Texture P_1, RenderTexture P_2, Material P_3, int P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D orig_\u202b\u206b\u200d\u202e\u200e\u202c\u206f\u200b\u206e\u200f\u200f\u202d\u206a\u200e\u206f\u200e\u206c\u206d\u202a\u206a\u206e\u200e\u206d\u202a\u202c\u202e\u206b\u202a\u202e\u206e\u200b\u200d\u202b\u206b\u200b\u206f\u202c\u202b\u206d\u202d\u202e(int P_0, int P_1, TextureFormat P_2, bool P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D hook_\u202b\u206b\u200d\u202e\u200e\u202c\u206f\u200b\u206e\u200f\u200f\u202d\u206a\u200e\u206f\u200e\u206c\u206d\u202a\u206a\u206e\u200e\u206d\u202a\u202c\u202e\u206b\u202a\u202e\u206e\u200b\u200d\u202b\u206b\u200b\u206f\u202c\u202b\u206d\u202d\u202e(orig_\u202b\u206b\u200d\u202e\u200e\u202c\u206f\u200b\u206e\u200f\u200f\u202d\u206a\u200e\u206f\u200e\u206c\u206d\u202a\u206a\u206e\u200e\u206d\u202a\u202c\u202e\u206b\u202a\u202e\u206e\u200b\u200d\u202b\u206b\u200b\u206f\u202c\u202b\u206d\u202d\u202e orig, int P_1, int P_2, TextureFormat P_3, bool P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202b\u202a\u202e\u206a\u202b\u202e\u200b\u206b\u200d\u200c\u206f\u200b\u202d\u206b\u200e\u202d\u206b\u200b\u206e\u206b\u202c\u202d\u206b\u206e\u206b\u202b\u202e\u202a\u200c\u200f\u202c\u206d\u202b\u202a\u200f\u202a\u202a\u206d\u202d\u206c\u202e(Texture2D P_0, Color[] P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202b\u202a\u202e\u206a\u202b\u202e\u200b\u206b\u200d\u200c\u206f\u200b\u202d\u206b\u200e\u202d\u206b\u200b\u206e\u206b\u202c\u202d\u206b\u206e\u206b\u202b\u202e\u202a\u200c\u200f\u202c\u206d\u202b\u202a\u200f\u202a\u202a\u206d\u202d\u206c\u202e(orig_\u202b\u202a\u202e\u206a\u202b\u202e\u200b\u206b\u200d\u200c\u206f\u200b\u202d\u206b\u200e\u202d\u206b\u200b\u206e\u206b\u202c\u202d\u206b\u206e\u206b\u202b\u202e\u202a\u200c\u200f\u202c\u206d\u202b\u202a\u200f\u202a\u202a\u206d\u202d\u206c\u202e orig, Texture2D P_1, Color[] P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202e\u202d\u206b\u206b\u206e\u200d\u200e\u200d\u202d\u202a\u206c\u206f\u206d\u202c\u200d\u206c\u202e\u200d\u202c\u206b\u202a\u206f\u206d\u202b\u200e\u202d\u200e\u202d\u206a\u200c\u202e\u206c\u202b\u200d\u200b\u206c\u200d\u206f\u206f\u202c\u202e(Texture2D P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202e\u202d\u206b\u206b\u206e\u200d\u200e\u200d\u202d\u202a\u206c\u206f\u206d\u202c\u200d\u206c\u202e\u200d\u202c\u206b\u202a\u206f\u206d\u202b\u200e\u202d\u200e\u202d\u206a\u200c\u202e\u206c\u202b\u200d\u200b\u206c\u200d\u206f\u206f\u202c\u202e(orig_\u202e\u202d\u206b\u206b\u206e\u200d\u200e\u200d\u202d\u202a\u206c\u206f\u206d\u202c\u200d\u206c\u202e\u200d\u202c\u206b\u202a\u206f\u206d\u202b\u200e\u202d\u200e\u202d\u206a\u200c\u202e\u206c\u202b\u200d\u200b\u206c\u200d\u206f\u206f\u202c\u202e orig, Texture2D P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate RenderTexture orig_\u202c\u206a\u202e\u202d\u200c\u202e\u206a\u202c\u206b\u206e\u200b\u206c\u200d\u206a\u200e\u206a\u206b\u206a\u202d\u206a\u206e\u206b\u202a\u202a\u206b\u202d\u206f\u202b\u202b\u202d\u206c\u206d\u206c\u202d\u206c\u202a\u206b\u202c\u206c\u202b\u202e(int P_0, int P_1, int P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate RenderTexture hook_\u202c\u206a\u202e\u202d\u200c\u202e\u206a\u202c\u206b\u206e\u200b\u206c\u200d\u206a\u200e\u206a\u206b\u206a\u202d\u206a\u206e\u206b\u202a\u202a\u206b\u202d\u206f\u202b\u202b\u202d\u206c\u206d\u206c\u202d\u206c\u202a\u206b\u202c\u206c\u202b\u202e(orig_\u202c\u206a\u202e\u202d\u200c\u202e\u206a\u202c\u206b\u206e\u200b\u206c\u200d\u206a\u200e\u206a\u206b\u206a\u202d\u206a\u206e\u206b\u202a\u202a\u206b\u202d\u206f\u202b\u202b\u202d\u206c\u206d\u206c\u202d\u206c\u202a\u206b\u202c\u206c\u202b\u202e orig, int P_1, int P_2, int P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_\u202a\u202d\u206c\u200b\u200e\u202c\u200d\u206d\u200e\u202c\u206a\u200c\u206f\u202d\u206e\u200d\u202a\u206f\u200b\u200c\u206b\u202c\u206f\u206b\u202d\u200f\u200f\u206b\u206d\u200f\u202e\u200f\u206d\u206d\u206e\u206f\u206f\u206b\u206c\u200e\u202e(RenderTexture P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_\u202a\u202d\u206c\u200b\u200e\u202c\u200d\u206d\u200e\u202c\u206a\u200c\u206f\u202d\u206e\u200d\u202a\u206f\u200b\u200c\u206b\u202c\u206f\u206b\u202d\u200f\u200f\u206b\u206d\u200f\u202e\u200f\u206d\u206d\u206e\u206f\u206f\u206b\u206c\u200e\u202e(orig_\u202a\u202d\u206c\u200b\u200e\u202c\u200d\u206d\u200e\u202c\u206a\u200c\u206f\u202d\u206e\u200d\u202a\u206f\u200b\u200c\u206b\u202c\u206f\u206b\u202d\u200f\u200f\u206b\u206d\u200f\u202e\u200f\u206d\u206d\u206e\u206f\u206f\u206b\u206c\u200e\u202e orig, RenderTexture P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202a\u200c\u206a\u202c\u200f\u202e\u202b\u200c\u206d\u202d\u200f\u200c\u206d\u206f\u206d\u200e\u206d\u202a\u200c\u202e\u202a\u206e\u206b\u206f\u206e\u202a\u206d\u202a\u200e\u206f\u206f\u202a\u206e\u202e\u200b\u202a\u202a\u202c\u202a\u206f\u202e(RenderTexture P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202a\u200c\u206a\u202c\u200f\u202e\u202b\u200c\u206d\u202d\u200f\u200c\u206d\u206f\u206d\u200e\u206d\u202a\u200c\u202e\u202a\u206e\u206b\u206f\u206e\u202a\u206d\u202a\u200e\u206f\u206f\u202a\u206e\u202e\u200b\u202a\u202a\u202c\u202a\u206f\u202e(orig_\u202a\u200c\u206a\u202c\u200f\u202e\u202b\u200c\u206d\u202d\u200f\u200c\u206d\u206f\u206d\u200e\u206d\u202a\u200c\u202e\u202a\u206e\u206b\u206f\u206e\u202a\u206d\u202a\u200e\u206f\u206f\u202a\u206e\u202e\u200b\u202a\u202a\u202c\u202a\u206f\u202e orig, RenderTexture P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_\u202b\u200d\u202a\u202d\u206b\u202c\u202d\u202c\u200e\u206b\u206a\u206a\u202e\u206e\u206b\u200d\u202e\u200e\u206e\u200f\u206a\u202e\u202a\u200f\u200c\u200e\u202e\u206e\u206e\u202a\u200c\u200b\u206c\u202e\u206d\u206f\u202c\u206f\u206e\u202a\u202e();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_\u202b\u200d\u202a\u202d\u206b\u202c\u202d\u202c\u200e\u206b\u206a\u206a\u202e\u206e\u206b\u200d\u202e\u200e\u206e\u200f\u206a\u202e\u202a\u200f\u200c\u200e\u202e\u206e\u206e\u202a\u200c\u200b\u206c\u202e\u206d\u206f\u202c\u206f\u206e\u202a\u202e(orig_\u202b\u200d\u202a\u202d\u206b\u202c\u202d\u202c\u200e\u206b\u206a\u206a\u202e\u206e\u206b\u200d\u202e\u200e\u206e\u200f\u206a\u202e\u202a\u200f\u200c\u200e\u202e\u206e\u206e\u202a\u200c\u200b\u206c\u202e\u206d\u206f\u202c\u206f\u206e\u202a\u202e orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202c\u206f\u202b\u202b\u206b\u200c\u206d\u206d\u202e\u206c\u202c\u202d\u206e\u200b\u202c\u206f\u206c\u200e\u200e\u202b\u200f\u200d\u200c\u206b\u200b\u200d\u202e\u200c\u202a\u206a\u206e\u206e\u202a\u206e\u202e\u206c\u202d\u206e\u200b\u202e\u202e(Object P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202c\u206f\u202b\u202b\u206b\u200c\u206d\u206d\u202e\u206c\u202c\u202d\u206e\u200b\u202c\u206f\u206c\u200e\u200e\u202b\u200f\u200d\u200c\u206b\u200b\u200d\u202e\u200c\u202a\u206a\u206e\u206e\u202a\u206e\u202e\u206c\u202d\u206e\u200b\u202e\u202e(orig_\u202c\u206f\u202b\u202b\u206b\u200c\u206d\u206d\u202e\u206c\u202c\u202d\u206e\u200b\u202c\u206f\u206c\u200e\u200e\u202b\u200f\u200d\u200c\u206b\u200b\u200d\u202e\u200c\u202a\u206a\u206e\u206e\u202a\u206e\u202e\u206c\u202d\u206e\u200b\u202e\u202e orig, Object P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202b\u206b\u202a\u202a\u200f\u200f\u200c\u200f\u202c\u202d\u202a\u202c\u200c\u202a\u206f\u206b\u200f\u200e\u200f\u202a\u202b\u200b\u200c\u202c\u206e\u200f\u206e\u202a\u200c\u200e\u202c\u202a\u200b\u202d\u206d\u200e\u206f\u202c\u206e\u202e(Object P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202b\u206b\u202a\u202a\u200f\u200f\u200c\u200f\u202c\u202d\u202a\u202c\u200c\u202a\u206f\u206b\u200f\u200e\u200f\u202a\u202b\u200b\u200c\u202c\u206e\u200f\u206e\u202a\u200c\u200e\u202c\u202a\u200b\u202d\u206d\u200e\u206f\u202c\u206e\u202e(orig_\u202b\u206b\u202a\u202a\u200f\u200f\u200c\u200f\u202c\u202d\u202a\u202c\u200c\u202a\u206f\u206b\u200f\u200e\u200f\u202a\u202b\u200b\u200c\u202c\u206e\u200f\u206e\u202a\u200c\u200e\u202c\u202a\u200b\u202d\u206d\u200e\u206f\u202c\u206e\u202e orig, Object P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate RenderTexture orig_\u202c\u206c\u200e\u200c\u200e\u206e\u206d\u206c\u206b\u202b\u200b\u206c\u206b\u206f\u202c\u202b\u202b\u200b\u202c\u200e\u206a\u202a\u202e\u202d\u206d\u202b\u202a\u206e\u202a\u206d\u202b\u206a\u206e\u200f\u206b\u202b\u200d\u206b\u200b\u206d\u202e();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate RenderTexture hook_\u202c\u206c\u200e\u200c\u200e\u206e\u206d\u206c\u206b\u202b\u200b\u206c\u206b\u206f\u202c\u202b\u202b\u200b\u202c\u200e\u206a\u202a\u202e\u202d\u206d\u202b\u202a\u206e\u202a\u206d\u202b\u206a\u206e\u200f\u206b\u202b\u200d\u206b\u200b\u206d\u202e(orig_\u202c\u206c\u200e\u200c\u200e\u206e\u206d\u206c\u206b\u202b\u200b\u206c\u206b\u206f\u202c\u202b\u202b\u200b\u202c\u200e\u206a\u202a\u202e\u202d\u206d\u202b\u202a\u206e\u202a\u206d\u202b\u206a\u206e\u200f\u206b\u202b\u200d\u206b\u200b\u206d\u202e orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u206a\u206d\u200e\u206d\u202d\u206c\u202e\u202e\u200b\u200f\u202b\u206c\u206a\u206f\u206f\u200c\u200e\u200f\u200f\u200e\u206f\u202a\u202d\u200e\u202d\u200f\u206d\u206e\u202a\u206f\u200d\u202e\u206e\u202a\u206e\u200d\u200f\u206a\u200f\u206b\u202e(RenderTexture P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u206a\u206d\u200e\u206d\u202d\u206c\u202e\u202e\u200b\u200f\u202b\u206c\u206a\u206f\u206f\u200c\u200e\u200f\u200f\u200e\u206f\u202a\u202d\u200e\u202d\u200f\u206d\u206e\u202a\u206f\u200d\u202e\u206e\u202a\u206e\u200d\u200f\u206a\u200f\u206b\u202e(orig_\u206a\u206d\u200e\u206d\u202d\u206c\u202e\u202e\u200b\u200f\u202b\u206c\u206a\u206f\u206f\u200c\u200e\u200f\u200f\u200e\u206f\u202a\u202d\u200e\u202d\u200f\u206d\u206e\u202a\u206f\u200d\u202e\u206e\u202a\u206e\u200d\u200f\u206a\u200f\u206b\u202e orig, RenderTexture P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_\u206b\u200f\u206e\u200b\u206e\u200f\u206e\u206a\u200b\u200f\u206b\u206b\u206b\u202a\u200c\u206f\u200d\u200e\u202d\u202c\u206d\u206b\u202c\u202a\u200d\u206d\u206c\u202d\u202c\u202d\u202c\u206e\u200c\u202c\u202a\u200e\u206c\u206c\u200b\u202a\u202e(Texture P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_\u206b\u200f\u206e\u200b\u206e\u200f\u206e\u206a\u200b\u200f\u206b\u206b\u206b\u202a\u200c\u206f\u200d\u200e\u202d\u202c\u206d\u206b\u202c\u202a\u200d\u206d\u206c\u202d\u202c\u202d\u202c\u206e\u200c\u202c\u202a\u200e\u206c\u206c\u200b\u202a\u202e(orig_\u206b\u200f\u206e\u200b\u206e\u200f\u206e\u206a\u200b\u200f\u206b\u206b\u206b\u202a\u200c\u206f\u200d\u200e\u202d\u202c\u206d\u206b\u202c\u202a\u200d\u206d\u206c\u202d\u202c\u202d\u202c\u206e\u200c\u202c\u202a\u200e\u206c\u206c\u200b\u202a\u202e orig, Texture P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_\u206c\u202c\u202c\u206c\u200f\u202d\u200d\u200d\u206c\u206f\u202e\u206f\u202e\u206e\u206c\u202d\u202d\u206c\u200d\u202b\u200f\u200e\u200f\u202e\u206c\u200f\u200c\u202e\u202a\u200d\u206d\u206a\u202a\u206c\u206c\u206e\u202e\u200d\u206c\u206a\u202e(Texture P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_\u206c\u202c\u202c\u206c\u200f\u202d\u200d\u200d\u206c\u206f\u202e\u206f\u202e\u206e\u206c\u202d\u202d\u206c\u200d\u202b\u200f\u200e\u200f\u202e\u206c\u200f\u200c\u202e\u202a\u200d\u206d\u206a\u202a\u206c\u206c\u206e\u202e\u200d\u206c\u206a\u202e(orig_\u206c\u202c\u202c\u206c\u200f\u202d\u200d\u200d\u206c\u206f\u202e\u206f\u202e\u206e\u206c\u202d\u202d\u206c\u200d\u202b\u200f\u200e\u200f\u202e\u206c\u200f\u200c\u202e\u202a\u200d\u206d\u206a\u202a\u206c\u206c\u206e\u202e\u200d\u206c\u206a\u202e orig, Texture P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D orig_\u200e\u200e\u206a\u202b\u200f\u202c\u206d\u206f\u202e\u206d\u200d\u206d\u206c\u206c\u206b\u206d\u202d\u202e\u200c\u202e\u200b\u206c\u200d\u206d\u202d\u200c\u206e\u206c\u200c\u206a\u202e\u202c\u202b\u206d\u202c\u206f\u200e\u202e\u202b\u202e\u202e(int P_0, int P_1, TextureFormat P_2, bool P_3, bool P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Texture2D hook_\u200e\u200e\u206a\u202b\u200f\u202c\u206d\u206f\u202e\u206d\u200d\u206d\u206c\u206c\u206b\u206d\u202d\u202e\u200c\u202e\u200b\u206c\u200d\u206d\u202d\u200c\u206e\u206c\u200c\u206a\u202e\u202c\u202b\u206d\u202c\u206f\u200e\u202e\u202b\u202e\u202e(orig_\u200e\u200e\u206a\u202b\u200f\u202c\u206d\u206f\u202e\u206d\u200d\u206d\u206c\u206c\u206b\u206d\u202d\u202e\u200c\u202e\u200b\u206c\u200d\u206d\u202d\u200c\u206e\u206c\u200c\u206a\u202e\u202c\u202b\u206d\u202c\u206f\u200e\u202e\u202b\u202e\u202e orig, int P_1, int P_2, TextureFormat P_3, bool P_4, bool P_5);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_\u200f\u202a\u200b\u200f\u202c\u200c\u200e\u206a\u206a\u202e\u202c\u202b\u206d\u206a\u202c\u200b\u202c\u200f\u202c\u200d\u200f\u202e\u206e\u200c\u202d\u206f\u206c\u200b\u206a\u200b\u202a\u200c\u200c\u202b\u206f\u200c\u206c\u206e\u206d\u206f\u202e(Texture2D P_0, int P_1, int P_2, TextureFormat P_3, bool P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_\u200f\u202a\u200b\u200f\u202c\u200c\u200e\u206a\u206a\u202e\u202c\u202b\u206d\u206a\u202c\u200b\u202c\u200f\u202c\u200d\u200f\u202e\u206e\u200c\u202d\u206f\u206c\u200b\u206a\u200b\u202a\u200c\u200c\u202b\u206f\u200c\u206c\u206e\u206d\u206f\u202e(orig_\u200f\u202a\u200b\u200f\u202c\u200c\u200e\u206a\u206a\u202e\u202c\u202b\u206d\u206a\u202c\u200b\u202c\u200f\u202c\u200d\u200f\u202e\u206e\u200c\u202d\u206f\u206c\u200b\u206a\u200b\u202a\u200c\u200c\u202b\u206f\u200c\u206c\u206e\u206d\u206f\u202e orig, Texture2D P_1, int P_2, int P_3, TextureFormat P_4, bool P_5);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202e\u202c\u206f\u202e\u202c\u206d\u200b\u202b\u206b\u200f\u202e\u206e\u200e\u200c\u202c\u206d\u206b\u206a\u206b\u200b\u200b\u206a\u206e\u206e\u202c\u200d\u206c\u206d\u200e\u200b\u200c\u202b\u206b\u206c\u200d\u206d\u206f\u200d\u206d\u206b\u202e(Texture2D P_0, Rect P_1, int P_2, int P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202e\u202c\u206f\u202e\u202c\u206d\u200b\u202b\u206b\u200f\u202e\u206e\u200e\u200c\u202c\u206d\u206b\u206a\u206b\u200b\u200b\u206a\u206e\u206e\u202c\u200d\u206c\u206d\u200e\u200b\u200c\u202b\u206b\u206c\u200d\u206d\u206f\u200d\u206d\u206b\u202e(orig_\u202e\u202c\u206f\u202e\u202c\u206d\u200b\u202b\u206b\u200f\u202e\u206e\u200e\u200c\u202c\u206d\u206b\u206a\u206b\u200b\u200b\u206a\u206e\u206e\u202c\u200d\u206c\u206d\u200e\u200b\u200c\u202b\u206b\u206c\u200d\u206d\u206f\u200d\u206d\u206b\u202e orig, Texture2D P_1, Rect P_2, int P_3, int P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_\u202c\u206c\u206b\u202c\u200d\u206e\u206f\u200c\u202b\u200e\u202a\u206e\u200e\u200e\u202a\u200e\u202c\u206a\u202e\u200d\u200c\u200d\u202b\u206a\u200d\u200e\u206d\u200d\u200f\u202c\u202a\u202e\u202c\u206c\u206b\u206f\u206b\u206b\u206f\u206f\u202e();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_\u202c\u206c\u206b\u202c\u200d\u206e\u206f\u200c\u202b\u200e\u202a\u206e\u200e\u200e\u202a\u200e\u202c\u206a\u202e\u200d\u200c\u200d\u202b\u206a\u200d\u200e\u206d\u200d\u200f\u202c\u202a\u202e\u202c\u206c\u206b\u206f\u206b\u206b\u206f\u206f\u202e(orig_\u202c\u206c\u206b\u202c\u200d\u206e\u206f\u200c\u202b\u200e\u202a\u206e\u200e\u200e\u202a\u200e\u202c\u206a\u202e\u200d\u200c\u200d\u202b\u206a\u200d\u200e\u206d\u200d\u200f\u202c\u202a\u202e\u202c\u206c\u206b\u206f\u206b\u206b\u206f\u206f\u202e orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_\u200f\u206c\u202e\u206a\u206a\u202d\u200e\u200d\u200c\u206c\u202d\u200e\u200c\u206d\u206a\u202a\u202c\u202a\u200e\u200b\u206a\u202a\u202d\u200e\u200c\u206e\u202a\u206b\u206e\u200c\u202d\u206c\u206d\u202c\u202e\u202b\u202e\u202b\u200f\u202b\u202e(string P_0, object P_1, object P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_\u200f\u206c\u202e\u206a\u206a\u202d\u200e\u200d\u200c\u206c\u202d\u200e\u200c\u206d\u206a\u202a\u202c\u202a\u200e\u200b\u206a\u202a\u202d\u200e\u200c\u206e\u202a\u206b\u206e\u200c\u202d\u206c\u206d\u202c\u202e\u202b\u202e\u202b\u200f\u202b\u202e(orig_\u200f\u206c\u202e\u206a\u206a\u202d\u200e\u200d\u200c\u206c\u202d\u200e\u200c\u206d\u206a\u202a\u202c\u202a\u200e\u200b\u206a\u202a\u202d\u200e\u200c\u206e\u202a\u206b\u206e\u200c\u202d\u206c\u206d\u202c\u202e\u202b\u202e\u202b\u200f\u202b\u202e orig, string P_1, object P_2, object P_3);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Color[] orig_\u200d\u200e\u202c\u202c\u206b\u202a\u200b\u206f\u206d\u202c\u206b\u206f\u206f\u202e\u202e\u200d\u206c\u202a\u202a\u206f\u200d\u206c\u200d\u206d\u206a\u206e\u202d\u202a\u206d\u206d\u202c\u202a\u206f\u200d\u206f\u202e\u202a\u200b\u200e\u206f\u202e(Texture2D P_0, int P_1, int P_2, int P_3, int P_4);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Color[] hook_\u200d\u200e\u202c\u202c\u206b\u202a\u200b\u206f\u206d\u202c\u206b\u206f\u206f\u202e\u202e\u200d\u206c\u202a\u202a\u206f\u200d\u206c\u200d\u206d\u206a\u206e\u202d\u202a\u206d\u206d\u202c\u202a\u206f\u200d\u206f\u202e\u202a\u200b\u200e\u206f\u202e(orig_\u200d\u200e\u202c\u202c\u206b\u202a\u200b\u206f\u206d\u202c\u206b\u206f\u206f\u202e\u202e\u200d\u206c\u202a\u202a\u206f\u200d\u206c\u200d\u206d\u206a\u206e\u202d\u202a\u206d\u206d\u202c\u202a\u206f\u200d\u206f\u202e\u202a\u200b\u200e\u206f\u202e orig, Texture2D P_1, int P_2, int P_3, int P_4, int P_5);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate TextureFormat orig_\u200b\u206f\u206e\u200d\u206a\u202a\u206a\u206d\u206f\u200f\u200e\u202b\u202e\u200d\u202d\u200e\u202c\u206e\u200f\u200b\u202d\u202c\u202b\u200c\u202d\u206c\u200d\u202b\u206a\u200f\u206e\u202b\u202a\u200c\u206f\u206a\u200e\u202e\u202a\u200d\u202e(Texture2D P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate TextureFormat hook_\u200b\u206f\u206e\u200d\u206a\u202a\u206a\u206d\u206f\u200f\u200e\u202b\u202e\u200d\u202d\u200e\u202c\u206e\u200f\u200b\u202d\u202c\u202b\u200c\u202d\u206c\u200d\u202b\u206a\u200f\u206e\u202b\u202a\u200c\u206f\u206a\u200e\u202e\u202a\u200d\u202e(orig_\u200b\u206f\u206e\u200d\u206a\u202a\u206a\u206d\u206f\u200f\u200e\u202b\u202e\u200d\u202d\u200e\u202c\u206e\u200f\u200b\u202d\u202c\u202b\u200c\u202d\u206c\u200d\u202b\u206a\u200f\u206e\u202b\u202a\u200c\u206f\u206a\u200e\u202e\u202a\u200d\u202e orig, Texture2D P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u206d\u200d\u206b\u200c\u200e\u206b\u202e\u202e\u206d\u202e\u206c\u202d\u206d\u200e\u206b\u206a\u206f\u202b\u202a\u202c\u206a\u202e\u206a\u202c\u206a\u200e\u202b\u200c\u200c\u200e\u202a\u206f\u200b\u200b\u206f\u200f\u200c\u206a\u202c\u200d\u202e(Texture P_0, TextureWrapMode P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u206d\u200d\u206b\u200c\u200e\u206b\u202e\u202e\u206d\u202e\u206c\u202d\u206d\u200e\u206b\u206a\u206f\u202b\u202a\u202c\u206a\u202e\u206a\u202c\u206a\u200e\u202b\u200c\u200c\u200e\u202a\u206f\u200b\u200b\u206f\u200f\u200c\u206a\u202c\u200d\u202e(orig_\u206d\u200d\u206b\u200c\u200e\u206b\u202e\u202e\u206d\u202e\u206c\u202d\u206d\u200e\u206b\u206a\u206f\u202b\u202a\u202c\u206a\u202e\u206a\u202c\u206a\u200e\u202b\u200c\u200c\u200e\u202a\u206f\u200b\u200b\u206f\u200f\u200c\u206a\u202c\u200d\u202e orig, Texture P_1, TextureWrapMode P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate FilterMode orig_\u200e\u200e\u206f\u200c\u206d\u202c\u202d\u202b\u202e\u206c\u200d\u200e\u206a\u202e\u206c\u202c\u206e\u200b\u206d\u200b\u202d\u200f\u206a\u202d\u206e\u202b\u202c\u202c\u206f\u206e\u200d\u206d\u200d\u202d\u200d\u202c\u206a\u206f\u200d\u202a\u202e(Texture P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate FilterMode hook_\u200e\u200e\u206f\u200c\u206d\u202c\u202d\u202b\u202e\u206c\u200d\u200e\u206a\u202e\u206c\u202c\u206e\u200b\u206d\u200b\u202d\u200f\u206a\u202d\u206e\u202b\u202c\u202c\u206f\u206e\u200d\u206d\u200d\u202d\u200d\u202c\u206a\u206f\u200d\u202a\u202e(orig_\u200e\u200e\u206f\u200c\u206d\u202c\u202d\u202b\u202e\u206c\u200d\u200e\u206a\u202e\u206c\u202c\u206e\u200b\u206d\u200b\u202d\u200f\u206a\u202d\u206e\u202b\u202c\u202c\u206f\u206e\u200d\u206d\u200d\u202d\u200d\u202c\u206a\u206f\u200d\u202a\u202e orig, Texture P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u202c\u206d\u200f\u200c\u206e\u202c\u200b\u202b\u206f\u206a\u200c\u202e\u206a\u202b\u202a\u200b\u206f\u202b\u206b\u202a\u206c\u202b\u202e\u202b\u202e\u206b\u202d\u202b\u206c\u202d\u206c\u202a\u200f\u200e\u202d\u206a\u206f\u202b\u206d\u206a\u202e(Texture P_0, FilterMode P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u202c\u206d\u200f\u200c\u206e\u202c\u200b\u202b\u206f\u206a\u200c\u202e\u206a\u202b\u202a\u200b\u206f\u202b\u206b\u202a\u206c\u202b\u202e\u202b\u202e\u206b\u202d\u202b\u206c\u202d\u206c\u202a\u200f\u200e\u202d\u206a\u206f\u202b\u206d\u206a\u202e(orig_\u202c\u206d\u200f\u200c\u206e\u202c\u200b\u202b\u206f\u206a\u200c\u202e\u206a\u202b\u202a\u200b\u206f\u202b\u206b\u202a\u206c\u202b\u202e\u202b\u202e\u206b\u202d\u202b\u206c\u202d\u206c\u202a\u200f\u200e\u202d\u206a\u206f\u202b\u206d\u206a\u202e orig, Texture P_1, FilterMode P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_\u206e\u202e\u200f\u206b\u200e\u200c\u206d\u202a\u206b\u200d\u202e\u206a\u200c\u206e\u206f\u200e\u206e\u200d\u200d\u202d\u200c\u206f\u200c\u200b\u202d\u202a\u206f\u202b\u206e\u206c\u200b\u206b\u202d\u206b\u200f\u200b\u206b\u206b\u200e\u206d\u202e(Object P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_\u206e\u202e\u200f\u206b\u200e\u200c\u206d\u202a\u206b\u200d\u202e\u206a\u200c\u206e\u206f\u200e\u206e\u200d\u200d\u202d\u200c\u206f\u200c\u200b\u202d\u202a\u206f\u202b\u206e\u206c\u200b\u206b\u202d\u206b\u200f\u200b\u206b\u206b\u200e\u206d\u202e(orig_\u206e\u202e\u200f\u206b\u200e\u200c\u206d\u202a\u206b\u200d\u202e\u206a\u200c\u206e\u206f\u200e\u206e\u200d\u200d\u202d\u200c\u206f\u200c\u200b\u202d\u202a\u206f\u202b\u206e\u206c\u200b\u206b\u202d\u206b\u200f\u200b\u206b\u206b\u200e\u206d\u202e orig, Object P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_\u200c\u200f\u206d\u206b\u200d\u202e\u202c\u200f\u202b\u200f\u200f\u206b\u202a\u202a\u202d\u202b\u206e\u202e\u202d\u200e\u200f\u200d\u206b\u200f\u200c\u202e\u200b\u202c\u202c\u200e\u206f\u206e\u200d\u200b\u206e\u202c\u206d\u200e\u206a\u202e\u202e(string P_0, string P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_\u200c\u200f\u206d\u206b\u200d\u202e\u202c\u200f\u202b\u200f\u200f\u206b\u202a\u202a\u202d\u202b\u206e\u202e\u202d\u200e\u200f\u200d\u206b\u200f\u200c\u202e\u200b\u202c\u202c\u200e\u206f\u206e\u200d\u200b\u206e\u202c\u206d\u200e\u206a\u202e\u202e(orig_\u200c\u200f\u206d\u206b\u200d\u202e\u202c\u200f\u202b\u200f\u200f\u206b\u202a\u202a\u202d\u202b\u206e\u202e\u202d\u200e\u200f\u200d\u206b\u200f\u200c\u202e\u200b\u202c\u202c\u200e\u206f\u206e\u200d\u200b\u206e\u202c\u206d\u200e\u206a\u202e\u202e orig, string P_1, string P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_\u206e\u206b\u206b\u206b\u206c\u200b\u202e\u200e\u202b\u200d\u206b\u200c\u202b\u202c\u202c\u206f\u202a\u200e\u202e\u206c\u202c\u206b\u202c\u202c\u200b\u202a\u200b\u202c\u200d\u206c\u200b\u206d\u202e\u200e\u202d\u206d\u202b\u200d\u200c\u206b\u202e(Object P_0, string P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_\u206e\u206b\u206b\u206b\u206c\u200b\u202e\u200e\u202b\u200d\u206b\u200c\u202b\u202c\u202c\u206f\u202a\u200e\u202e\u206c\u202c\u206b\u202c\u202c\u200b\u202a\u200b\u202c\u200d\u206c\u200b\u206d\u202e\u200e\u202d\u206d\u202b\u200d\u200c\u206b\u202e(orig_\u206e\u206b\u206b\u206b\u206c\u200b\u202e\u200e\u202b\u200d\u206b\u200c\u202b\u202c\u202c\u206f\u202a\u200e\u202e\u206c\u202c\u206b\u202c\u202c\u200b\u202a\u200b\u202c\u200d\u206c\u200b\u206d\u202e\u200e\u202d\u206d\u202b\u200d\u200c\u206b\u202e orig, Object P_1, string P_2);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Vector3 orig_\u202d\u200e\u200e\u200e\u200d\u206c\u200c\u206b\u200c\u200c\u202a\u202d\u202a\u200d\u206b\u200e\u206f\u202a\u206f\u206c\u202c\u206b\u206f\u206a\u202e\u200b\u206b\u202a\u202a\u206d\u202b\u206f\u206b\u200f\u200e\u200d\u202d\u200d\u202e\u200f\u202e(TerrainData P_0);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate Vector3 hook_\u202d\u200e\u200e\u200e\u200d\u206c\u200c\u206b\u200c\u200c\u202a\u202d\u202a\u200d\u206b\u200e\u206f\u202a\u206f\u206c\u202c\u206b\u206f\u206a\u202e\u200b\u206b\u202a\u202a\u206d\u202b\u206f\u206b\u200f\u200e\u200d\u202d\u200d\u202e\u200f\u202e(orig_\u202d\u200e\u200e\u200e\u200d\u206c\u200c\u206b\u200c\u200c\u202a\u202d\u202a\u200d\u206b\u200e\u206f\u202a\u206f\u206c\u202c\u206b\u206f\u206a\u202e\u200b\u206b\u202a\u202a\u206d\u202b\u206f\u206b\u200f\u200e\u200d\u202d\u200d\u202e\u200f\u202e orig, TerrainData P_1);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_\u206e\u200c\u206b\u202e\u202b\u200f\u206c\u202a\u200b\u206b\u202b\u206c\u206b\u206e\u206e\u206e\u206c\u206c\u206b\u202b\u200c\u202a\u206a\u206d\u206a\u206b\u206d\u200e\u206c\u202e\u206e\u200e\u206a\u200e\u200c\u200b\u206b\u206f\u200d\u206e\u202e();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_\u206e\u200c\u206b\u202e\u202b\u200f\u206c\u202a\u200b\u206b\u202b\u206c\u206b\u206e\u206e\u206e\u206c\u206c\u206b\u202b\u200c\u202a\u206a\u206d\u206a\u206b\u206d\u200e\u206c\u202e\u206e\u200e\u206a\u200e\u200c\u200b\u206b\u206f\u200d\u206e\u202e(orig_\u206e\u200c\u206b\u202e\u202b\u200f\u206c\u202a\u200b\u206b\u202b\u206c\u206b\u206e\u206e\u206e\u206c\u206c\u206b\u202b\u200c\u202a\u206a\u206d\u206a\u206b\u206d\u200e\u206c\u202e\u206e\u200e\u206a\u200e\u200c\u200b\u206b\u206f\u200d\u206e\u202e orig);

		public static class \u206b\u206a\u200c\u206b\u206a\u202a\u200d\u202a\u200f\u202b\u200b\u206b\u200d\u202c\u206c\u206c\u202a\u206e\u200c\u206d\u202a\u206b\u206c\u200e\u200c\u202b\u206e\u206e\u200b\u206f\u200f\u200e\u202e\u206b\u202d\u200f\u200b\u202a\u206d\u202c\u202e
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_ctor(object self, TerrainData P_1, bool P_2, bool P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_ctor(orig_ctor orig, object self, TerrainData P_2, bool P_3, bool P_4);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] orig_\u200d\u202d\u206a\u202d\u206e\u206e\u206e\u200f\u206c\u206c\u202a\u200f\u200f\u202a\u206a\u202e\u206f\u206f\u206c\u202e\u206c\u200c\u206b\u202e\u206a\u200f\u206b\u200c\u200f\u200d\u200e\u202b\u200f\u200c\u206c\u206d\u202c\u206f\u202a\u200e\u202e(object self, int P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] hook_\u200d\u202d\u206a\u202d\u206e\u206e\u206e\u200f\u206c\u206c\u202a\u200f\u200f\u202a\u206a\u202e\u206f\u206f\u206c\u202e\u206c\u200c\u206b\u202e\u206a\u200f\u206b\u200c\u200f\u200d\u200e\u202b\u200f\u200c\u206c\u206d\u202c\u206f\u202a\u200e\u202e(orig_\u200d\u202d\u206a\u202d\u206e\u206e\u206e\u200f\u206c\u206c\u202a\u200f\u200f\u202a\u206a\u202e\u206f\u206f\u206c\u202e\u206c\u200c\u206b\u202e\u206a\u200f\u206b\u200c\u200f\u200d\u200e\u202b\u200f\u200c\u206c\u206d\u202c\u206f\u202a\u200e\u202e orig, object self, int P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] orig_\u202b\u200f\u206d\u202b\u202e\u206b\u206c\u202d\u206d\u200e\u202c\u206d\u206f\u202b\u200f\u202a\u200c\u206c\u206e\u206b\u202c\u202c\u200b\u200c\u202c\u200f\u206c\u202a\u202b\u206c\u200d\u202c\u202b\u200c\u206b\u202b\u200f\u200b\u206c\u206e\u202e(object self, int P_1, int P_2, int P_3, int P_4, int P_5);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] hook_\u202b\u200f\u206d\u202b\u202e\u206b\u206c\u202d\u206d\u200e\u202c\u206d\u206f\u202b\u200f\u202a\u200c\u206c\u206e\u206b\u202c\u202c\u200b\u200c\u202c\u200f\u206c\u202a\u202b\u206c\u200d\u202c\u202b\u200c\u206b\u202b\u200f\u200b\u206c\u206e\u202e(orig_\u202b\u200f\u206d\u202b\u202e\u206b\u206c\u202d\u206d\u200e\u202c\u206d\u206f\u202b\u200f\u202a\u200c\u206c\u206e\u206b\u202c\u202c\u200b\u200c\u202c\u200f\u206c\u202a\u202b\u206c\u200d\u202c\u202b\u200c\u206b\u202b\u200f\u200b\u206c\u206e\u202e orig, object self, int P_2, int P_3, int P_4, int P_5, int P_6);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] orig_\u206e\u202e\u206d\u206f\u200c\u202d\u206d\u202d\u200b\u200b\u200c\u206c\u206f\u202d\u200b\u206e\u202d\u200c\u202a\u206b\u202e\u202c\u202a\u202e\u206c\u200b\u202c\u200d\u202b\u200e\u206a\u202e\u206f\u202e\u202b\u202d\u206e\u206d\u200c\u200d\u202e(object self, int P_1, int P_2, int P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] hook_\u206e\u202e\u206d\u206f\u200c\u202d\u206d\u202d\u200b\u200b\u200c\u206c\u206f\u202d\u200b\u206e\u202d\u200c\u202a\u206b\u202e\u202c\u202a\u202e\u206c\u200b\u202c\u200d\u202b\u200e\u206a\u202e\u206f\u202e\u202b\u202d\u206e\u206d\u200c\u200d\u202e(orig_\u206e\u202e\u206d\u206f\u200c\u202d\u206d\u202d\u200b\u200b\u200c\u206c\u206f\u202d\u200b\u206e\u202d\u200c\u202a\u206b\u202e\u202c\u202a\u202e\u206c\u200b\u202c\u200d\u202b\u200e\u206a\u202e\u206f\u202e\u202b\u202d\u206e\u206d\u200c\u200d\u202e orig, object self, int P_2, int P_3, int P_4);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u206e\u206e\u200e\u206d\u200d\u200d\u200b\u206f\u206f\u200b\u206b\u206c\u206c\u202a\u206e\u206e\u206d\u202e\u206f\u202d\u206c\u206b\u206f\u202d\u202a\u202b\u206d\u206d\u202d\u200d\u200f\u202e\u202e\u206b\u200d\u206c\u200e\u206a\u200f\u202a\u202e(object self, int P_1, bool P_2, bool P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u206e\u206e\u200e\u206d\u200d\u200d\u200b\u206f\u206f\u200b\u206b\u206c\u206c\u202a\u206e\u206e\u206d\u202e\u206f\u202d\u206c\u206b\u206f\u202d\u202a\u202b\u206d\u206d\u202d\u200d\u200f\u202e\u202e\u206b\u200d\u206c\u200e\u206a\u200f\u202a\u202e(orig_\u206e\u206e\u200e\u206d\u200d\u200d\u200b\u206f\u206f\u200b\u206b\u206c\u206c\u202a\u206e\u206e\u206d\u202e\u206f\u202d\u206c\u206b\u206f\u202d\u202a\u202b\u206d\u206d\u202d\u200d\u200f\u202e\u202e\u206b\u200d\u206c\u200e\u206a\u200f\u202a\u202e orig, object self, int P_2, bool P_3, bool P_4);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u206d\u200c\u200d\u206c\u202a\u206c\u200e\u202b\u200d\u206e\u202b\u200d\u202a\u202d\u206b\u202b\u200b\u206a\u200f\u206d\u200f\u200f\u206a\u206b\u202a\u206c\u202a\u200e\u200e\u200e\u202c\u202b\u206e\u200c\u202d\u206b\u202e\u200b\u200b\u206f\u202e(object self, int P_1, bool P_2, bool P_3, int P_4, int P_5, int P_6, int P_7);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u206d\u200c\u200d\u206c\u202a\u206c\u200e\u202b\u200d\u206e\u202b\u200d\u202a\u202d\u206b\u202b\u200b\u206a\u200f\u206d\u200f\u200f\u206a\u206b\u202a\u206c\u202a\u200e\u200e\u200e\u202c\u202b\u206e\u200c\u202d\u206b\u202e\u200b\u200b\u206f\u202e(orig_\u206d\u200c\u200d\u206c\u202a\u206c\u200e\u202b\u200d\u206e\u202b\u200d\u202a\u202d\u206b\u202b\u200b\u206a\u200f\u206d\u200f\u200f\u206a\u206b\u202a\u206c\u202a\u200e\u200e\u200e\u202c\u202b\u206e\u200c\u202d\u206b\u202e\u200b\u200b\u206f\u202e orig, object self, int P_2, bool P_3, bool P_4, int P_5, int P_6, int P_7, int P_8);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] orig_\u206c\u202d\u200c\u206d\u202d\u202c\u206a\u206a\u202e\u206d\u206c\u206e\u200b\u206d\u202c\u202b\u202d\u206a\u200c\u206f\u206a\u202e\u202d\u206f\u200f\u206b\u200f\u202e\u202d\u200c\u202a\u200f\u200b\u202d\u202a\u206c\u202c\u206c\u206b\u202a\u202e(object self, int P_1, bool P_2, bool P_3, int P_4, int P_5);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] hook_\u206c\u202d\u200c\u206d\u202d\u202c\u206a\u206a\u202e\u206d\u206c\u206e\u200b\u206d\u202c\u202b\u202d\u206a\u200c\u206f\u206a\u202e\u202d\u206f\u200f\u206b\u200f\u202e\u202d\u200c\u202a\u200f\u200b\u202d\u202a\u206c\u202c\u206c\u206b\u202a\u202e(orig_\u206c\u202d\u200c\u206d\u202d\u202c\u206a\u206a\u202e\u206d\u206c\u206e\u200b\u206d\u202c\u202b\u202d\u206a\u200c\u206f\u206a\u202e\u202d\u206f\u200f\u206b\u200f\u202e\u202d\u200c\u202a\u200f\u200b\u202d\u202a\u206c\u202c\u206c\u206b\u202a\u202e orig, object self, int P_2, bool P_3, bool P_4, int P_5, int P_6);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u200f\u202a\u206e\u206e\u202d\u202c\u206d\u200d\u202b\u202b\u200c\u202b\u200e\u200b\u202b\u206b\u206e\u202d\u202c\u206e\u206f\u202a\u202c\u206f\u200b\u202e\u206c\u200e\u206c\u202a\u200c\u206c\u200e\u202d\u206d\u206e\u202c\u200c\u202d\u206c\u202e(object self, int P_1, bool P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u200f\u202a\u206e\u206e\u202d\u202c\u206d\u200d\u202b\u202b\u200c\u202b\u200e\u200b\u202b\u206b\u206e\u202d\u202c\u206e\u206f\u202a\u202c\u206f\u200b\u202e\u206c\u200e\u206c\u202a\u200c\u206c\u200e\u202d\u206d\u206e\u202c\u200c\u202d\u206c\u202e(orig_\u200f\u202a\u206e\u206e\u202d\u202c\u206d\u200d\u202b\u202b\u200c\u202b\u200e\u200b\u202b\u206b\u206e\u202d\u202c\u206e\u206f\u202a\u202c\u206f\u200b\u202e\u206c\u200e\u206c\u202a\u200c\u206c\u200e\u202d\u206d\u206e\u202c\u200c\u202d\u206c\u202e orig, object self, int P_2, bool P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u200d\u200b\u206a\u202b\u200f\u202b\u202c\u200c\u200e\u206d\u206c\u206d\u206b\u202a\u202d\u202b\u202d\u200d\u202a\u206c\u200d\u206d\u206a\u202d\u202e\u202b\u206c\u200b\u206f\u202e\u206e\u202e\u200d\u206a\u202b\u202a\u202d\u206a\u202e\u206a\u202e(object self, int P_1, bool P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u200d\u200b\u206a\u202b\u200f\u202b\u202c\u200c\u200e\u206d\u206c\u206d\u206b\u202a\u202d\u202b\u202d\u200d\u202a\u206c\u200d\u206d\u206a\u202d\u202e\u202b\u206c\u200b\u206f\u202e\u206e\u202e\u200d\u206a\u202b\u202a\u202d\u206a\u202e\u206a\u202e(orig_\u200d\u200b\u206a\u202b\u200f\u202b\u202c\u200c\u200e\u206d\u206c\u206d\u206b\u202a\u202d\u202b\u202d\u200d\u202a\u206c\u200d\u206d\u206a\u202d\u202e\u202b\u206c\u200b\u206f\u202e\u206e\u202e\u200d\u206a\u202b\u202a\u202d\u206a\u202e\u206a\u202e orig, object self, int P_2, bool P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u202e\u202e\u202c\u206e\u206c\u202d\u200e\u206e\u200c\u202c\u206b\u206a\u202a\u200f\u200d\u202c\u206c\u206c\u202d\u200e\u200e\u200f\u206a\u202c\u200f\u200b\u206b\u200d\u202d\u200c\u206d\u202e\u200c\u200d\u206a\u200e\u206b\u202d\u200d\u200e\u202e(object self, int P_1, bool P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u202e\u202e\u202c\u206e\u206c\u202d\u200e\u206e\u200c\u202c\u206b\u206a\u202a\u200f\u200d\u202c\u206c\u206c\u202d\u200e\u200e\u200f\u206a\u202c\u200f\u200b\u206b\u200d\u202d\u200c\u206d\u202e\u200c\u200d\u206a\u200e\u206b\u202d\u200d\u200e\u202e(orig_\u202e\u202e\u202c\u206e\u206c\u202d\u200e\u206e\u200c\u202c\u206b\u206a\u202a\u200f\u200d\u202c\u206c\u206c\u202d\u200e\u200e\u200f\u206a\u202c\u200f\u200b\u206b\u200d\u202d\u200c\u206d\u202e\u200c\u200d\u206a\u200e\u206b\u202d\u200d\u200e\u202e orig, object self, int P_2, bool P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u202e\u206e\u202d\u206e\u200b\u200e\u202b\u206c\u206f\u200c\u202c\u200d\u200c\u200f\u202a\u200c\u200c\u200f\u200b\u202e\u206e\u206e\u202e\u202b\u200d\u200c\u206e\u206a\u206a\u200c\u202c\u200b\u200b\u206f\u206f\u206b\u206c\u202b\u206e\u206c\u202e(object self, int P_1, bool P_2, int P_3, int P_4, int P_5, int P_6);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u202e\u206e\u202d\u206e\u200b\u200e\u202b\u206c\u206f\u200c\u202c\u200d\u200c\u200f\u202a\u200c\u200c\u200f\u200b\u202e\u206e\u206e\u202e\u202b\u200d\u200c\u206e\u206a\u206a\u200c\u202c\u200b\u200b\u206f\u206f\u206b\u206c\u202b\u206e\u206c\u202e(orig_\u202e\u206e\u202d\u206e\u200b\u200e\u202b\u206c\u206f\u200c\u202c\u200d\u200c\u200f\u202a\u200c\u200c\u200f\u200b\u202e\u206e\u206e\u202e\u202b\u200d\u200c\u206e\u206a\u206a\u200c\u202c\u200b\u200b\u206f\u206f\u206b\u206c\u202b\u206e\u206c\u202e orig, object self, int P_2, bool P_3, int P_4, int P_5, int P_6, int P_7);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] orig_\u200f\u200c\u202e\u202c\u202c\u206c\u202c\u206e\u202e\u200d\u200b\u200d\u200f\u200f\u202b\u200e\u202e\u200e\u200f\u202d\u202d\u200f\u202a\u206d\u202a\u200b\u206c\u200b\u206c\u206c\u206e\u200e\u202e\u206a\u202d\u200b\u202c\u206a\u200f\u200d\u202e(object self, int P_1, bool P_2, int P_3, int P_4);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] hook_\u200f\u200c\u202e\u202c\u202c\u206c\u202c\u206e\u202e\u200d\u200b\u200d\u200f\u200f\u202b\u200e\u202e\u200e\u200f\u202d\u202d\u200f\u202a\u206d\u202a\u200b\u206c\u200b\u206c\u206c\u206e\u200e\u202e\u206a\u202d\u200b\u202c\u206a\u200f\u200d\u202e(orig_\u200f\u200c\u202e\u202c\u202c\u206c\u202c\u206e\u202e\u200d\u200b\u200d\u200f\u200f\u202b\u200e\u202e\u200e\u200f\u202d\u202d\u200f\u202a\u206d\u202a\u200b\u206c\u200b\u206c\u206c\u206e\u200e\u202e\u206a\u202d\u200b\u202c\u206a\u200f\u200d\u202e orig, object self, int P_2, bool P_3, int P_4, int P_5);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u206b\u206e\u200b\u202c\u202a\u202b\u202d\u202a\u200d\u200f\u206b\u200f\u206b\u200f\u202b\u202d\u202a\u200f\u200e\u206a\u202c\u202e\u202a\u206c\u200d\u202a\u202a\u200f\u200d\u200f\u200c\u206a\u206e\u206e\u202b\u206e\u206b\u200f\u206d\u200c\u202e(object self, int P_1, bool P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u206b\u206e\u200b\u202c\u202a\u202b\u202d\u202a\u200d\u200f\u206b\u200f\u206b\u200f\u202b\u202d\u202a\u200f\u200e\u206a\u202c\u202e\u202a\u206c\u200d\u202a\u202a\u200f\u200d\u200f\u200c\u206a\u206e\u206e\u202b\u206e\u206b\u200f\u206d\u200c\u202e(orig_\u206b\u206e\u200b\u202c\u202a\u202b\u202d\u202a\u200d\u200f\u206b\u200f\u206b\u200f\u202b\u202d\u202a\u200f\u200e\u206a\u202c\u202e\u202a\u206c\u200d\u202a\u202a\u200f\u200d\u200f\u200c\u206a\u206e\u206e\u202b\u206e\u206b\u200f\u206d\u200c\u202e orig, object self, int P_2, bool P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u200c\u206e\u200e\u200d\u200b\u202e\u200f\u206e\u202c\u206a\u206f\u206c\u202b\u206d\u202c\u202e\u206e\u206e\u206a\u202d\u200f\u202d\u200f\u202d\u202a\u200d\u202d\u200e\u200b\u206a\u202c\u206d\u200c\u206d\u206e\u200c\u200d\u200c\u202d\u200f\u202e(object self, int P_1, bool P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u200c\u206e\u200e\u200d\u200b\u202e\u200f\u206e\u202c\u206a\u206f\u206c\u202b\u206d\u202c\u202e\u206e\u206e\u206a\u202d\u200f\u202d\u200f\u202d\u202a\u200d\u202d\u200e\u200b\u206a\u202c\u206d\u200c\u206d\u206e\u200c\u200d\u200c\u202d\u200f\u202e(orig_\u200c\u206e\u200e\u200d\u200b\u202e\u200f\u206e\u202c\u206a\u206f\u206c\u202b\u206d\u202c\u202e\u206e\u206e\u206a\u202d\u200f\u202d\u200f\u202d\u202a\u200d\u202d\u200e\u200b\u206a\u202c\u206d\u200c\u206d\u206e\u200c\u200d\u200c\u202d\u200f\u202e orig, object self, int P_2, bool P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u200d\u202c\u206b\u200e\u202b\u200b\u202d\u206c\u206f\u202c\u202d\u206a\u202e\u200b\u202b\u202e\u202a\u200f\u206a\u202a\u200c\u206a\u202d\u200c\u206b\u202b\u206c\u206c\u200b\u206c\u200f\u202e\u200f\u200e\u200f\u206e\u200e\u206d\u200f\u200e\u202e(object self, int P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u200d\u202c\u206b\u200e\u202b\u200b\u202d\u206c\u206f\u202c\u202d\u206a\u202e\u200b\u202b\u202e\u202a\u200f\u206a\u202a\u200c\u206a\u202d\u200c\u206b\u202b\u206c\u206c\u200b\u206c\u200f\u202e\u200f\u200e\u200f\u206e\u200e\u206d\u200f\u200e\u202e(orig_\u200d\u202c\u206b\u200e\u202b\u200b\u202d\u206c\u206f\u202c\u202d\u206a\u202e\u200b\u202b\u202e\u202a\u200f\u206a\u202a\u200c\u206a\u202d\u200c\u206b\u202b\u206c\u206c\u200b\u206c\u200f\u202e\u200f\u200e\u200f\u206e\u200e\u206d\u200f\u200e\u202e orig, object self, int P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D orig_\u200c\u202c\u206d\u200e\u206f\u206a\u202d\u206a\u206e\u202c\u202b\u206d\u200c\u206f\u202c\u200c\u200f\u200c\u202d\u200f\u200b\u206b\u200f\u206b\u202a\u200d\u200e\u202c\u202b\u200e\u200e\u202b\u206e\u200b\u200e\u206c\u202a\u200f\u200d\u206a\u202e(object self, int P_1, int P_2, int P_3, int P_4, int P_5);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D hook_\u200c\u202c\u206d\u200e\u206f\u206a\u202d\u206a\u206e\u202c\u202b\u206d\u200c\u206f\u202c\u200c\u200f\u200c\u202d\u200f\u200b\u206b\u200f\u206b\u202a\u200d\u200e\u202c\u202b\u200e\u200e\u202b\u206e\u200b\u200e\u206c\u202a\u200f\u200d\u206a\u202e(orig_\u200c\u202c\u206d\u200e\u206f\u206a\u202d\u206a\u206e\u202c\u202b\u206d\u200c\u206f\u202c\u200c\u200f\u200c\u202d\u200f\u200b\u206b\u200f\u206b\u202a\u200d\u200e\u202c\u202b\u200e\u200e\u202b\u206e\u200b\u200e\u206c\u202a\u200f\u200d\u206a\u202e orig, object self, int P_2, int P_3, int P_4, int P_5, int P_6);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] orig_\u200e\u200f\u206f\u202d\u202e\u200d\u202b\u202d\u206d\u206b\u200b\u202d\u200e\u202a\u200b\u200b\u206d\u200e\u200b\u200c\u202e\u202c\u202d\u202a\u202c\u202e\u200e\u206a\u206d\u202e\u206f\u200d\u200e\u206c\u200c\u202c\u202b\u202c\u202c\u202b\u202e(object self, int P_1, int P_2, int P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] hook_\u200e\u200f\u206f\u202d\u202e\u200d\u202b\u202d\u206d\u206b\u200b\u202d\u200e\u202a\u200b\u200b\u206d\u200e\u200b\u200c\u202e\u202c\u202d\u202a\u202c\u202e\u200e\u206a\u206d\u202e\u206f\u200d\u200e\u206c\u200c\u202c\u202b\u202c\u202c\u202b\u202e(orig_\u200e\u200f\u206f\u202d\u202e\u200d\u202b\u202d\u206d\u206b\u200b\u202d\u200e\u202a\u200b\u200b\u206d\u200e\u200b\u200c\u202e\u202c\u202d\u202a\u202c\u202e\u200e\u206a\u206d\u202e\u206f\u200d\u200e\u206c\u200c\u202c\u202b\u202c\u202c\u202b\u202e orig, object self, int P_2, int P_3, int P_4);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Vector2 orig_\u200b\u206a\u206b\u206c\u206b\u200d\u200f\u206d\u206d\u202a\u206f\u200b\u206c\u206f\u202b\u200c\u200b\u200c\u206e\u206a\u202d\u206d\u200d\u200c\u202a\u202b\u200b\u206e\u200d\u202d\u202c\u206a\u200d\u202e\u202b\u206f\u206d\u200b\u206c\u202e\u202e(object self);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Vector2 hook_\u200b\u206a\u206b\u206c\u206b\u200d\u200f\u206d\u206d\u202a\u206f\u200b\u206c\u206f\u202b\u200c\u200b\u200c\u206e\u206a\u202d\u206d\u200d\u200c\u202a\u202b\u200b\u206e\u200d\u202d\u202c\u206a\u200d\u202e\u202b\u206f\u206d\u200b\u206c\u202e\u202e(orig_\u200b\u206a\u206b\u206c\u206b\u200d\u200f\u206d\u206d\u202a\u206f\u200b\u206c\u206f\u202b\u200c\u200b\u200c\u206e\u206a\u202d\u206d\u200d\u200c\u202a\u202b\u200b\u206e\u200d\u202d\u202c\u206a\u200d\u202e\u202b\u206f\u206d\u200b\u206c\u202e\u202e orig, object self);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_\u200c\u202a\u206b\u200d\u200f\u206e\u200c\u200c\u206e\u202a\u200b\u206b\u206a\u206d\u200c\u200c\u200b\u202b\u202e\u200f\u200f\u206f\u206b\u200d\u200b\u202d\u206c\u206d\u200f\u206a\u206f\u200f\u206b\u200c\u206f\u202e\u200d\u206f\u206d\u206d\u202e(Object P_0, Object P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_\u200c\u202a\u206b\u200d\u200f\u206e\u200c\u200c\u206e\u202a\u200b\u206b\u206a\u206d\u200c\u200c\u200b\u202b\u202e\u200f\u200f\u206f\u206b\u200d\u200b\u202d\u206c\u206d\u200f\u206a\u206f\u200f\u206b\u200c\u206f\u202e\u200d\u206f\u206d\u206d\u202e(orig_\u200c\u202a\u206b\u200d\u200f\u206e\u200c\u200c\u206e\u202a\u200b\u206b\u206a\u206d\u200c\u200c\u200b\u202b\u202e\u200f\u200f\u206f\u206b\u200d\u200b\u202d\u206c\u206d\u200f\u206a\u206f\u200f\u206b\u200c\u206f\u202e\u200d\u206f\u206d\u206d\u202e orig, Object P_1, Object P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] orig_\u202c\u206c\u200c\u206f\u206f\u206e\u200b\u200d\u206b\u202b\u206c\u200c\u202b\u206b\u206e\u202b\u202d\u206c\u206a\u206d\u206b\u202b\u200d\u206d\u202d\u206c\u200f\u206f\u202c\u202d\u206d\u202a\u206e\u200e\u200b\u202e\u202b\u200b\u200b\u206c\u202e(TerrainData P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture2D[] hook_\u202c\u206c\u200c\u206f\u206f\u206e\u200b\u200d\u206b\u202b\u206c\u200c\u202b\u206b\u206e\u202b\u202d\u206c\u206a\u206d\u206b\u202b\u200d\u206d\u202d\u206c\u200f\u206f\u202c\u202d\u206d\u202a\u206e\u200e\u200b\u202e\u202b\u200b\u200b\u206c\u202e(orig_\u202c\u206c\u200c\u206f\u206f\u206e\u200b\u200d\u206b\u202b\u206c\u200c\u202b\u206b\u206e\u202b\u202d\u206c\u206a\u206d\u206b\u202b\u200d\u206d\u202d\u206c\u200f\u206f\u202c\u202d\u206d\u202a\u206e\u200e\u200b\u202e\u202b\u200b\u200b\u206c\u202e orig, TerrainData P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate string orig_\u200d\u202d\u206b\u206f\u206d\u200b\u202b\u202e\u206f\u200f\u200f\u202e\u200d\u200b\u200f\u202d\u206f\u206f\u206f\u206c\u206f\u206e\u200b\u202a\u200f\u206f\u206e\u206c\u200f\u206a\u200d\u202c\u202d\u202b\u206a\u200e\u200b\u206e\u206c\u202e\u202e(Object P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate string hook_\u200d\u202d\u206b\u206f\u206d\u200b\u202b\u202e\u206f\u200f\u200f\u202e\u200d\u200b\u200f\u202d\u206f\u206f\u206f\u206c\u206f\u206e\u200b\u202a\u200f\u206f\u206e\u206c\u200f\u206a\u200d\u202c\u202d\u202b\u206a\u200e\u200b\u206e\u206c\u202e\u202e(orig_\u200d\u202d\u206b\u206f\u206d\u200b\u202b\u202e\u206f\u200f\u200f\u202e\u200d\u200b\u200f\u202d\u206f\u206f\u206f\u206c\u206f\u206e\u200b\u202a\u200f\u206f\u206e\u206c\u200f\u206a\u200d\u202c\u202d\u202b\u206a\u200e\u200b\u206e\u206c\u202e\u202e orig, Object P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_\u206b\u202c\u206e\u206c\u206f\u206d\u200d\u202c\u200e\u206b\u202a\u202d\u206b\u202c\u206d\u206b\u206a\u206a\u206a\u202b\u202c\u206a\u206a\u206d\u206d\u202c\u202d\u206f\u202c\u200b\u206c\u200f\u206a\u200e\u202b\u200c\u200e\u202c\u202c\u206e\u202e(string P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_\u206b\u202c\u206e\u206c\u206f\u206d\u200d\u202c\u200e\u206b\u202a\u202d\u206b\u202c\u206d\u206b\u206a\u206a\u206a\u202b\u202c\u206a\u206a\u206d\u206d\u202c\u202d\u206f\u202c\u200b\u206c\u200f\u206a\u200e\u202b\u200c\u200e\u202c\u202c\u206e\u202e(orig_\u206b\u202c\u206e\u206c\u206f\u206d\u200d\u202c\u200e\u206b\u202a\u202d\u206b\u202c\u206d\u206b\u206a\u206a\u206a\u202b\u202c\u206a\u206a\u206d\u206d\u202c\u202d\u206f\u202c\u200b\u206c\u200f\u206a\u200e\u202b\u200c\u200e\u202c\u202c\u206e\u202e orig, string P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate string orig_\u200e\u206c\u202d\u202a\u206a\u202a\u202e\u206c\u202e\u206d\u200c\u206a\u200f\u206a\u206c\u202e\u200b\u202e\u200f\u200f\u200b\u202e\u200b\u202e\u202a\u200e\u200c\u202a\u200d\u202d\u206f\u206c\u200b\u200f\u200f\u206e\u206d\u200e\u206b\u206d\u202e(string P_0, string P_1, string P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate string hook_\u200e\u206c\u202d\u202a\u206a\u202a\u202e\u206c\u202e\u206d\u200c\u206a\u200f\u206a\u206c\u202e\u200b\u202e\u200f\u200f\u200b\u202e\u200b\u202e\u202a\u200e\u200c\u202a\u200d\u202d\u206f\u206c\u200b\u200f\u200f\u206e\u206d\u200e\u206b\u206d\u202e(orig_\u200e\u206c\u202d\u202a\u206a\u202a\u202e\u206c\u202e\u206d\u200c\u206a\u200f\u206a\u206c\u202e\u200b\u202e\u200f\u200f\u200b\u202e\u200b\u202e\u202a\u200e\u200c\u202a\u200d\u202d\u206f\u206c\u200b\u200f\u200f\u206e\u206d\u200e\u206b\u206d\u202e orig, string P_1, string P_2, string P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Shader orig_\u202b\u202b\u202e\u202c\u206e\u202c\u206e\u200e\u202b\u200c\u206d\u206d\u200c\u206d\u200b\u206a\u200f\u202a\u200f\u200e\u200e\u206e\u200e\u206d\u206a\u200d\u200e\u202d\u206f\u202a\u202e\u200b\u200e\u200e\u206c\u206b\u200e\u202b\u200f\u202d\u202e(string P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Shader hook_\u202b\u202b\u202e\u202c\u206e\u202c\u206e\u200e\u202b\u200c\u206d\u206d\u200c\u206d\u200b\u206a\u200f\u202a\u200f\u200e\u200e\u206e\u200e\u206d\u206a\u200d\u200e\u202d\u206f\u202a\u202e\u200b\u200e\u200e\u206c\u206b\u200e\u202b\u200f\u202d\u202e(orig_\u202b\u202b\u202e\u202c\u206e\u202c\u206e\u200e\u202b\u200c\u206d\u206d\u200c\u206d\u200b\u206a\u200f\u202a\u200f\u200e\u200e\u206e\u200e\u206d\u206a\u200d\u200e\u202d\u206f\u202a\u202e\u200b\u200e\u200e\u206c\u206b\u200e\u202b\u200f\u202d\u202e orig, string P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Material orig_\u206d\u206f\u202b\u206d\u202e\u206d\u202d\u202a\u200f\u202c\u200e\u206d\u200d\u202e\u200f\u206f\u200c\u202b\u202d\u206e\u202c\u206d\u200d\u206d\u202d\u200f\u202c\u206f\u202c\u202a\u206b\u206b\u206b\u202b\u202a\u206c\u200f\u206a\u206b\u206e\u202e(Shader P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Material hook_\u206d\u206f\u202b\u206d\u202e\u206d\u202d\u202a\u200f\u202c\u200e\u206d\u200d\u202e\u200f\u206f\u200c\u202b\u202d\u206e\u202c\u206d\u200d\u206d\u202d\u200f\u202c\u206f\u202c\u202a\u206b\u206b\u206b\u202b\u202a\u206c\u200f\u206a\u206b\u206e\u202e(orig_\u206d\u206f\u202b\u206d\u202e\u206d\u202d\u202a\u200f\u202c\u200e\u206d\u200d\u202e\u200f\u206f\u200c\u202b\u202d\u206e\u202c\u206d\u200d\u206d\u202d\u200f\u202c\u206f\u202c\u202a\u206b\u206b\u206b\u202b\u202a\u206c\u200f\u206a\u206b\u206e\u202e orig, Shader P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u200f\u202c\u202c\u200b\u200f\u202b\u202c\u202c\u202b\u200d\u202c\u202d\u206b\u202e\u206e\u200f\u202c\u200e\u200f\u206d\u206e\u202b\u200c\u202d\u200c\u206b\u202d\u202d\u202b\u206f\u206f\u202c\u206b\u202d\u202b\u200c\u206d\u206b\u206f\u206c\u202e(Material P_0, string P_1, float P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u200f\u202c\u202c\u200b\u200f\u202b\u202c\u202c\u202b\u200d\u202c\u202d\u206b\u202e\u206e\u200f\u202c\u200e\u200f\u206d\u206e\u202b\u200c\u202d\u200c\u206b\u202d\u202d\u202b\u206f\u206f\u202c\u206b\u202d\u202b\u200c\u206d\u206b\u206f\u206c\u202e(orig_\u200f\u202c\u202c\u200b\u200f\u202b\u202c\u202c\u202b\u200d\u202c\u202d\u206b\u202e\u206e\u200f\u202c\u200e\u200f\u206d\u206e\u202b\u200c\u202d\u200c\u206b\u202d\u202d\u202b\u206f\u206f\u202c\u206b\u202d\u202b\u200c\u206d\u206b\u206f\u206c\u202e orig, Material P_1, string P_2, float P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate int orig_\u206a\u206b\u202e\u206a\u200d\u200e\u200b\u202a\u206a\u206c\u202c\u200f\u202d\u206d\u202e\u202c\u202a\u202b\u200f\u202d\u206e\u206a\u206c\u206e\u206e\u202c\u202e\u206c\u200d\u200b\u202e\u202c\u206a\u202d\u200b\u200c\u206c\u206a\u202d\u202e(TerrainData P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate int hook_\u206a\u206b\u202e\u206a\u200d\u200e\u200b\u202a\u206a\u206c\u202c\u200f\u202d\u206d\u202e\u202c\u202a\u202b\u200f\u202d\u206e\u206a\u206c\u206e\u206e\u202c\u202e\u206c\u200d\u200b\u202e\u202c\u206a\u202d\u200b\u200c\u206c\u206a\u202d\u202e(orig_\u206a\u206b\u202e\u206a\u200d\u200e\u200b\u202a\u206a\u206c\u202c\u200f\u202d\u206d\u202e\u202c\u202a\u202b\u200f\u202d\u206e\u206a\u206c\u206e\u206e\u202c\u202e\u206c\u200d\u200b\u202e\u202c\u206a\u202d\u200b\u200c\u206c\u206a\u202d\u202e orig, TerrainData P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture orig_\u202b\u200c\u202c\u206c\u206a\u202a\u206c\u202b\u202d\u200c\u206d\u206f\u206b\u200e\u200b\u202b\u206e\u206b\u200d\u200c\u200f\u200b\u206d\u202d\u200d\u202a\u202d\u200f\u206c\u206b\u200d\u202b\u202a\u206d\u200d\u206b\u206d\u200f\u202a\u206b\u202e(int P_0, int P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture hook_\u202b\u200c\u202c\u206c\u206a\u202a\u206c\u202b\u202d\u200c\u206d\u206f\u206b\u200e\u200b\u202b\u206e\u206b\u200d\u200c\u200f\u200b\u206d\u202d\u200d\u202a\u202d\u200f\u206c\u206b\u200d\u202b\u202a\u206d\u200d\u206b\u206d\u200f\u202a\u206b\u202e(orig_\u202b\u200c\u202c\u206c\u206a\u202a\u206c\u202b\u202d\u200c\u206d\u206f\u206b\u200e\u200b\u202b\u206e\u206b\u200d\u200c\u200f\u200b\u206d\u202d\u200d\u202a\u202d\u200f\u206c\u206b\u200d\u202b\u202a\u206d\u200d\u206b\u206d\u200f\u202a\u206b\u202e orig, int P_1, int P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_\u200c\u200b\u202e\u202c\u202c\u206e\u202c\u200c\u202e\u202a\u202d\u200d\u206e\u206a\u200e\u206b\u202b\u202a\u206b\u202c\u202e\u206d\u200d\u200c\u200d\u200f\u206c\u200c\u206d\u200b\u200c\u202e\u206b\u206b\u206f\u200e\u202c\u202a\u200e\u202e\u202e(RenderTexture P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_\u200c\u200b\u202e\u202c\u202c\u206e\u202c\u200c\u202e\u202a\u202d\u200d\u206e\u206a\u200e\u206b\u202b\u202a\u206b\u202c\u202e\u206d\u200d\u200c\u200d\u200f\u206c\u200c\u206d\u200b\u200c\u202e\u206b\u206b\u206f\u200e\u202c\u202a\u200e\u202e\u202e(orig_\u200c\u200b\u202e\u202c\u202c\u206e\u202c\u200c\u202e\u202a\u202d\u200d\u206e\u206a\u200e\u206b\u202b\u202a\u206b\u202c\u202e\u206d\u200d\u200c\u200d\u200f\u206c\u200c\u206d\u200b\u200c\u202e\u206b\u206b\u206f\u200e\u202c\u202a\u200e\u202e\u202e orig, RenderTexture P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate TextureFormat orig_\u206e\u202e\u206c\u206a\u202e\u206f\u206f\u206a\u206e\u200c\u206b\u206b\u206c\u202a\u200f\u202e\u206f\u200f\u200d\u200e\u206e\u202c\u206d\u206f\u200d\u200e\u206c\u202c\u206b\u206a\u206d\u202e\u202e\u200f\u202b\u206c\u202a\u206f\u200b\u206e\u202e(Texture2D P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate TextureFormat hook_\u206e\u202e\u206c\u206a\u202e\u206f\u206f\u206a\u206e\u200c\u206b\u206b\u206c\u202a\u200f\u202e\u206f\u200f\u200d\u200e\u206e\u202c\u206d\u206f\u200d\u200e\u206c\u202c\u206b\u206a\u206d\u202e\u202e\u200f\u202b\u206c\u202a\u206f\u200b\u206e\u202e(orig_\u206e\u202e\u206c\u206a\u202e\u206f\u206f\u206a\u206e\u200c\u206b\u206b\u206c\u202a\u200f\u202e\u206f\u200f\u200d\u200e\u206e\u202c\u206d\u206f\u200d\u200e\u206c\u202c\u206b\u206a\u206d\u202e\u202e\u200f\u202b\u206c\u202a\u206f\u200b\u206e\u202e orig, Texture2D P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u206a\u200f\u200f\u202a\u206e\u202d\u202e\u206f\u200e\u200b\u200d\u200f\u206c\u202d\u206e\u206c\u202a\u202e\u206b\u200c\u206b\u206d\u202b\u202c\u206b\u200b\u202d\u206c\u200f\u202d\u202c\u202c\u202a\u206f\u200f\u206f\u202a\u200c\u202b\u200d\u202e(Texture P_0, TextureWrapMode P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u206a\u200f\u200f\u202a\u206e\u202d\u202e\u206f\u200e\u200b\u200d\u200f\u206c\u202d\u206e\u206c\u202a\u202e\u206b\u200c\u206b\u206d\u202b\u202c\u206b\u200b\u202d\u206c\u200f\u202d\u202c\u202c\u202a\u206f\u200f\u206f\u202a\u200c\u202b\u200d\u202e(orig_\u206a\u200f\u200f\u202a\u206e\u202d\u202e\u206f\u200e\u200b\u200d\u200f\u206c\u202d\u206e\u206c\u202a\u202e\u206b\u200c\u206b\u206d\u202b\u202c\u206b\u200b\u202d\u206c\u200f\u202d\u202c\u202c\u202a\u206f\u200f\u206f\u202a\u200c\u202b\u200d\u202e orig, Texture P_1, TextureWrapMode P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate string orig_\u200b\u206e\u202c\u200d\u200d\u200b\u206d\u200d\u202b\u200f\u202a\u200e\u206b\u206d\u206b\u202b\u200e\u206a\u200b\u200c\u202e\u202c\u206a\u200f\u200d\u206c\u200d\u206d\u202b\u200d\u202d\u206a\u202e\u206a\u206d\u206b\u200f\u200e\u200f\u206c\u202e(string P_0, string P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate string hook_\u200b\u206e\u202c\u200d\u200d\u200b\u206d\u200d\u202b\u200f\u202a\u200e\u206b\u206d\u206b\u202b\u200e\u206a\u200b\u200c\u202e\u202c\u206a\u200f\u200d\u206c\u200d\u206d\u202b\u200d\u202d\u206a\u202e\u206a\u206d\u206b\u200f\u200e\u200f\u206c\u202e(orig_\u200b\u206e\u202c\u200d\u200d\u200b\u206d\u200d\u202b\u200f\u202a\u200e\u206b\u206d\u206b\u202b\u200e\u206a\u200b\u200c\u202e\u202c\u206a\u200f\u200d\u206c\u200d\u206d\u202b\u200d\u202d\u206a\u202e\u206a\u206d\u206b\u200f\u200e\u200f\u206c\u202e orig, string P_1, string P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u202d\u206e\u200d\u200f\u202c\u200e\u206e\u200f\u206b\u202d\u200e\u202a\u200f\u202a\u202c\u202c\u206c\u200b\u200f\u206f\u206a\u206a\u206a\u202b\u206b\u206e\u206d\u200c\u202c\u200b\u200d\u206e\u202c\u200c\u200e\u200b\u202b\u200d\u206f\u200c\u202e(Object P_0, string P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u202d\u206e\u200d\u200f\u202c\u200e\u206e\u200f\u206b\u202d\u200e\u202a\u200f\u202a\u202c\u202c\u206c\u200b\u200f\u206f\u206a\u206a\u206a\u202b\u206b\u206e\u206d\u200c\u202c\u200b\u200d\u206e\u202c\u200c\u200e\u200b\u202b\u200d\u206f\u200c\u202e(orig_\u202d\u206e\u200d\u200f\u202c\u200e\u206e\u200f\u206b\u202d\u200e\u202a\u200f\u202a\u202c\u202c\u206c\u200b\u200f\u206f\u206a\u206a\u206a\u202b\u206b\u206e\u206d\u200c\u202c\u200b\u200d\u206e\u202c\u200c\u200e\u200b\u202b\u200d\u206f\u200c\u202e orig, Object P_1, string P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u200b\u206b\u202a\u206c\u206e\u202c\u200c\u202d\u206e\u206c\u200e\u200f\u200d\u202d\u200e\u206a\u202b\u206a\u202b\u202b\u206c\u200d\u206c\u206a\u200b\u202a\u202c\u206b\u206b\u200e\u200d\u206e\u206e\u206d\u202b\u206e\u206c\u206f\u200b\u202d\u202e(RenderTexture P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u200b\u206b\u202a\u206c\u206e\u202c\u200c\u202d\u206e\u206c\u200e\u200f\u200d\u202d\u200e\u206a\u202b\u206a\u202b\u202b\u206c\u200d\u206c\u206a\u200b\u202a\u202c\u206b\u206b\u200e\u200d\u206e\u206e\u206d\u202b\u206e\u206c\u206f\u200b\u202d\u202e(orig_\u200b\u206b\u202a\u206c\u206e\u202c\u200c\u202d\u206e\u206c\u200e\u200f\u200d\u202d\u200e\u206a\u202b\u206a\u202b\u202b\u206c\u200d\u206c\u206a\u200b\u202a\u202c\u206b\u206b\u200e\u200d\u206e\u206e\u206d\u202b\u206e\u206c\u206f\u200b\u202d\u202e orig, RenderTexture P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_\u202e\u202d\u200e\u202e\u200b\u202b\u202a\u200c\u202b\u202a\u206d\u206a\u206b\u206d\u206a\u206a\u202c\u202c\u206d\u206b\u206e\u206e\u206f\u200d\u206a\u200d\u206c\u202c\u206a\u206f\u206c\u206a\u200e\u206d\u200f\u206f\u206a\u202a\u200f\u200e\u202e();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_\u202e\u202d\u200e\u202e\u200b\u202b\u202a\u200c\u202b\u202a\u206d\u206a\u206b\u206d\u206a\u206a\u202c\u202c\u206d\u206b\u206e\u206e\u206f\u200d\u206a\u200d\u206c\u202c\u206a\u206f\u206c\u206a\u200e\u206d\u200f\u206f\u206a\u202a\u200f\u200e\u202e(orig_\u202e\u202d\u200e\u202e\u200b\u202b\u202a\u200c\u202b\u202a\u206d\u206a\u206b\u206d\u206a\u206a\u202c\u202c\u206d\u206b\u206e\u206e\u206f\u200d\u206a\u200d\u206c\u202c\u206a\u206f\u206c\u206a\u200e\u206d\u200f\u206f\u206a\u202a\u200f\u200e\u202e orig);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u206b\u206f\u200e\u206e\u202c\u200d\u206a\u206d\u206c\u206e\u206e\u206d\u206a\u206f\u202a\u202c\u200f\u206a\u200d\u206f\u206e\u202a\u200d\u206d\u206b\u200e\u200d\u206b\u202c\u202e\u200e\u200d\u206f\u200e\u202d\u200e\u206f\u200c\u206d\u202d\u202e(Object P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u206b\u206f\u200e\u206e\u202c\u200d\u206a\u206d\u206c\u206e\u206e\u206d\u206a\u206f\u202a\u202c\u200f\u206a\u200d\u206f\u206e\u202a\u200d\u206d\u206b\u200e\u200d\u206b\u202c\u202e\u200e\u200d\u206f\u200e\u202d\u200e\u206f\u200c\u206d\u202d\u202e(orig_\u206b\u206f\u200e\u206e\u202c\u200d\u206a\u206d\u206c\u206e\u206e\u206d\u206a\u206f\u202a\u202c\u200f\u206a\u200d\u206f\u206e\u202a\u200d\u206d\u206b\u200e\u200d\u206b\u202c\u202e\u200e\u200d\u206f\u200e\u202d\u200e\u206f\u200c\u206d\u202d\u202e orig, Object P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u206b\u206e\u200e\u202a\u206f\u202e\u206f\u200e\u200f\u206c\u202e\u206d\u206c\u206c\u202b\u200c\u202b\u202e\u206b\u202d\u206a\u202a\u202b\u200b\u202d\u200d\u206e\u206f\u206b\u200f\u202e\u206d\u202e\u200f\u200b\u206e\u202c\u202c\u202a\u202c\u202e(Object P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u206b\u206e\u200e\u202a\u206f\u202e\u206f\u200e\u200f\u206c\u202e\u206d\u206c\u206c\u202b\u200c\u202b\u202e\u206b\u202d\u206a\u202a\u202b\u200b\u202d\u200d\u206e\u206f\u206b\u200f\u202e\u206d\u202e\u200f\u200b\u206e\u202c\u202c\u202a\u202c\u202e(orig_\u206b\u206e\u200e\u202a\u206f\u202e\u206f\u200e\u200f\u206c\u202e\u206d\u206c\u206c\u202b\u200c\u202b\u202e\u206b\u202d\u206a\u202a\u202b\u200b\u202d\u200d\u206e\u206f\u206b\u200f\u202e\u206d\u202e\u200f\u200b\u206e\u202c\u202c\u202a\u202c\u202e orig, Object P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate ColorSpace orig_\u206a\u202b\u202c\u200b\u206f\u202e\u200c\u206b\u200f\u202b\u206e\u206e\u200b\u202b\u202a\u206f\u202a\u202c\u206f\u200b\u206c\u200d\u206e\u200c\u202b\u202a\u206f\u206e\u200b\u200d\u202e\u200e\u202c\u206b\u200e\u206e\u202d\u206a\u202b\u200e\u202e();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate ColorSpace hook_\u206a\u202b\u202c\u200b\u206f\u202e\u200c\u206b\u200f\u202b\u206e\u206e\u200b\u202b\u202a\u206f\u202a\u202c\u206f\u200b\u206c\u200d\u206e\u200c\u202b\u202a\u206f\u206e\u200b\u200d\u202e\u200e\u202c\u206b\u200e\u206e\u202d\u206a\u202b\u200e\u202e(orig_\u206a\u202b\u202c\u200b\u206f\u202e\u200c\u206b\u200f\u202b\u206e\u206e\u200b\u202b\u202a\u206f\u202a\u202c\u206f\u200b\u206c\u200d\u206e\u200c\u202b\u202a\u206f\u206e\u200b\u200d\u202e\u200e\u202c\u206b\u200e\u206e\u202d\u206a\u202b\u200e\u202e orig);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture orig_\u202d\u206b\u202d\u202d\u202c\u200f\u200c\u200e\u202d\u200b\u202c\u200b\u206e\u206c\u206d\u206c\u202e\u206b\u206a\u206e\u206a\u200d\u202c\u202b\u200d\u206d\u206f\u206c\u206b\u202b\u206c\u202e\u206e\u200b\u206a\u200f\u200f\u206f\u206a\u202a\u202e(TerrainData P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture hook_\u202d\u206b\u202d\u202d\u202c\u200f\u200c\u200e\u202d\u200b\u202c\u200b\u206e\u206c\u206d\u206c\u202e\u206b\u206a\u206e\u206a\u200d\u202c\u202b\u200d\u206d\u206f\u206c\u206b\u202b\u206c\u202e\u206e\u200b\u206a\u200f\u200f\u206f\u206a\u202a\u202e(orig_\u202d\u206b\u202d\u202d\u202c\u200f\u200c\u200e\u202d\u200b\u202c\u200b\u206e\u206c\u206d\u206c\u202e\u206b\u206a\u206e\u206a\u200d\u202c\u202b\u200d\u206d\u206f\u206c\u206b\u202b\u206c\u202e\u206e\u200b\u206a\u200f\u200f\u206f\u206a\u202a\u202e orig, TerrainData P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u206f\u200f\u206f\u200b\u206e\u202b\u202c\u206a\u200e\u200b\u200f\u206d\u206b\u200e\u200f\u200e\u206c\u202d\u206a\u206f\u200b\u200d\u206a\u206b\u206d\u202a\u202d\u206c\u206b\u206f\u202d\u200b\u200c\u202d\u202a\u206d\u206e\u206c\u202b\u202d\u202e(Material P_0, string P_1, Vector4 P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u206f\u200f\u206f\u200b\u206e\u202b\u202c\u206a\u200e\u200b\u200f\u206d\u206b\u200e\u200f\u200e\u206c\u202d\u206a\u206f\u200b\u200d\u206a\u206b\u206d\u202a\u202d\u206c\u206b\u206f\u202d\u200b\u200c\u202d\u202a\u206d\u206e\u206c\u202b\u202d\u202e(orig_\u206f\u200f\u206f\u200b\u206e\u202b\u202c\u206a\u200e\u200b\u200f\u206d\u206b\u200e\u200f\u200e\u206c\u202d\u206a\u206f\u200b\u200d\u206a\u206b\u206d\u202a\u202d\u206c\u206b\u206f\u202d\u200b\u200c\u202d\u202a\u206d\u206e\u206c\u202b\u202d\u202e orig, Material P_1, string P_2, Vector4 P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate int orig_\u206b\u206a\u200e\u202d\u206b\u202d\u200b\u202a\u206f\u200e\u200d\u202e\u206d\u200b\u206a\u202a\u200f\u202d\u206f\u202b\u202a\u200b\u206b\u200b\u200d\u200b\u202e\u202d\u206c\u206e\u202b\u202e\u202a\u200e\u202b\u200c\u202a\u200b\u200c\u206b\u202e(Texture P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate int hook_\u206b\u206a\u200e\u202d\u206b\u202d\u200b\u202a\u206f\u200e\u200d\u202e\u206d\u200b\u206a\u202a\u200f\u202d\u206f\u202b\u202a\u200b\u206b\u200b\u200d\u200b\u202e\u202d\u206c\u206e\u202b\u202e\u202a\u200e\u202b\u200c\u202a\u200b\u200c\u206b\u202e(orig_\u206b\u206a\u200e\u202d\u206b\u202d\u200b\u202a\u206f\u200e\u200d\u202e\u206d\u200b\u206a\u202a\u200f\u202d\u206f\u202b\u202a\u200b\u206b\u200b\u200d\u200b\u202e\u202d\u206c\u206e\u202b\u202e\u202a\u200e\u202b\u200c\u202a\u200b\u200c\u206b\u202e orig, Texture P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTextureFormat orig_\u206c\u206c\u200e\u202a\u202d\u202b\u206d\u202b\u202b\u200b\u200e\u202b\u202e\u200d\u200d\u202e\u206b\u206a\u206d\u206d\u206e\u200b\u200d\u206b\u202c\u200c\u202b\u202e\u202d\u202d\u206c\u200d\u200c\u202c\u202b\u200c\u200b\u206a\u202d\u202a\u202e(RenderTexture P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTextureFormat hook_\u206c\u206c\u200e\u202a\u202d\u202b\u206d\u202b\u202b\u200b\u200e\u202b\u202e\u200d\u200d\u202e\u206b\u206a\u206d\u206d\u206e\u200b\u200d\u206b\u202c\u200c\u202b\u202e\u202d\u202d\u206c\u200d\u200c\u202c\u202b\u200c\u200b\u206a\u202d\u202a\u202e(orig_\u206c\u206c\u200e\u202a\u202d\u202b\u206d\u202b\u202b\u200b\u200e\u202b\u202e\u200d\u200d\u202e\u206b\u206a\u206d\u206d\u206e\u200b\u200d\u206b\u202c\u200c\u202b\u202e\u202d\u202d\u206c\u200d\u200c\u202c\u202b\u200c\u200b\u206a\u202d\u202a\u202e orig, RenderTexture P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_\u202e\u206b\u206b\u206c\u202c\u206b\u206e\u200f\u206f\u200c\u206b\u206a\u202d\u206c\u200c\u200f\u200f\u200f\u202a\u200b\u202c\u206f\u206d\u200d\u202a\u200f\u206a\u202e\u202e\u200f\u206b\u202e\u206a\u202d\u206d\u202b\u200e\u206a\u206d\u202b\u202e(RenderTextureFormat P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_\u202e\u206b\u206b\u206c\u202c\u206b\u206e\u200f\u206f\u200c\u206b\u206a\u202d\u206c\u200c\u200f\u200f\u200f\u202a\u200b\u202c\u206f\u206d\u200d\u202a\u200f\u206a\u202e\u202e\u200f\u206b\u202e\u206a\u202d\u206d\u202b\u200e\u206a\u206d\u202b\u202e(orig_\u202e\u206b\u206b\u206c\u202c\u206b\u206e\u200f\u206f\u200c\u206b\u206a\u202d\u206c\u200c\u200f\u200f\u200f\u202a\u200b\u202c\u206f\u206d\u200d\u202a\u200f\u206a\u202e\u202e\u200f\u206b\u202e\u206a\u202d\u206d\u202b\u200e\u206a\u206d\u202b\u202e orig, RenderTextureFormat P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_\u200b\u202d\u200c\u206c\u202e\u200f\u200e\u200d\u202b\u202d\u206c\u200f\u206b\u202c\u200d\u200f\u202c\u206f\u202c\u200d\u202a\u206f\u202b\u202d\u200e\u202e\u206e\u202c\u206f\u200d\u200f\u206e\u206c\u206d\u202d\u206a\u206f\u206e\u202c\u202d\u202e(TextureFormat P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_\u200b\u202d\u200c\u206c\u202e\u200f\u200e\u200d\u202b\u202d\u206c\u200f\u206b\u202c\u200d\u200f\u202c\u206f\u202c\u200d\u202a\u206f\u202b\u202d\u200e\u202e\u206e\u202c\u206f\u200d\u200f\u206e\u206c\u206d\u202d\u206a\u206f\u206e\u202c\u202d\u202e(orig_\u200b\u202d\u200c\u206c\u202e\u200f\u200e\u200d\u202b\u202d\u206c\u200f\u206b\u202c\u200d\u200f\u202c\u206f\u202c\u200d\u202a\u206f\u202b\u202d\u200e\u202e\u206e\u202c\u206f\u200d\u200f\u206e\u206c\u206d\u202d\u206a\u206f\u206e\u202c\u202d\u202e orig, TextureFormat P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture orig_\u206b\u200b\u202c\u206a\u200b\u200d\u200e\u206c\u206c\u202c\u200e\u206d\u202a\u202c\u202a\u206a\u202d\u206b\u202d\u202c\u206b\u206d\u206c\u202d\u202c\u200e\u206e\u206b\u206e\u206b\u202a\u202a\u202a\u202e\u202d\u202c\u206f\u206f\u206f\u200d\u202e(int P_0, int P_1, int P_2, RenderTextureFormat P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture hook_\u206b\u200b\u202c\u206a\u200b\u200d\u200e\u206c\u206c\u202c\u200e\u206d\u202a\u202c\u202a\u206a\u202d\u206b\u202d\u202c\u206b\u206d\u206c\u202d\u202c\u200e\u206e\u206b\u206e\u206b\u202a\u202a\u202a\u202e\u202d\u202c\u206f\u206f\u206f\u200d\u202e(orig_\u206b\u200b\u202c\u206a\u200b\u200d\u200e\u206c\u206c\u202c\u200e\u206d\u202a\u202c\u202a\u206a\u202d\u206b\u202d\u202c\u206b\u206d\u206c\u202d\u202c\u200e\u206e\u206b\u206e\u206b\u202a\u202a\u202a\u202e\u202d\u202c\u206f\u206f\u206f\u200d\u202e orig, int P_1, int P_2, int P_3, RenderTextureFormat P_4);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture orig_\u200b\u206a\u200e\u206d\u206f\u200f\u200c\u202c\u206a\u206f\u206c\u206f\u200f\u206e\u206c\u200d\u200c\u202c\u202b\u200d\u202a\u206c\u206c\u200c\u206c\u206c\u200b\u200f\u202a\u202d\u206c\u200d\u202e\u200e\u200d\u206e\u202c\u200d\u206b\u202e(TerrainData P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Texture hook_\u200b\u206a\u200e\u206d\u206f\u200f\u200c\u202c\u206a\u206f\u206c\u206f\u200f\u206e\u206c\u200d\u200c\u202c\u202b\u200d\u202a\u206c\u206c\u200c\u206c\u206c\u200b\u200f\u202a\u202d\u206c\u200d\u202e\u200e\u200d\u206e\u202c\u200d\u206b\u202e(orig_\u200b\u206a\u200e\u206d\u206f\u200f\u200c\u202c\u206a\u206f\u206c\u206f\u200f\u206e\u206c\u200d\u200c\u202c\u202b\u200d\u202a\u206c\u206c\u200c\u206c\u206c\u200b\u200f\u202a\u202d\u206c\u200d\u202e\u200e\u200d\u206e\u202c\u200d\u206b\u202e orig, TerrainData P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_\u202c\u202d\u202c\u200f\u200e\u206f\u206c\u200f\u206d\u200d\u200d\u202b\u202d\u206d\u200f\u200d\u200d\u202e\u200b\u206d\u200c\u202c\u200e\u200c\u200d\u200e\u200e\u206d\u200f\u200d\u200d\u206c\u206d\u206c\u200c\u206e\u206e\u200f\u202c\u202a\u202e(TerrainData P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_\u202c\u202d\u202c\u200f\u200e\u206f\u206c\u200f\u206d\u200d\u200d\u202b\u202d\u206d\u200f\u200d\u200d\u202e\u200b\u206d\u200c\u202c\u200e\u200c\u200d\u200e\u200e\u206d\u200f\u200d\u200d\u206c\u206d\u206c\u200c\u206e\u206e\u200f\u202c\u202a\u202e(orig_\u202c\u202d\u202c\u200f\u200e\u206f\u206c\u200f\u206d\u200d\u200d\u202b\u202d\u206d\u200f\u200d\u200d\u202e\u200b\u206d\u200c\u202c\u200e\u200c\u200d\u200e\u200e\u206d\u200f\u200d\u200d\u206c\u206d\u206c\u200c\u206e\u206e\u200f\u202c\u202a\u202e orig, TerrainData P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u200f\u206a\u200c\u206b\u200c\u202d\u200f\u206c\u200d\u200b\u206d\u200f\u202c\u200c\u200b\u202c\u206b\u206a\u206a\u202d\u202a\u200d\u206e\u202b\u206c\u206b\u202e\u206a\u202b\u206d\u200d\u200d\u206d\u206e\u206c\u200f\u202e\u200f\u200d\u206e\u202e(TerrainData P_0, bool P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u200f\u206a\u200c\u206b\u200c\u202d\u200f\u206c\u200d\u200b\u206d\u200f\u202c\u200c\u200b\u202c\u206b\u206a\u206a\u202d\u202a\u200d\u206e\u202b\u206c\u206b\u202e\u206a\u202b\u206d\u200d\u200d\u206d\u206e\u206c\u200f\u202e\u200f\u200d\u206e\u202e(orig_\u200f\u206a\u200c\u206b\u200c\u202d\u200f\u206c\u200d\u200b\u206d\u200f\u202c\u200c\u200b\u202c\u206b\u206a\u206a\u202d\u202a\u200d\u206e\u202b\u206c\u206b\u202e\u206a\u202b\u206d\u200d\u200d\u206d\u206e\u206c\u200f\u202e\u200f\u200d\u206e\u202e orig, TerrainData P_1, bool P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture orig_\u206b\u206d\u206b\u206d\u206c\u206d\u206d\u206d\u206e\u202a\u202b\u200b\u202d\u206e\u206e\u202e\u202c\u206e\u200b\u206f\u200b\u202d\u206a\u200f\u206b\u200c\u200c\u200e\u202c\u206f\u202e\u202d\u202c\u206d\u206a\u206a\u206e\u202e\u200c\u200f\u202e(int P_0, int P_1, int P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate RenderTexture hook_\u206b\u206d\u206b\u206d\u206c\u206d\u206d\u206d\u206e\u202a\u202b\u200b\u202d\u206e\u206e\u202e\u202c\u206e\u200b\u206f\u200b\u202d\u206a\u200f\u206b\u200c\u200c\u200e\u202c\u206f\u202e\u202d\u202c\u206d\u206a\u206a\u206e\u202e\u200c\u200f\u202e(orig_\u206b\u206d\u206b\u206d\u206c\u206d\u206d\u206d\u206e\u202a\u202b\u200b\u202d\u206e\u206e\u202e\u202c\u206e\u200b\u206f\u200b\u202d\u206a\u200f\u206b\u200c\u200c\u200e\u202c\u206f\u202e\u202d\u202c\u206d\u206a\u206a\u206e\u202e\u200c\u200f\u202e orig, int P_1, int P_2, int P_3);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_\u202a\u200f\u202c\u206a\u206a\u200d\u206b\u200c\u202b\u206c\u206c\u200b\u200c\u206a\u200b\u202a\u202e\u202e\u200d\u206b\u202e\u206e\u202a\u202a\u202e\u200f\u202e\u200d\u206e\u202e\u200d\u202c\u200d\u202c\u202a\u200c\u202a\u202e\u200e\u200c\u202e(Texture P_0, RenderTexture P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_\u202a\u200f\u202c\u206a\u206a\u200d\u206b\u200c\u202b\u206c\u206c\u200b\u200c\u206a\u200b\u202a\u202e\u202e\u200d\u206b\u202e\u206e\u202a\u202a\u202e\u200f\u202e\u200d\u206e\u202e\u200d\u202c\u200d\u202c\u202a\u200c\u202a\u202e\u200e\u200c\u202e(orig_\u202a\u200f\u202c\u206a\u206a\u200d\u206b\u200c\u202b\u206c\u206c\u200b\u200c\u206a\u200b\u202a\u202e\u202e\u200d\u206b\u202e\u206e\u202a\u202a\u202e\u200f\u202e\u200d\u206e\u202e\u200d\u202c\u200d\u202c\u202a\u200c\u202a\u202e\u200e\u200c\u202e orig, Texture P_1, RenderTexture P_2);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Color[] orig_\u200f\u206a\u206e\u202c\u202b\u206e\u200d\u206a\u200e\u202a\u206e\u200c\u206c\u206e\u200b\u200b\u200e\u202d\u206e\u200c\u206d\u202d\u200e\u200b\u202b\u200d\u202a\u200b\u202c\u202a\u200f\u206e\u202d\u206b\u200f\u206e\u206b\u202b\u202b\u206c\u202e(Texture2D P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate Color[] hook_\u200f\u206a\u206e\u202c\u202b\u206e\u200d\u206a\u200e\u202a\u206e\u200c\u206c\u206e\u200b\u200b\u200e\u202d\u206e\u200c\u206d\u202d\u200e\u200b\u202b\u200d\u202a\u200b\u202c\u202a\u200f\u206e\u202d\u206b\u200f\u206e\u206b\u202b\u202b\u206c\u202e(orig_\u200f\u206a\u206e\u202c\u202b\u206e\u200d\u206a\u200e\u202a\u206e\u200c\u206c\u206e\u200b\u200b\u200e\u202d\u206e\u200c\u206d\u202d\u200e\u200b\u202b\u200d\u202a\u200b\u202c\u202a\u200f\u206e\u202d\u206b\u200f\u206e\u206b\u202b\u202b\u206c\u202e orig, Texture2D P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate float orig_\u202e\u206d\u206c\u206a\u200c\u202b\u206c\u202a\u200f\u202c\u206c\u202b\u200b\u202e\u206f\u202d\u200b\u200f\u202a\u202b\u200f\u206c\u206c\u202c\u200b\u202d\u200c\u202d\u206d\u206b\u202d\u200c\u200b\u202c\u202d\u200e\u202e\u206e\u200e\u202d\u202e(IEnumerable<float> P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate float hook_\u202e\u206d\u206c\u206a\u200c\u202b\u206c\u202a\u200f\u202c\u206c\u202b\u200b\u202e\u206f\u202d\u200b\u200f\u202a\u202b\u200f\u206c\u206c\u202c\u200b\u202d\u200c\u202d\u206d\u206b\u202d\u200c\u200b\u202c\u202d\u200e\u202e\u206e\u200e\u202d\u202e(orig_\u202e\u206d\u206c\u206a\u200c\u202b\u206c\u202a\u200f\u202c\u206c\u202b\u200b\u202e\u206f\u202d\u200b\u200f\u202a\u202b\u200f\u206c\u206c\u202c\u200b\u202d\u200c\u202d\u206d\u206b\u202d\u200c\u200b\u202c\u202d\u200e\u202e\u206e\u200e\u202d\u202e orig, IEnumerable<float> P_1);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate float orig_\u206c\u206b\u206c\u202a\u206e\u206a\u202e\u200f\u202d\u202e\u202b\u202e\u200c\u202e\u206d\u206c\u200d\u202b\u206a\u200b\u202a\u206b\u206a\u206c\u202c\u202d\u200d\u206b\u206d\u206f\u200d\u206b\u202e\u200c\u206f\u200f\u200f\u202d\u206d\u206e\u202e(IEnumerable<float> P_0);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate float hook_\u206c\u206b\u206c\u202a\u206e\u206a\u202e\u200f\u202d\u202e\u202b\u202e\u200c\u202e\u206d\u206c\u200d\u202b\u206a\u200b\u202a\u206b\u206a\u206c\u202c\u202d\u200d\u206b\u206d\u206f\u200d\u206b\u202e\u200c\u206f\u200f\u200f\u202d\u206d\u206e\u202e(orig_\u206c\u206b\u206c\u202a\u206e\u206a\u202e\u200f\u202d\u202e\u202b\u202e\u200c\u202e\u206d\u206c\u200d\u202b\u206a\u200b\u202a\u206b\u206a\u206c\u202c\u202d\u200d\u206b\u206d\u206f\u200d\u206b\u202e\u200c\u206f\u200f\u200f\u202d\u206d\u206e\u202e orig, IEnumerable<float> P_1);

			public static class \u206f\u202d\u200c\u206d\u200c\u200f\u206d\u206e\u202b\u200b\u202d\u206f\u206e\u200e\u206d\u206d\u206b\u206c\u206d\u200d\u202d\u202c\u200b\u206f\u200e\u202e\u206c\u206f\u202b\u202d\u206a\u200c\u202a\u200b\u200e\u206a\u200f\u200b\u200c\u202c\u202e
			{
				[EditorBrowsable(EditorBrowsableState.Never)]
				public delegate void orig_cctor();

				[EditorBrowsable(EditorBrowsableState.Never)]
				public delegate void hook_cctor(orig_cctor orig);

				[EditorBrowsable(EditorBrowsableState.Never)]
				public delegate void orig_ctor(object self);

				[EditorBrowsable(EditorBrowsableState.Never)]
				public delegate void hook_ctor(orig_ctor orig, object self);

				[EditorBrowsable(EditorBrowsableState.Never)]
				public delegate float orig_\u206b\u200e\u200d\u206f\u206e\u206f\u206a\u202a\u200b\u200d\u200e\u206f\u202c\u202e\u202e\u206d\u202e\u200e\u200c\u202a\u200c\u200d\u202d\u200f\u202d\u200b\u202d\u202d\u202e\u206b\u206f\u206d\u200d\u202a\u202d\u200f\u202d\u202c\u202d\u206b\u202e(object self, Color P_1);

				[EditorBrowsable(EditorBrowsableState.Never)]
				public delegate float hook_\u206b\u200e\u200d\u206f\u206e\u206f\u206a\u202a\u200b\u200d\u200e\u206f\u202c\u202e\u202e\u206d\u202e\u200e\u200c\u202a\u200c\u200d\u202d\u200f\u202d\u200b\u202d\u202d\u202e\u206b\u206f\u206d\u200d\u202a\u202d\u200f\u202d\u202c\u202d\u206b\u202e(orig_\u206b\u200e\u200d\u206f\u206e\u206f\u206a\u202a\u200b\u200d\u200e\u206f\u202c\u202e\u202e\u206d\u202e\u200e\u200c\u202a\u200c\u200d\u202d\u200f\u202d\u200b\u202d\u202d\u202e\u206b\u206f\u206d\u200d\u202a\u202d\u200f\u202d\u202c\u202d\u206b\u202e orig, object self, Color P_2);

				[EditorBrowsable(EditorBrowsableState.Never)]
				public delegate float orig_\u206d\u202d\u200c\u202e\u200c\u206b\u202d\u200c\u202a\u206b\u202d\u206c\u200e\u206b\u200b\u206c\u200e\u200c\u200f\u206c\u200d\u200d\u200b\u206a\u202d\u202d\u202

plugins/MMHOOK/MMHOOK_Assembly-CSharp.dll

Decompiled a year ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using DigitalRuby.ThunderAndLightning;
using Dissonance;
using Dissonance.Integrations.Unity_NFGO;
using DunGen;
using DunGen.Adapters;
using DunGen.Analysis;
using DunGen.Editor;
using DunGen.Graph;
using DunGen.Tags;
using GameNetcodeStuff;
using MonoMod.Cil;
using MonoMod.RuntimeDetour.HookGen;
using On;
using On.DigitalRuby.ThunderAndLightning;
using On.Dissonance.Integrations.Unity_NFGO;
using On.DunGen;
using On.DunGen.Adapters;
using On.DunGen.Analysis;
using On.DunGen.Editor;
using On.DunGen.Graph;
using On.DunGen.Tags;
using On.GameNetcodeStuff;
using On.__GEN;
using Steamworks;
using Steamworks.Data;
using TMPro;
using Unity.AI.Navigation;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityEngine.Video;

[assembly: AssemblyVersion("0.0.0.0")]
namespace On
{
	public static class AlarmButton
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_PushAlarmButton(AlarmButton self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_PushAlarmButton(orig_PushAlarmButton orig, AlarmButton self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Update(AlarmButton self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Update(orig_Update orig, AlarmButton self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(AlarmButton self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, AlarmButton self);

		public static event hook_PushAlarmButton PushAlarmButton
		{
			add
			{
				HookEndpointManager.Add<hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Update Update
		{
			add
			{
				HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class AlarmButton
	{
		public static event Manipulator PushAlarmButton
		{
			add
			{
				HookEndpointManager.Modify<On.AlarmButton.hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AlarmButton.hook_PushAlarmButton>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Update
		{
			add
			{
				HookEndpointManager.Modify<On.AlarmButton.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AlarmButton.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.AlarmButton.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AlarmButton.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On
{
	public static class AnimatedItem
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Start(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Start(orig_Start orig, AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_EquipItem(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_EquipItem(orig_EquipItem orig, AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DiscardItem(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DiscardItem(orig_DiscardItem orig, AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_PocketItem(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_PocketItem(orig_PocketItem orig, AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Update(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Update(orig_Update orig, AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___initializeVariables(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___initializeVariables(orig___initializeVariables orig, AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig___getTypeName(AnimatedItem self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook___getTypeName(orig___getTypeName orig, AnimatedItem self);

		public static event hook_Start Start
		{
			add
			{
				HookEndpointManager.Add<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_EquipItem EquipItem
		{
			add
			{
				HookEndpointManager.Add<hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DiscardItem DiscardItem
		{
			add
			{
				HookEndpointManager.Add<hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_PocketItem PocketItem
		{
			add
			{
				HookEndpointManager.Add<hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Update Update
		{
			add
			{
				HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___initializeVariables __initializeVariables
		{
			add
			{
				HookEndpointManager.Add<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___getTypeName __getTypeName
		{
			add
			{
				HookEndpointManager.Add<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class AnimatedItem
	{
		public static event Manipulator Start
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator EquipItem
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook_EquipItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator DiscardItem
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook_DiscardItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator PocketItem
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook_PocketItem>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Update
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator __initializeVariables
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator __getTypeName
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedItem.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedItem.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On
{
	public static class AnimatedTextureUV
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnEnable(AnimatedTextureUV self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnEnable(orig_OnEnable orig, AnimatedTextureUV self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnDisable(AnimatedTextureUV self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnDisable(orig_OnDisable orig, AnimatedTextureUV self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator orig_AnimateUV(AnimatedTextureUV self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator hook_AnimateUV(orig_AnimateUV orig, AnimatedTextureUV self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(AnimatedTextureUV self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, AnimatedTextureUV self);

		public static event hook_OnEnable OnEnable
		{
			add
			{
				HookEndpointManager.Add<hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnDisable OnDisable
		{
			add
			{
				HookEndpointManager.Add<hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_AnimateUV AnimateUV
		{
			add
			{
				HookEndpointManager.Add<hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class AnimatedTextureUV
	{
		public static event Manipulator OnEnable
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedTextureUV.hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnDisable
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedTextureUV.hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator AnimateUV
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedTextureUV.hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_AnimateUV>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.AnimatedTextureUV.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimatedTextureUV.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On
{
	public static class AnimationStopPoints
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetAnimationStopPosition1(AnimationStopPoints self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetAnimationStopPosition1(orig_SetAnimationStopPosition1 orig, AnimationStopPoints self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetAnimationGo(AnimationStopPoints self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetAnimationGo(orig_SetAnimationGo orig, AnimationStopPoints self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetAnimationStopPosition2(AnimationStopPoints self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetAnimationStopPosition2(orig_SetAnimationStopPosition2 orig, AnimationStopPoints self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(AnimationStopPoints self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, AnimationStopPoints self);

		public static event hook_SetAnimationStopPosition1 SetAnimationStopPosition1
		{
			add
			{
				HookEndpointManager.Add<hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetAnimationGo SetAnimationGo
		{
			add
			{
				HookEndpointManager.Add<hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetAnimationStopPosition2 SetAnimationStopPosition2
		{
			add
			{
				HookEndpointManager.Add<hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class AnimationStopPoints
	{
		public static event Manipulator SetAnimationStopPosition1
		{
			add
			{
				HookEndpointManager.Modify<On.AnimationStopPoints.hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_SetAnimationStopPosition1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SetAnimationGo
		{
			add
			{
				HookEndpointManager.Modify<On.AnimationStopPoints.hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_SetAnimationGo>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SetAnimationStopPosition2
		{
			add
			{
				HookEndpointManager.Modify<On.AnimationStopPoints.hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_SetAnimationStopPosition2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.AnimationStopPoints.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AnimationStopPoints.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On
{
	public static class AudioReverbPresets
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(AudioReverbPresets self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, AudioReverbPresets self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class AudioReverbPresets
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.AudioReverbPresets.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AudioReverbPresets.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On
{
	public static class AutoParentToShip
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Awake(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Awake(orig_Awake orig, AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_LateUpdate(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_LateUpdate(orig_LateUpdate orig, AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartSuckingOutOfShip(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartSuckingOutOfShip(orig_StartSuckingOutOfShip orig, AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator orig_SuckObjectOutOfShip(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator hook_SuckObjectOutOfShip(orig_SuckObjectOutOfShip orig, AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_MoveToOffset(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_MoveToOffset(orig_MoveToOffset orig, AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___initializeVariables(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___initializeVariables(orig___initializeVariables orig, AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig___getTypeName(AutoParentToShip self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook___getTypeName(orig___getTypeName orig, AutoParentToShip self);

		public static event hook_Awake Awake
		{
			add
			{
				HookEndpointManager.Add<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_LateUpdate LateUpdate
		{
			add
			{
				HookEndpointManager.Add<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartSuckingOutOfShip StartSuckingOutOfShip
		{
			add
			{
				HookEndpointManager.Add<hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SuckObjectOutOfShip SuckObjectOutOfShip
		{
			add
			{
				HookEndpointManager.Add<hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_MoveToOffset MoveToOffset
		{
			add
			{
				HookEndpointManager.Add<hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___initializeVariables __initializeVariables
		{
			add
			{
				HookEndpointManager.Add<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___getTypeName __getTypeName
		{
			add
			{
				HookEndpointManager.Add<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class AutoParentToShip
	{
		public static event Manipulator Awake
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator LateUpdate
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator StartSuckingOutOfShip
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook_StartSuckingOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SuckObjectOutOfShip
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook_SuckObjectOutOfShip>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator MoveToOffset
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook_MoveToOffset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator __initializeVariables
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator __getTypeName
		{
			add
			{
				HookEndpointManager.Modify<On.AutoParentToShip.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.AutoParentToShip.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On
{
	public static class BaboonBirdAI
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Start(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Start(orig_Start orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SyncInitialValuesServerRpc(BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SyncInitialValuesServerRpc(orig_SyncInitialValuesServerRpc orig, BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SyncInitialValuesClientRpc(BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SyncInitialValuesClientRpc(orig_SyncInitialValuesClientRpc orig, BaboonBirdAI self, int syncLeadershipLevel, Vector3 campPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_LateUpdate(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_LateUpdate(orig_LateUpdate orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnCollideWithPlayer(BaboonBirdAI self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnCollideWithPlayer(orig_OnCollideWithPlayer orig, BaboonBirdAI self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnCollideWithEnemy(BaboonBirdAI self, Collider other, EnemyAI enemyScript);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnCollideWithEnemy(orig_OnCollideWithEnemy orig, BaboonBirdAI self, Collider other, EnemyAI enemyScript);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_HitEnemy(BaboonBirdAI self, int force, PlayerControllerB playerWhoHit, bool playHitSFX);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_HitEnemy(orig_HitEnemy orig, BaboonBirdAI self, int force, PlayerControllerB playerWhoHit, bool playHitSFX);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_KillEnemy(BaboonBirdAI self, bool destroy);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_KillEnemy(orig_KillEnemy orig, BaboonBirdAI self, bool destroy);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StopKillAnimation(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StopKillAnimation(orig_StopKillAnimation orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StabPlayerDeathAnimServerRpc(BaboonBirdAI self, int playerObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StabPlayerDeathAnimServerRpc(orig_StabPlayerDeathAnimServerRpc orig, BaboonBirdAI self, int playerObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StabPlayerDeathAnimClientRpc(BaboonBirdAI self, int playerObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StabPlayerDeathAnimClientRpc(orig_StabPlayerDeathAnimClientRpc orig, BaboonBirdAI self, int playerObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator orig_killPlayerAnimation(BaboonBirdAI self, int playerObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator hook_killPlayerAnimation(orig_killPlayerAnimation orig, BaboonBirdAI self, int playerObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_InteractWithScrap(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_InteractWithScrap(orig_InteractWithScrap orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_CanGrabScrap(BaboonBirdAI self, GrabbableObject scrap);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_CanGrabScrap(orig_CanGrabScrap orig, BaboonBirdAI self, GrabbableObject scrap);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DropHeldItemAndSync(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DropHeldItemAndSync(orig_DropHeldItemAndSync orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DropScrapServerRpc(BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DropScrapServerRpc(orig_DropScrapServerRpc orig, BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DropScrapClientRpc(BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DropScrapClientRpc(orig_DropScrapClientRpc orig, BaboonBirdAI self, NetworkObjectReference item, Vector3 targetFloorPosition, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DropScrap(BaboonBirdAI self, NetworkObject item, Vector3 targetFloorPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DropScrap(orig_DropScrap orig, BaboonBirdAI self, NetworkObject item, Vector3 targetFloorPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_GrabItemAndSync(BaboonBirdAI self, NetworkObject item);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_GrabItemAndSync(orig_GrabItemAndSync orig, BaboonBirdAI self, NetworkObject item);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_GrabScrapServerRpc(BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_GrabScrapServerRpc(orig_GrabScrapServerRpc orig, BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_GrabScrapClientRpc(BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_GrabScrapClientRpc(orig_GrabScrapClientRpc orig, BaboonBirdAI self, NetworkObjectReference item, int clientWhoSentRPC);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_GrabScrap(BaboonBirdAI self, NetworkObject item);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_GrabScrap(orig_GrabScrap orig, BaboonBirdAI self, NetworkObject item);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ReachedNodeInSearch(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ReachedNodeInSearch(orig_ReachedNodeInSearch orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DoAIInterval(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DoAIInterval(orig_DoAIInterval orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StopFocusingThreat(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StopFocusingThreat(orig_StopFocusingThreat orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StopFocusingThreatServerRpc(BaboonBirdAI self, bool enterScoutingMode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StopFocusingThreatServerRpc(orig_StopFocusingThreatServerRpc orig, BaboonBirdAI self, bool enterScoutingMode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StopFocusingThreatClientRpc(BaboonBirdAI self, bool enterScoutingMode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StopFocusingThreatClientRpc(orig_StopFocusingThreatClientRpc orig, BaboonBirdAI self, bool enterScoutingMode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetAggressiveMode(BaboonBirdAI self, int mode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetAggressiveMode(orig_SetAggressiveMode orig, BaboonBirdAI self, int mode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetAggressiveModeServerRpc(BaboonBirdAI self, int mode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetAggressiveModeServerRpc(orig_SetAggressiveModeServerRpc orig, BaboonBirdAI self, int mode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetAggressiveModeClientRpc(BaboonBirdAI self, int mode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetAggressiveModeClientRpc(orig_SetAggressiveModeClientRpc orig, BaboonBirdAI self, int mode);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetThreatInView(BaboonBirdAI self, bool inView);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetThreatInView(orig_SetThreatInView orig, BaboonBirdAI self, bool inView);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetThreatInViewServerRpc(BaboonBirdAI self, bool inView);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetThreatInViewServerRpc(orig_SetThreatInViewServerRpc orig, BaboonBirdAI self, bool inView);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetThreatInViewClientRpc(BaboonBirdAI self, bool inView);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetThreatInViewClientRpc(orig_SetThreatInViewClientRpc orig, BaboonBirdAI self, bool inView);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_EnemyEnterRestModeServerRpc(BaboonBirdAI self, bool sleep, bool atCamp);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_EnemyEnterRestModeServerRpc(orig_EnemyEnterRestModeServerRpc orig, BaboonBirdAI self, bool sleep, bool atCamp);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_EnemyEnterRestModeClientRpc(BaboonBirdAI self, bool sleep, bool atCamp);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_EnemyEnterRestModeClientRpc(orig_EnemyEnterRestModeClientRpc orig, BaboonBirdAI self, bool sleep, bool atCamp);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_EnemyGetUpServerRpc(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_EnemyGetUpServerRpc(orig_EnemyGetUpServerRpc orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_EnemyGetUpClientRpc(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_EnemyGetUpClientRpc(orig_EnemyGetUpClientRpc orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnDrawGizmos(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnDrawGizmos(orig_OnDrawGizmos orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DetectNoise(BaboonBirdAI self, Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot, int noiseID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DetectNoise(orig_DetectNoise orig, BaboonBirdAI self, Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot, int noiseID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_AnimateLooking(BaboonBirdAI self, Vector3 lookAtPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_AnimateLooking(orig_AnimateLooking orig, BaboonBirdAI self, Vector3 lookAtPosition);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Update(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Update(orig_Update orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate float orig_GetComfortableDistanceToThreat(BaboonBirdAI self, Threat focusedThreat);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate float hook_GetComfortableDistanceToThreat(orig_GetComfortableDistanceToThreat orig, BaboonBirdAI self, Threat focusedThreat);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ReactToThreat(BaboonBirdAI self, Threat closestThreat);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ReactToThreat(orig_ReactToThreat orig, BaboonBirdAI self, Threat closestThreat);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartFocusOnThreatServerRpc(BaboonBirdAI self, NetworkObjectReference netObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartFocusOnThreatServerRpc(orig_StartFocusOnThreatServerRpc orig, BaboonBirdAI self, NetworkObjectReference netObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartFocusOnThreatClientRpc(BaboonBirdAI self, NetworkObjectReference netObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartFocusOnThreatClientRpc(orig_StartFocusOnThreatClientRpc orig, BaboonBirdAI self, NetworkObjectReference netObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate float orig_ReactToOtherBaboonSighted(BaboonBirdAI self, BaboonBirdAI otherBaboon);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate float hook_ReactToOtherBaboonSighted(orig_ReactToOtherBaboonSighted orig, BaboonBirdAI self, BaboonBirdAI otherBaboon);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DoLOSCheck(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DoLOSCheck(orig_DoLOSCheck orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_PingBaboonInterest(BaboonBirdAI self, Vector3 interestPosition, int pingImportance);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_PingBaboonInterest(orig_PingBaboonInterest orig, BaboonBirdAI self, Vector3 interestPosition, int pingImportance);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_PingBirdInterestServerRpc(BaboonBirdAI self, Vector3 lookPosition, float timeToPeek);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_PingBirdInterestServerRpc(orig_PingBirdInterestServerRpc orig, BaboonBirdAI self, Vector3 lookPosition, float timeToPeek);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_PingBirdInterestClientRpc(BaboonBirdAI self, Vector3 lookPosition, float timeToPeek);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_PingBirdInterestClientRpc(orig_PingBirdInterestClientRpc orig, BaboonBirdAI self, Vector3 lookPosition, float timeToPeek);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_JoinScoutingGroup(BaboonBirdAI self, BaboonBirdAI otherBaboon);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_JoinScoutingGroup(orig_JoinScoutingGroup orig, BaboonBirdAI self, BaboonBirdAI otherBaboon);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartScoutingGroup(BaboonBirdAI self, BaboonBirdAI firstMember, bool syncWithClients);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartScoutingGroup(orig_StartScoutingGroup orig, BaboonBirdAI self, BaboonBirdAI firstMember, bool syncWithClients);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_LeaveCurrentScoutingGroup(BaboonBirdAI self, bool sync);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_LeaveCurrentScoutingGroup(orig_LeaveCurrentScoutingGroup orig, BaboonBirdAI self, bool sync);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_LeaveScoutingGroupServerRpc(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_LeaveScoutingGroupServerRpc(orig_LeaveScoutingGroupServerRpc orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_LeaveScoutingGroupClientRpc(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_LeaveScoutingGroupClientRpc(orig_LeaveScoutingGroupClientRpc orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartScoutingGroupServerRpc(BaboonBirdAI self, NetworkObjectReference leaderNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartScoutingGroupServerRpc(orig_StartScoutingGroupServerRpc orig, BaboonBirdAI self, NetworkObjectReference leaderNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartScoutingGroupClientRpc(BaboonBirdAI self, NetworkObjectReference leaderNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartScoutingGroupClientRpc(orig_StartScoutingGroupClientRpc orig, BaboonBirdAI self, NetworkObjectReference leaderNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_JoinScoutingGroupServerRpc(BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_JoinScoutingGroupServerRpc(orig_JoinScoutingGroupServerRpc orig, BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_JoinScoutingGroupClientRpc(BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_JoinScoutingGroupClientRpc(orig_JoinScoutingGroupClientRpc orig, BaboonBirdAI self, NetworkObjectReference otherBaboonNetworkObject);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_CallToOtherBaboon(BaboonBirdAI self, BaboonBirdAI otherBaboon);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_CallToOtherBaboon(orig_CallToOtherBaboon orig, BaboonBirdAI self, BaboonBirdAI otherBaboon);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartMiscAnimation(BaboonBirdAI self, int anim);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartMiscAnimation(orig_StartMiscAnimation orig, BaboonBirdAI self, int anim);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartMiscAnimationServerRpc(BaboonBirdAI self, int miscAnimationId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartMiscAnimationServerRpc(orig_StartMiscAnimationServerRpc orig, BaboonBirdAI self, int miscAnimationId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_StartMiscAnimationClientRpc(BaboonBirdAI self, int miscAnimationId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_StartMiscAnimationClientRpc(orig_StartMiscAnimationClientRpc orig, BaboonBirdAI self, int miscAnimationId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_CalculateAnimationDirection(BaboonBirdAI self, float maxSpeed);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_CalculateAnimationDirection(orig_CalculateAnimationDirection orig, BaboonBirdAI self, float maxSpeed);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___initializeVariables(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___initializeVariables(orig___initializeVariables orig, BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_InitializeRPCS_BaboonBirdAI();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_InitializeRPCS_BaboonBirdAI(orig_InitializeRPCS_BaboonBirdAI orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3452382367(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3452382367(orig___rpc_handler_3452382367 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3856685904(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3856685904(orig___rpc_handler_3856685904 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_2476579270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_2476579270(orig___rpc_handler_2476579270 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3749667856(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3749667856(orig___rpc_handler_3749667856 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1418775270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1418775270(orig___rpc_handler_1418775270 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1865475504(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1865475504(orig___rpc_handler_1865475504 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_869682226(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_869682226(orig___rpc_handler_869682226 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1564051222(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1564051222(orig___rpc_handler_1564051222 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1546030380(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1546030380(orig___rpc_handler_1546030380 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3360048400(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3360048400(orig___rpc_handler_3360048400 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_443869275(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_443869275(orig___rpc_handler_443869275 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1782649174(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1782649174(orig___rpc_handler_1782649174 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3428942850(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3428942850(orig___rpc_handler_3428942850 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_2073937320(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_2073937320(orig___rpc_handler_2073937320 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1806580287(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1806580287(orig___rpc_handler_1806580287 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1567928363(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1567928363(orig___rpc_handler_1567928363 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3614203845(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3614203845(orig___rpc_handler_3614203845 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1155909339(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1155909339(orig___rpc_handler_1155909339 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3933590138(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3933590138(orig___rpc_handler_3933590138 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_991811456(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_991811456(orig___rpc_handler_991811456 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1670979535(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1670979535(orig___rpc_handler_1670979535 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_2348332192(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_2348332192(orig___rpc_handler_2348332192 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_2459653399(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_2459653399(orig___rpc_handler_2459653399 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_696889160(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_696889160(orig___rpc_handler_696889160 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3367846835(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3367846835(orig___rpc_handler_3367846835 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1737299197(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1737299197(orig___rpc_handler_1737299197 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1775372234(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1775372234(orig___rpc_handler_1775372234 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1078565091(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1078565091(orig___rpc_handler_1078565091 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_1580405641(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_1580405641(orig___rpc_handler_1580405641 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___rpc_handler_3995026000(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___rpc_handler_3995026000(orig___rpc_handler_3995026000 orig, NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig___getTypeName(BaboonBirdAI self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook___getTypeName(orig___getTypeName orig, BaboonBirdAI self);

		public static event hook_Start Start
		{
			add
			{
				HookEndpointManager.Add<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SyncInitialValuesServerRpc SyncInitialValuesServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_SyncInitialValuesServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SyncInitialValuesServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SyncInitialValuesClientRpc SyncInitialValuesClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_SyncInitialValuesClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SyncInitialValuesClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_LateUpdate LateUpdate
		{
			add
			{
				HookEndpointManager.Add<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_LateUpdate>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnCollideWithPlayer OnCollideWithPlayer
		{
			add
			{
				HookEndpointManager.Add<hook_OnCollideWithPlayer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnCollideWithPlayer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnCollideWithEnemy OnCollideWithEnemy
		{
			add
			{
				HookEndpointManager.Add<hook_OnCollideWithEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnCollideWithEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_HitEnemy HitEnemy
		{
			add
			{
				HookEndpointManager.Add<hook_HitEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_HitEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_KillEnemy KillEnemy
		{
			add
			{
				HookEndpointManager.Add<hook_KillEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_KillEnemy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StopKillAnimation StopKillAnimation
		{
			add
			{
				HookEndpointManager.Add<hook_StopKillAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StopKillAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StabPlayerDeathAnimServerRpc StabPlayerDeathAnimServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StabPlayerDeathAnimServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StabPlayerDeathAnimServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StabPlayerDeathAnimClientRpc StabPlayerDeathAnimClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StabPlayerDeathAnimClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StabPlayerDeathAnimClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_killPlayerAnimation killPlayerAnimation
		{
			add
			{
				HookEndpointManager.Add<hook_killPlayerAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_killPlayerAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_InteractWithScrap InteractWithScrap
		{
			add
			{
				HookEndpointManager.Add<hook_InteractWithScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_InteractWithScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CanGrabScrap CanGrabScrap
		{
			add
			{
				HookEndpointManager.Add<hook_CanGrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CanGrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DropHeldItemAndSync DropHeldItemAndSync
		{
			add
			{
				HookEndpointManager.Add<hook_DropHeldItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DropHeldItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DropScrapServerRpc DropScrapServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_DropScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DropScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DropScrapClientRpc DropScrapClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_DropScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DropScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DropScrap DropScrap
		{
			add
			{
				HookEndpointManager.Add<hook_DropScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DropScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GrabItemAndSync GrabItemAndSync
		{
			add
			{
				HookEndpointManager.Add<hook_GrabItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GrabItemAndSync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GrabScrapServerRpc GrabScrapServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_GrabScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GrabScrapServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GrabScrapClientRpc GrabScrapClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_GrabScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GrabScrapClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GrabScrap GrabScrap
		{
			add
			{
				HookEndpointManager.Add<hook_GrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GrabScrap>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ReachedNodeInSearch ReachedNodeInSearch
		{
			add
			{
				HookEndpointManager.Add<hook_ReachedNodeInSearch>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ReachedNodeInSearch>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DoAIInterval DoAIInterval
		{
			add
			{
				HookEndpointManager.Add<hook_DoAIInterval>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DoAIInterval>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StopFocusingThreat StopFocusingThreat
		{
			add
			{
				HookEndpointManager.Add<hook_StopFocusingThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StopFocusingThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StopFocusingThreatServerRpc StopFocusingThreatServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StopFocusingThreatServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StopFocusingThreatServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StopFocusingThreatClientRpc StopFocusingThreatClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StopFocusingThreatClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StopFocusingThreatClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetAggressiveMode SetAggressiveMode
		{
			add
			{
				HookEndpointManager.Add<hook_SetAggressiveMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetAggressiveMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetAggressiveModeServerRpc SetAggressiveModeServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_SetAggressiveModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetAggressiveModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetAggressiveModeClientRpc SetAggressiveModeClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_SetAggressiveModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetAggressiveModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetThreatInView SetThreatInView
		{
			add
			{
				HookEndpointManager.Add<hook_SetThreatInView>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetThreatInView>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetThreatInViewServerRpc SetThreatInViewServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_SetThreatInViewServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetThreatInViewServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetThreatInViewClientRpc SetThreatInViewClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_SetThreatInViewClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetThreatInViewClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_EnemyEnterRestModeServerRpc EnemyEnterRestModeServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_EnemyEnterRestModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_EnemyEnterRestModeServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_EnemyEnterRestModeClientRpc EnemyEnterRestModeClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_EnemyEnterRestModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_EnemyEnterRestModeClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_EnemyGetUpServerRpc EnemyGetUpServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_EnemyGetUpServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_EnemyGetUpServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_EnemyGetUpClientRpc EnemyGetUpClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_EnemyGetUpClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_EnemyGetUpClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnDrawGizmos OnDrawGizmos
		{
			add
			{
				HookEndpointManager.Add<hook_OnDrawGizmos>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnDrawGizmos>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DetectNoise DetectNoise
		{
			add
			{
				HookEndpointManager.Add<hook_DetectNoise>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DetectNoise>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_AnimateLooking AnimateLooking
		{
			add
			{
				HookEndpointManager.Add<hook_AnimateLooking>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_AnimateLooking>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Update Update
		{
			add
			{
				HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetComfortableDistanceToThreat GetComfortableDistanceToThreat
		{
			add
			{
				HookEndpointManager.Add<hook_GetComfortableDistanceToThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetComfortableDistanceToThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ReactToThreat ReactToThreat
		{
			add
			{
				HookEndpointManager.Add<hook_ReactToThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ReactToThreat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartFocusOnThreatServerRpc StartFocusOnThreatServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StartFocusOnThreatServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartFocusOnThreatServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartFocusOnThreatClientRpc StartFocusOnThreatClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StartFocusOnThreatClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartFocusOnThreatClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ReactToOtherBaboonSighted ReactToOtherBaboonSighted
		{
			add
			{
				HookEndpointManager.Add<hook_ReactToOtherBaboonSighted>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ReactToOtherBaboonSighted>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DoLOSCheck DoLOSCheck
		{
			add
			{
				HookEndpointManager.Add<hook_DoLOSCheck>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DoLOSCheck>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_PingBaboonInterest PingBaboonInterest
		{
			add
			{
				HookEndpointManager.Add<hook_PingBaboonInterest>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_PingBaboonInterest>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_PingBirdInterestServerRpc PingBirdInterestServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_PingBirdInterestServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_PingBirdInterestServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_PingBirdInterestClientRpc PingBirdInterestClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_PingBirdInterestClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_PingBirdInterestClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_JoinScoutingGroup JoinScoutingGroup
		{
			add
			{
				HookEndpointManager.Add<hook_JoinScoutingGroup>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_JoinScoutingGroup>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartScoutingGroup StartScoutingGroup
		{
			add
			{
				HookEndpointManager.Add<hook_StartScoutingGroup>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartScoutingGroup>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_LeaveCurrentScoutingGroup LeaveCurrentScoutingGroup
		{
			add
			{
				HookEndpointManager.Add<hook_LeaveCurrentScoutingGroup>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_LeaveCurrentScoutingGroup>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_LeaveScoutingGroupServerRpc LeaveScoutingGroupServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_LeaveScoutingGroupServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_LeaveScoutingGroupServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_LeaveScoutingGroupClientRpc LeaveScoutingGroupClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_LeaveScoutingGroupClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_LeaveScoutingGroupClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartScoutingGroupServerRpc StartScoutingGroupServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StartScoutingGroupServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartScoutingGroupServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartScoutingGroupClientRpc StartScoutingGroupClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StartScoutingGroupClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartScoutingGroupClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_JoinScoutingGroupServerRpc JoinScoutingGroupServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_JoinScoutingGroupServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_JoinScoutingGroupServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_JoinScoutingGroupClientRpc JoinScoutingGroupClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_JoinScoutingGroupClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_JoinScoutingGroupClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CallToOtherBaboon CallToOtherBaboon
		{
			add
			{
				HookEndpointManager.Add<hook_CallToOtherBaboon>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CallToOtherBaboon>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartMiscAnimation StartMiscAnimation
		{
			add
			{
				HookEndpointManager.Add<hook_StartMiscAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartMiscAnimation>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartMiscAnimationServerRpc StartMiscAnimationServerRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StartMiscAnimationServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartMiscAnimationServerRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartMiscAnimationClientRpc StartMiscAnimationClientRpc
		{
			add
			{
				HookEndpointManager.Add<hook_StartMiscAnimationClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartMiscAnimationClientRpc>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CalculateAnimationDirection CalculateAnimationDirection
		{
			add
			{
				HookEndpointManager.Add<hook_CalculateAnimationDirection>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CalculateAnimationDirection>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___initializeVariables __initializeVariables
		{
			add
			{
				HookEndpointManager.Add<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_InitializeRPCS_BaboonBirdAI InitializeRPCS_BaboonBirdAI
		{
			add
			{
				HookEndpointManager.Add<hook_InitializeRPCS_BaboonBirdAI>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_InitializeRPCS_BaboonBirdAI>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_3452382367 __rpc_handler_3452382367
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_3452382367>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_3452382367>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_3856685904 __rpc_handler_3856685904
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_3856685904>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_3856685904>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_2476579270 __rpc_handler_2476579270
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_2476579270>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_2476579270>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_3749667856 __rpc_handler_3749667856
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_3749667856>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_3749667856>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_1418775270 __rpc_handler_1418775270
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_1418775270>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_1418775270>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_1865475504 __rpc_handler_1865475504
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_1865475504>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_1865475504>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_869682226 __rpc_handler_869682226
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_869682226>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_869682226>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_1564051222 __rpc_handler_1564051222
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_1564051222>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_1564051222>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_1546030380 __rpc_handler_1546030380
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_1546030380>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_1546030380>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_3360048400 __rpc_handler_3360048400
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_3360048400>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_3360048400>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_443869275 __rpc_handler_443869275
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_443869275>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_443869275>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_1782649174 __rpc_handler_1782649174
		{
			add
			{
				HookEndpointManager.Add<hook___rpc_handler_1782649174>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___rpc_handler_1782649174>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___rpc_handler_3428942850 __rpc_handler_3428942850
		{
			add
			

plugins/MMHOOK/MMHOOK_ClientNetworkTransform.dll

Decompiled a year ago
using System;
using System.ComponentModel;
using System.Reflection;
using MonoMod.Cil;
using MonoMod.RuntimeDetour.HookGen;
using On;
using On.Unity.Netcode.Samples;
using On.__GEN;
using Unity.Netcode.Samples;

[assembly: AssemblyVersion("0.0.0.0")]
namespace On
{
	public static class UnitySourceGeneratedAssemblyMonoScriptTypes_v1
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig_Get();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook_Get(orig_Get orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, object self);

		public static event hook_Get Get
		{
			add
			{
				HookEndpointManager.Add<hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class UnitySourceGeneratedAssemblyMonoScriptTypes_v1
	{
		public static event Manipulator Get
		{
			add
			{
				HookEndpointManager.Modify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Unity.Netcode.Samples
{
	public static class ClientNetworkTransform
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnNetworkSpawn(ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnNetworkSpawn(orig_OnNetworkSpawn orig, ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Update(ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Update(orig_Update orig, ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig___initializeVariables(ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook___initializeVariables(orig___initializeVariables orig, ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig___getTypeName(ClientNetworkTransform self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook___getTypeName(orig___getTypeName orig, ClientNetworkTransform self);

		public static event hook_OnNetworkSpawn OnNetworkSpawn
		{
			add
			{
				HookEndpointManager.Add<hook_OnNetworkSpawn>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnNetworkSpawn>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Update Update
		{
			add
			{
				HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___initializeVariables __initializeVariables
		{
			add
			{
				HookEndpointManager.Add<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook___getTypeName __getTypeName
		{
			add
			{
				HookEndpointManager.Add<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Unity.Netcode.Samples
{
	public static class ClientNetworkTransform
	{
		public static event Manipulator OnNetworkSpawn
		{
			add
			{
				HookEndpointManager.Modify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook_OnNetworkSpawn>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook_OnNetworkSpawn>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Update
		{
			add
			{
				HookEndpointManager.Modify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator __initializeVariables
		{
			add
			{
				HookEndpointManager.Modify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook___initializeVariables>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator __getTypeName
		{
			add
			{
				HookEndpointManager.Modify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Unity.Netcode.Samples.ClientNetworkTransform.hook___getTypeName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.__GEN
{
	public static class NetworkVariableSerializationHelper
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_InitializeSerialization();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_InitializeSerialization(orig_InitializeSerialization orig);

		public static event hook_InitializeSerialization InitializeSerialization
		{
			add
			{
				HookEndpointManager.Add<hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.__GEN
{
	public static class NetworkVariableSerializationHelper
	{
		public static event Manipulator InitializeSerialization
		{
			add
			{
				HookEndpointManager.Modify<On.__GEN.NetworkVariableSerializationHelper.hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.__GEN.NetworkVariableSerializationHelper.hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace BepHookGen
{
	public class size6144
	{
	}
}

plugins/MMHOOK/MMHOOK_DissonanceVoip.dll

Decompiled a year ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using Dissonance;
using Dissonance.Audio;
using Dissonance.Audio.Capture;
using Dissonance.Audio.Codecs;
using Dissonance.Audio.Playback;
using Dissonance.Config;
using Dissonance.Datastructures;
using Dissonance.Networking;
using Dissonance.VAD;
using MonoMod.Cil;
using MonoMod.RuntimeDetour.HookGen;
using NAudio.Wave;
using On;
using On.Dissonance;
using On.Dissonance.Audio;
using On.Dissonance.Audio.Capture;
using On.Dissonance.Audio.Codecs;
using On.Dissonance.Audio.Codecs.Identity;
using On.Dissonance.Audio.Codecs.Opus;
using On.Dissonance.Audio.Codecs.Silence;
using On.Dissonance.Audio.Playback;
using On.Dissonance.Config;
using On.Dissonance.Datastructures;
using On.Dissonance.Extensions;
using On.Dissonance.Networking;
using On.Dissonance.Networking.Client;
using On.Dissonance.Threading;
using On.NAudio.Dsp;
using On.NAudio.Wave;
using UnityEngine;

[assembly: AssemblyVersion("0.0.0.0")]
namespace On
{
	public static class UnitySourceGeneratedAssemblyMonoScriptTypes_v1
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig_Get();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook_Get(orig_Get orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, object self);

		public static event hook_Get Get
		{
			add
			{
				HookEndpointManager.Add<hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class UnitySourceGeneratedAssemblyMonoScriptTypes_v1
	{
		public static event Manipulator Get
		{
			add
			{
				HookEndpointManager.Modify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.NAudio.Dsp
{
	public static class WdlResampler
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetMode(object self, bool interp, int filtercnt, bool sinc, int sinc_size, int sinc_interpsize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetMode(orig_SetMode orig, object self, bool interp, int filtercnt, bool sinc, int sinc_size, int sinc_interpsize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetFilterParms(object self, float filterpos, float filterq);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetFilterParms(orig_SetFilterParms orig, object self, float filterpos, float filterq);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetFeedMode(object self, bool wantInputDriven);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetFeedMode(orig_SetFeedMode orig, object self, bool wantInputDriven);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Reset(object self, double fracpos);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Reset(orig_Reset orig, object self, double fracpos);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetRates(object self, double rate_in, double rate_out);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetRates(orig_SetRates orig, object self, double rate_in, double rate_out);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate double orig_GetCurrentLatency(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate double hook_GetCurrentLatency(orig_GetCurrentLatency orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_ResamplePrepare(object self, int out_samples, int nch, out float[] inbuffer, out int inbufferOffset);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_ResamplePrepare(orig_ResamplePrepare orig, object self, int out_samples, int nch, out float[] inbuffer, out int inbufferOffset);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_ResampleOut(object self, float[] outBuffer, int outBufferIndex, int nsamples_in, int nsamples_out, int nch);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_ResampleOut(orig_ResampleOut orig, object self, float[] outBuffer, int outBufferIndex, int nsamples_in, int nsamples_out, int nch);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_BuildLowPass(object self, double filtpos);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_BuildLowPass(orig_BuildLowPass orig, object self, double filtpos);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SincSample(object self, float[] outBuffer, int outBufferIndex, float[] inBuffer, int inBufferIndex, double fracpos, int nch, float[] filter, int filterIndex, int filtsz);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SincSample(orig_SincSample orig, object self, float[] outBuffer, int outBufferIndex, float[] inBuffer, int inBufferIndex, double fracpos, int nch, float[] filter, int filterIndex, int filtsz);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SincSample1(object self, float[] outBuffer, int outBufferIndex, float[] inBuffer, int inBufferIndex, double fracpos, float[] filter, int filterIndex, int filtsz);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SincSample1(orig_SincSample1 orig, object self, float[] outBuffer, int outBufferIndex, float[] inBuffer, int inBufferIndex, double fracpos, float[] filter, int filterIndex, int filtsz);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SincSample2(object self, float[] outptr, int outBufferIndex, float[] inBuffer, int inBufferIndex, double fracpos, float[] filter, int filterIndex, int filtsz);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SincSample2(orig_SincSample2 orig, object self, float[] outptr, int outBufferIndex, float[] inBuffer, int inBufferIndex, double fracpos, float[] filter, int filterIndex, int filtsz);

		public static class WDL_Resampler_IIRFilter
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_ctor(object self);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_ctor(orig_ctor orig, object self);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_Reset(object self);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_Reset(orig_Reset orig, object self);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_setParms(object self, double fpos, double Q);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_setParms(orig_setParms orig, object self, double fpos, double Q);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_Apply(object self, float[] inBuffer, int inIndex, float[] outBuffer, int outIndex, int ns, int span, int w);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_Apply(orig_Apply orig, object self, float[] inBuffer, int inIndex, float[] outBuffer, int outIndex, int ns, int span, int w);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate double orig_denormal_filter_float(object self, float x);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate double hook_denormal_filter_float(orig_denormal_filter_float orig, object self, float x);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate double orig_denormal_filter_double(object self, double x);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate double hook_denormal_filter_double(orig_denormal_filter_double orig, object self, double x);

			public static event hook_ctor ctor
			{
				add
				{
					HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_Reset Reset
			{
				add
				{
					HookEndpointManager.Add<hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_setParms setParms
			{
				add
				{
					HookEndpointManager.Add<hook_setParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_setParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_Apply Apply
			{
				add
				{
					HookEndpointManager.Add<hook_Apply>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_Apply>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_denormal_filter_float denormal_filter_float
			{
				add
				{
					HookEndpointManager.Add<hook_denormal_filter_float>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_denormal_filter_float>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_denormal_filter_double denormal_filter_double
			{
				add
				{
					HookEndpointManager.Add<hook_denormal_filter_double>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_denormal_filter_double>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetMode SetMode
		{
			add
			{
				HookEndpointManager.Add<hook_SetMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetFilterParms SetFilterParms
		{
			add
			{
				HookEndpointManager.Add<hook_SetFilterParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetFilterParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetFeedMode SetFeedMode
		{
			add
			{
				HookEndpointManager.Add<hook_SetFeedMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetFeedMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Reset Reset
		{
			add
			{
				HookEndpointManager.Add<hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetRates SetRates
		{
			add
			{
				HookEndpointManager.Add<hook_SetRates>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetRates>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetCurrentLatency GetCurrentLatency
		{
			add
			{
				HookEndpointManager.Add<hook_GetCurrentLatency>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetCurrentLatency>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ResamplePrepare ResamplePrepare
		{
			add
			{
				HookEndpointManager.Add<hook_ResamplePrepare>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ResamplePrepare>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ResampleOut ResampleOut
		{
			add
			{
				HookEndpointManager.Add<hook_ResampleOut>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ResampleOut>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BuildLowPass BuildLowPass
		{
			add
			{
				HookEndpointManager.Add<hook_BuildLowPass>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BuildLowPass>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SincSample SincSample
		{
			add
			{
				HookEndpointManager.Add<hook_SincSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SincSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SincSample1 SincSample1
		{
			add
			{
				HookEndpointManager.Add<hook_SincSample1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SincSample1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SincSample2 SincSample2
		{
			add
			{
				HookEndpointManager.Add<hook_SincSample2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SincSample2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.NAudio.Dsp
{
	public static class WdlResampler
	{
		public static class WDL_Resampler_IIRFilter
		{
			public static event Manipulator ctor
			{
				add
				{
					HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator Reset
			{
				add
				{
					HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator setParms
			{
				add
				{
					HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_setParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_setParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator Apply
			{
				add
				{
					HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_Apply>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_Apply>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator denormal_filter_float
			{
				add
				{
					HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_denormal_filter_float>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_denormal_filter_float>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator denormal_filter_double
			{
				add
				{
					HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_denormal_filter_double>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.WDL_Resampler_IIRFilter.hook_denormal_filter_double>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SetMode
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_SetMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_SetMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SetFilterParms
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_SetFilterParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_SetFilterParms>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SetFeedMode
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_SetFeedMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_SetFeedMode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Reset
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_Reset>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SetRates
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_SetRates>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_SetRates>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetCurrentLatency
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_GetCurrentLatency>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_GetCurrentLatency>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ResamplePrepare
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_ResamplePrepare>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_ResamplePrepare>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ResampleOut
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_ResampleOut>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_ResampleOut>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator BuildLowPass
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_BuildLowPass>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_BuildLowPass>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SincSample
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_SincSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_SincSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SincSample1
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_SincSample1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_SincSample1>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SincSample2
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Dsp.WdlResampler.hook_SincSample2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Dsp.WdlResampler.hook_SincSample2>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.NAudio.Wave
{
	public static class WaveFileWriter
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor_Stream_WaveFormat(Stream self, Stream outStream, WaveFormat format);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor_Stream_WaveFormat(orig_ctor_Stream_WaveFormat orig, Stream self, Stream outStream, WaveFormat format);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor_string_WaveFormat(Stream self, string filename, WaveFormat format);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor_string_WaveFormat(orig_ctor_string_WaveFormat orig, Stream self, string filename, WaveFormat format);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_WriteDataChunkHeader(Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_WriteDataChunkHeader(orig_WriteDataChunkHeader orig, Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_CreateFactChunk(Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_CreateFactChunk(orig_CreateFactChunk orig, Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_HasFactChunk(Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_HasFactChunk(orig_HasFactChunk orig, Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_Read(Stream self, byte[] buffer, int offset, int count);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_Read(orig_Read orig, Stream self, byte[] buffer, int offset, int count);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate long orig_Seek(Stream self, long offset, SeekOrigin origin);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate long hook_Seek(orig_Seek orig, Stream self, long offset, SeekOrigin origin);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SetLength(Stream self, long value);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SetLength(orig_SetLength orig, Stream self, long value);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Write(Stream self, byte[] data, int offset, int count);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Write(orig_Write orig, Stream self, byte[] data, int offset, int count);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_WriteSample(Stream self, float sample);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_WriteSample(orig_WriteSample orig, Stream self, float sample);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_WriteSamples(Stream self, float[] samples, int offset, int count);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_WriteSamples(orig_WriteSamples orig, Stream self, float[] samples, int offset, int count);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Flush(Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Flush(orig_Flush orig, Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Dispose(Stream self, bool disposing);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Dispose(orig_Dispose orig, Stream self, bool disposing);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_UpdateHeader(Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_UpdateHeader(orig_UpdateHeader orig, Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_UpdateDataChunk(Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_UpdateDataChunk(orig_UpdateDataChunk orig, Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_UpdateRiffChunk(Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_UpdateRiffChunk(orig_UpdateRiffChunk orig, Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_UpdateFactChunk(Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_UpdateFactChunk(orig_UpdateFactChunk orig, Stream self, BinaryWriter writer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Finalize(Stream self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Finalize(orig_Finalize orig, Stream self);

		public static event hook_ctor_Stream_WaveFormat ctor_Stream_WaveFormat
		{
			add
			{
				HookEndpointManager.Add<hook_ctor_Stream_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor_Stream_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor_string_WaveFormat ctor_string_WaveFormat
		{
			add
			{
				HookEndpointManager.Add<hook_ctor_string_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor_string_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_WriteDataChunkHeader WriteDataChunkHeader
		{
			add
			{
				HookEndpointManager.Add<hook_WriteDataChunkHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_WriteDataChunkHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CreateFactChunk CreateFactChunk
		{
			add
			{
				HookEndpointManager.Add<hook_CreateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CreateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_HasFactChunk HasFactChunk
		{
			add
			{
				HookEndpointManager.Add<hook_HasFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_HasFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Read Read
		{
			add
			{
				HookEndpointManager.Add<hook_Read>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Read>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Seek Seek
		{
			add
			{
				HookEndpointManager.Add<hook_Seek>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Seek>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SetLength SetLength
		{
			add
			{
				HookEndpointManager.Add<hook_SetLength>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SetLength>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Write Write
		{
			add
			{
				HookEndpointManager.Add<hook_Write>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Write>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_WriteSample WriteSample
		{
			add
			{
				HookEndpointManager.Add<hook_WriteSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_WriteSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_WriteSamples WriteSamples
		{
			add
			{
				HookEndpointManager.Add<hook_WriteSamples>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_WriteSamples>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Flush Flush
		{
			add
			{
				HookEndpointManager.Add<hook_Flush>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Flush>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Dispose Dispose
		{
			add
			{
				HookEndpointManager.Add<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_UpdateHeader UpdateHeader
		{
			add
			{
				HookEndpointManager.Add<hook_UpdateHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_UpdateHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_UpdateDataChunk UpdateDataChunk
		{
			add
			{
				HookEndpointManager.Add<hook_UpdateDataChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_UpdateDataChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_UpdateRiffChunk UpdateRiffChunk
		{
			add
			{
				HookEndpointManager.Add<hook_UpdateRiffChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_UpdateRiffChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_UpdateFactChunk UpdateFactChunk
		{
			add
			{
				HookEndpointManager.Add<hook_UpdateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_UpdateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public new static event hook_Finalize Finalize
		{
			add
			{
				HookEndpointManager.Add<hook_Finalize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Finalize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.NAudio.Wave
{
	public static class WaveFileWriter
	{
		public static event Manipulator ctor_Stream_WaveFormat
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_ctor_Stream_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_ctor_Stream_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor_string_WaveFormat
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_ctor_string_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_ctor_string_WaveFormat>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator WriteDataChunkHeader
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_WriteDataChunkHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_WriteDataChunkHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator CreateFactChunk
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_CreateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_CreateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator HasFactChunk
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_HasFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_HasFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Read
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_Read>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_Read>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Seek
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_Seek>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_Seek>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SetLength
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_SetLength>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_SetLength>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Write
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_Write>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_Write>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator WriteSample
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_WriteSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_WriteSample>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator WriteSamples
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_WriteSamples>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_WriteSamples>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Flush
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_Flush>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_Flush>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Dispose
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator UpdateHeader
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_UpdateHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_UpdateHeader>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator UpdateDataChunk
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_UpdateDataChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_UpdateDataChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator UpdateRiffChunk
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_UpdateRiffChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_UpdateRiffChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator UpdateFactChunk
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_UpdateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_UpdateFactChunk>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public new static event Manipulator Finalize
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFileWriter.hook_Finalize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFileWriter.hook_Finalize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.NAudio.Wave
{
	public static class WaveFormat
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(WaveFormat self, int sampleRate, int channels);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, WaveFormat self, int sampleRate, int channels);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_Equals(WaveFormat self, WaveFormat other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_Equals(orig_Equals orig, WaveFormat self, WaveFormat other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetHashCode(WaveFormat self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetHashCode(orig_GetHashCode orig, WaveFormat self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_ToString(WaveFormat self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_ToString(orig_ToString orig, WaveFormat self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public new static event hook_Equals Equals
		{
			add
			{
				HookEndpointManager.Add<hook_Equals>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Equals>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public new static event hook_GetHashCode GetHashCode
		{
			add
			{
				HookEndpointManager.Add<hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public new static event hook_ToString ToString
		{
			add
			{
				HookEndpointManager.Add<hook_ToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.NAudio.Wave
{
	public static class WaveFormat
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFormat.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFormat.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public new static event Manipulator Equals
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFormat.hook_Equals>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFormat.hook_Equals>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public new static event Manipulator GetHashCode
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFormat.hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFormat.hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public new static event Manipulator ToString
		{
			add
			{
				HookEndpointManager.Modify<On.NAudio.Wave.WaveFormat.hook_ToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.NAudio.Wave.WaveFormat.hook_ToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class BaseCommsTrigger
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Awake(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Awake(orig_Awake orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Start(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Start(orig_Start orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnEnable(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnEnable(orig_OnEnable orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Update(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Update(orig_Update orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnDisable(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnDisable(orig_OnDisable orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnDestroy(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnDestroy(orig_OnDestroy orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_TokensModified(BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_TokensModified(orig_TokensModified orig, BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_ContainsToken(BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_ContainsToken(orig_ContainsToken orig, BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_AddToken(BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_AddToken(orig_AddToken orig, BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_RemoveToken(BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_RemoveToken(orig_RemoveToken orig, BaseCommsTrigger self, string token);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ColliderTriggerChanged(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ColliderTriggerChanged(orig_ColliderTriggerChanged orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnTriggerEnter2D(BaseCommsTrigger self, Collider2D other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnTriggerEnter2D(orig_OnTriggerEnter2D orig, BaseCommsTrigger self, Collider2D other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnTriggerExit2D(BaseCommsTrigger self, Collider2D other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnTriggerExit2D(orig_OnTriggerExit2D orig, BaseCommsTrigger self, Collider2D other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnTriggerEnter(BaseCommsTrigger self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnTriggerEnter(orig_OnTriggerEnter orig, BaseCommsTrigger self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnTriggerExit(BaseCommsTrigger self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnTriggerExit(orig_OnTriggerExit orig, BaseCommsTrigger self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_ColliderTriggerFilter(BaseCommsTrigger self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_ColliderTriggerFilter(orig_ColliderTriggerFilter orig, BaseCommsTrigger self, Collider other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_ColliderTriggerFilter2D(BaseCommsTrigger self, Collider2D other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_ColliderTriggerFilter2D(orig_ColliderTriggerFilter2D orig, BaseCommsTrigger self, Collider2D other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate DissonanceComms orig_FindLocalVoiceComm(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate DissonanceComms hook_FindLocalVoiceComm(orig_FindLocalVoiceComm orig, BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_CheckVoiceComm(BaseCommsTrigger self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_CheckVoiceComm(orig_CheckVoiceComm orig, BaseCommsTrigger self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Awake Awake
		{
			add
			{
				HookEndpointManager.Add<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Start Start
		{
			add
			{
				HookEndpointManager.Add<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnEnable OnEnable
		{
			add
			{
				HookEndpointManager.Add<hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Update Update
		{
			add
			{
				HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnDisable OnDisable
		{
			add
			{
				HookEndpointManager.Add<hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnDestroy OnDestroy
		{
			add
			{
				HookEndpointManager.Add<hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_TokensModified TokensModified
		{
			add
			{
				HookEndpointManager.Add<hook_TokensModified>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_TokensModified>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ContainsToken ContainsToken
		{
			add
			{
				HookEndpointManager.Add<hook_ContainsToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ContainsToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_AddToken AddToken
		{
			add
			{
				HookEndpointManager.Add<hook_AddToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_AddToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_RemoveToken RemoveToken
		{
			add
			{
				HookEndpointManager.Add<hook_RemoveToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_RemoveToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ColliderTriggerChanged ColliderTriggerChanged
		{
			add
			{
				HookEndpointManager.Add<hook_ColliderTriggerChanged>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ColliderTriggerChanged>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnTriggerEnter2D OnTriggerEnter2D
		{
			add
			{
				HookEndpointManager.Add<hook_OnTriggerEnter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnTriggerEnter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnTriggerExit2D OnTriggerExit2D
		{
			add
			{
				HookEndpointManager.Add<hook_OnTriggerExit2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnTriggerExit2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnTriggerEnter OnTriggerEnter
		{
			add
			{
				HookEndpointManager.Add<hook_OnTriggerEnter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnTriggerEnter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnTriggerExit OnTriggerExit
		{
			add
			{
				HookEndpointManager.Add<hook_OnTriggerExit>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnTriggerExit>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ColliderTriggerFilter ColliderTriggerFilter
		{
			add
			{
				HookEndpointManager.Add<hook_ColliderTriggerFilter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ColliderTriggerFilter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ColliderTriggerFilter2D ColliderTriggerFilter2D
		{
			add
			{
				HookEndpointManager.Add<hook_ColliderTriggerFilter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ColliderTriggerFilter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_FindLocalVoiceComm FindLocalVoiceComm
		{
			add
			{
				HookEndpointManager.Add<hook_FindLocalVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_FindLocalVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CheckVoiceComm CheckVoiceComm
		{
			add
			{
				HookEndpointManager.Add<hook_CheckVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CheckVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Dissonance
{
	public static class BaseCommsTrigger
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Awake
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Start
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_Start>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnEnable
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_OnEnable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Update
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnDisable
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_OnDisable>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnDestroy
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator TokensModified
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_TokensModified>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_TokensModified>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ContainsToken
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_ContainsToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_ContainsToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator AddToken
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_AddToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_AddToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator RemoveToken
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_RemoveToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_RemoveToken>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ColliderTriggerChanged
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_ColliderTriggerChanged>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_ColliderTriggerChanged>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnTriggerEnter2D
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerEnter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerEnter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnTriggerExit2D
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerExit2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerExit2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnTriggerEnter
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerEnter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerEnter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnTriggerExit
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerExit>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_OnTriggerExit>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ColliderTriggerFilter
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_ColliderTriggerFilter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_ColliderTriggerFilter>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ColliderTriggerFilter2D
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_ColliderTriggerFilter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_ColliderTriggerFilter2D>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator FindLocalVoiceComm
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_FindLocalVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_FindLocalVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator CheckVoiceComm
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.BaseCommsTrigger.hook_CheckVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.BaseCommsTrigger.hook_CheckVoiceComm>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class ChannelProperties
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(ChannelProperties self, object defaultPriority);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, ChannelProperties self, object defaultPriority);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Dissonance
{
	public static class ChannelProperties
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.ChannelProperties.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.ChannelProperties.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class PlayerChannel
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(ref PlayerChannel self, ushort subscriptionId, string playerId, PlayerChannels channels, ChannelProperties properties);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, ref PlayerChannel self, ushort subscriptionId, string playerId, PlayerChannels channels, ChannelProperties properties);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Dispose(ref PlayerChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Dispose(orig_Dispose orig, ref PlayerChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_CheckValidProperties(ref PlayerChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_CheckValidProperties(orig_CheckValidProperties orig, ref PlayerChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_Equals_PlayerChannel(ref PlayerChannel self, PlayerChannel other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_Equals_PlayerChannel(orig_Equals_PlayerChannel orig, ref PlayerChannel self, PlayerChannel other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_Equals_object(ref PlayerChannel self, object obj);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_Equals_object(orig_Equals_object orig, ref PlayerChannel self, object obj);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetHashCode(ref PlayerChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetHashCode(orig_GetHashCode orig, ref PlayerChannel self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Dispose Dispose
		{
			add
			{
				HookEndpointManager.Add<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CheckValidProperties CheckValidProperties
		{
			add
			{
				HookEndpointManager.Add<hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Equals_PlayerChannel Equals_PlayerChannel
		{
			add
			{
				HookEndpointManager.Add<hook_Equals_PlayerChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Equals_PlayerChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Equals_object Equals_object
		{
			add
			{
				HookEndpointManager.Add<hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public new static event hook_GetHashCode GetHashCode
		{
			add
			{
				HookEndpointManager.Add<hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Dissonance
{
	public static class PlayerChannel
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannel.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannel.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Dispose
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannel.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannel.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator CheckValidProperties
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannel.hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannel.hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Equals_PlayerChannel
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannel.hook_Equals_PlayerChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannel.hook_Equals_PlayerChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Equals_object
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannel.hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannel.hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public new static event Manipulator GetHashCode
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannel.hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannel.hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class PlayerChannels
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(PlayerChannels self, object priorityProvider);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, PlayerChannels self, object priorityProvider);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate PlayerChannel orig_CreateChannel(PlayerChannels self, ushort subscriptionId, string channelId, ChannelProperties properties);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate PlayerChannel hook_CreateChannel(orig_CreateChannel orig, PlayerChannels self, ushort subscriptionId, string channelId, ChannelProperties properties);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CreateChannel CreateChannel
		{
			add
			{
				HookEndpointManager.Add<hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Dissonance
{
	public static class PlayerChannels
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannels.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannels.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator CreateChannel
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.PlayerChannels.hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.PlayerChannels.hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class RemoteChannel
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(ref RemoteChannel self, string targetName, ChannelType type, PlaybackOptions options);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, ref RemoteChannel self, string targetName, ChannelType type, PlaybackOptions options);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Dissonance
{
	public static class RemoteChannel
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RemoteChannel.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RemoteChannel.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class RoomChannel
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(ref RoomChannel self, ushort subscriptionId, string roomId, RoomChannels channels, ChannelProperties properties);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, ref RoomChannel self, ushort subscriptionId, string roomId, RoomChannels channels, ChannelProperties properties);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Dispose(ref RoomChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Dispose(orig_Dispose orig, ref RoomChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_CheckValidProperties(ref RoomChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_CheckValidProperties(orig_CheckValidProperties orig, ref RoomChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_Equals_RoomChannel(ref RoomChannel self, RoomChannel other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_Equals_RoomChannel(orig_Equals_RoomChannel orig, ref RoomChannel self, RoomChannel other);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_Equals_object(ref RoomChannel self, object obj);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_Equals_object(orig_Equals_object orig, ref RoomChannel self, object obj);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetHashCode(ref RoomChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetHashCode(orig_GetHashCode orig, ref RoomChannel self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_cctor();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_cctor(orig_cctor orig);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Dispose Dispose
		{
			add
			{
				HookEndpointManager.Add<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CheckValidProperties CheckValidProperties
		{
			add
			{
				HookEndpointManager.Add<hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Equals_RoomChannel Equals_RoomChannel
		{
			add
			{
				HookEndpointManager.Add<hook_Equals_RoomChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Equals_RoomChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Equals_object Equals_object
		{
			add
			{
				HookEndpointManager.Add<hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public new static event hook_GetHashCode GetHashCode
		{
			add
			{
				HookEndpointManager.Add<hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_cctor cctor
		{
			add
			{
				HookEndpointManager.Add<hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Dissonance
{
	public static class RoomChannel
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannel.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannel.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Dispose
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannel.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannel.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator CheckValidProperties
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannel.hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannel.hook_CheckValidProperties>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Equals_RoomChannel
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannel.hook_Equals_RoomChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannel.hook_Equals_RoomChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Equals_object
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannel.hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannel.hook_Equals_object>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public new static event Manipulator GetHashCode
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannel.hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannel.hook_GetHashCode>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator cctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannel.hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannel.hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class RoomChannels
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(RoomChannels self, object priorityProvider);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, RoomChannels self, object priorityProvider);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate RoomChannel orig_CreateChannel(RoomChannels self, ushort subscriptionId, string channelId, ChannelProperties properties);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate RoomChannel hook_CreateChannel(orig_CreateChannel orig, RoomChannels self, ushort subscriptionId, string channelId, ChannelProperties properties);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CreateChannel CreateChannel
		{
			add
			{
				HookEndpointManager.Add<hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Dissonance
{
	public static class RoomChannels
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannels.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannels.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator CreateChannel
		{
			add
			{
				HookEndpointManager.Modify<On.Dissonance.RoomChannels.hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Dissonance.RoomChannels.hook_CreateChannel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Dissonance
{
	public static class CodecSettings
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(ref CodecSettings self, Codec codec, uint frameSize, int sampleRate);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, ref CodecSettings self, Codec codec, uint frameSize, int sampleRate);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_ToString(ref CodecSettings self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_ToString(orig_ToString orig, ref CodecSettings self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public new static event hook_ToString ToString
		{
			add
			{
				HookEndpointManager.Add<hook_ToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)

plugins/MMHOOK/MMHOOK_Facepunch Transport for Netcode for GameObjects.dll

Decompiled a year ago
using System;
using System.Collections;
using System.ComponentModel;
using System.Reflection;
using MonoMod.Cil;
using MonoMod.RuntimeDetour.HookGen;
using Netcode.Transports.Facepunch;
using On;
using On.Netcode.Transports.Facepunch;
using On.__GEN;
using Steamworks.Data;
using Unity.Netcode;

[assembly: AssemblyVersion("0.0.0.0")]
namespace On
{
	public static class UnitySourceGeneratedAssemblyMonoScriptTypes_v1
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig_Get();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook_Get(orig_Get orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, object self);

		public static event hook_Get Get
		{
			add
			{
				HookEndpointManager.Add<hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL
{
	public static class UnitySourceGeneratedAssemblyMonoScriptTypes_v1
	{
		public static event Manipulator Get
		{
			add
			{
				HookEndpointManager.Modify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_Get>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.UnitySourceGeneratedAssemblyMonoScriptTypes_v1.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Netcode.Transports.Facepunch
{
	public static class FacepunchTransport
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Awake(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Awake(orig_Awake orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Update(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Update(orig_Update orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_OnDestroy(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_OnDestroy(orig_OnDestroy orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DisconnectLocalClient(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DisconnectLocalClient(orig_DisconnectLocalClient orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_DisconnectRemoteClient(FacepunchTransport self, ulong clientId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_DisconnectRemoteClient(orig_DisconnectRemoteClient orig, FacepunchTransport self, ulong clientId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ulong orig_GetCurrentRtt(FacepunchTransport self, ulong clientId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ulong hook_GetCurrentRtt(orig_GetCurrentRtt orig, FacepunchTransport self, ulong clientId);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Initialize(FacepunchTransport self, NetworkManager networkManager);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Initialize(orig_Initialize orig, FacepunchTransport self, NetworkManager networkManager);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate SendType orig_NetworkDeliveryToSendType(FacepunchTransport self, NetworkDelivery delivery);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate SendType hook_NetworkDeliveryToSendType(orig_NetworkDeliveryToSendType orig, FacepunchTransport self, NetworkDelivery delivery);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Shutdown(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Shutdown(orig_Shutdown orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Send(FacepunchTransport self, ulong clientId, ArraySegment<byte> data, NetworkDelivery delivery);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Send(orig_Send orig, FacepunchTransport self, ulong clientId, ArraySegment<byte> data, NetworkDelivery delivery);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate NetworkEvent orig_PollEvent(FacepunchTransport self, out ulong clientId, out ArraySegment<byte> payload, out float receiveTime);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate NetworkEvent hook_PollEvent(orig_PollEvent orig, FacepunchTransport self, out ulong clientId, out ArraySegment<byte> payload, out float receiveTime);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_StartClient(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_StartClient(orig_StartClient orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_StartServer(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_StartServer(orig_StartServer orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_EnsurePayloadCapacity(FacepunchTransport self, int size);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_EnsurePayloadCapacity(orig_EnsurePayloadCapacity orig, FacepunchTransport self, int size);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_IConnectionManager_OnConnecting(FacepunchTransport self, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_IConnectionManager_OnConnecting(orig_Steamworks_IConnectionManager_OnConnecting orig, FacepunchTransport self, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_IConnectionManager_OnConnected(FacepunchTransport self, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_IConnectionManager_OnConnected(orig_Steamworks_IConnectionManager_OnConnected orig, FacepunchTransport self, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_IConnectionManager_OnDisconnected(FacepunchTransport self, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_IConnectionManager_OnDisconnected(orig_Steamworks_IConnectionManager_OnDisconnected orig, FacepunchTransport self, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_IConnectionManager_OnMessage(FacepunchTransport self, IntPtr data, int size, long messageNum, long recvTime, int channel);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_IConnectionManager_OnMessage(orig_Steamworks_IConnectionManager_OnMessage orig, FacepunchTransport self, IntPtr data, int size, long messageNum, long recvTime, int channel);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_ISocketManager_OnConnecting(FacepunchTransport self, Connection connection, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_ISocketManager_OnConnecting(orig_Steamworks_ISocketManager_OnConnecting orig, FacepunchTransport self, Connection connection, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_ISocketManager_OnConnected(FacepunchTransport self, Connection connection, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_ISocketManager_OnConnected(orig_Steamworks_ISocketManager_OnConnected orig, FacepunchTransport self, Connection connection, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_ISocketManager_OnDisconnected(FacepunchTransport self, Connection connection, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_ISocketManager_OnDisconnected(orig_Steamworks_ISocketManager_OnDisconnected orig, FacepunchTransport self, Connection connection, ConnectionInfo info);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Steamworks_ISocketManager_OnMessage(FacepunchTransport self, Connection connection, NetIdentity identity, IntPtr data, int size, long messageNum, long recvTime, int channel);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Steamworks_ISocketManager_OnMessage(orig_Steamworks_ISocketManager_OnMessage orig, FacepunchTransport self, Connection connection, NetIdentity identity, IntPtr data, int size, long messageNum, long recvTime, int channel);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator orig_InitSteamworks(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IEnumerator hook_InitSteamworks(orig_InitSteamworks orig, FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(FacepunchTransport self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, FacepunchTransport self);

		public static class Client
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_ctor(object self);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_ctor(orig_ctor orig, object self);

			public static event hook_ctor ctor
			{
				add
				{
					HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}
		}

		public static event hook_Awake Awake
		{
			add
			{
				HookEndpointManager.Add<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Update Update
		{
			add
			{
				HookEndpointManager.Add<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_OnDestroy OnDestroy
		{
			add
			{
				HookEndpointManager.Add<hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DisconnectLocalClient DisconnectLocalClient
		{
			add
			{
				HookEndpointManager.Add<hook_DisconnectLocalClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DisconnectLocalClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_DisconnectRemoteClient DisconnectRemoteClient
		{
			add
			{
				HookEndpointManager.Add<hook_DisconnectRemoteClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_DisconnectRemoteClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetCurrentRtt GetCurrentRtt
		{
			add
			{
				HookEndpointManager.Add<hook_GetCurrentRtt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetCurrentRtt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Initialize Initialize
		{
			add
			{
				HookEndpointManager.Add<hook_Initialize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Initialize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_NetworkDeliveryToSendType NetworkDeliveryToSendType
		{
			add
			{
				HookEndpointManager.Add<hook_NetworkDeliveryToSendType>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_NetworkDeliveryToSendType>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Shutdown Shutdown
		{
			add
			{
				HookEndpointManager.Add<hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Send Send
		{
			add
			{
				HookEndpointManager.Add<hook_Send>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Send>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_PollEvent PollEvent
		{
			add
			{
				HookEndpointManager.Add<hook_PollEvent>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_PollEvent>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartClient StartClient
		{
			add
			{
				HookEndpointManager.Add<hook_StartClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_StartServer StartServer
		{
			add
			{
				HookEndpointManager.Add<hook_StartServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_StartServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_EnsurePayloadCapacity EnsurePayloadCapacity
		{
			add
			{
				HookEndpointManager.Add<hook_EnsurePayloadCapacity>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_EnsurePayloadCapacity>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_IConnectionManager_OnConnecting Steamworks_IConnectionManager_OnConnecting
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_IConnectionManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_IConnectionManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_IConnectionManager_OnConnected Steamworks_IConnectionManager_OnConnected
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_IConnectionManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_IConnectionManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_IConnectionManager_OnDisconnected Steamworks_IConnectionManager_OnDisconnected
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_IConnectionManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_IConnectionManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_IConnectionManager_OnMessage Steamworks_IConnectionManager_OnMessage
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_IConnectionManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_IConnectionManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_ISocketManager_OnConnecting Steamworks_ISocketManager_OnConnecting
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_ISocketManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_ISocketManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_ISocketManager_OnConnected Steamworks_ISocketManager_OnConnected
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_ISocketManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_ISocketManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_ISocketManager_OnDisconnected Steamworks_ISocketManager_OnDisconnected
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_ISocketManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_ISocketManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Steamworks_ISocketManager_OnMessage Steamworks_ISocketManager_OnMessage
		{
			add
			{
				HookEndpointManager.Add<hook_Steamworks_ISocketManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Steamworks_ISocketManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_InitSteamworks InitSteamworks
		{
			add
			{
				HookEndpointManager.Add<hook_InitSteamworks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_InitSteamworks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Netcode.Transports.Facepunch
{
	public static class FacepunchTransport
	{
		public static class Client
		{
			public static event Manipulator ctor
			{
				add
				{
					HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.Client.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.Client.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}
		}

		public static event Manipulator Awake
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Awake>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Update
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Update>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator OnDestroy
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_OnDestroy>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator DisconnectLocalClient
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_DisconnectLocalClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_DisconnectLocalClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator DisconnectRemoteClient
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_DisconnectRemoteClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_DisconnectRemoteClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetCurrentRtt
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_GetCurrentRtt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_GetCurrentRtt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Initialize
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Initialize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Initialize>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator NetworkDeliveryToSendType
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_NetworkDeliveryToSendType>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_NetworkDeliveryToSendType>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Shutdown
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Send
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Send>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Send>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator PollEvent
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_PollEvent>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_PollEvent>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator StartClient
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_StartClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_StartClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator StartServer
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_StartServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_StartServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator EnsurePayloadCapacity
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_EnsurePayloadCapacity>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_EnsurePayloadCapacity>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_IConnectionManager_OnConnecting
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_IConnectionManager_OnConnected
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_IConnectionManager_OnDisconnected
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_IConnectionManager_OnMessage
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_IConnectionManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_ISocketManager_OnConnecting
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnConnecting>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_ISocketManager_OnConnected
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnConnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_ISocketManager_OnDisconnected
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnDisconnected>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Steamworks_ISocketManager_OnMessage
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_Steamworks_ISocketManager_OnMessage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator InitSteamworks
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_InitSteamworks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_InitSteamworks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.FacepunchTransport.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Netcode.Transports.Facepunch
{
	public static class ReadOnlyAttribute
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(ReadOnlyAttribute self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, ReadOnlyAttribute self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Netcode.Transports.Facepunch
{
	public static class ReadOnlyAttribute
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Netcode.Transports.Facepunch.ReadOnlyAttribute.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Netcode.Transports.Facepunch.ReadOnlyAttribute.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.__GEN
{
	public static class NetworkVariableSerializationHelper
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_InitializeSerialization();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_InitializeSerialization(orig_InitializeSerialization orig);

		public static event hook_InitializeSerialization InitializeSerialization
		{
			add
			{
				HookEndpointManager.Add<hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.__GEN
{
	public static class NetworkVariableSerializationHelper
	{
		public static event Manipulator InitializeSerialization
		{
			add
			{
				HookEndpointManager.Modify<On.__GEN.NetworkVariableSerializationHelper.hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.__GEN.NetworkVariableSerializationHelper.hook_InitializeSerialization>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace BepHookGen
{
	public class size14848
	{
	}
}

plugins/MMHOOK/MMHOOK_Facepunch.Steamworks.Win64.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using MonoMod.Cil;
using MonoMod.RuntimeDetour.HookGen;
using On.Microsoft.CodeAnalysis;
using On.Steamworks;
using On.Steamworks.Data;
using On.Steamworks.ServerList;
using On.Steamworks.Ugc;
using On.System.Runtime.CompilerServices;
using Steamworks;
using Steamworks.Data;
using Steamworks.ServerList;
using Steamworks.Ugc;

[assembly: AssemblyVersion("0.0.0.0")]
namespace On.Microsoft.CodeAnalysis
{
	public static class EmbeddedAttribute
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(Attribute self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, Attribute self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Microsoft.CodeAnalysis
{
	public static class EmbeddedAttribute
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Microsoft.CodeAnalysis.EmbeddedAttribute.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Microsoft.CodeAnalysis.EmbeddedAttribute.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.System.Runtime.CompilerServices
{
	public static class IsReadOnlyAttribute
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(Attribute self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, Attribute self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.System.Runtime.CompilerServices
{
	public static class IsReadOnlyAttribute
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.System.Runtime.CompilerServices.IsReadOnlyAttribute.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.System.Runtime.CompilerServices.IsReadOnlyAttribute.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class AuthTicket
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Cancel(AuthTicket self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Cancel(orig_Cancel orig, AuthTicket self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Dispose(AuthTicket self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Dispose(orig_Dispose orig, AuthTicket self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(AuthTicket self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, AuthTicket self);

		public static event hook_Cancel Cancel
		{
			add
			{
				HookEndpointManager.Add<hook_Cancel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Cancel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Dispose Dispose
		{
			add
			{
				HookEndpointManager.Add<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Steamworks
{
	public static class AuthTicket
	{
		public static event Manipulator Cancel
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.AuthTicket.hook_Cancel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.AuthTicket.hook_Cancel>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Dispose
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.AuthTicket.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.AuthTicket.hook_Dispose>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.AuthTicket.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.AuthTicket.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class Dispatch
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SteamAPI_ManualDispatch_Init();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SteamAPI_ManualDispatch_Init(orig_SteamAPI_ManualDispatch_Init orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_SteamAPI_ManualDispatch_RunFrame(ValueType pipe);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_SteamAPI_ManualDispatch_RunFrame(orig_SteamAPI_ManualDispatch_RunFrame orig, ValueType pipe);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_SteamAPI_ManualDispatch_GetNextCallback(ValueType pipe, [In][Out] ValueType msg);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_SteamAPI_ManualDispatch_GetNextCallback(orig_SteamAPI_ManualDispatch_GetNextCallback orig, ValueType pipe, [In][Out] ValueType msg);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_SteamAPI_ManualDispatch_FreeLastCallback(ValueType pipe);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_SteamAPI_ManualDispatch_FreeLastCallback(orig_SteamAPI_ManualDispatch_FreeLastCallback orig, ValueType pipe);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Init();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Init(orig_Init orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Frame(ValueType pipe);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Frame(orig_Frame orig, ValueType pipe);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ProcessCallback(ValueType msg, bool isServer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ProcessCallback(orig_ProcessCallback orig, ValueType msg, bool isServer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_CallbackToString(CallbackType type, IntPtr data, int expectedsize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_CallbackToString(orig_CallbackToString orig, CallbackType type, IntPtr data, int expectedsize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ProcessResult(ValueType msg);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ProcessResult(orig_ProcessResult orig, ValueType msg);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_LoopClientAsync();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_LoopClientAsync(orig_LoopClientAsync orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_LoopServerAsync();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_LoopServerAsync(orig_LoopServerAsync orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ShutdownServer();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ShutdownServer(orig_ShutdownServer orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ShutdownClient();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ShutdownClient(orig_ShutdownClient orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_cctor();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_cctor(orig_cctor orig);

		public static event hook_SteamAPI_ManualDispatch_Init SteamAPI_ManualDispatch_Init
		{
			add
			{
				HookEndpointManager.Add<hook_SteamAPI_ManualDispatch_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SteamAPI_ManualDispatch_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SteamAPI_ManualDispatch_RunFrame SteamAPI_ManualDispatch_RunFrame
		{
			add
			{
				HookEndpointManager.Add<hook_SteamAPI_ManualDispatch_RunFrame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SteamAPI_ManualDispatch_RunFrame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SteamAPI_ManualDispatch_GetNextCallback SteamAPI_ManualDispatch_GetNextCallback
		{
			add
			{
				HookEndpointManager.Add<hook_SteamAPI_ManualDispatch_GetNextCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SteamAPI_ManualDispatch_GetNextCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SteamAPI_ManualDispatch_FreeLastCallback SteamAPI_ManualDispatch_FreeLastCallback
		{
			add
			{
				HookEndpointManager.Add<hook_SteamAPI_ManualDispatch_FreeLastCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SteamAPI_ManualDispatch_FreeLastCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Init Init
		{
			add
			{
				HookEndpointManager.Add<hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Frame Frame
		{
			add
			{
				HookEndpointManager.Add<hook_Frame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Frame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ProcessCallback ProcessCallback
		{
			add
			{
				HookEndpointManager.Add<hook_ProcessCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ProcessCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_CallbackToString CallbackToString
		{
			add
			{
				HookEndpointManager.Add<hook_CallbackToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_CallbackToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ProcessResult ProcessResult
		{
			add
			{
				HookEndpointManager.Add<hook_ProcessResult>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ProcessResult>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_LoopClientAsync LoopClientAsync
		{
			add
			{
				HookEndpointManager.Add<hook_LoopClientAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_LoopClientAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_LoopServerAsync LoopServerAsync
		{
			add
			{
				HookEndpointManager.Add<hook_LoopServerAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_LoopServerAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ShutdownServer ShutdownServer
		{
			add
			{
				HookEndpointManager.Add<hook_ShutdownServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ShutdownServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_ShutdownClient ShutdownClient
		{
			add
			{
				HookEndpointManager.Add<hook_ShutdownClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ShutdownClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_cctor cctor
		{
			add
			{
				HookEndpointManager.Add<hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Steamworks
{
	public static class Dispatch
	{
		public static event Manipulator SteamAPI_ManualDispatch_Init
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SteamAPI_ManualDispatch_RunFrame
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_RunFrame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_RunFrame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SteamAPI_ManualDispatch_GetNextCallback
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_GetNextCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_GetNextCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SteamAPI_ManualDispatch_FreeLastCallback
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_FreeLastCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_SteamAPI_ManualDispatch_FreeLastCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Init
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Frame
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_Frame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_Frame>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ProcessCallback
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_ProcessCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_ProcessCallback>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator CallbackToString
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_CallbackToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_CallbackToString>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ProcessResult
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_ProcessResult>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_ProcessResult>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator LoopClientAsync
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_LoopClientAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_LoopClientAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator LoopServerAsync
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_LoopServerAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_LoopServerAsync>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ShutdownServer
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_ShutdownServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_ShutdownServer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator ShutdownClient
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_ShutdownClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_ShutdownClient>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator cctor
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.Dispatch.hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.Dispatch.hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class SteamAPI
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_Init();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_Init(orig_Init orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Shutdown();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Shutdown(orig_Shutdown orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig_GetHSteamPipe();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook_GetHSteamPipe(orig_GetHSteamPipe orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_RestartAppIfNecessary(uint unOwnAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_RestartAppIfNecessary(orig_RestartAppIfNecessary orig, uint unOwnAppID);

		public static class Native
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_SteamAPI_Init();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_SteamAPI_Init(orig_SteamAPI_Init orig);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_SteamAPI_Shutdown();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_SteamAPI_Shutdown(orig_SteamAPI_Shutdown orig);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate ValueType orig_SteamAPI_GetHSteamPipe();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate ValueType hook_SteamAPI_GetHSteamPipe(orig_SteamAPI_GetHSteamPipe orig);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_SteamAPI_RestartAppIfNecessary(uint unOwnAppID);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_SteamAPI_RestartAppIfNecessary(orig_SteamAPI_RestartAppIfNecessary orig, uint unOwnAppID);

			public static event hook_SteamAPI_Init SteamAPI_Init
			{
				add
				{
					HookEndpointManager.Add<hook_SteamAPI_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamAPI_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_SteamAPI_Shutdown SteamAPI_Shutdown
			{
				add
				{
					HookEndpointManager.Add<hook_SteamAPI_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamAPI_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_SteamAPI_GetHSteamPipe SteamAPI_GetHSteamPipe
			{
				add
				{
					HookEndpointManager.Add<hook_SteamAPI_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamAPI_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_SteamAPI_RestartAppIfNecessary SteamAPI_RestartAppIfNecessary
			{
				add
				{
					HookEndpointManager.Add<hook_SteamAPI_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamAPI_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}
		}

		public static event hook_Init Init
		{
			add
			{
				HookEndpointManager.Add<hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Shutdown Shutdown
		{
			add
			{
				HookEndpointManager.Add<hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetHSteamPipe GetHSteamPipe
		{
			add
			{
				HookEndpointManager.Add<hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_RestartAppIfNecessary RestartAppIfNecessary
		{
			add
			{
				HookEndpointManager.Add<hook_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Steamworks
{
	public static class SteamAPI
	{
		public static class Native
		{
			public static event Manipulator SteamAPI_Init
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator SteamAPI_Shutdown
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator SteamAPI_GetHSteamPipe
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator SteamAPI_RestartAppIfNecessary
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.Native.hook_SteamAPI_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}
		}

		public static event Manipulator Init
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamAPI.hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.hook_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Shutdown
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamAPI.hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetHSteamPipe
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamAPI.hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator RestartAppIfNecessary
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamAPI.hook_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamAPI.hook_RestartAppIfNecessary>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class SteamGameServer
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_RunCallbacks();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_RunCallbacks(orig_RunCallbacks orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_Shutdown();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_Shutdown(orig_Shutdown orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig_GetHSteamPipe();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook_GetHSteamPipe(orig_GetHSteamPipe orig);

		public static class Native
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_SteamGameServer_RunCallbacks();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_SteamGameServer_RunCallbacks(orig_SteamGameServer_RunCallbacks orig);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void orig_SteamGameServer_Shutdown();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate void hook_SteamGameServer_Shutdown(orig_SteamGameServer_Shutdown orig);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate ValueType orig_SteamGameServer_GetHSteamPipe();

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate ValueType hook_SteamGameServer_GetHSteamPipe(orig_SteamGameServer_GetHSteamPipe orig);

			public static event hook_SteamGameServer_RunCallbacks SteamGameServer_RunCallbacks
			{
				add
				{
					HookEndpointManager.Add<hook_SteamGameServer_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamGameServer_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_SteamGameServer_Shutdown SteamGameServer_Shutdown
			{
				add
				{
					HookEndpointManager.Add<hook_SteamGameServer_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamGameServer_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}

			public static event hook_SteamGameServer_GetHSteamPipe SteamGameServer_GetHSteamPipe
			{
				add
				{
					HookEndpointManager.Add<hook_SteamGameServer_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamGameServer_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}
		}

		public static event hook_RunCallbacks RunCallbacks
		{
			add
			{
				HookEndpointManager.Add<hook_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_Shutdown Shutdown
		{
			add
			{
				HookEndpointManager.Add<hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetHSteamPipe GetHSteamPipe
		{
			add
			{
				HookEndpointManager.Add<hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Steamworks
{
	public static class SteamGameServer
	{
		public static class Native
		{
			public static event Manipulator SteamGameServer_RunCallbacks
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamGameServer.Native.hook_SteamGameServer_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamGameServer.Native.hook_SteamGameServer_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator SteamGameServer_Shutdown
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamGameServer.Native.hook_SteamGameServer_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamGameServer.Native.hook_SteamGameServer_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}

			public static event Manipulator SteamGameServer_GetHSteamPipe
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamGameServer.Native.hook_SteamGameServer_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamGameServer.Native.hook_SteamGameServer_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}
		}

		public static event Manipulator RunCallbacks
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamGameServer.hook_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamGameServer.hook_RunCallbacks>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator Shutdown
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamGameServer.hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamGameServer.hook_Shutdown>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetHSteamPipe
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamGameServer.hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamGameServer.hook_GetHSteamPipe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class SteamInternal
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_GameServer_Init(uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, string pchVersionString);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_GameServer_Init(orig_GameServer_Init orig, uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, string pchVersionString);

		public static class Native
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool orig_SteamInternal_GameServer_Init(uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, string pchVersionString);

			[EditorBrowsable(EditorBrowsableState.Never)]
			public delegate bool hook_SteamInternal_GameServer_Init(orig_SteamInternal_GameServer_Init orig, uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, string pchVersionString);

			public static event hook_SteamInternal_GameServer_Init SteamInternal_GameServer_Init
			{
				add
				{
					HookEndpointManager.Add<hook_SteamInternal_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
				remove
				{
					HookEndpointManager.Remove<hook_SteamInternal_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
				}
			}
		}

		public static event hook_GameServer_Init GameServer_Init
		{
			add
			{
				HookEndpointManager.Add<hook_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Steamworks
{
	public static class SteamInternal
	{
		public static class Native
		{
			public static event Manipulator SteamInternal_GameServer_Init
			{
				add
				{
					HookEndpointManager.Modify<On.Steamworks.SteamInternal.Native.hook_SteamInternal_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
				remove
				{
					HookEndpointManager.Unmodify<On.Steamworks.SteamInternal.Native.hook_SteamInternal_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
				}
			}
		}

		public static event Manipulator GameServer_Init
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.SteamInternal.hook_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.SteamInternal.hook_GameServer_Init>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class CallbackTypeFactory
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_cctor();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_cctor(orig_cctor orig);

		public static event hook_cctor cctor
		{
			add
			{
				HookEndpointManager.Add<hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Steamworks
{
	public static class CallbackTypeFactory
	{
		public static event Manipulator cctor
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.CallbackTypeFactory.hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.CallbackTypeFactory.hook_cctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class ISteamAppList
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(object self, bool IsGameServer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, object self, bool IsGameServer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr orig_SteamAPI_SteamAppList_v001();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr hook_SteamAPI_SteamAppList_v001(orig_SteamAPI_SteamAppList_v001 orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr orig_GetUserInterfacePointer(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr hook_GetUserInterfacePointer(orig_GetUserInterfacePointer orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig__GetNumInstalledApps(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook__GetNumInstalledApps(orig__GetNumInstalledApps orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig_GetNumInstalledApps(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook_GetNumInstalledApps(orig_GetNumInstalledApps orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig__GetInstalledApps(IntPtr self, [In][Out] AppId[] pvecAppID, uint unMaxAppIDs);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook__GetInstalledApps(orig__GetInstalledApps orig, IntPtr self, [In][Out] AppId[] pvecAppID, uint unMaxAppIDs);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig_GetInstalledApps(object self, [In][Out] AppId[] pvecAppID, uint unMaxAppIDs);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook_GetInstalledApps(orig_GetInstalledApps orig, object self, [In][Out] AppId[] pvecAppID, uint unMaxAppIDs);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig__GetAppName(IntPtr self, AppId nAppID, IntPtr pchName, int cchNameMax);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook__GetAppName(orig__GetAppName orig, IntPtr self, AppId nAppID, IntPtr pchName, int cchNameMax);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetAppName(object self, AppId nAppID, out string pchName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetAppName(orig_GetAppName orig, object self, AppId nAppID, out string pchName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig__GetAppInstallDir(IntPtr self, AppId nAppID, IntPtr pchDirectory, int cchNameMax);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook__GetAppInstallDir(orig__GetAppInstallDir orig, IntPtr self, AppId nAppID, IntPtr pchDirectory, int cchNameMax);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetAppInstallDir(object self, AppId nAppID, out string pchDirectory);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetAppInstallDir(orig_GetAppInstallDir orig, object self, AppId nAppID, out string pchDirectory);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig__GetAppBuildId(IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook__GetAppBuildId(orig__GetAppBuildId orig, IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetAppBuildId(object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetAppBuildId(orig_GetAppBuildId orig, object self, AppId nAppID);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SteamAPI_SteamAppList_v001 SteamAPI_SteamAppList_v001
		{
			add
			{
				HookEndpointManager.Add<hook_SteamAPI_SteamAppList_v001>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SteamAPI_SteamAppList_v001>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetUserInterfacePointer GetUserInterfacePointer
		{
			add
			{
				HookEndpointManager.Add<hook_GetUserInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetUserInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetNumInstalledApps _GetNumInstalledApps
		{
			add
			{
				HookEndpointManager.Add<hook__GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetNumInstalledApps GetNumInstalledApps
		{
			add
			{
				HookEndpointManager.Add<hook_GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetInstalledApps _GetInstalledApps
		{
			add
			{
				HookEndpointManager.Add<hook__GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetInstalledApps GetInstalledApps
		{
			add
			{
				HookEndpointManager.Add<hook_GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetAppName _GetAppName
		{
			add
			{
				HookEndpointManager.Add<hook__GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetAppName GetAppName
		{
			add
			{
				HookEndpointManager.Add<hook_GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetAppInstallDir _GetAppInstallDir
		{
			add
			{
				HookEndpointManager.Add<hook__GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetAppInstallDir GetAppInstallDir
		{
			add
			{
				HookEndpointManager.Add<hook_GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetAppBuildId _GetAppBuildId
		{
			add
			{
				HookEndpointManager.Add<hook__GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetAppBuildId GetAppBuildId
		{
			add
			{
				HookEndpointManager.Add<hook_GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}
	}
}
namespace IL.Steamworks
{
	public static class ISteamAppList
	{
		public static event Manipulator ctor
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator SteamAPI_SteamAppList_v001
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_SteamAPI_SteamAppList_v001>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_SteamAPI_SteamAppList_v001>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetUserInterfacePointer
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_GetUserInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_GetUserInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator _GetNumInstalledApps
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook__GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook__GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetNumInstalledApps
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_GetNumInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator _GetInstalledApps
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook__GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook__GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetInstalledApps
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_GetInstalledApps>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator _GetAppName
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook__GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook__GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetAppName
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_GetAppName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator _GetAppInstallDir
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook__GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook__GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetAppInstallDir
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator _GetAppBuildId
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook__GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook__GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}

		public static event Manipulator GetAppBuildId
		{
			add
			{
				HookEndpointManager.Modify<On.Steamworks.ISteamAppList.hook_GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
			remove
			{
				HookEndpointManager.Unmodify<On.Steamworks.ISteamAppList.hook_GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)(object)value);
			}
		}
	}
}
namespace On.Steamworks
{
	public static class ISteamApps
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_ctor(object self, bool IsGameServer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_ctor(orig_ctor orig, object self, bool IsGameServer);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr orig_SteamAPI_SteamApps_v008();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr hook_SteamAPI_SteamApps_v008(orig_SteamAPI_SteamApps_v008 orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr orig_GetUserInterfacePointer(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr hook_GetUserInterfacePointer(orig_GetUserInterfacePointer orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr orig_SteamAPI_SteamGameServerApps_v008();

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr hook_SteamAPI_SteamGameServerApps_v008(orig_SteamAPI_SteamGameServerApps_v008 orig);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr orig_GetServerInterfacePointer(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate IntPtr hook_GetServerInterfacePointer(orig_GetServerInterfacePointer orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsSubscribed(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsSubscribed(orig__BIsSubscribed orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsSubscribed(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsSubscribed(orig_BIsSubscribed orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsLowViolence(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsLowViolence(orig__BIsLowViolence orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsLowViolence(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsLowViolence(orig_BIsLowViolence orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsCybercafe(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsCybercafe(orig__BIsCybercafe orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsCybercafe(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsCybercafe(orig_BIsCybercafe orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsVACBanned(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsVACBanned(orig__BIsVACBanned orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsVACBanned(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsVACBanned(orig_BIsVACBanned orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig__GetCurrentGameLanguage(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook__GetCurrentGameLanguage(orig__GetCurrentGameLanguage orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_GetCurrentGameLanguage(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_GetCurrentGameLanguage(orig_GetCurrentGameLanguage orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig__GetAvailableGameLanguages(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook__GetAvailableGameLanguages(orig__GetAvailableGameLanguages orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_GetAvailableGameLanguages(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_GetAvailableGameLanguages(orig_GetAvailableGameLanguages orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsSubscribedApp(IntPtr self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsSubscribedApp(orig__BIsSubscribedApp orig, IntPtr self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsSubscribedApp(object self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsSubscribedApp(orig_BIsSubscribedApp orig, object self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsDlcInstalled(IntPtr self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsDlcInstalled(orig__BIsDlcInstalled orig, IntPtr self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsDlcInstalled(object self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsDlcInstalled(orig_BIsDlcInstalled orig, object self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig__GetEarliestPurchaseUnixTime(IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook__GetEarliestPurchaseUnixTime(orig__GetEarliestPurchaseUnixTime orig, IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig_GetEarliestPurchaseUnixTime(object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook_GetEarliestPurchaseUnixTime(orig_GetEarliestPurchaseUnixTime orig, object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsSubscribedFromFreeWeekend(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsSubscribedFromFreeWeekend(orig__BIsSubscribedFromFreeWeekend orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsSubscribedFromFreeWeekend(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsSubscribedFromFreeWeekend(orig_BIsSubscribedFromFreeWeekend orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig__GetDLCCount(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook__GetDLCCount(orig__GetDLCCount orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetDLCCount(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetDLCCount(orig_GetDLCCount orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BGetDLCDataByIndex(IntPtr self, int iDLC, ref AppId pAppID, ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BGetDLCDataByIndex(orig__BGetDLCDataByIndex orig, IntPtr self, int iDLC, ref AppId pAppID, ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BGetDLCDataByIndex(object self, int iDLC, ref AppId pAppID, ref bool pbAvailable, out string pchName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BGetDLCDataByIndex(orig_BGetDLCDataByIndex orig, object self, int iDLC, ref AppId pAppID, ref bool pbAvailable, out string pchName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig__InstallDLC(IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook__InstallDLC(orig__InstallDLC orig, IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_InstallDLC(object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_InstallDLC(orig_InstallDLC orig, object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig__UninstallDLC(IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook__UninstallDLC(orig__UninstallDLC orig, IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_UninstallDLC(object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_UninstallDLC(orig_UninstallDLC orig, object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig__RequestAppProofOfPurchaseKey(IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook__RequestAppProofOfPurchaseKey(orig__RequestAppProofOfPurchaseKey orig, IntPtr self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_RequestAppProofOfPurchaseKey(object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_RequestAppProofOfPurchaseKey(orig_RequestAppProofOfPurchaseKey orig, object self, AppId nAppID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__GetCurrentBetaName(IntPtr self, IntPtr pchName, int cchNameBufferSize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__GetCurrentBetaName(orig__GetCurrentBetaName orig, IntPtr self, IntPtr pchName, int cchNameBufferSize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_GetCurrentBetaName(object self, out string pchName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_GetCurrentBetaName(orig_GetCurrentBetaName orig, object self, out string pchName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__MarkContentCorrupt(IntPtr self, bool bMissingFilesOnly);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__MarkContentCorrupt(orig__MarkContentCorrupt orig, IntPtr self, bool bMissingFilesOnly);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_MarkContentCorrupt(object self, bool bMissingFilesOnly);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_MarkContentCorrupt(orig_MarkContentCorrupt orig, object self, bool bMissingFilesOnly);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig__GetInstalledDepots(IntPtr self, AppId appID, [In][Out] ValueType pvecDepots, uint cMaxDepots);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook__GetInstalledDepots(orig__GetInstalledDepots orig, IntPtr self, AppId appID, [In][Out] ValueType pvecDepots, uint cMaxDepots);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig_GetInstalledDepots(object self, AppId appID, [In][Out] ValueType pvecDepots, uint cMaxDepots);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook_GetInstalledDepots(orig_GetInstalledDepots orig, object self, AppId appID, [In][Out] ValueType pvecDepots, uint cMaxDepots);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig__GetAppInstallDir(IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook__GetAppInstallDir(orig__GetAppInstallDir orig, IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint orig_GetAppInstallDir(object self, AppId appID, out string pchFolder);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate uint hook_GetAppInstallDir(orig_GetAppInstallDir orig, object self, AppId appID, out string pchFolder);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsAppInstalled(IntPtr self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsAppInstalled(orig__BIsAppInstalled orig, IntPtr self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsAppInstalled(object self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsAppInstalled(orig_BIsAppInstalled orig, object self, AppId appID);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate SteamId orig__GetAppOwner(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate SteamId hook__GetAppOwner(orig__GetAppOwner orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate SteamId orig_GetAppOwner(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate SteamId hook_GetAppOwner(orig_GetAppOwner orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig__GetLaunchQueryParam(IntPtr self, string pchKey);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook__GetLaunchQueryParam(orig__GetLaunchQueryParam orig, IntPtr self, string pchKey);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string orig_GetLaunchQueryParam(object self, string pchKey);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate string hook_GetLaunchQueryParam(orig_GetLaunchQueryParam orig, object self, string pchKey);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__GetDlcDownloadProgress(IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__GetDlcDownloadProgress(orig__GetDlcDownloadProgress orig, IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_GetDlcDownloadProgress(object self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_GetDlcDownloadProgress(orig_GetDlcDownloadProgress orig, object self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig__GetAppBuildId(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook__GetAppBuildId(orig__GetAppBuildId orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetAppBuildId(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetAppBuildId(orig_GetAppBuildId orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig__RequestAllProofOfPurchaseKeys(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook__RequestAllProofOfPurchaseKeys(orig__RequestAllProofOfPurchaseKeys orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void orig_RequestAllProofOfPurchaseKeys(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate void hook_RequestAllProofOfPurchaseKeys(orig_RequestAllProofOfPurchaseKeys orig, object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig__GetFileDetails(IntPtr self, string pszFileName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook__GetFileDetails(orig__GetFileDetails orig, IntPtr self, string pszFileName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType orig_GetFileDetails(object self, string pszFileName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate ValueType hook_GetFileDetails(orig_GetFileDetails orig, object self, string pszFileName);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig__GetLaunchCommandLine(IntPtr self, IntPtr pszCommandLine, int cubCommandLine);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook__GetLaunchCommandLine(orig__GetLaunchCommandLine orig, IntPtr self, IntPtr pszCommandLine, int cubCommandLine);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int orig_GetLaunchCommandLine(object self, out string pszCommandLine);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate int hook_GetLaunchCommandLine(orig_GetLaunchCommandLine orig, object self, out string pszCommandLine);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig__BIsSubscribedFromFamilySharing(IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook__BIsSubscribedFromFamilySharing(orig__BIsSubscribedFromFamilySharing orig, IntPtr self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool orig_BIsSubscribedFromFamilySharing(object self);

		[EditorBrowsable(EditorBrowsableState.Never)]
		public delegate bool hook_BIsSubscribedFromFamilySharing(orig_BIsSubscribedFromFamilySharing orig, object self);

		public static event hook_ctor ctor
		{
			add
			{
				HookEndpointManager.Add<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_ctor>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SteamAPI_SteamApps_v008 SteamAPI_SteamApps_v008
		{
			add
			{
				HookEndpointManager.Add<hook_SteamAPI_SteamApps_v008>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SteamAPI_SteamApps_v008>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetUserInterfacePointer GetUserInterfacePointer
		{
			add
			{
				HookEndpointManager.Add<hook_GetUserInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetUserInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_SteamAPI_SteamGameServerApps_v008 SteamAPI_SteamGameServerApps_v008
		{
			add
			{
				HookEndpointManager.Add<hook_SteamAPI_SteamGameServerApps_v008>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_SteamAPI_SteamGameServerApps_v008>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetServerInterfacePointer GetServerInterfacePointer
		{
			add
			{
				HookEndpointManager.Add<hook_GetServerInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetServerInterfacePointer>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsSubscribed _BIsSubscribed
		{
			add
			{
				HookEndpointManager.Add<hook__BIsSubscribed>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsSubscribed>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsSubscribed BIsSubscribed
		{
			add
			{
				HookEndpointManager.Add<hook_BIsSubscribed>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsSubscribed>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsLowViolence _BIsLowViolence
		{
			add
			{
				HookEndpointManager.Add<hook__BIsLowViolence>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsLowViolence>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsLowViolence BIsLowViolence
		{
			add
			{
				HookEndpointManager.Add<hook_BIsLowViolence>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsLowViolence>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsCybercafe _BIsCybercafe
		{
			add
			{
				HookEndpointManager.Add<hook__BIsCybercafe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsCybercafe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsCybercafe BIsCybercafe
		{
			add
			{
				HookEndpointManager.Add<hook_BIsCybercafe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsCybercafe>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsVACBanned _BIsVACBanned
		{
			add
			{
				HookEndpointManager.Add<hook__BIsVACBanned>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsVACBanned>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsVACBanned BIsVACBanned
		{
			add
			{
				HookEndpointManager.Add<hook_BIsVACBanned>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsVACBanned>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetCurrentGameLanguage _GetCurrentGameLanguage
		{
			add
			{
				HookEndpointManager.Add<hook__GetCurrentGameLanguage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetCurrentGameLanguage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetCurrentGameLanguage GetCurrentGameLanguage
		{
			add
			{
				HookEndpointManager.Add<hook_GetCurrentGameLanguage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetCurrentGameLanguage>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetAvailableGameLanguages _GetAvailableGameLanguages
		{
			add
			{
				HookEndpointManager.Add<hook__GetAvailableGameLanguages>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetAvailableGameLanguages>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetAvailableGameLanguages GetAvailableGameLanguages
		{
			add
			{
				HookEndpointManager.Add<hook_GetAvailableGameLanguages>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetAvailableGameLanguages>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsSubscribedApp _BIsSubscribedApp
		{
			add
			{
				HookEndpointManager.Add<hook__BIsSubscribedApp>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsSubscribedApp>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsSubscribedApp BIsSubscribedApp
		{
			add
			{
				HookEndpointManager.Add<hook_BIsSubscribedApp>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsSubscribedApp>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsDlcInstalled _BIsDlcInstalled
		{
			add
			{
				HookEndpointManager.Add<hook__BIsDlcInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsDlcInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsDlcInstalled BIsDlcInstalled
		{
			add
			{
				HookEndpointManager.Add<hook_BIsDlcInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsDlcInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetEarliestPurchaseUnixTime _GetEarliestPurchaseUnixTime
		{
			add
			{
				HookEndpointManager.Add<hook__GetEarliestPurchaseUnixTime>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetEarliestPurchaseUnixTime>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetEarliestPurchaseUnixTime GetEarliestPurchaseUnixTime
		{
			add
			{
				HookEndpointManager.Add<hook_GetEarliestPurchaseUnixTime>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetEarliestPurchaseUnixTime>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsSubscribedFromFreeWeekend _BIsSubscribedFromFreeWeekend
		{
			add
			{
				HookEndpointManager.Add<hook__BIsSubscribedFromFreeWeekend>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsSubscribedFromFreeWeekend>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsSubscribedFromFreeWeekend BIsSubscribedFromFreeWeekend
		{
			add
			{
				HookEndpointManager.Add<hook_BIsSubscribedFromFreeWeekend>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsSubscribedFromFreeWeekend>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetDLCCount _GetDLCCount
		{
			add
			{
				HookEndpointManager.Add<hook__GetDLCCount>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetDLCCount>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetDLCCount GetDLCCount
		{
			add
			{
				HookEndpointManager.Add<hook_GetDLCCount>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetDLCCount>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BGetDLCDataByIndex _BGetDLCDataByIndex
		{
			add
			{
				HookEndpointManager.Add<hook__BGetDLCDataByIndex>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BGetDLCDataByIndex>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BGetDLCDataByIndex BGetDLCDataByIndex
		{
			add
			{
				HookEndpointManager.Add<hook_BGetDLCDataByIndex>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BGetDLCDataByIndex>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__InstallDLC _InstallDLC
		{
			add
			{
				HookEndpointManager.Add<hook__InstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__InstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_InstallDLC InstallDLC
		{
			add
			{
				HookEndpointManager.Add<hook_InstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_InstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__UninstallDLC _UninstallDLC
		{
			add
			{
				HookEndpointManager.Add<hook__UninstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__UninstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_UninstallDLC UninstallDLC
		{
			add
			{
				HookEndpointManager.Add<hook_UninstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_UninstallDLC>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__RequestAppProofOfPurchaseKey _RequestAppProofOfPurchaseKey
		{
			add
			{
				HookEndpointManager.Add<hook__RequestAppProofOfPurchaseKey>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__RequestAppProofOfPurchaseKey>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_RequestAppProofOfPurchaseKey RequestAppProofOfPurchaseKey
		{
			add
			{
				HookEndpointManager.Add<hook_RequestAppProofOfPurchaseKey>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_RequestAppProofOfPurchaseKey>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetCurrentBetaName _GetCurrentBetaName
		{
			add
			{
				HookEndpointManager.Add<hook__GetCurrentBetaName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetCurrentBetaName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetCurrentBetaName GetCurrentBetaName
		{
			add
			{
				HookEndpointManager.Add<hook_GetCurrentBetaName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetCurrentBetaName>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__MarkContentCorrupt _MarkContentCorrupt
		{
			add
			{
				HookEndpointManager.Add<hook__MarkContentCorrupt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__MarkContentCorrupt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_MarkContentCorrupt MarkContentCorrupt
		{
			add
			{
				HookEndpointManager.Add<hook_MarkContentCorrupt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_MarkContentCorrupt>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetInstalledDepots _GetInstalledDepots
		{
			add
			{
				HookEndpointManager.Add<hook__GetInstalledDepots>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetInstalledDepots>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetInstalledDepots GetInstalledDepots
		{
			add
			{
				HookEndpointManager.Add<hook_GetInstalledDepots>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetInstalledDepots>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetAppInstallDir _GetAppInstallDir
		{
			add
			{
				HookEndpointManager.Add<hook__GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetAppInstallDir GetAppInstallDir
		{
			add
			{
				HookEndpointManager.Add<hook_GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetAppInstallDir>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__BIsAppInstalled _BIsAppInstalled
		{
			add
			{
				HookEndpointManager.Add<hook__BIsAppInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__BIsAppInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_BIsAppInstalled BIsAppInstalled
		{
			add
			{
				HookEndpointManager.Add<hook_BIsAppInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_BIsAppInstalled>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetAppOwner _GetAppOwner
		{
			add
			{
				HookEndpointManager.Add<hook__GetAppOwner>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetAppOwner>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetAppOwner GetAppOwner
		{
			add
			{
				HookEndpointManager.Add<hook_GetAppOwner>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetAppOwner>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetLaunchQueryParam _GetLaunchQueryParam
		{
			add
			{
				HookEndpointManager.Add<hook__GetLaunchQueryParam>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetLaunchQueryParam>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetLaunchQueryParam GetLaunchQueryParam
		{
			add
			{
				HookEndpointManager.Add<hook_GetLaunchQueryParam>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetLaunchQueryParam>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetDlcDownloadProgress _GetDlcDownloadProgress
		{
			add
			{
				HookEndpointManager.Add<hook__GetDlcDownloadProgress>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetDlcDownloadProgress>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetDlcDownloadProgress GetDlcDownloadProgress
		{
			add
			{
				HookEndpointManager.Add<hook_GetDlcDownloadProgress>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetDlcDownloadProgress>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__GetAppBuildId _GetAppBuildId
		{
			add
			{
				HookEndpointManager.Add<hook__GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook_GetAppBuildId GetAppBuildId
		{
			add
			{
				HookEndpointManager.Add<hook_GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook_GetAppBuildId>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
		}

		public static event hook__RequestAllProofOfPurchaseKeys _RequestAllProofOfPurchaseKeys
		{
			add
			{
				HookEndpointManager.Add<hook__RequestAllProofOfPurchaseKeys>(MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), (Delegate)value);
			}
			remove
			{
				HookEndpointManager.Remove<hook__RequestAllProofOfPurchaseKeys>(MethodBase.GetMethodFromHandle((Runt

plugins/OrtonLongGaming-FreddyBracken/FreddyBracken.dll

Decompiled a year ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
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: AssemblyTitle("FreddyBracken")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FreddyBracken")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("2ed810b2-476e-4150-b015-645ee4681b3d")]
[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 FreddyBracken
{
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "FreddyBracken";

		public const string PLUGIN_NAME = "FreddyBracken";

		public const string PLUGIN_VERSION = "1.0.4";
	}
	[BepInPlugin("FreddyBracken", "FreddyBracken", "1.0.4")]
	public class Plugin : BaseUnityPlugin
	{
		public static GameObject Visuals;

		public static AudioClip NeckCrackAudio;

		public static AudioClip AngeredAudio;

		public static Texture2D FreddyMaterial;

		public static Texture2D FreddyNormal;

		public static Texture2D FreddyEyes;

		public static ConfigEntry<bool> useFreddyTextures;

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin FreddyBracken is loaded!");
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
			string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "freddy.bundle");
			AssetBundle val = AssetBundle.LoadFromFile(text);
			Visuals = val.LoadAsset<GameObject>("assets/prefabs/freddy.prefab");
			NeckCrackAudio = val.LoadAsset<AudioClip>("assets/prefabs/freddycrackneck.wav");
			AngeredAudio = val.LoadAsset<AudioClip>("assets/prefabs/freddyangered.wav");
			FreddyMaterial = val.LoadAsset<Texture2D>("assets/prefabs/freddy_albedo.png");
			FreddyNormal = val.LoadAsset<Texture2D>("assets/prefabs/freddy_normal.png");
			FreddyEyes = val.LoadAsset<Texture2D>("assets/prefabs/freddy_eyes_albedo.png");
			useFreddyTextures = ((BaseUnityPlugin)this).Config.Bind<bool>("FreddyBracken", "UseFreddyTextures", false, "Swap out the default dark Bracken body material for Freddy's actual brown fur, bowtie, etc materials.");
			SkinnedMeshRenderer[] componentsInChildren = Visuals.GetComponentsInChildren<SkinnedMeshRenderer>(true);
			foreach (SkinnedMeshRenderer val2 in componentsInChildren)
			{
				((Component)val2).gameObject.layer = LayerMask.NameToLayer("Enemies");
			}
		}
	}
}
namespace FreddyBracken.Patches
{
	[HarmonyPatch(typeof(FlowermanAI), "Start")]
	internal class FlowermanPatch
	{
		private static void Postfix(FlowermanAI __instance)
		{
			//IL_00e3: 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_0105: 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_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Expected O, but got Unknown
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: 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_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Expected O, but got Unknown
			if ((Object)(object)Plugin.Visuals == (Object)null)
			{
				return;
			}
			Transform val = ((Component)__instance).transform.Find("FlowermanModel");
			object obj;
			if (val == null)
			{
				obj = null;
			}
			else
			{
				Transform obj2 = val.Find("LOD1");
				obj = ((obj2 != null) ? ((Component)obj2).GetComponent<SkinnedMeshRenderer>() : null);
			}
			SkinnedMeshRenderer val2 = (SkinnedMeshRenderer)obj;
			object obj3;
			if (val == null)
			{
				obj3 = null;
			}
			else
			{
				Transform obj4 = val.Find("AnimContainer");
				obj3 = ((obj4 != null) ? obj4.Find("metarig") : null);
			}
			Transform val3 = (Transform)obj3;
			if (!((Object)(object)val2 == (Object)null) && ((Renderer)val2).enabled)
			{
				((Renderer)val2).enabled = false;
				Renderer[] componentsInChildren = ((Component)val3).gameObject.GetComponentsInChildren<Renderer>();
				foreach (Renderer val4 in componentsInChildren)
				{
					val4.enabled = false;
				}
				GameObject val5 = Object.Instantiate<GameObject>(Plugin.Visuals);
				val5.transform.SetParent(val);
				val5.transform.localPosition = Vector3.zero;
				val5.transform.localRotation = Quaternion.identity;
				val5.transform.localScale = Vector3.one;
				Transform val6 = val5.transform.Find("Container/Body_Geo");
				Transform val7 = val5.transform.Find("Container/metarig");
				val7.SetParent(val3.parent, true);
				((Component)val7).transform.localScale = ((Component)val3).transform.localScale;
				((Component)val7).transform.localRotation = ((Component)val3).transform.localRotation;
				((Component)val7).transform.localPosition = ((Component)val3).transform.localPosition;
				SkinnedMeshRenderer component = ((Component)val6).GetComponent<SkinnedMeshRenderer>();
				component.rootBone = val7;
				if (Plugin.useFreddyTextures.Value)
				{
					MaterialPropertyBlock val8 = new MaterialPropertyBlock();
					((Renderer)component).GetPropertyBlock(val8, 0);
					val8.SetColor("_BaseColor", Color.white);
					val8.SetColor("_Color", Color.white);
					val8.SetTexture("_BaseColorMap", (Texture)(object)Plugin.FreddyMaterial);
					val8.SetVector("_BaseColorMap_ST", new Vector4(1f, 1f, 0f, 0f));
					val8.SetFloat("_NormalMapSpace", 0f);
					val8.SetTexture("_NormalMap", (Texture)(object)Plugin.FreddyNormal);
					val8.SetVector("_NormalMap_ST", new Vector4(1f, 1f, 0f, 0f));
					val8.SetFloat("_Metallic", 0f);
					((Renderer)component).SetPropertyBlock(val8, 0);
					MaterialPropertyBlock val9 = new MaterialPropertyBlock();
					((Renderer)component).GetPropertyBlock(val9, 1);
					val8.SetTexture("_BaseColorMap", (Texture)(object)Plugin.FreddyEyes);
					((Renderer)component).SetPropertyBlock(val9, 1);
				}
				((Object)val3).name = "old-metarig";
				__instance.crackNeckSFX = Plugin.NeckCrackAudio;
				__instance.creatureAngerVoice.clip = Plugin.AngeredAudio;
				__instance.rightHandGrip = val7.Find("Torso1").Find("Torso2").Find("Torso3")
					.Find("Arm1.R")
					.Find("Arm2.R")
					.Find("Arm3.R")
					.Find("Hand1.R")
					.Find("HandGripPosition");
			}
		}
	}
}

plugins/quackandcheese-MirrorDecor/MirrorDecor.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.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalLib.Extras;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using MoreCompany.Cosmetics;
using UnityEngine;
using UnityEngine.Rendering;

[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("MirrorDecor")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A mod for Lethal Company that adds a working mirror decoration that you can buy for your ship!")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MirrorDecor")]
[assembly: AssemblyTitle("MirrorDecor")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MirrorDecor
{
	public class Config
	{
		public static ConfigEntry<bool> mirrorEnabled;

		public static ConfigEntry<int> mirrorPrice;

		public static ConfigEntry<bool> alwaysAvailable;

		public static ConfigEntry<int> resolution;

		public static void Load()
		{
			mirrorEnabled = Plugin.config.Bind<bool>("Mirror", "MirrorEnabled", true, "Will you be able to purchase the mirror?");
			mirrorPrice = Plugin.config.Bind<int>("Mirror", "MirrorPrice", 100, "What will be the price of the mirror?");
			alwaysAvailable = Plugin.config.Bind<bool>("Mirror", "AlwaysAvailable", true, "Is the mirror always available to purchase from the store?");
			resolution = Plugin.config.Bind<int>("Mirror", "MirrorResolution", 2000, "What is the resolution/quality of the mirror image? (ex. 2000 = 2000x2000 pixels)");
		}
	}
	[HarmonyPatch(typeof(HUDManager), "AddPlayerChatMessageClientRpc")]
	internal class CosmeticPatch
	{
		private static void Postfix()
		{
			//IL_00a6: 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)
			if (!Chainloader.PluginInfos.ContainsKey("me.swipez.melonloader.morecompany"))
			{
				return;
			}
			CosmeticApplication val = Object.FindObjectOfType<CosmeticApplication>();
			if (CosmeticRegistry.locallySelectedCosmetics.Count <= 0 || val.spawnedCosmetics.Count > 0)
			{
				return;
			}
			foreach (string locallySelectedCosmetic in CosmeticRegistry.locallySelectedCosmetics)
			{
				val.ApplyCosmetic(locallySelectedCosmetic, true);
			}
			foreach (CosmeticInstance spawnedCosmetic in val.spawnedCosmetics)
			{
				Transform transform = ((Component)spawnedCosmetic).transform;
				transform.localScale *= 0.38f;
				SetAllChildrenLayer(((Component)spawnedCosmetic).transform, 29);
			}
		}

		private static void SetAllChildrenLayer(Transform transform, string layerName)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			int layer = LayerMask.NameToLayer(layerName);
			((Component)transform).gameObject.layer = layer;
			foreach (Transform item in transform)
			{
				Transform transform2 = item;
				SetAllChildrenLayer(transform2, layerName);
			}
		}

		private static void SetAllChildrenLayer(Transform transform, int layer)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			((Component)transform).gameObject.layer = layer;
			foreach (Transform item in transform)
			{
				Transform transform2 = item;
				SetAllChildrenLayer(transform2, layer);
			}
		}
	}
	public class CustomUnlockable
	{
		public string name = "";

		public string unlockablePath = "";

		public string infoPath = "";

		public Action<UnlockableItem> unlockableAction = delegate
		{
		};

		public bool enabled = true;

		public int unlockCost = -1;

		public CustomUnlockable(string name, string unlockablePath, string infoPath, Action<UnlockableItem> action = null, int unlockCost = -1)
		{
			this.name = name;
			this.unlockablePath = unlockablePath;
			this.infoPath = infoPath;
			if (action != null)
			{
				unlockableAction = action;
			}
			this.unlockCost = unlockCost;
		}

		public static CustomUnlockable Add(string name, string unlockablePath, string infoPath = null, Action<UnlockableItem> action = null, int unlockCost = -1, bool enabled = true)
		{
			return new CustomUnlockable(name, unlockablePath, infoPath, action, unlockCost)
			{
				enabled = enabled
			};
		}
	}
	public class MirrorScript : MonoBehaviour
	{
		private void Update()
		{
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB), "SpawnPlayerAnimation")]
	internal class PlayerPatch
	{
		private static void Postfix(ref PlayerControllerB __instance)
		{
			if ((Object)(object)__instance == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				PlayerControllerB val = __instance;
				((Renderer)val.thisPlayerModel).shadowCastingMode = (ShadowCastingMode)1;
				((Component)val.thisPlayerModel).gameObject.layer = 29;
				((Component)val.thisPlayerModelArms).gameObject.layer = 3;
			}
		}
	}
	[BepInPlugin("quackandcheese.mirrordecor", "MirrorDecor", "1.1.4")]
	[BepInDependency("evaisa.lethallib", "0.3.1")]
	[BepInProcess("Lethal Company.exe")]
	public class Plugin : BaseUnityPlugin
	{
		public const string ModGUID = "quackandcheese.mirrordecor";

		public const string ModName = "MirrorDecor";

		public const string ModVersion = "1.1.4";

		public static AssetBundle Bundle;

		public static ConfigFile config;

		public static ManualLogSource logger;

		public static List<CustomUnlockable> customUnlockables;

		private void Awake()
		{
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Expected O, but got Unknown
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
			Bundle = QuickLoadAssetBundle("mirror.assets");
			logger = ((BaseUnityPlugin)this).Logger;
			config = ((BaseUnityPlugin)this).Config;
			Harmony val = new Harmony("quackandcheese.mirrordecor");
			val.PatchAll();
			Config.Load();
			RegisterItems();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin MirrorDecor is loaded!");
		}

		private void RegisterItems()
		{
			customUnlockables = new List<CustomUnlockable> { CustomUnlockable.Add("Mirror", "Assets/Mirror/Unlockables/Mirror/Mirror.asset", "Assets/Mirror/Unlockables/Mirror/MirrorInfo.asset", null, Config.mirrorPrice.Value, Config.mirrorEnabled.Value) };
			UnlockableItem unlockable = Bundle.LoadAsset<UnlockableItemDef>("Assets/Mirror/Unlockables/Mirror/Mirror.asset").unlockable;
			unlockable.alwaysInStock = Config.alwaysAvailable.Value;
			RenderTexture renderTexture = Bundle.LoadAsset<RenderTexture>("Assets/Mirror/Materials/Mirror.renderTexture");
			int value = Config.resolution.Value;
			Resize(renderTexture, value, value);
			foreach (CustomUnlockable customUnlockable in customUnlockables)
			{
				if (customUnlockable.enabled)
				{
					UnlockableItem unlockable2 = Bundle.LoadAsset<UnlockableItemDef>(customUnlockable.unlockablePath).unlockable;
					if ((Object)(object)unlockable2.prefabObject != (Object)null)
					{
						NetworkPrefabs.RegisterNetworkPrefab(unlockable2.prefabObject);
					}
					TerminalNode val = null;
					if (customUnlockable.infoPath != null)
					{
						val = Bundle.LoadAsset<TerminalNode>(customUnlockable.infoPath);
					}
					Unlockables.RegisterUnlockable(unlockable2, (StoreType)2, (TerminalNode)null, (TerminalNode)null, val, customUnlockable.unlockCost);
				}
			}
		}

		public static T FindAsset<T>(string name) where T : Object
		{
			return Resources.FindObjectsOfTypeAll<T>().ToList().Find((T x) => ((Object)x).name == name);
		}

		public static AssetBundle QuickLoadAssetBundle(string assetBundleName)
		{
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), assetBundleName);
			return AssetBundle.LoadFromFile(text);
		}

		private void Resize(RenderTexture renderTexture, int width, int height)
		{
			if (Object.op_Implicit((Object)(object)renderTexture))
			{
				renderTexture.Release();
				((Texture)renderTexture).width = width;
				((Texture)renderTexture).height = height;
			}
		}

		public void sendModInfo()
		{
			foreach (KeyValuePair<string, PluginInfo> pluginInfo in Chainloader.PluginInfos)
			{
				if (pluginInfo.Value.Metadata.GUID.Contains("ModSync"))
				{
					try
					{
						List<string> list = new List<string> { "quackandcheese", "MirrorDecor" };
						((Component)pluginInfo.Value.Instance).BroadcastMessage("getModInfo", (object)list, (SendMessageOptions)1);
						break;
					}
					catch (Exception)
					{
						logger.LogInfo((object)"Failed to send info to ModSync, go yell at Minx");
						break;
					}
				}
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "MirrorDecor";

		public const string PLUGIN_NAME = "MirrorDecor";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}

plugins/Rattenbonkers-TVLoader/TVLoader.dll

Decompiled a year ago
using System;
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 BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using TVLoader.Utils;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Video;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("TVLoader")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TVLoader")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e59845a7-f2f7-4416-9a61-ca1939ce6e2d")]
[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 TVLoader
{
	[BepInPlugin("rattenbonkers.TVLoader", "TVLoader", "1.1.0")]
	public class TVLoaderPlugin : BaseUnityPlugin
	{
		private const string MyGUID = "rattenbonkers.TVLoader";

		private const string PluginName = "TVLoader";

		private const string VersionString = "1.1.0";

		private static readonly Harmony Harmony = new Harmony("rattenbonkers.TVLoader");

		public static ManualLogSource Log = new ManualLogSource("TVLoader");

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			Harmony.PatchAll();
			VideoManager.Load();
			((BaseUnityPlugin)this).Logger.LogInfo((object)string.Format("PluginName: {0}, VersionString: {1} is loaded. Video Count: {2}", "TVLoader", "1.1.0", VideoManager.Videos.Count));
		}
	}
}
namespace TVLoader.Utils
{
	internal static class VideoManager
	{
		public static List<string> Videos = new List<string>();

		public static void Load()
		{
			string[] directories = Directory.GetDirectories(Paths.PluginPath);
			foreach (string text in directories)
			{
				string path = Path.Combine(Paths.PluginPath, text, "Television Videos");
				if (Directory.Exists(path))
				{
					string[] files = Directory.GetFiles(path, "*.mp4");
					Videos.AddRange(files);
					TVLoaderPlugin.Log.LogInfo((object)$"{text} has {files.Length} videos.");
				}
			}
			string path2 = Path.Combine(Paths.PluginPath, "Television Videos");
			if (!Directory.Exists(path2))
			{
				Directory.CreateDirectory(path2);
			}
			string[] files2 = Directory.GetFiles(path2, "*.mp4");
			Videos.AddRange(files2);
			TVLoaderPlugin.Log.LogInfo((object)$"Global has {files2.Length} videos.");
			TVLoaderPlugin.Log.LogInfo((object)$"Loaded {Videos.Count} total.");
		}
	}
}
namespace TVLoader.Patches
{
	[HarmonyPatch(typeof(TVScript))]
	internal class TVScriptPatches
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static EventHandler <>9__13_0;

			internal void <PrepareVideo>b__13_0(VideoPlayer source)
			{
				TVLoaderPlugin.Log.LogInfo((object)"Prepared next video!");
			}
		}

		private static FieldInfo currentClipProperty = typeof(TVScript).GetField("currentClip", BindingFlags.Instance | BindingFlags.NonPublic);

		private static FieldInfo currentTimeProperty = typeof(TVScript).GetField("currentClipTime", BindingFlags.Instance | BindingFlags.NonPublic);

		private static FieldInfo wasTvOnLastFrameProp = typeof(TVScript).GetField("wasTvOnLastFrame", BindingFlags.Instance | BindingFlags.NonPublic);

		private static FieldInfo timeSinceTurningOffTVProp = typeof(TVScript).GetField("timeSinceTurningOffTV", BindingFlags.Instance | BindingFlags.NonPublic);

		private static MethodInfo setMatMethod = typeof(TVScript).GetMethod("SetTVScreenMaterial", BindingFlags.Instance | BindingFlags.NonPublic);

		private static MethodInfo onEnableMethod = typeof(TVScript).GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.NonPublic);

		private static bool tvHasPlayedBefore = false;

		private static RenderTexture renderTexture;

		private static VideoPlayer currentVideoPlayer;

		private static VideoPlayer nextVideoPlayer;

		[HarmonyPrefix]
		[HarmonyPatch("Update")]
		public static bool Update(TVScript __instance)
		{
			if ((Object)(object)currentVideoPlayer == (Object)null)
			{
				currentVideoPlayer = ((Component)__instance).GetComponent<VideoPlayer>();
				renderTexture = currentVideoPlayer.targetTexture;
				if (VideoManager.Videos.Count > 0)
				{
					PrepareVideo(__instance, 0);
				}
			}
			if (NetworkManager.Singleton.ShutdownInProgress || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)
			{
				return false;
			}
			bool flag = (bool)wasTvOnLastFrameProp.GetValue(__instance);
			if (!__instance.tvOn || GameNetworkManager.Instance.localPlayerController.isInsideFactory)
			{
				if (flag)
				{
					wasTvOnLastFrameProp.SetValue(__instance, false);
					setMatMethod.Invoke(__instance, new object[1] { false });
					currentTimeProperty.SetValue(__instance, (float)__instance.video.time);
					__instance.video.Stop();
				}
				if (((NetworkBehaviour)__instance).IsServer && !__instance.tvOn)
				{
					float num = (float)timeSinceTurningOffTVProp.GetValue(__instance);
					timeSinceTurningOffTVProp.SetValue(__instance, num + Time.deltaTime);
				}
				float num2 = (float)currentTimeProperty.GetValue(__instance);
				currentTimeProperty.SetValue(__instance, num2 + Time.deltaTime);
			}
			else
			{
				if (!flag)
				{
					wasTvOnLastFrameProp.SetValue(__instance, true);
					setMatMethod.Invoke(__instance, new object[1] { true });
					int index = (int)currentClipProperty.GetValue(__instance);
					__instance.video.url = "file://" + VideoManager.Videos[index];
					__instance.video.time = (float)currentTimeProperty.GetValue(__instance);
					__instance.video.Play();
				}
				currentTimeProperty.SetValue(__instance, (float)__instance.video.time);
			}
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch("TurnTVOnOff")]
		public static bool TurnTVOnOff(TVScript __instance, bool on)
		{
			TVLoaderPlugin.Log.LogInfo((object)$"TVOnOff: {on}");
			if (VideoManager.Videos.Count == 0)
			{
				return false;
			}
			int num = (int)currentClipProperty.GetValue(__instance);
			if (on && tvHasPlayedBefore)
			{
				num = (num + 1) % VideoManager.Videos.Count;
				currentClipProperty.SetValue(__instance, num);
			}
			__instance.tvOn = on;
			if (on)
			{
				PlayVideo(__instance);
				__instance.tvSFX.PlayOneShot(__instance.switchTVOn);
				WalkieTalkie.TransmitOneShotAudio(__instance.tvSFX, __instance.switchTVOn, 1f);
			}
			else
			{
				__instance.video.Stop();
				__instance.tvSFX.PlayOneShot(__instance.switchTVOff);
				WalkieTalkie.TransmitOneShotAudio(__instance.tvSFX, __instance.switchTVOff, 1f);
			}
			setMatMethod.Invoke(__instance, new object[1] { on });
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch("TVFinishedClip")]
		public static bool TVFinishedClip(TVScript __instance, VideoPlayer source)
		{
			if (!__instance.tvOn || GameNetworkManager.Instance.localPlayerController.isInsideFactory)
			{
				return false;
			}
			TVLoaderPlugin.Log.LogInfo((object)"TVFinishedClip");
			int num = (int)currentClipProperty.GetValue(__instance);
			if (VideoManager.Videos.Count > 0)
			{
				num = (num + 1) % VideoManager.Videos.Count;
			}
			currentTimeProperty.SetValue(__instance, 0f);
			currentClipProperty.SetValue(__instance, num);
			PlayVideo(__instance);
			return false;
		}

		private static void PrepareVideo(TVScript instance, int index = -1)
		{
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Expected O, but got Unknown
			if (index == -1)
			{
				index = (int)currentClipProperty.GetValue(instance) + 1;
			}
			if ((Object)(object)nextVideoPlayer != (Object)null && ((Component)nextVideoPlayer).gameObject.activeInHierarchy)
			{
				Object.Destroy((Object)(object)nextVideoPlayer);
			}
			nextVideoPlayer = ((Component)instance).gameObject.AddComponent<VideoPlayer>();
			nextVideoPlayer.playOnAwake = false;
			nextVideoPlayer.isLooping = false;
			nextVideoPlayer.source = (VideoSource)1;
			nextVideoPlayer.controlledAudioTrackCount = 1;
			nextVideoPlayer.audioOutputMode = (VideoAudioOutputMode)1;
			nextVideoPlayer.SetTargetAudioSource((ushort)0, instance.tvSFX);
			nextVideoPlayer.url = "file://" + VideoManager.Videos[index % VideoManager.Videos.Count];
			nextVideoPlayer.Prepare();
			VideoPlayer obj = nextVideoPlayer;
			object obj2 = <>c.<>9__13_0;
			if (obj2 == null)
			{
				EventHandler val = delegate
				{
					TVLoaderPlugin.Log.LogInfo((object)"Prepared next video!");
				};
				<>c.<>9__13_0 = val;
				obj2 = (object)val;
			}
			obj.prepareCompleted += (EventHandler)obj2;
		}

		private static void PlayVideo(TVScript instance)
		{
			tvHasPlayedBefore = true;
			if (VideoManager.Videos.Count != 0)
			{
				if ((Object)(object)nextVideoPlayer != (Object)null)
				{
					VideoPlayer val = currentVideoPlayer;
					instance.video = (currentVideoPlayer = nextVideoPlayer);
					nextVideoPlayer = null;
					TVLoaderPlugin.Log.LogInfo((object)$"Destroy {val}");
					Object.Destroy((Object)(object)val);
					onEnableMethod.Invoke(instance, new object[0]);
				}
				currentTimeProperty.SetValue(instance, 0f);
				instance.video.targetTexture = renderTexture;
				instance.video.Play();
				PrepareVideo(instance);
			}
		}
	}
}

plugins/raydenoir-SCP173CoilheadSFX/SCP173/SCP_173.dll

Decompiled a year ago
using System;
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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
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.6", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("SCP_173")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("SCP173 mod")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.1")]
[assembly: AssemblyProduct("SCP_173")]
[assembly: AssemblyTitle("SCP_173")]
[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 SCP_173
{
	[BepInPlugin("raydenoir.SCP_173", "SCP_173", "1.1.1")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Logging;

		public static string PluginDirectory;

		public static ConfigEntry<bool> EnableDefaultMovementSounds;

		public static ConfigEntry<bool> EnableDefaultSpringSounds;

		public static AudioClip[] ScareSounds;

		public static AudioClip Concrete;

		public static GameObject Scp173Model;

		public static AssetBundle Bundle;

		private void Awake()
		{
			Logging = ((BaseUnityPlugin)this).Logger;
			PluginDirectory = ((BaseUnityPlugin)this).Info.Location;
			EnableDefaultMovementSounds = ((BaseUnityPlugin)this).Config.Bind<bool>("Sounds", "EnableDefaultMovementSounds", false, "true/false: If set to false, enables concrete grinding sounds instead of default Coilhead steps.");
			EnableDefaultSpringSounds = ((BaseUnityPlugin)this).Config.Bind<bool>("Sounds", "EnableDefaultSpringSounds", false, "true/false: If set to false, enables scare sounds on SCP-173 appearance instead of default spring noises.");
			LoadAssets();
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
			Logging.LogInfo((object)"Plugin raydenoir.SCP_173 is loaded!");
		}

		private void LoadAssets()
		{
			try
			{
				Bundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(PluginDirectory), "scp173"));
			}
			catch (Exception ex)
			{
				Logging.LogError((object)("Couldn't load asset bundle: " + ex.Message));
				return;
			}
			try
			{
				ScareSounds = (AudioClip[])(object)new AudioClip[6];
				for (int i = 0; i < 6; i++)
				{
					ScareSounds[i] = Bundle.LoadAsset<AudioClip>("assets/scp173/scare" + (i + 1) + ".wav");
				}
				Concrete = Bundle.LoadAsset<AudioClip>("assets/scp173/concrete.wav");
				Scp173Model = Bundle.LoadAsset<GameObject>("assets/scp173/scp173.prefab");
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Successfully loaded assets.");
			}
			catch (Exception ex2)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("Couldn't load assets: " + ex2.Message));
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "SCP_173";

		public const string PLUGIN_NAME = "SCP_173";

		public const string PLUGIN_VERSION = "1.1.1";
	}
}
namespace SCP_173.Patches
{
	[HarmonyPatch]
	public class CoilheadPatch : MonoBehaviour
	{
		public static ManualLogSource Logging = Plugin.Logging;

		[HarmonyPatch(typeof(EnemyAI), "Start")]
		[HarmonyPostfix]
		public static void Summon173(EnemyAI __instance)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			if (__instance is SpringManAI)
			{
				SpringManAI val;
				try
				{
					val = (SpringManAI)__instance;
				}
				catch (Exception ex)
				{
					Logging.LogError((object)("Couldn't cast EnemyAI instance to SpringManAI: " + ex.Message));
					return;
				}
				Object.Destroy((Object)(object)((Component)((Component)val).transform.Find("SpringManModel").Find("Body")).gameObject.GetComponent<SkinnedMeshRenderer>());
				Object.Destroy((Object)(object)((Component)((Component)val).transform.Find("SpringManModel").Find("Head")).gameObject.GetComponent<MeshRenderer>());
				InstantiateScp173(val);
				ChangeSpringNoises(val);
				Logging.LogInfo((object)"SCP-173 resources are loaded.");
			}
		}

		private static void InstantiateScp173(SpringManAI parent)
		{
			//IL_003f: 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_0061: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)Plugin.Scp173Model == (Object)null))
			{
				GameObject val = Object.Instantiate<GameObject>(Plugin.Scp173Model);
				val.transform.SetParent(((Component)parent).transform.Find("SpringManModel"));
				val.transform.localPosition = Vector3.zero;
				val.transform.localRotation = Quaternion.identity;
				val.transform.localScale = Vector3.one;
			}
		}

		private static void ChangeSpringNoises(SpringManAI parent)
		{
			if (!Plugin.EnableDefaultSpringSounds.Value && Plugin.ScareSounds != null)
			{
				((Component)parent).GetComponent<SpringManAI>().springNoises = Plugin.ScareSounds;
			}
		}

		[HarmonyPatch(typeof(SpringManAI), "SetAnimationGoClientRpc")]
		[HarmonyPostfix]
		[ClientRpc]
		public static void PlayWalkSounds(SpringManAI __instance)
		{
			if (!Plugin.EnableDefaultMovementSounds.Value && !((Object)(object)Plugin.Concrete == (Object)null))
			{
				((EnemyAI)__instance).creatureSFX.PlayOneShot(Plugin.Concrete, 0.75f);
				WalkieTalkie.TransmitOneShotAudio(((EnemyAI)__instance).creatureSFX, Plugin.Concrete, 0.4f);
			}
		}

		[HarmonyPatch(typeof(SpringManAI), "SetAnimationStopClientRpc")]
		[HarmonyPostfix]
		[ClientRpc]
		public static void StopWalkSounds(SpringManAI __instance)
		{
			if (!Plugin.EnableDefaultMovementSounds.Value && !((Object)(object)Plugin.Concrete == (Object)null) && ((EnemyAI)__instance).creatureSFX.isPlaying)
			{
				((EnemyAI)__instance).creatureSFX.Stop();
			}
		}
	}
}

plugins/Renegades-FlashlightToggle/FlashlightToggle.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 GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Control")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Control")]
[assembly: AssemblyTitle("Control")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Control
{
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "Control";

		public const string PLUGIN_NAME = "Control";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace Flashlight
{
	[BepInPlugin("rr.Flashlight", "Flashlight", "1.3.1")]
	public class Plugin : BaseUnityPlugin
	{
		private Harmony _harmony = new Harmony("Flashlight");

		private void Awake()
		{
			_harmony.PatchAll(typeof(Plugin));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"------Flashlight done.------");
		}

		[HarmonyPatch(typeof(PlayerControllerB), "SpawnPlayerAnimation")]
		[HarmonyPostfix]
		public static void ClearFlashlight(PlayerControllerB __instance)
		{
			__instance.pocketedFlashlight = null;
		}

		[HarmonyPatch(typeof(PlayerControllerB), "Update")]
		[HarmonyPostfix]
		public static void ReadInput(PlayerControllerB __instance)
		{
			if (((!((NetworkBehaviour)__instance).IsOwner || !__instance.isPlayerControlled || (((NetworkBehaviour)__instance).IsServer && !__instance.isHostPlayerObject)) && !__instance.isTestingPlayer) || __instance.inTerminalMenu || __instance.isTypingChat || !Application.isFocused)
			{
				return;
			}
			if (__instance.currentlyHeldObjectServer is FlashlightItem && (Object)(object)__instance.currentlyHeldObjectServer != (Object)(object)__instance.pocketedFlashlight)
			{
				__instance.pocketedFlashlight = __instance.currentlyHeldObjectServer;
			}
			if ((Object)(object)__instance.pocketedFlashlight == (Object)null || !((ButtonControl)Keyboard.current.fKey).wasPressedThisFrame || !(__instance.pocketedFlashlight is FlashlightItem) || !__instance.pocketedFlashlight.isHeld)
			{
				return;
			}
			try
			{
				__instance.pocketedFlashlight.UseItemOnClient(true);
				if (!(__instance.currentlyHeldObjectServer is FlashlightItem))
				{
					GrabbableObject pocketedFlashlight = __instance.pocketedFlashlight;
					((Behaviour)((FlashlightItem)((pocketedFlashlight is FlashlightItem) ? pocketedFlashlight : null)).flashlightBulbGlow).enabled = false;
					GrabbableObject pocketedFlashlight2 = __instance.pocketedFlashlight;
					((Behaviour)((FlashlightItem)((pocketedFlashlight2 is FlashlightItem) ? pocketedFlashlight2 : null)).flashlightBulb).enabled = false;
					GrabbableObject pocketedFlashlight3 = __instance.pocketedFlashlight;
					if (((pocketedFlashlight3 is FlashlightItem) ? pocketedFlashlight3 : null).isBeingUsed)
					{
						((Behaviour)__instance.helmetLight).enabled = true;
						GrabbableObject pocketedFlashlight4 = __instance.pocketedFlashlight;
						((FlashlightItem)((pocketedFlashlight4 is FlashlightItem) ? pocketedFlashlight4 : null)).usingPlayerHelmetLight = true;
						GrabbableObject pocketedFlashlight5 = __instance.pocketedFlashlight;
						((FlashlightItem)((pocketedFlashlight5 is FlashlightItem) ? pocketedFlashlight5 : null)).PocketFlashlightServerRpc(true);
					}
					else
					{
						((Behaviour)__instance.helmetLight).enabled = false;
						GrabbableObject pocketedFlashlight6 = __instance.pocketedFlashlight;
						((FlashlightItem)((pocketedFlashlight6 is FlashlightItem) ? pocketedFlashlight6 : null)).usingPlayerHelmetLight = false;
						GrabbableObject pocketedFlashlight7 = __instance.pocketedFlashlight;
						((FlashlightItem)((pocketedFlashlight7 is FlashlightItem) ? pocketedFlashlight7 : null)).PocketFlashlightServerRpc(false);
					}
				}
			}
			catch
			{
			}
		}
	}
}

plugins/Renegades-WalkieUse/Walkie.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 GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Walkie")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Walkie")]
[assembly: AssemblyTitle("Walkie")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Walkie
{
	[BepInPlugin("rr.Walkie", "WalkieUse", "1.2.3")]
	[HarmonyPatch(typeof(PlayerControllerB))]
	public class WalkieToggle : BaseUnityPlugin
	{
		private Harmony _harmony = new Harmony("Flashlight");

		private void Awake()
		{
			_harmony.PatchAll(typeof(WalkieToggle));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"------Walkie done.------");
		}

		[HarmonyPatch(typeof(PlayerControllerB), "Update")]
		[HarmonyPostfix]
		public static void ReadInput(PlayerControllerB __instance)
		{
			GrabbableObject val = null;
			if (((!((NetworkBehaviour)__instance).IsOwner || !__instance.isPlayerControlled || (((NetworkBehaviour)__instance).IsServer && !__instance.isHostPlayerObject)) && !__instance.isTestingPlayer) || __instance.inTerminalMenu || __instance.isTypingChat || ShipBuildModeManager.Instance.InBuildMode || !Application.isFocused)
			{
				return;
			}
			for (int i = 0; i < __instance.ItemSlots.Length; i++)
			{
				if (__instance.ItemSlots[i] is WalkieTalkie && __instance.ItemSlots[i].isBeingUsed)
				{
					val = __instance.ItemSlots[i];
					break;
				}
			}
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			if (((ButtonControl)Keyboard.current.rKey).wasPressedThisFrame)
			{
				try
				{
					if (__instance.currentlyHeldObjectServer is WalkieTalkie)
					{
						__instance.currentlyHeldObjectServer.UseItemOnClient(true);
					}
					else if ((Object)(object)val != (Object)null)
					{
						val.UseItemOnClient(true);
					}
				}
				catch
				{
				}
			}
			if (!((ButtonControl)Keyboard.current.rKey).wasReleasedThisFrame)
			{
				return;
			}
			try
			{
				if (__instance.currentlyHeldObjectServer is WalkieTalkie)
				{
					__instance.currentlyHeldObjectServer.UseItemOnClient(false);
				}
				else if ((Object)(object)val != (Object)null)
				{
					val.UseItemOnClient(false);
				}
			}
			catch
			{
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "Walkie";

		public const string PLUGIN_NAME = "Walkie";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}

plugins/Rozebud-FOV_Adjust/FovAdjust.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 BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FovAdjust")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FovAdjust")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("dfb6681a-9f25-4737-a7fe-10b3c23f65b3")]
[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 FovAdjust;

[BepInPlugin("Rozebud.FovAdjust", "FOV Adjust", "1.1.1")]
public class FovAdjustBase : BaseUnityPlugin
{
	private const string modGUID = "Rozebud.FovAdjust";

	private const string modName = "FOV Adjust";

	private const string modVer = "1.1.1";

	private readonly Harmony harmony = new Harmony("Rozebud.FovAdjust");

	private static FovAdjustBase Instance;

	public static ManualLogSource log;

	public static ConfigEntry<float> configFov;

	public static ConfigEntry<bool> configHideVisor;

	public static bool inDebugMode;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		log = Logger.CreateLogSource("Rozebud.FovAdjust");
		log.LogInfo((object)"Starting.");
		configFov = ((BaseUnityPlugin)this).Config.Bind<float>("General", "fov", 66f, "Change the field of view of the camera. Clamped from 66 to 130 for my sanity. Also keep in mind that this is vertical FOV.");
		configHideVisor = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "hideVisor", false, "Changes whether the first person visor is visible.");
		PlayerControllerBPatches.newTargetFovBase = Mathf.Clamp(configFov.Value, 66f, 130f);
		PlayerControllerBPatches.hideVisor = configHideVisor.Value;
		log.LogInfo((object)"Configs DONE!");
		PlayerControllerBPatches.calculateVisorStuff();
		harmony.PatchAll(typeof(PlayerControllerBPatches));
		harmony.PatchAll(typeof(HUDManagerPatches));
		log.LogInfo((object)"All FOV Adjust patches have loaded successfully.");
	}
}
public class PlayerControllerBPatches
{
	public static float newTargetFovBase = 66f;

	private static float prefixCamFov = 0f;

	public static bool hideVisor = false;

	private static Vector3 visorScale;

	public static Vector3 visorScaleBottom = new Vector3(0.68f, 0.8f, 0.95f);

	public static Vector3 visorScaleTop = new Vector3(0.68f, 0.35f, 0.99f);

	public static float linToSinLerp = 0.6f;

	public static float visorScaleTopRefFOV = 130f;

	[HarmonyPatch(typeof(PlayerControllerB), "Awake")]
	[HarmonyPostfix]
	private static void Awake_Postfix(PlayerControllerB __instance)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		if (!filterPlayerControllers(__instance))
		{
			__instance.localVisor.localScale = visorScale;
		}
	}

	[HarmonyPatch(typeof(PlayerControllerB), "Update")]
	[HarmonyPrefix]
	private static void Update_Prefix(PlayerControllerB __instance)
	{
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b6: 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_005a: 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_00d8: 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_0158: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		if (filterPlayerControllers(__instance))
		{
			return;
		}
		prefixCamFov = __instance.gameplayCamera.fieldOfView;
		if (FovAdjustBase.inDebugMode)
		{
			if (((ButtonControl)Keyboard.current.minusKey).wasPressedThisFrame)
			{
				visorScale.x -= 0.00049999997f;
				FovAdjustBase.log.LogMessage((object)visorScale);
			}
			else if (((ButtonControl)Keyboard.current.equalsKey).wasPressedThisFrame)
			{
				visorScale.x += 0.00049999997f;
				FovAdjustBase.log.LogMessage((object)visorScale);
			}
			if (((ButtonControl)Keyboard.current.leftBracketKey).wasPressedThisFrame)
			{
				visorScale.y -= 0.00049999997f;
				FovAdjustBase.log.LogMessage((object)visorScale);
			}
			else if (((ButtonControl)Keyboard.current.rightBracketKey).wasPressedThisFrame)
			{
				visorScale.y += 0.00049999997f;
				FovAdjustBase.log.LogMessage((object)visorScale);
			}
			if (((ButtonControl)Keyboard.current.semicolonKey).wasPressedThisFrame)
			{
				visorScale.z -= 0.00049999997f;
				FovAdjustBase.log.LogMessage((object)visorScale);
			}
			else if (((ButtonControl)Keyboard.current.quoteKey).wasPressedThisFrame)
			{
				visorScale.z += 0.00049999997f;
				FovAdjustBase.log.LogMessage((object)visorScale);
			}
		}
		if (__instance.localVisor.localScale != visorScale)
		{
			__instance.localVisor.localScale = visorScale;
		}
	}

	[HarmonyPatch(typeof(PlayerControllerB), "Update")]
	[HarmonyPostfix]
	private static void Update_Postfix(PlayerControllerB __instance)
	{
		if (!filterPlayerControllers(__instance))
		{
			float num = newTargetFovBase;
			if (__instance.inTerminalMenu)
			{
				num = 60f;
			}
			else if (__instance.IsInspectingItem)
			{
				num = 46f;
			}
			else if (__instance.isSprinting)
			{
				num *= 1.03f;
			}
			__instance.gameplayCamera.fieldOfView = Mathf.Lerp(prefixCamFov, num, 6f * Time.deltaTime);
		}
	}

	[HarmonyPatch(typeof(PlayerControllerB), "LateUpdate")]
	[HarmonyPostfix]
	private static void LateUpdate_Postfix(PlayerControllerB __instance)
	{
		//IL_0033: 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)
		//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_005c: Unknown result type (might be due to invalid IL or missing references)
		if (!filterPlayerControllers(__instance) && (newTargetFovBase > 66f || FovAdjustBase.inDebugMode))
		{
			__instance.localVisor.position = __instance.localVisor.position + __instance.localVisor.rotation * new Vector3(0f, 0f, -0.06f);
		}
	}

	private static float easeOutSine(float x)
	{
		return Mathf.Sin(x * (float)Math.PI / 2f);
	}

	public static void calculateVisorStuff()
	{
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: 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_0098: 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_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)
		if (hideVisor)
		{
			visorScale = new Vector3(0f, 0f, 0f);
		}
		else if (newTargetFovBase > 66f || FovAdjustBase.inDebugMode)
		{
			float num = (newTargetFovBase - 66f) / (visorScaleTopRefFOV - 66f);
			num = Mathf.Lerp(num, easeOutSine(num), linToSinLerp);
			visorScale = Vector3.LerpUnclamped(visorScaleBottom, visorScaleTop, num);
		}
		else
		{
			visorScale = new Vector3(0.36f, 0.49f, 0.49f);
		}
	}

	private static bool filterPlayerControllers(PlayerControllerB player)
	{
		return !((NetworkBehaviour)player).IsOwner || !player.isPlayerControlled || (((NetworkBehaviour)player).IsServer && !player.isHostPlayerObject && !player.isTestingPlayer);
	}
}
public class HUDManagerPatches
{
	[HarmonyPatch(typeof(HUDManager), "SubmitChat_performed")]
	[HarmonyPrefix]
	public static bool SubmitChat_performed_Prefix(HUDManager __instance)
	{
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: 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_017f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0239: Unknown result type (might be due to invalid IL or missing references)
		//IL_023e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0262: Unknown result type (might be due to invalid IL or missing references)
		//IL_0267: Unknown result type (might be due to invalid IL or missing references)
		string text = __instance.chatTextField.text;
		if (text.StartsWith("/fov"))
		{
			string[] array = text.Split(new char[1] { ' ' });
			if (array.Length > 1 && float.TryParse(array[1], out var result))
			{
				result = Mathf.Clamp(result, 66f, 130f);
				PlayerControllerBPatches.newTargetFovBase = result;
				if (!FovAdjustBase.inDebugMode)
				{
					PlayerControllerBPatches.calculateVisorStuff();
				}
			}
		}
		else if (text.StartsWith("/toggleVisor"))
		{
			PlayerControllerBPatches.hideVisor = !PlayerControllerBPatches.hideVisor;
			PlayerControllerBPatches.calculateVisorStuff();
		}
		else if (text.StartsWith("/recalcVisor") && FovAdjustBase.inDebugMode)
		{
			PlayerControllerBPatches.calculateVisorStuff();
		}
		else if (text.StartsWith("/setScaleBottom") && FovAdjustBase.inDebugMode)
		{
			string[] array2 = text.Split(new char[1] { ' ' });
			PlayerControllerBPatches.visorScaleBottom = new Vector3(float.Parse(array2[1]), float.Parse(array2[2]), float.Parse(array2[3]));
		}
		else if (text.StartsWith("/setScaleTop") && FovAdjustBase.inDebugMode)
		{
			string[] array3 = text.Split(new char[1] { ' ' });
			PlayerControllerBPatches.visorScaleTop = new Vector3(float.Parse(array3[1]), float.Parse(array3[2]), float.Parse(array3[3]));
		}
		else if (text.StartsWith("/setSinAmount") && FovAdjustBase.inDebugMode)
		{
			string[] array4 = text.Split(new char[1] { ' ' });
			PlayerControllerBPatches.linToSinLerp = float.Parse(array4[1]);
		}
		else if (text.StartsWith("/setTopRef") && FovAdjustBase.inDebugMode)
		{
			string[] array5 = text.Split(new char[1] { ' ' });
			PlayerControllerBPatches.visorScaleTopRefFOV = float.Parse(array5[1]);
		}
		else
		{
			if (!text.StartsWith("/gimmeMyValues") || !FovAdjustBase.inDebugMode)
			{
				return true;
			}
			ManualLogSource log = FovAdjustBase.log;
			Vector3 val = PlayerControllerBPatches.visorScaleBottom;
			log.LogMessage((object)("visorScaleBottom: " + ((object)(Vector3)(ref val)).ToString()));
			ManualLogSource log2 = FovAdjustBase.log;
			val = PlayerControllerBPatches.visorScaleTop;
			log2.LogMessage((object)("visorScaleTop: " + ((object)(Vector3)(ref val)).ToString()));
			FovAdjustBase.log.LogMessage((object)("linToSinLerp: " + PlayerControllerBPatches.linToSinLerp));
			FovAdjustBase.log.LogMessage((object)("visorScaleTopRefFOV: " + PlayerControllerBPatches.visorScaleTopRefFOV));
		}
		__instance.localPlayer = GameNetworkManager.Instance.localPlayerController;
		__instance.localPlayer.isTypingChat = false;
		__instance.chatTextField.text = "";
		EventSystem.current.SetSelectedGameObject((GameObject)null);
		((Behaviour)__instance.typingIndicator).enabled = false;
		return false;
	}
}

plugins/RugbugRedfern-Skinwalkers/SkinwalkerMod.dll

Decompiled a year ago
using System;
using System.Collections;
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 BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Dissonance.Config;
using HarmonyLib;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Networking;
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: AssemblyTitle("SkinwalkerMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkinwalkerMod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fd4979a2-cef0-46af-8bf8-97e630b11475")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
internal class <Module>
{
	static <Module>()
	{
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>();
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<float>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<float>();
	}
}
namespace SkinwalkerMod;

[BepInPlugin("RugbugRedfern.SkinwalkerMod", "Skinwalker Mod", "1.0.7")]
internal class PluginLoader : BaseUnityPlugin
{
	private readonly Harmony harmony = new Harmony("RugbugRedfern.SkinwalkerMod");

	private const string modGUID = "RugbugRedfern.SkinwalkerMod";

	private const string modVersion = "1.0.7";

	private static bool initialized;

	public static PluginLoader Instance { get; private set; }

	private void Awake()
	{
		//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Expected O, but got Unknown
		if (initialized)
		{
			return;
		}
		initialized = true;
		Instance = this;
		harmony.PatchAll(Assembly.GetExecutingAssembly());
		Type[] types = Assembly.GetExecutingAssembly().GetTypes();
		Type[] array = types;
		foreach (Type type in array)
		{
			MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
			MethodInfo[] array2 = methods;
			foreach (MethodInfo methodInfo in array2)
			{
				object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
				if (customAttributes.Length != 0)
				{
					methodInfo.Invoke(null, null);
				}
			}
		}
		SkinwalkerLogger.Initialize("RugbugRedfern.SkinwalkerMod");
		SkinwalkerLogger.Log("SKINWALKER MOD STARTING UP 1.0.7");
		SkinwalkerConfig.InitConfig();
		SceneManager.sceneLoaded += SkinwalkerNetworkManagerHandler.ClientConnectInitializer;
		GameObject val = new GameObject("Skinwalker Mod");
		val.AddComponent<SkinwalkerModPersistent>();
		((Object)val).hideFlags = (HideFlags)61;
		Object.DontDestroyOnLoad((Object)(object)val);
	}

	public void BindConfig<T>(ref ConfigEntry<T> config, string section, string key, T defaultValue, string description = "")
	{
		config = ((BaseUnityPlugin)this).Config.Bind<T>(section, key, defaultValue, description);
	}
}
internal class SkinwalkerBehaviour : MonoBehaviour
{
	private AudioSource audioSource;

	public const float PLAY_INTERVAL_MIN = 15f;

	public const float PLAY_INTERVAL_MAX = 40f;

	private float nextTimeToPlayAudio;

	public void Initialize(EnemyAI ai)
	{
		audioSource = ai.creatureVoice;
		SetNextTime();
	}

	private void Update()
	{
		if (Time.time > nextTimeToPlayAudio)
		{
			SetNextTime();
			AudioClip sample = SkinwalkerModPersistent.Instance.GetSample();
			if (Object.op_Implicit((Object)(object)sample))
			{
				audioSource.PlayOneShot(sample);
			}
		}
	}

	private void SetNextTime()
	{
		if (SkinwalkerNetworkManager.Instance.VoiceLineFrequency.Value <= 0f)
		{
			nextTimeToPlayAudio = Time.time + 100000000f;
		}
		else
		{
			nextTimeToPlayAudio = Time.time + Random.Range(15f, 40f) / SkinwalkerNetworkManager.Instance.VoiceLineFrequency.Value;
		}
	}

	private T CopyComponent<T>(T original, GameObject destination) where T : Component
	{
		Type type = ((object)original).GetType();
		Component val = destination.AddComponent(type);
		FieldInfo[] fields = type.GetFields();
		FieldInfo[] array = fields;
		foreach (FieldInfo fieldInfo in array)
		{
			fieldInfo.SetValue(val, fieldInfo.GetValue(original));
		}
		return (T)(object)((val is T) ? val : null);
	}
}
internal class SkinwalkerConfig
{
	public static ConfigEntry<bool> VoiceEnabled_BaboonHawk;

	public static ConfigEntry<bool> VoiceEnabled_Bracken;

	public static ConfigEntry<bool> VoiceEnabled_BunkerSpider;

	public static ConfigEntry<bool> VoiceEnabled_Centipede;

	public static ConfigEntry<bool> VoiceEnabled_CoilHead;

	public static ConfigEntry<bool> VoiceEnabled_EyelessDog;

	public static ConfigEntry<bool> VoiceEnabled_ForestGiant;

	public static ConfigEntry<bool> VoiceEnabled_GhostGirl;

	public static ConfigEntry<bool> VoiceEnabled_GiantWorm;

	public static ConfigEntry<bool> VoiceEnabled_HoardingBug;

	public static ConfigEntry<bool> VoiceEnabled_Hygrodere;

	public static ConfigEntry<bool> VoiceEnabled_Jester;

	public static ConfigEntry<bool> VoiceEnabled_SporeLizard;

	public static ConfigEntry<bool> VoiceEnabled_Thumper;

	public static ConfigEntry<float> VoiceLineFrequency;

	public static void InitConfig()
	{
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_BaboonHawk, "Monster Voices", "Baboon Hawk", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_Bracken, "Monster Voices", "Bracken", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_BunkerSpider, "Monster Voices", "Bunker Spider", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_Centipede, "Monster Voices", "Centipede", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_CoilHead, "Monster Voices", "Coil Head", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_EyelessDog, "Monster Voices", "Eyeless Dog", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_ForestGiant, "Monster Voices", "Forest Giant", defaultValue: false);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_GhostGirl, "Monster Voices", "Ghost Girl", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_GiantWorm, "Monster Voices", "Giant Worm", defaultValue: false);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_HoardingBug, "Monster Voices", "Hoarding Bug", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_Hygrodere, "Monster Voices", "Hygrodere", defaultValue: false);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_Jester, "Monster Voices", "Jester", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_SporeLizard, "Monster Voices", "Spore Lizard", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceEnabled_Thumper, "Monster Voices", "Thumper", defaultValue: true);
		PluginLoader.Instance.BindConfig(ref VoiceLineFrequency, "Monster Voices", "VoiceLineFrequency", 1f, "1 is the default, and voice lines will occur every " + 15f.ToString("0") + " to " + 40f.ToString("0") + " seconds per enemy. Setting this to 2 means they will occur twice as often, 0.5 means half as often, etc.");
		SkinwalkerLogger.Log("VoiceEnabled_BaboonHawk" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_BaboonHawk.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_Bracken" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Bracken.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_BunkerSpider" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_BunkerSpider.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_Centipede" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Centipede.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_CoilHead" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_CoilHead.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_EyelessDog" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_EyelessDog.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_ForestGiant" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_ForestGiant.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_GhostGirl" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_GhostGirl.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_GiantWorm" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_GiantWorm.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_HoardingBug" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_HoardingBug.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_Hygrodere" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Hygrodere.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_Jester" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Jester.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_SporeLizard" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_SporeLizard.Value}]");
		SkinwalkerLogger.Log("VoiceEnabled_Thumper" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Thumper.Value}]");
		SkinwalkerLogger.Log("VoiceLineFrequency" + $" VALUE LOADED FROM CONFIG: [{VoiceLineFrequency.Value}]");
	}
}
internal static class SkinwalkerLogger
{
	internal static ManualLogSource logSource;

	public static void Initialize(string modGUID)
	{
		logSource = Logger.CreateLogSource(modGUID);
	}

	public static void Log(object message)
	{
		logSource.LogInfo(message);
	}

	public static void LogError(object message)
	{
		logSource.LogError(message);
	}
}
public class SkinwalkerModPersistent : MonoBehaviour
{
	private string audioFolder;

	private List<AudioClip> cachedAudio = new List<AudioClip>();

	private float nextTimeToCheckFolder = 30f;

	private float nextTimeToCheckEnemies = 30f;

	private const float folderScanInterval = 8f;

	private const float enemyScanInterval = 5f;

	public static SkinwalkerModPersistent Instance { get; private set; }

	private void Awake()
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		Instance = this;
		((Component)this).transform.position = Vector3.zero;
		SkinwalkerLogger.Log("Skinwalker Mod Object Initialized");
		audioFolder = Path.Combine(Application.dataPath, "..", "Dissonance_Diagnostics");
		EnableRecording();
		if (!Directory.Exists(audioFolder))
		{
			Directory.CreateDirectory(audioFolder);
		}
	}

	private void OnApplicationQuit()
	{
		DisableRecording();
	}

	private void EnableRecording()
	{
		DebugSettings.Instance.EnablePlaybackDiagnostics = true;
		DebugSettings.Instance.RecordFinalAudio = true;
	}

	private void Update()
	{
		if (Time.realtimeSinceStartup > nextTimeToCheckFolder)
		{
			nextTimeToCheckFolder = Time.realtimeSinceStartup + 8f;
			if (!Directory.Exists(audioFolder))
			{
				SkinwalkerLogger.LogError("Audio folder is missing at " + audioFolder);
				return;
			}
			string[] files = Directory.GetFiles(audioFolder);
			foreach (string text in files)
			{
				SkinwalkerLogger.Log("Got audio file path " + text);
				((MonoBehaviour)this).StartCoroutine(LoadWavFile(text, delegate(AudioClip audioClip)
				{
					cachedAudio.Add(audioClip);
				}));
			}
		}
		if (!(Time.realtimeSinceStartup > nextTimeToCheckEnemies))
		{
			return;
		}
		nextTimeToCheckEnemies = Time.realtimeSinceStartup + 5f;
		EnemyAI[] array = Object.FindObjectsOfType<EnemyAI>(true);
		EnemyAI[] array2 = array;
		SkinwalkerBehaviour skinwalkerBehaviour = default(SkinwalkerBehaviour);
		foreach (EnemyAI val in array2)
		{
			SkinwalkerLogger.Log("IsEnemyEnabled " + ((Object)val).name + " " + IsEnemyEnabled(val));
			if (IsEnemyEnabled(val) && !((Component)val).TryGetComponent<SkinwalkerBehaviour>(ref skinwalkerBehaviour))
			{
				((Component)val).gameObject.AddComponent<SkinwalkerBehaviour>().Initialize(val);
			}
		}
	}

	private bool IsEnemyEnabled(EnemyAI enemy)
	{
		if ((Object)(object)enemy == (Object)null)
		{
			return false;
		}
		return ((Object)((Component)enemy).gameObject).name switch
		{
			"BaboonHawkEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_BaboonHawk.Value, 
			"Flowerman(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Bracken.Value, 
			"SandSpider(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_BunkerSpider.Value, 
			"RedLocustBees(Clone)" => false, 
			"Centipede(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Centipede.Value, 
			"SpringMan(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_CoilHead.Value, 
			"MouthDog(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_EyelessDog.Value, 
			"ForestGiant(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_ForestGiant.Value, 
			"DressGirl(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_GhostGirl.Value, 
			"SandWorm(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_GiantWorm.Value, 
			"HoarderBug(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_HoardingBug.Value, 
			"Blob(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Hygrodere.Value, 
			"JesterEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Jester.Value, 
			"PufferEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_SporeLizard.Value, 
			"Crawler(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Thumper.Value, 
			"DocileLocustBees(Clone)" => false, 
			"DoublewingedBird(Clone)" => false, 
			_ => true, 
		};
	}

	internal IEnumerator LoadWavFile(string path, Action<AudioClip> callback)
	{
		UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(path, (AudioType)20);
		try
		{
			yield return www.SendWebRequest();
			if ((int)www.result != 1)
			{
				SkinwalkerLogger.LogError("Failed to load WAV file: " + www.error);
				yield break;
			}
			SkinwalkerLogger.Log("Loaded clip from path " + path);
			AudioClip audioClip = DownloadHandlerAudioClip.GetContent(www);
			if (audioClip.length > 0.9f)
			{
				callback(audioClip);
			}
			File.Delete(path);
		}
		finally
		{
			((IDisposable)www)?.Dispose();
		}
	}

	private void DisableRecording()
	{
		DebugSettings.Instance.EnablePlaybackDiagnostics = false;
		DebugSettings.Instance.RecordFinalAudio = false;
		if (Directory.Exists(audioFolder))
		{
			Directory.Delete(audioFolder, recursive: true);
		}
	}

	public AudioClip GetSample()
	{
		if (cachedAudio.Count > 0)
		{
			int index = Random.Range(0, cachedAudio.Count - 1);
			AudioClip result = cachedAudio[index];
			cachedAudio.RemoveAt(index);
			return result;
		}
		while (cachedAudio.Count > 200)
		{
			cachedAudio.RemoveAt(0);
		}
		return null;
	}

	public void ClearCache()
	{
		cachedAudio.Clear();
	}
}
internal static class SkinwalkerNetworkManagerHandler
{
	internal static void ClientConnectInitializer(Scene sceneName, LoadSceneMode sceneEnum)
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Expected O, but got Unknown
		if (((Scene)(ref sceneName)).name == "SampleSceneRelay")
		{
			GameObject val = new GameObject("SkinwalkerNetworkManager");
			val.AddComponent<NetworkObject>();
			val.AddComponent<SkinwalkerNetworkManager>();
			Debug.Log((object)"Initialized SkinwalkerNetworkManager");
		}
	}
}
internal class SkinwalkerNetworkManager : NetworkBehaviour
{
	public NetworkVariable<bool> VoiceEnabled_BaboonHawk = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_Bracken = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_BunkerSpider = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_Centipede = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_CoilHead = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_EyelessDog = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_ForestGiant = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_GhostGirl = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_GiantWorm = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_HoardingBug = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_Hygrodere = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_Jester = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_SporeLizard = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<bool> VoiceEnabled_Thumper = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public NetworkVariable<float> VoiceLineFrequency = new NetworkVariable<float>(1f, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

	public static SkinwalkerNetworkManager Instance { get; private set; }

	private void Awake()
	{
		Instance = this;
		NetworkVariable<bool> voiceEnabled_BaboonHawk = VoiceEnabled_BaboonHawk;
		voiceEnabled_BaboonHawk.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_BaboonHawk.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_BaboonHawk" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_Bracken = VoiceEnabled_Bracken;
		voiceEnabled_Bracken.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_Bracken.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_Bracken" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_BunkerSpider = VoiceEnabled_BunkerSpider;
		voiceEnabled_BunkerSpider.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_BunkerSpider.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_BunkerSpider" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_Centipede = VoiceEnabled_Centipede;
		voiceEnabled_Centipede.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_Centipede.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_Centipede" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_CoilHead = VoiceEnabled_CoilHead;
		voiceEnabled_CoilHead.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_CoilHead.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_CoilHead" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_EyelessDog = VoiceEnabled_EyelessDog;
		voiceEnabled_EyelessDog.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_EyelessDog.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_EyelessDog" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_ForestGiant = VoiceEnabled_ForestGiant;
		voiceEnabled_ForestGiant.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_ForestGiant.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_ForestGiant" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_GhostGirl = VoiceEnabled_GhostGirl;
		voiceEnabled_GhostGirl.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_GhostGirl.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_GhostGirl" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_GiantWorm = VoiceEnabled_GiantWorm;
		voiceEnabled_GiantWorm.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_GiantWorm.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_GiantWorm" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_HoardingBug = VoiceEnabled_HoardingBug;
		voiceEnabled_HoardingBug.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_HoardingBug.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_HoardingBug" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_Hygrodere = VoiceEnabled_Hygrodere;
		voiceEnabled_Hygrodere.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_Hygrodere.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_Hygrodere" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_Jester = VoiceEnabled_Jester;
		voiceEnabled_Jester.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_Jester.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_Jester" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_SporeLizard = VoiceEnabled_SporeLizard;
		voiceEnabled_SporeLizard.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_SporeLizard.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_SporeLizard" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<bool> voiceEnabled_Thumper = VoiceEnabled_Thumper;
		voiceEnabled_Thumper.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)voiceEnabled_Thumper.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool prevValue, bool newValue)
		{
			SkinwalkerLogger.Log("VoiceEnabled_Thumper" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		NetworkVariable<float> voiceLineFrequency = VoiceLineFrequency;
		voiceLineFrequency.OnValueChanged = (OnValueChangedDelegate<float>)(object)Delegate.Combine((Delegate?)(object)voiceLineFrequency.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<float>)delegate(float prevValue, float newValue)
		{
			SkinwalkerLogger.Log("VoiceLineFrequency" + $" VALUE CHANGED: [prev: {prevValue}] [new: {newValue}]");
		});
		if (GameNetworkManager.Instance.isHostingGame)
		{
			VoiceEnabled_BaboonHawk.Value = SkinwalkerConfig.VoiceEnabled_BaboonHawk.Value;
			VoiceEnabled_Bracken.Value = SkinwalkerConfig.VoiceEnabled_Bracken.Value;
			VoiceEnabled_BunkerSpider.Value = SkinwalkerConfig.VoiceEnabled_BunkerSpider.Value;
			VoiceEnabled_Centipede.Value = SkinwalkerConfig.VoiceEnabled_Centipede.Value;
			VoiceEnabled_CoilHead.Value = SkinwalkerConfig.VoiceEnabled_CoilHead.Value;
			VoiceEnabled_EyelessDog.Value = SkinwalkerConfig.VoiceEnabled_EyelessDog.Value;
			VoiceEnabled_ForestGiant.Value = SkinwalkerConfig.VoiceEnabled_ForestGiant.Value;
			VoiceEnabled_GhostGirl.Value = SkinwalkerConfig.VoiceEnabled_GhostGirl.Value;
			VoiceEnabled_GiantWorm.Value = SkinwalkerConfig.VoiceEnabled_GiantWorm.Value;
			VoiceEnabled_HoardingBug.Value = SkinwalkerConfig.VoiceEnabled_HoardingBug.Value;
			VoiceEnabled_Hygrodere.Value = SkinwalkerConfig.VoiceEnabled_Hygrodere.Value;
			VoiceEnabled_Jester.Value = SkinwalkerConfig.VoiceEnabled_Jester.Value;
			VoiceEnabled_SporeLizard.Value = SkinwalkerConfig.VoiceEnabled_SporeLizard.Value;
			VoiceEnabled_Thumper.Value = SkinwalkerConfig.VoiceEnabled_Thumper.Value;
			VoiceLineFrequency.Value = SkinwalkerConfig.VoiceLineFrequency.Value;
			SkinwalkerLogger.Log("HOST SENDING CONFIG TO CLIENTS");
		}
		SkinwalkerLogger.Log("SkinwalkerNetworkManager Awake");
	}

	public override void OnDestroy()
	{
		((NetworkBehaviour)this).OnDestroy();
		SkinwalkerLogger.Log("SkinwalkerNetworkManager OnDestroy");
		SkinwalkerModPersistent.Instance?.ClearCache();
	}

	protected override void __initializeVariables()
	{
		if (VoiceEnabled_BaboonHawk == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_BaboonHawk cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_BaboonHawk).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_BaboonHawk, "VoiceEnabled_BaboonHawk");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_BaboonHawk);
		if (VoiceEnabled_Bracken == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Bracken cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_Bracken).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Bracken, "VoiceEnabled_Bracken");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Bracken);
		if (VoiceEnabled_BunkerSpider == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_BunkerSpider cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_BunkerSpider).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_BunkerSpider, "VoiceEnabled_BunkerSpider");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_BunkerSpider);
		if (VoiceEnabled_Centipede == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Centipede cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_Centipede).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Centipede, "VoiceEnabled_Centipede");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Centipede);
		if (VoiceEnabled_CoilHead == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_CoilHead cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_CoilHead).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_CoilHead, "VoiceEnabled_CoilHead");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_CoilHead);
		if (VoiceEnabled_EyelessDog == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_EyelessDog cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_EyelessDog).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_EyelessDog, "VoiceEnabled_EyelessDog");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_EyelessDog);
		if (VoiceEnabled_ForestGiant == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_ForestGiant cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_ForestGiant).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_ForestGiant, "VoiceEnabled_ForestGiant");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_ForestGiant);
		if (VoiceEnabled_GhostGirl == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_GhostGirl cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_GhostGirl).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_GhostGirl, "VoiceEnabled_GhostGirl");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_GhostGirl);
		if (VoiceEnabled_GiantWorm == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_GiantWorm cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_GiantWorm).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_GiantWorm, "VoiceEnabled_GiantWorm");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_GiantWorm);
		if (VoiceEnabled_HoardingBug == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_HoardingBug cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_HoardingBug).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_HoardingBug, "VoiceEnabled_HoardingBug");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_HoardingBug);
		if (VoiceEnabled_Hygrodere == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Hygrodere cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_Hygrodere).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Hygrodere, "VoiceEnabled_Hygrodere");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Hygrodere);
		if (VoiceEnabled_Jester == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Jester cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_Jester).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Jester, "VoiceEnabled_Jester");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Jester);
		if (VoiceEnabled_SporeLizard == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_SporeLizard cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_SporeLizard).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_SporeLizard, "VoiceEnabled_SporeLizard");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_SporeLizard);
		if (VoiceEnabled_Thumper == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Thumper cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceEnabled_Thumper).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Thumper, "VoiceEnabled_Thumper");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Thumper);
		if (VoiceLineFrequency == null)
		{
			throw new Exception("SkinwalkerNetworkManager.VoiceLineFrequency cannot be null. All NetworkVariableBase instances must be initialized.");
		}
		((NetworkVariableBase)VoiceLineFrequency).Initialize((NetworkBehaviour)(object)this);
		((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceLineFrequency, "VoiceLineFrequency");
		base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceLineFrequency);
		((NetworkBehaviour)this).__initializeVariables();
	}

	protected internal override string __getTypeName()
	{
		return "SkinwalkerNetworkManager";
	}
}

plugins/SirTyler-BetterTeleporter/BetterTeleporter.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.Logging;
using BetterTeleporter.Patches;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BetterTeleporter")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Better Teleporters for Lethal Company")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BetterTeleporter")]
[assembly: AssemblyTitle("BetterTeleporter")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BetterTeleporter
{
	[BepInPlugin("BetterTeleporter", "BetterTeleporter", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private readonly Harmony harmony = new Harmony("BetterTeleporter");

		internal ManualLogSource log;

		public static Plugin instance { get; private set; }

		private void Awake()
		{
			instance = this;
			log = ((BaseUnityPlugin)this).Logger;
			harmony.PatchAll(typeof(BetterInversePatch));
			log.LogInfo((object)"Plugin BetterTeleporter is loaded!");
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "BetterTeleporter";

		public const string PLUGIN_NAME = "BetterTeleporter";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace BetterTeleporter.Patches
{
	[HarmonyPatch(typeof(ShipTeleporter))]
	internal class BetterInversePatch
	{
		[HarmonyPatch("TeleportPlayerOutWithInverseTeleporter")]
		[HarmonyPrefix]
		private static bool TeleportPlayerOutWithInverseTeleporter(ShipTeleporter __instance, ref int[] ___playersBeingTeleported, int playerObj, Vector3 teleportPos)
		{
			//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_0099: 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_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Expected O, but got Unknown
			//IL_0108: Expected O, but got Unknown
			if (StartOfRound.Instance.allPlayerScripts[playerObj].isPlayerDead)
			{
				return true;
			}
			PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerObj];
			SetPlayerTeleporterId(__instance, ___playersBeingTeleported, val, -1);
			DropSomeItems(val);
			if (Object.op_Implicit((Object)(object)Object.FindObjectOfType<AudioReverbPresets>()))
			{
				Object.FindObjectOfType<AudioReverbPresets>().audioPresets[2].ChangeAudioReverbForPlayer(val);
			}
			val.isInElevator = false;
			val.isInHangarShipRoom = false;
			val.isInsideFactory = true;
			val.averageVelocity = 0f;
			val.velocityLastFrame = Vector3.zero;
			StartOfRound.Instance.allPlayerScripts[playerObj].TeleportPlayer(teleportPos, false, 0f, false, true);
			StartOfRound.Instance.allPlayerScripts[playerObj].beamOutParticle.Play();
			__instance.shipTeleporterAudio.PlayOneShot(__instance.teleporterBeamUpSFX);
			StartOfRound.Instance.allPlayerScripts[playerObj].movementAudio.PlayOneShot(__instance.teleporterBeamUpSFX);
			if ((Object)val == (Object)GameNetworkManager.Instance.localPlayerController)
			{
				Debug.Log((object)"Teleporter shaking camera");
				HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
			}
			return false;
		}

		private static void SetPlayerTeleporterId(ShipTeleporter __instance, int[] playersBeingTeleported, PlayerControllerB playerScript, int teleporterId)
		{
			playerScript.shipTeleporterId = teleporterId;
			playersBeingTeleported[playerScript.playerClientId] = (int)playerScript.playerClientId;
		}

		private static void DropSomeItems(PlayerControllerB __instance, bool itemsFall = true, bool disconnecting = false)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			//IL_00f8: 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_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: 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_0170: 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_017f: 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_01fb: 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)
			for (int i = 0; i < __instance.ItemSlots.Length; i++)
			{
				GrabbableObject val = __instance.ItemSlots[i];
				if (!((Object)val != (Object)null) || val is KeyItem)
				{
					continue;
				}
				if (val is FlashlightItem || val is WalkieTalkie)
				{
					float num = val.insertedBattery.charge * 0.5f;
					if (num < 0f)
					{
						num = 0f;
					}
					val.insertedBattery = new Battery(num != 0f, num);
					val.SyncBatteryServerRpc((int)(num * 100f));
					continue;
				}
				if (itemsFall)
				{
					val.parentObject = null;
					val.heldByPlayerOnServer = false;
					if (__instance.isInElevator)
					{
						((Component)val).transform.SetParent(__instance.playersManager.elevatorTransform, true);
					}
					else
					{
						((Component)val).transform.SetParent(__instance.playersManager.propsContainer, true);
					}
					__instance.SetItemInElevator(__instance.isInHangarShipRoom, __instance.isInElevator, val);
					val.EnablePhysics(true);
					val.EnableItemMeshes(true);
					((Component)val).transform.localScale = val.originalScale;
					val.isHeld = false;
					val.isPocketed = false;
					val.startFallingPosition = ((Component)val).transform.parent.InverseTransformPoint(((Component)val).transform.position);
					val.FallToGround(true);
					val.fallTime = Random.Range(-0.3f, 0.05f);
					if (((NetworkBehaviour)__instance).IsOwner)
					{
						val.DiscardItemOnClient();
					}
					else if (!val.itemProperties.syncDiscardFunction)
					{
						val.playerHeldBy = null;
					}
				}
				if (((NetworkBehaviour)__instance).IsOwner && !disconnecting)
				{
					((Behaviour)HUDManager.Instance.holdingTwoHandedItem).enabled = false;
					((Behaviour)HUDManager.Instance.itemSlotIcons[i]).enabled = false;
					HUDManager.Instance.ClearControlTips();
					__instance.activatingItem = false;
				}
				__instance.ItemSlots[i] = null;
			}
			if (__instance.isHoldingObject)
			{
				__instance.isHoldingObject = false;
				if ((Object)__instance.currentlyHeldObjectServer != (Object)null)
				{
					MethodInfo method = ((object)__instance).GetType().GetMethod("SetSpecialGrabAnimationBool", BindingFlags.Instance | BindingFlags.NonPublic);
					method.Invoke(__instance, new object[2] { false, __instance.currentlyHeldObjectServer });
				}
				__instance.playerBodyAnimator.SetBool("cancelHolding", true);
				__instance.playerBodyAnimator.SetTrigger("Throw");
			}
			__instance.twoHanded = false;
			__instance.carryWeight = 1f;
			__instance.currentlyHeldObjectServer = null;
		}
	}
}

plugins/Sligili-HDLethalCompany/HDLethalCompany.dll

Decompiled a year ago
using System;
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 BepInEx;
using BepInEx.Configuration;
using GameNetcodeStuff;
using HDLethalCompany.Patch;
using HDLethalCompany.Tools;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("HDLethalCompanyRemake")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HDLethalCompanyRemake")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7f379bc1-1fd4-4c72-9247-a181862eec6b")]
[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 HDLethalCompany
{
	[BepInPlugin("HDLethalCompany", "HDLethalCompany-Sligili", "1.5.3")]
	public class HDLethalCompanyInitialization : BaseUnityPlugin
	{
		private static ConfigEntry<float> config_ResMult;

		private static ConfigEntry<bool> config_EnablePostProcessing;

		private static ConfigEntry<bool> config_EnableFog;

		private static ConfigEntry<bool> config_EnableAntialiasing;

		private static ConfigEntry<bool> config_EnableResolution;

		private static ConfigEntry<bool> config_EnableFoliage;

		private static ConfigEntry<int> config_FogQuality;

		private static ConfigEntry<int> config_TextureQuality;

		private static ConfigEntry<int> config_LOD;

		private static ConfigEntry<int> config_ShadowmapQuality;

		private Harmony _harmony;

		private void Awake()
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			((BaseUnityPlugin)this).Logger.LogInfo((object)"HDLethalCompany loaded");
			ConfigFile();
			GraphicsPatch.assetBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "HDLethalCompany/hdlethalcompany"));
			_harmony = new Harmony("HDLethalCompany");
			_harmony.PatchAll(typeof(GraphicsPatch));
		}

		private void ConfigFile()
		{
			config_ResMult = ((BaseUnityPlugin)this).Config.Bind<float>("RESOLUTION", "Value", 2.233f, "Resolution Scale Multiplier - <EXAMPLES -> | 1.000 = 860x520p | 2.233 =~ 1920x1080p | 2.977 = 2560x1440p | 4.465 = 3840x2060p > - The UI scanned elements have slightly incorrect offsets after 3.000");
			config_EnableResolution = ((BaseUnityPlugin)this).Config.Bind<bool>("RESOLUTION", "EnableRes", true, "Resolution Fix - In case you wanna use another resolution mod or apply any widescreen mod while keeping the graphics settings");
			config_EnableAntialiasing = ((BaseUnityPlugin)this).Config.Bind<bool>("EFFECTS", "EnableAA", false, "Anti-Aliasing (Unity's SMAA)");
			config_EnablePostProcessing = ((BaseUnityPlugin)this).Config.Bind<bool>("EFFECTS", "EnablePP", true, "Post-Processing (Color grading)");
			config_TextureQuality = ((BaseUnityPlugin)this).Config.Bind<int>("EFFECTS", "TextureQuality", 3, "Texture Resolution Quality - <PRESETS -> | 0 = VERY LOW (1/8) | 1 = LOW (1/4) | 2 = MEDIUM (1/2) | 3 = HIGH (1/1 VANILLA) >");
			config_FogQuality = ((BaseUnityPlugin)this).Config.Bind<int>("EFFECTS", "FogQuality", 1, "Volumetric Fog Quality - <PRESETS -> | 0 = VERY LOW | 1 = VANILLA FOG | 2 = MEDIUM | 3 = HIGH >");
			config_EnableFog = ((BaseUnityPlugin)this).Config.Bind<bool>("EFFECTS", "EnableFOG", true, "Volumetric Fog Toggle - Use this as a last resource in case lowering the fog quality is not enough to get decent performance");
			config_LOD = ((BaseUnityPlugin)this).Config.Bind<int>("EFFECTS", "LOD", 1, "Level Of Detail - <PRESETS -> | 0 = LOW (HALF DISTANCE) | 1 = VANILLA | 2 = HIGH (TWICE THE DISTANCE) >");
			config_ShadowmapQuality = ((BaseUnityPlugin)this).Config.Bind<int>("EFFECTS", "ShadowQuality", 3, "Shadows Resolution - <PRESETS -> 0 = VERY LOW (SHADOWS DISABLED)| 1 = LOW (256) | 2 = MEDIUM (1024) | 3 = VANILLA (2048) > - Shadowmap max resolution");
			config_EnableFoliage = ((BaseUnityPlugin)this).Config.Bind<bool>("EFFECTS", "EnableF", true, "Foliage Toggle - If the game camera should or not render bushes/grass (trees won't be affected)");
			GraphicsPatch.m_enableFoliage = config_EnableFoliage.Value;
			GraphicsPatch.m_enableResolutionFix = config_EnableResolution.Value;
			GraphicsPatch.m_setShadowQuality = config_ShadowmapQuality.Value;
			GraphicsPatch.m_setLOD = config_LOD.Value;
			GraphicsPatch.m_setTextureResolution = config_TextureQuality.Value;
			GraphicsPatch.m_setFogQuality = config_FogQuality.Value;
			GraphicsPatch.multiplier = config_ResMult.Value;
			GraphicsPatch.anchorOffsetZ = 0.123f * config_ResMult.Value + 0.877f;
			GraphicsPatch.m_widthResolution = 860f * config_ResMult.Value;
			GraphicsPatch.m_heightResolution = 520f * config_ResMult.Value;
			GraphicsPatch.m_enableAntiAliasing = config_EnableAntialiasing.Value;
			GraphicsPatch.m_enableFog = config_EnableFog.Value;
			GraphicsPatch.m_enablePostProcessing = config_EnablePostProcessing.Value;
		}
	}
	public static class PluginInfo
	{
		public const string Guid = "HDLethalCompany";

		public const string Name = "HDLethalCompany-Sligili";

		public const string Ver = "1.5.3";
	}
}
namespace HDLethalCompany.Tools
{
	public class Reflection
	{
		public static object GetInstanceField(Type type, object instance, string fieldName)
		{
			BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
			FieldInfo field = type.GetField(fieldName, bindingAttr);
			return field.GetValue(instance);
		}

		public static object CallMethod(object instance, string methodName, params object[] args)
		{
			MethodInfo method = instance.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				return method.Invoke(instance, args);
			}
			return null;
		}
	}
}
namespace HDLethalCompany.Patch
{
	internal class GraphicsPatch
	{
		public static bool m_enablePostProcessing;

		public static bool m_enableFog;

		public static bool m_enableAntiAliasing;

		public static bool m_enableResolutionFix;

		public static bool m_enableFoliage = true;

		public static int m_setFogQuality;

		public static int m_setTextureResolution;

		public static int m_setLOD;

		public static int m_setShadowQuality;

		private static HDRenderPipelineAsset myAsset;

		public static AssetBundle assetBundle;

		public static float anchorOffsetX = 439.48f;

		public static float anchorOffsetY = 244.8f;

		public static float anchorOffsetZ;

		public static float multiplier;

		public static float m_widthResolution;

		public static float m_heightResolution;

		[HarmonyPatch(typeof(PlayerControllerB), "Start")]
		[HarmonyPrefix]
		private static void StartPrefix(PlayerControllerB __instance)
		{
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: 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_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_00a1: Unknown result type (might be due to invalid IL or missing references)
			Object[] array = Resources.FindObjectsOfTypeAll(typeof(HDAdditionalCameraData));
			foreach (Object obj in array)
			{
				HDAdditionalCameraData val = (HDAdditionalCameraData)(object)((obj is HDAdditionalCameraData) ? obj : null);
				if (!(((Object)((Component)val).gameObject).name == "MapCamera"))
				{
					val.customRenderingSettings = true;
					ToggleCustomPass(val, m_enablePostProcessing);
					SetLevelOfDetail(val);
					ToggleVolumetricFog(val, m_enableFog);
					if (!m_enableFoliage)
					{
						LayerMask val2 = LayerMask.op_Implicit(((Component)val).GetComponent<Camera>().cullingMask);
						val2 = LayerMask.op_Implicit(LayerMask.op_Implicit(val2) & -1025);
						((Component)val).GetComponent<Camera>().cullingMask = LayerMask.op_Implicit(val2);
					}
					SetShadowQuality(assetBundle, val);
					if (!(((Object)((Component)val).gameObject).name == "SecurityCamera") && !(((Object)((Component)val).gameObject).name == "ShipCamera"))
					{
						SetAntiAliasing(val);
					}
				}
			}
			array = null;
			SetTextureQuality();
			SetFogQuality();
			if (m_enableResolutionFix && multiplier != 1f)
			{
				int width = (int)Math.Round(m_widthResolution, 0);
				int height = (int)Math.Round(m_heightResolution, 0);
				((Texture)__instance.gameplayCamera.targetTexture).width = width;
				((Texture)__instance.gameplayCamera.targetTexture).height = height;
			}
		}

		[HarmonyPatch(typeof(RoundManager), "GenerateNewFloor")]
		[HarmonyPrefix]
		private static void RoundPostFix()
		{
			SetFogQuality();
			if (m_setLOD == 0)
			{
				RemoveLodFromGameObject("CatwalkStairs");
			}
		}

		[HarmonyPatch(typeof(HUDManager), "UpdateScanNodes")]
		[HarmonyPostfix]
		private static void UpdateScanNodesPostfix(PlayerControllerB playerScript, HUDManager __instance)
		{
			//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_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: 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_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: 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)
			if (anchorOffsetZ > 1.238f)
			{
				anchorOffsetZ = 1.238f;
			}
			if (!m_enableResolutionFix || multiplier == 1f)
			{
				return;
			}
			Vector3 zero = Vector3.zero;
			bool flag = false;
			for (int i = 0; i < __instance.scanElements.Length; i++)
			{
				if ((Traverse.Create((object)__instance).Field("scanNodes").GetValue() as Dictionary<RectTransform, ScanNodeProperties>).Count > 0 && (Traverse.Create((object)__instance).Field("scanNodes").GetValue() as Dictionary<RectTransform, ScanNodeProperties>).TryGetValue(__instance.scanElements[i], out var value) && (Object)(object)value != (Object)null)
				{
					try
					{
						if ((bool)Reflection.CallMethod(__instance, "NodeIsNotVisible", value, i))
						{
							continue;
						}
						if (!((Component)__instance.scanElements[i]).gameObject.activeSelf)
						{
							((Component)__instance.scanElements[i]).gameObject.SetActive(true);
							((Component)__instance.scanElements[i]).GetComponent<Animator>().SetInteger("colorNumber", value.nodeType);
							if (value.creatureScanID != -1)
							{
								Traverse.Create((object)__instance).Method("AttemptScanNewCreature", new object[1] { value.creatureScanID });
							}
						}
						goto IL_0186;
					}
					catch (Exception arg)
					{
						Debug.LogError((object)$"Error in updatescanNodes A: {arg}");
						goto IL_0186;
					}
				}
				(Traverse.Create((object)__instance).Field("scanNodes").GetValue() as Dictionary<RectTransform, ScanNodeProperties>).Remove(__instance.scanElements[i]);
				((Component)__instance.scanElements[i]).gameObject.SetActive(false);
				continue;
				IL_0186:
				try
				{
					Traverse.Create((object)__instance).Field("scanElementText").SetValue((object)((Component)__instance.scanElements[i]).gameObject.GetComponentsInChildren<TextMeshProUGUI>());
					if ((Traverse.Create((object)__instance).Field("scanElementText").GetValue() as TextMeshProUGUI[]).Length > 1)
					{
						((TMP_Text)(Traverse.Create((object)__instance).Field("scanElementText").GetValue() as TextMeshProUGUI[])[0]).text = value.headerText;
						((TMP_Text)(Traverse.Create((object)__instance).Field("scanElementText").GetValue() as TextMeshProUGUI[])[1]).text = value.subText;
					}
					if (value.nodeType == 2)
					{
						flag = true;
					}
					zero = playerScript.gameplayCamera.WorldToScreenPoint(((Component)value).transform.position);
					((Transform)__instance.scanElements[i]).position = new Vector3(((Transform)__instance.scanElements[i]).position.x, ((Transform)__instance.scanElements[i]).position.y, 12.17f * anchorOffsetZ);
					__instance.scanElements[i].anchoredPosition = Vector2.op_Implicit(new Vector3(zero.x - anchorOffsetX * multiplier, zero.y - anchorOffsetY * multiplier));
					if (!(multiplier > 3f))
					{
						((Transform)__instance.scanElements[i]).localScale = new Vector3(multiplier, multiplier, multiplier);
					}
					else
					{
						((Transform)__instance.scanElements[i]).localScale = new Vector3(3f, 3f, 3f);
					}
				}
				catch (Exception arg2)
				{
					Debug.LogError((object)$"Error in updatescannodes B: {arg2}");
				}
			}
			try
			{
				if (!flag)
				{
					__instance.totalScrapScanned = 0;
					Traverse.Create((object)__instance).Field("totalScrapScannedDisplayNum").SetValue((object)0);
					Traverse.Create((object)__instance).Field("addToDisplayTotalInterval").SetValue((object)0.35f);
				}
				__instance.scanInfoAnimator.SetBool("display", (int)Reflection.GetInstanceField(typeof(HUDManager), __instance, "scannedScrapNum") >= 2 && flag);
			}
			catch (Exception arg3)
			{
				Debug.LogError((object)$"Error in updatescannodes C: {arg3}");
			}
		}

		public static void SetShadowQuality(AssetBundle assetBundle, HDAdditionalCameraData cameraData)
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)assetBundle == (Object)null)
			{
				Debug.LogError((object)"HDLETHALCOMPANY: Something is wrong with the Asset Bundle - Null");
				return;
			}
			((BitArray128)(ref cameraData.renderingPathCustomFrameSettingsOverrideMask.mask))[20u] = true;
			((FrameSettings)(ref cameraData.renderingPathCustomFrameSettings)).SetEnabled((FrameSettingsField)20, (m_setShadowQuality != 0) ? true : false);
			myAsset = (HDRenderPipelineAsset)((m_setShadowQuality != 1) ? ((m_setShadowQuality != 2) ? ((object)(HDRenderPipelineAsset)QualitySettings.renderPipeline) : ((object)(myAsset = assetBundle.LoadAsset<HDRenderPipelineAsset>("Assets/HDLethalCompany/MediumShadowsAsset.asset")))) : (myAsset = assetBundle.LoadAsset<HDRenderPipelineAsset>("Assets/HDLethalCompany/VeryLowShadowsAsset.asset")));
			QualitySettings.renderPipeline = (RenderPipelineAsset)(object)myAsset;
		}

		public static void SetLevelOfDetail(HDAdditionalCameraData cameraData)
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			if (m_setLOD != 1)
			{
				((BitArray128)(ref cameraData.renderingPathCustomFrameSettingsOverrideMask.mask))[60u] = true;
				((BitArray128)(ref cameraData.renderingPathCustomFrameSettingsOverrideMask.mask))[61u] = true;
				((FrameSettings)(ref cameraData.renderingPathCustomFrameSettings)).SetEnabled((FrameSettingsField)60, true);
				((FrameSettings)(ref cameraData.renderingPathCustomFrameSettings)).SetEnabled((FrameSettingsField)61, true);
				cameraData.renderingPathCustomFrameSettings.lodBiasMode = (LODBiasMode)2;
				cameraData.renderingPathCustomFrameSettings.lodBias = ((m_setLOD == 0) ? 0.6f : 2.3f);
			}
		}

		public static void SetTextureQuality()
		{
			if (m_setTextureResolution < 3)
			{
				int globalTextureMipmapLimit = 3 - m_setTextureResolution;
				QualitySettings.globalTextureMipmapLimit = globalTextureMipmapLimit;
			}
		}

		public static void SetAntiAliasing(HDAdditionalCameraData cameraData)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			if (m_enableAntiAliasing)
			{
				cameraData.antialiasing = (AntialiasingMode)3;
			}
		}

		public static void ToggleCustomPass(HDAdditionalCameraData cameraData, bool enable)
		{
			((BitArray128)(ref cameraData.renderingPathCustomFrameSettingsOverrideMask.mask))[6u] = true;
			((FrameSettings)(ref cameraData.renderingPathCustomFrameSettings)).SetEnabled((FrameSettingsField)6, enable);
		}

		public static void ToggleVolumetricFog(HDAdditionalCameraData cameraData, bool enable)
		{
			((BitArray128)(ref cameraData.renderingPathCustomFrameSettingsOverrideMask.mask))[28u] = true;
			((FrameSettings)(ref cameraData.renderingPathCustomFrameSettings)).SetEnabled((FrameSettingsField)28, enable);
		}

		public static void SetFogQuality()
		{
			Object[] array = Resources.FindObjectsOfTypeAll(typeof(Volume));
			Fog val2 = default(Fog);
			foreach (Object obj in array)
			{
				Volume val = (Volume)(object)((obj is Volume) ? obj : null);
				if (!val.sharedProfile.TryGet<Fog>(ref val2))
				{
					continue;
				}
				((VolumeParameter<int>)(object)((VolumeComponentWithQuality)val2).quality).Override(3);
				switch (m_setFogQuality)
				{
				case -1:
					if (val2.volumetricFogBudget > 0.05f)
					{
						val2.volumetricFogBudget = 0.05f;
					}
					if (val2.resolutionDepthRatio > 0.5f)
					{
						val2.resolutionDepthRatio = 0.5f;
					}
					break;
				case 0:
					if (val2.volumetricFogBudget > 0.05f)
					{
						val2.volumetricFogBudget = 0.05f;
					}
					if (val2.resolutionDepthRatio > 0.5f)
					{
						val2.resolutionDepthRatio = 0.5f;
					}
					break;
				case 2:
					if (val2.volumetricFogBudget > 0.333f)
					{
						val2.volumetricFogBudget = 0.333f;
					}
					if (val2.resolutionDepthRatio > 0.666f)
					{
						val2.resolutionDepthRatio = 0.666f;
					}
					break;
				case 3:
					if (val2.volumetricFogBudget > 0.666f)
					{
						val2.volumetricFogBudget = 0.666f;
					}
					if (val2.resolutionDepthRatio > 0.5f)
					{
						val2.resolutionDepthRatio = 0.5f;
					}
					break;
				}
			}
		}

		public static void RemoveLodFromGameObject(string name)
		{
			Object[] array = Resources.FindObjectsOfTypeAll(typeof(LODGroup));
			foreach (Object obj in array)
			{
				LODGroup val = (LODGroup)(object)((obj is LODGroup) ? obj : null);
				if (((Object)((Component)val).gameObject).name == name)
				{
					val.enabled = false;
				}
			}
		}
	}
}

plugins/Sligili-More_Emotes/MoreEmotes1.1.1.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 BepInEx;
using BepInEx.Configuration;
using GameNetcodeStuff;
using HarmonyLib;
using MoreEmotes.Patch;
using Tools;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FuckYouMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FuckYouMod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5ecc2bf2-af12-4e83-a6f1-cf2eacbf3060")]
[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 Tools
{
	public class Reflection
	{
		public static object GetInstanceField(Type type, object instance, string fieldName)
		{
			BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
			FieldInfo field = type.GetField(fieldName, bindingAttr);
			return field.GetValue(instance);
		}

		public static object CallMethod(object instance, string methodName, params object[] args)
		{
			MethodInfo method = instance.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				return method.Invoke(instance, args);
			}
			return null;
		}
	}
}
namespace MoreEmotes
{
	[BepInPlugin("MoreEmotes", "MoreEmotes-Sligili", "1.1.1")]
	public class FuckYouModInitialization : BaseUnityPlugin
	{
		private Harmony _harmony;

		private ConfigEntry<string> config_KeyEmote3;

		private ConfigEntry<string> config_KeyEmote4;

		private ConfigEntry<string> config_KeyEmote5;

		private ConfigEntry<string> config_KeyEmote6;

		private ConfigEntry<bool> config_toggleEmote3;

		private ConfigEntry<bool> config_toggleEmote4;

		private ConfigEntry<bool> config_toggleEmote5;

		private ConfigEntry<bool> config_toggleEmote6;

		private void Awake()
		{
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			((BaseUnityPlugin)this).Logger.LogInfo((object)"MoreEmotes loaded");
			EmotePatch.animationsBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "MoreEmotes/animationsbundle"));
			EmotePatch.animatorBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "MoreEmotes/animatorbundle"));
			EmotePatch.local = EmotePatch.animatorBundle.LoadAsset<RuntimeAnimatorController>("Assets/MoreEmotes/NEWmetarig.controller");
			EmotePatch.others = EmotePatch.animatorBundle.LoadAsset<RuntimeAnimatorController>("Assets/MoreEmotes/NEWmetarigOtherPlayers.controller");
			ConfigFile();
			_harmony = new Harmony("MoreEmotes");
			_harmony.PatchAll(typeof(EmotePatch));
		}

		private void ConfigFile()
		{
			config_KeyEmote3 = ((BaseUnityPlugin)this).Config.Bind<string>("MIDDLEFINGER", "EmoteKey", "3", "SUPPORTED KEYS A-Z | 0-9 | F1-F12 ");
			config_toggleEmote3 = ((BaseUnityPlugin)this).Config.Bind<bool>("MIDDLEFINGER", "Enable", true, "TOGGLE MIDDLEFINGER EMOTE KEY");
			EmotePatch.keyBind_Emote3 = config_KeyEmote3.Value;
			EmotePatch.enable3 = config_toggleEmote3.Value;
			config_KeyEmote4 = ((BaseUnityPlugin)this).Config.Bind<string>("THE GRIDDY", "EmoteKey", "6", "SUPPORTED KEYS A-Z | 0-9 | F1-F12 ");
			config_toggleEmote4 = ((BaseUnityPlugin)this).Config.Bind<bool>("THE GRIDDY", "Enable", true, "TOGGLE THE GRIDDY EMOTE KEY");
			EmotePatch.keyBind_Emote4 = config_KeyEmote4.Value;
			EmotePatch.enable4 = config_toggleEmote4.Value;
			config_KeyEmote5 = ((BaseUnityPlugin)this).Config.Bind<string>("SHY", "EmoteKey", "5", "SUPPORTED KEYS A-Z | 0-9 | F1-F12 ");
			config_toggleEmote5 = ((BaseUnityPlugin)this).Config.Bind<bool>("SHY", "Enable", true, "TOGGLE SHY EMOTE KEY");
			EmotePatch.keyBind_Emote5 = config_KeyEmote5.Value;
			EmotePatch.enable5 = config_toggleEmote5.Value;
			config_KeyEmote6 = ((BaseUnityPlugin)this).Config.Bind<string>("CLAP", "EmoteKey", "4", "SUPPORTED KEYS A-Z | 0-9 | F1-F12 ");
			config_toggleEmote6 = ((BaseUnityPlugin)this).Config.Bind<bool>("CLAP", "Enable", true, "TOGGLE CLAP EMOTE KEY");
			EmotePatch.keyBind_Emote6 = config_KeyEmote6.Value;
			EmotePatch.enable6 = config_toggleEmote6.Value;
		}
	}
	public static class PluginInfo
	{
		public const string Guid = "MoreEmotes";

		public const string Name = "MoreEmotes-Sligili";

		public const string Ver = "1.1.1";
	}
}
namespace MoreEmotes.Patch
{
	internal class EmotePatch
	{
		public static AssetBundle animationsBundle;

		public static AssetBundle animatorBundle;

		private static bool keyFlag_Emote3;

		public static bool enable3;

		private static bool keyFlag_Emote4;

		public static bool enable4;

		private static bool keyFlag_Emote5;

		public static bool enable5;

		private static bool keyFlag_Emote6;

		public static bool enable6;

		public static string keyBind_Emote3;

		public static string keyBind_Emote4;

		public static string keyBind_Emote5;

		public static string keyBind_Emote6;

		private static CallbackContext context;

		public static RuntimeAnimatorController local;

		public static RuntimeAnimatorController others;

		private static AudioClip _clap1;

		private static AudioClip _clap2;

		[HarmonyPatch(typeof(PlayerControllerB), "Start")]
		[HarmonyPostfix]
		private static void StartPostfix(PlayerControllerB __instance)
		{
			GameObject gameObject = ((Component)((Component)((Component)__instance).gameObject.transform.Find("ScavengerModel")).transform.Find("metarig")).gameObject;
			CustomAudioAnimationEvent customAudioAnimationEvent = gameObject.AddComponent<CustomAudioAnimationEvent>();
			customAudioAnimationEvent.player = __instance;
			if ((Object)(object)_clap1 == (Object)null)
			{
				_clap1 = animationsBundle.LoadAsset<AudioClip>("Assets/MoreEmotes/SingleClapEmote1.wav");
			}
			if ((Object)(object)_clap2 == (Object)null)
			{
				_clap2 = animationsBundle.LoadAsset<AudioClip>("Assets/MoreEmotes/SingleClapEmote2.wav");
			}
			customAudioAnimationEvent.clap1 = _clap1;
			customAudioAnimationEvent.clap2 = _clap2;
		}

		[HarmonyPatch(typeof(PlayerControllerB), "Update")]
		[HarmonyPostfix]
		private static void UpdatePrefix(PlayerControllerB __instance)
		{
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: 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)
			if (!__instance.isPlayerControlled || !((NetworkBehaviour)__instance).IsOwner)
			{
				__instance.playerBodyAnimator.runtimeAnimatorController = others;
				return;
			}
			if ((Object)(object)__instance.playerBodyAnimator != (Object)(object)local)
			{
				__instance.playerBodyAnimator.runtimeAnimatorController = local;
			}
			if (InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote3], 0f) && !keyFlag_Emote3 && enable3)
			{
				keyFlag_Emote3 = true;
				__instance.PerformEmote(context, 3);
			}
			else if (!InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote3], 0f))
			{
				keyFlag_Emote3 = false;
			}
			if (InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote4], 0f) && !keyFlag_Emote4 && enable4 && !__instance.isHoldingObject)
			{
				keyFlag_Emote4 = true;
				__instance.PerformEmote(context, 4);
			}
			else if (!InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote4], 0f))
			{
				keyFlag_Emote4 = false;
			}
			if (InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote5], 0f) && !keyFlag_Emote5 && enable5 && !__instance.isHoldingObject)
			{
				keyFlag_Emote5 = true;
				__instance.PerformEmote(context, 5);
			}
			else if (!InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote5], 0f))
			{
				keyFlag_Emote5 = false;
			}
			if (InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote6], 0f) && !keyFlag_Emote6 && enable6 && !__instance.isHoldingObject)
			{
				keyFlag_Emote6 = true;
				__instance.PerformEmote(context, 6);
			}
			else if (!InputControlExtensions.IsPressed(((InputControl)Keyboard.current)[keyBind_Emote6], 0f))
			{
				keyFlag_Emote6 = false;
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB), "PerformEmote")]
		[HarmonyPrefix]
		private static void PerformEmotePrefix(CallbackContext context, int emoteID, PlayerControllerB __instance)
		{
			if ((emoteID >= 3 || ((CallbackContext)(ref context)).performed) && ((((NetworkBehaviour)__instance).IsOwner && __instance.isPlayerControlled && (!((NetworkBehaviour)__instance).IsServer || __instance.isHostPlayerObject)) || __instance.isTestingPlayer) && (bool)Reflection.CallMethod(__instance, "CheckConditionsForEmote") && !(__instance.timeSinceStartingEmote < 0.5f))
			{
				__instance.timeSinceStartingEmote = 0f;
				__instance.performingEmote = true;
				__instance.playerBodyAnimator.SetInteger("emoteNumber", emoteID);
				__instance.StartPerformingEmoteServerRpc();
			}
		}
	}
	public class CustomAudioAnimationEvent : MonoBehaviour
	{
		private Animator animator;

		private AudioSource SoundsSource;

		public AudioClip clap1;

		public AudioClip clap2;

		public AudioClip clap3;

		public PlayerControllerB player;

		private void Start()
		{
			animator = ((Component)this).GetComponent<Animator>();
			SoundsSource = player.movementAudio;
		}

		public void PlayClapSound()
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			if (player.performingEmote && (!((NetworkBehaviour)player).IsOwner || !player.isPlayerControlled || animator.GetInteger("emoteNumber") == 6))
			{
				bool flag = player.isInHangarShipRoom && player.playersManager.hangarDoorsClosed;
				RoundManager.Instance.PlayAudibleNoise(((Component)player).transform.position, 22f, 0.6f, 0, flag, 6);
				SoundsSource.pitch = Random.Range(0.59f, 0.79f);
				switch (Random.Range(0, 2))
				{
				case 0:
					SoundsSource.PlayOneShot(clap1);
					break;
				case 1:
					SoundsSource.PlayOneShot(clap2);
					break;
				}
			}
		}

		public void PlayFootstepSound()
		{
			if (player.performingEmote && (!((NetworkBehaviour)player).IsOwner || !player.isPlayerControlled || animator.GetInteger("emoteNumber") == 4))
			{
				player.PlayFootstepLocal();
				player.PlayFootstepServer();
			}
		}
	}
}

plugins/Steven-Custom_Boombox_Music/CustomBoomboxTracks.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.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using CustomBoomboxTracks.Configuration;
using CustomBoomboxTracks.Managers;
using CustomBoomboxTracks.Utilities;
using HarmonyLib;
using UnityEngine;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("CustomBoomboxTracks")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion("1.4.0")]
[assembly: AssemblyProduct("CustomBoomboxTracks")]
[assembly: AssemblyTitle("CustomBoomboxTracks")]
[assembly: AssemblyVersion("1.4.0.0")]
namespace CustomBoomboxTracks
{
	[BepInPlugin("com.steven.lethalcompany.boomboxmusic", "Custom Boombox Music", "1.4.0")]
	public class BoomboxPlugin : BaseUnityPlugin
	{
		private const string GUID = "com.steven.lethalcompany.boomboxmusic";

		private const string NAME = "Custom Boombox Music";

		private const string VERSION = "1.4.0";

		private static BoomboxPlugin Instance;

		private void Awake()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			Instance = this;
			LogInfo("Loading...");
			AudioManager.GenerateFolders();
			Config.Init();
			new Harmony("com.steven.lethalcompany.boomboxmusic").PatchAll();
			LogInfo("Loading Complete!");
		}

		internal static void LogDebug(string message)
		{
			Instance.Log(message, (LogLevel)32);
		}

		internal static void LogInfo(string message)
		{
			Instance.Log(message, (LogLevel)16);
		}

		internal static void LogWarning(string message)
		{
			Instance.Log(message, (LogLevel)4);
		}

		internal static void LogError(string message)
		{
			Instance.Log(message, (LogLevel)2);
		}

		internal static void LogError(Exception ex)
		{
			Instance.Log(ex.Message + "\n" + ex.StackTrace, (LogLevel)2);
		}

		private void Log(string message, LogLevel logLevel)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			((BaseUnityPlugin)this).Logger.Log(logLevel, (object)message);
		}
	}
}
namespace CustomBoomboxTracks.Utilities
{
	public class SharedCoroutineStarter : MonoBehaviour
	{
		private static SharedCoroutineStarter _instance;

		public static Coroutine StartCoroutine(IEnumerator routine)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_instance == (Object)null)
			{
				_instance = new GameObject("Shared Coroutine Starter").AddComponent<SharedCoroutineStarter>();
				Object.DontDestroyOnLoad((Object)(object)_instance);
			}
			return ((MonoBehaviour)_instance).StartCoroutine(routine);
		}
	}
}
namespace CustomBoomboxTracks.Patches
{
	[HarmonyPatch(typeof(BoomboxItem), "PocketItem")]
	internal class BoomboxItem_PocketItem
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = instructions.ToList();
			bool flag = false;
			for (int i = 0; i < list.Count; i++)
			{
				if (!flag)
				{
					if (list[i].opcode == OpCodes.Call)
					{
						flag = true;
					}
					continue;
				}
				if (list[i].opcode == OpCodes.Ret)
				{
					break;
				}
				list[i].opcode = OpCodes.Nop;
			}
			return list;
		}
	}
	[HarmonyPatch(typeof(BoomboxItem), "Start")]
	internal class BoomboxItem_Start
	{
		private static void Postfix(BoomboxItem __instance)
		{
			if (AudioManager.FinishedLoading)
			{
				AudioManager.ApplyClips(__instance);
				return;
			}
			AudioManager.OnAllSongsLoaded += delegate
			{
				AudioManager.ApplyClips(__instance);
			};
		}
	}
	[HarmonyPatch(typeof(BoomboxItem), "StartMusic")]
	internal class BoomboxItem_StartMusic
	{
		private static void Postfix(BoomboxItem __instance, bool startMusic)
		{
			if (startMusic)
			{
				BoomboxPlugin.LogInfo("Playing " + ((Object)__instance.boomboxAudio.clip).name);
			}
		}
	}
	[HarmonyPatch(typeof(StartOfRound), "Awake")]
	internal class StartOfRound_Awake
	{
		private static void Prefix()
		{
			AudioManager.Load();
		}
	}
}
namespace CustomBoomboxTracks.Managers
{
	internal static class AudioManager
	{
		private static string[] allSongPaths;

		private static List<AudioClip> clips = new List<AudioClip>();

		private static bool firstRun = true;

		private static bool finishedLoading = false;

		private static readonly string directory = Path.Combine(Paths.BepInExRootPath, "Custom Songs", "Boombox Music");

		public static bool FinishedLoading => finishedLoading;

		public static bool HasNoSongs => allSongPaths.Length == 0;

		public static event Action OnAllSongsLoaded;

		public static void GenerateFolders()
		{
			Directory.CreateDirectory(directory);
			BoomboxPlugin.LogInfo("Created directory at " + directory);
		}

		public static void Load()
		{
			if (!firstRun)
			{
				return;
			}
			firstRun = false;
			allSongPaths = Directory.GetFiles(directory);
			if (allSongPaths.Length == 0)
			{
				BoomboxPlugin.LogWarning("No songs found!");
				return;
			}
			BoomboxPlugin.LogInfo("Preparing to load AudioClips...");
			List<Coroutine> list = new List<Coroutine>();
			string[] array = allSongPaths;
			for (int i = 0; i < array.Length; i++)
			{
				Coroutine item = SharedCoroutineStarter.StartCoroutine(LoadAudioClip(array[i]));
				list.Add(item);
			}
			SharedCoroutineStarter.StartCoroutine(WaitForAllClips(list));
		}

		private static IEnumerator LoadAudioClip(string filePath)
		{
			BoomboxPlugin.LogInfo("Loading " + filePath + "!");
			if ((int)GetAudioType(filePath) == 0)
			{
				BoomboxPlugin.LogError("Failed to load AudioClip from " + filePath + "\nUnsupported file extension!");
				yield break;
			}
			UnityWebRequest loader = UnityWebRequestMultimedia.GetAudioClip(filePath, GetAudioType(filePath));
			if (Config.StreamFromDisk)
			{
				DownloadHandler downloadHandler = loader.downloadHandler;
				((DownloadHandlerAudioClip)((downloadHandler is DownloadHandlerAudioClip) ? downloadHandler : null)).streamAudio = true;
			}
			loader.SendWebRequest();
			while (!loader.isDone)
			{
				yield return null;
			}
			if (loader.error != null)
			{
				BoomboxPlugin.LogError("Error loading clip from path: " + filePath + "\n" + loader.error);
				BoomboxPlugin.LogError(loader.error);
				yield break;
			}
			AudioClip content = DownloadHandlerAudioClip.GetContent(loader);
			if (Object.op_Implicit((Object)(object)content) && (int)content.loadState == 2)
			{
				BoomboxPlugin.LogInfo("Loaded " + filePath);
				((Object)content).name = Path.GetFileName(filePath);
				clips.Add(content);
			}
			else
			{
				BoomboxPlugin.LogError("Failed to load clip at: " + filePath + "\nThis might be due to an mismatch between the audio codec and the file extension!");
			}
		}

		private static IEnumerator WaitForAllClips(List<Coroutine> coroutines)
		{
			foreach (Coroutine coroutine in coroutines)
			{
				yield return coroutine;
			}
			clips.Sort((AudioClip first, AudioClip second) => ((Object)first).name.CompareTo(((Object)second).name));
			finishedLoading = true;
			AudioManager.OnAllSongsLoaded?.Invoke();
			AudioManager.OnAllSongsLoaded = null;
		}

		public static void ApplyClips(BoomboxItem __instance)
		{
			BoomboxPlugin.LogInfo("Applying clips!");
			if (Config.UseDefaultSongs)
			{
				__instance.musicAudios = __instance.musicAudios.Concat(clips).ToArray();
			}
			else
			{
				__instance.musicAudios = clips.ToArray();
			}
			BoomboxPlugin.LogInfo($"Total Clip Count: {__instance.musicAudios.Length}");
		}

		private static AudioType GetAudioType(string path)
		{
			string text = Path.GetExtension(path).ToLower();
			switch (text)
			{
			case ".wav":
				return (AudioType)20;
			case ".ogg":
				return (AudioType)14;
			case ".mp3":
				return (AudioType)13;
			default:
				BoomboxPlugin.LogError("Unsupported extension type: " + text);
				return (AudioType)0;
			}
		}
	}
}
namespace CustomBoomboxTracks.Configuration
{
	internal static class Config
	{
		private const string CONFIG_FILE_NAME = "boombox.cfg";

		private static ConfigFile _config;

		private static ConfigEntry<bool> _useDefaultSongs;

		private static ConfigEntry<bool> _streamAudioFromDisk;

		public static bool UseDefaultSongs
		{
			get
			{
				if (!_useDefaultSongs.Value)
				{
					return AudioManager.HasNoSongs;
				}
				return true;
			}
		}

		public static bool StreamFromDisk => _streamAudioFromDisk.Value;

		public static void Init()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			BoomboxPlugin.LogInfo("Initializing config...");
			_config = new ConfigFile(Path.Combine(Paths.ConfigPath, "boombox.cfg"), true);
			_useDefaultSongs = _config.Bind<bool>("Config", "Use Default Songs", false, "Include the default songs in the rotation.");
			_streamAudioFromDisk = _config.Bind<bool>("Config", "Stream Audio From Disk", false, "Requires less memory and takes less time to load, but prevents playing the same song twice at once.");
			BoomboxPlugin.LogInfo("Config initialized!");
		}

		private static void PrintConfig()
		{
			BoomboxPlugin.LogInfo($"Use Default Songs: {_useDefaultSongs.Value}");
			BoomboxPlugin.LogInfo($"Stream From Disk: {_streamAudioFromDisk}");
		}
	}
}

plugins/sunnobunno-BonkHitSFX/BonkHitSFX.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using BonkHitSFX.Patches;
using HarmonyLib;
using Microsoft.CodeAnalysis;
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(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("BonkHitSFX")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BonkHitSFX")]
[assembly: AssemblyTitle("BonkHitSFX")]
[assembly: AssemblyVersion("1.0.0.0")]
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;
		}
	}
}
namespace BonkHitSFX
{
	[BepInPlugin("sunnobunno.bonkhitsfx", "Bonk Hit SFX", "1.0.3")]
	public class BonkHitSFXBase : BaseUnityPlugin
	{
		private const string modGUID = "sunnobunno.bonkhitsfx";

		private const string modName = "Bonk Hit SFX";

		private const string modVersion = "1.0.3";

		private readonly Harmony harmony = new Harmony("sunnobunno.bonkhitsfx");

		private static BonkHitSFXBase? Instance;

		internal ManualLogSource? mls;

		internal static AudioClip[]? newHitSFX;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("sunnobunno.bonkhitsfx");
			mls.LogInfo((object)"BonkHitSFX is loading.");
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			string text = "BonkHitSFX.dll";
			string text2 = location.TrimEnd(text.ToCharArray());
			string text3 = text2 + "bonkhitsfx";
			AssetBundle val = AssetBundle.LoadFromFile(text3);
			if ((Object)(object)val == (Object)null)
			{
				mls.LogError((object)"Failed to load audio assets!");
				return;
			}
			newHitSFX = val.LoadAssetWithSubAssets<AudioClip>("Assets/bonkhitsfx.mp3");
			harmony.PatchAll(typeof(HitSFXPatch));
			mls.LogInfo((object)"BonkHitSFX is loaded. Ow.");
		}
	}
}
namespace BonkHitSFX.Patches
{
	[HarmonyPatch(typeof(Shovel))]
	internal class HitSFXPatch
	{
		[HarmonyPatch("HitShovelClientRpc")]
		[HarmonyPatch("HitShovel")]
		[HarmonyPrefix]
		public static void hitSFXPatch(ref AudioClip[] ___hitSFX)
		{
			AudioClip[] newHitSFX = BonkHitSFXBase.newHitSFX;
			___hitSFX = newHitSFX;
		}
	}
}

plugins/sunnobunno-LandMineFartReverb/LandMineFartReverb.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LandMineFartReverb.Patches;
using Microsoft.CodeAnalysis;
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(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("LandMineFartReverb")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LandMineFartReverb")]
[assembly: AssemblyTitle("LandMineFartReverb")]
[assembly: AssemblyVersion("1.0.0.0")]
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;
		}
	}
}
namespace LandMineFartReverb
{
	[BepInPlugin("sunnobunno.landminefartreverb", "Land Mine Fart Reverb", "1.0.1")]
	public class LandMineFartReverbBase : BaseUnityPlugin
	{
		private const string modGUID = "sunnobunno.landminefartreverb";

		private const string modName = "Land Mine Fart Reverb";

		private const string modVersion = "1.0.1";

		private readonly Harmony harmony = new Harmony("sunnobunno.landminefartreverb");

		private static LandMineFartReverbBase? Instance;

		internal ManualLogSource? mls;

		internal static AudioClip[]? newMineDetonate;

		internal static AudioClip[]? newMineDetonateFar;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("sunnobunno.landminefartreverb");
			mls.LogInfo((object)"LandMineFartReverb is loading.");
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			string text = "LandMineFartReverb.dll";
			string text2 = location.TrimEnd(text.ToCharArray());
			string text3 = text2 + "fartwithreverb";
			mls.LogInfo((object)text3);
			AssetBundle val = AssetBundle.LoadFromFile(text3);
			if ((Object)(object)val == (Object)null)
			{
				mls.LogError((object)"Failed to load audio assets!");
				return;
			}
			newMineDetonate = val.LoadAssetWithSubAssets<AudioClip>("Assets/fartwithreverb.mp3");
			newMineDetonateFar = val.LoadAssetWithSubAssets<AudioClip>("Assets/fartwithreverb.mp3");
			harmony.PatchAll(typeof(LandminePatch));
			mls.LogInfo((object)"LandMineFartReverb is loaded. Excuse me.");
		}
	}
}
namespace LandMineFartReverb.Patches
{
	[HarmonyPatch(typeof(Landmine))]
	internal class LandminePatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void hoarderBugAudioPatch(ref AudioClip ___mineDetonate, ref AudioClip ___mineDetonateFar)
		{
			AudioClip val = LandMineFartReverbBase.newMineDetonate[0];
			___mineDetonate = val;
			AudioClip val2 = LandMineFartReverbBase.newMineDetonateFar[0];
			___mineDetonateFar = val2;
		}
	}
}

plugins/sunnobunno-YippeeMod/YippeeMod.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using YippeeMod.Patches;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("YippeeMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("YippeeMod")]
[assembly: AssemblyTitle("YippeeMod")]
[assembly: AssemblyVersion("1.0.0.0")]
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;
		}
	}
}
namespace YippeeMod
{
	[BepInPlugin("sunnobunno.YippeeMod", "Yippee tbh mod", "1.2.1")]
	public class YippeeModBase : BaseUnityPlugin
	{
		private const string modGUID = "sunnobunno.YippeeMod";

		private const string modName = "Yippee tbh mod";

		private const string modVersion = "1.2.1";

		private readonly Harmony harmony = new Harmony("sunnobunno.YippeeMod");

		private static YippeeModBase? Instance;

		internal ManualLogSource? mls;

		internal static AudioClip[]? newSFX;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("sunnobunno.YippeeMod");
			mls.LogInfo((object)"Yippee Mod is loading.");
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			string text = "YippeeMod.dll";
			string text2 = location.TrimEnd(text.ToCharArray());
			string text3 = text2 + "yippeesound";
			mls.LogInfo((object)text3);
			AssetBundle val = AssetBundle.LoadFromFile(text3);
			if ((Object)(object)val == (Object)null)
			{
				mls.LogError((object)"Failed to load audio assets!");
				return;
			}
			newSFX = val.LoadAssetWithSubAssets<AudioClip>("assets/yippee-tbh.mp3");
			harmony.PatchAll(typeof(HoarderBugPatch));
			mls.LogInfo((object)"Yippee Mod is loaded. Yippee!!!");
		}
	}
}
namespace YippeeMod.Patches
{
	[HarmonyPatch(typeof(HoarderBugAI))]
	internal class HoarderBugPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void hoarderBugAudioPatch(ref AudioClip[] ___chitterSFX)
		{
			AudioClip[] newSFX = YippeeModBase.newSFX;
			___chitterSFX = newSFX;
		}
	}
}

plugins/Suskitech-AlwaysHearActiveWalkies/AlwaysHearWalkie.dll

Decompiled a year ago
using System;
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 BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LCAlwaysHearWalkieMod.Patches;
using Microsoft.CodeAnalysis;
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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("AlwaysHearWalkie")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.4.2.0")]
[assembly: AssemblyInformationalVersion("1.4.2+4173bc4d88b293dfbed3e97cfc3a082065ce4da9")]
[assembly: AssemblyProduct("Always Hear Active Walkies")]
[assembly: AssemblyTitle("AlwaysHearWalkie")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.4.2.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 BepInEx5.PluginTemplate
{
	[BepInPlugin("suskitech.LCAlwaysHearActiveWalkie", "LC Always Hear Active Walkies", "1.4.2")]
	public class LCAlwaysHearWalkieMod : BaseUnityPlugin
	{
		public static ManualLogSource Log;

		private const string modGUID = "suskitech.LCAlwaysHearActiveWalkie";

		private const string modName = "LC Always Hear Active Walkies";

		private const string modVersion = "1.4.2";

		private readonly Harmony harmony = new Harmony("suskitech.LCAlwaysHearActiveWalkie");

		private static LCAlwaysHearWalkieMod Instance;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			Log = Logger.CreateLogSource("suskitech.LCAlwaysHearActiveWalkie");
			Log.LogInfo((object)"\\ /");
			Log.LogInfo((object)"/|\\");
			Log.LogInfo((object)" |----|");
			Log.LogInfo((object)" |[__]| Always Hear Active Walkies");
			Log.LogInfo((object)" |.  .| Version 1.4.2 Loaded");
			Log.LogInfo((object)" |____|");
			harmony.PatchAll(typeof(LCAlwaysHearWalkieMod));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
			harmony.PatchAll(typeof(WalkieTalkiePatch));
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "AlwaysHearWalkie";

		public const string PLUGIN_NAME = "Always Hear Active Walkies";

		public const string PLUGIN_VERSION = "1.4.2";
	}
}
namespace LCAlwaysHearWalkieMod.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		private static float AudibleDistance = 20f;

		private static float throttleInterval = 0.4f;

		private static float throttle = 0f;

		private static float AverageDistanceToHeldWalkie = 2f;

		private static float WalkieRecordingRange = 20f;

		private static float PlayerToPlayerSpatialHearingRange = 20f;

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void alwaysHearWalkieTalkiesPatch(ref bool ___holdingWalkieTalkie, ref PlayerControllerB __instance)
		{
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: 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_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			throttle += Time.deltaTime;
			if (throttle < throttleInterval)
			{
				return;
			}
			throttle = 0f;
			if ((Object)(object)__instance == (Object)null || (Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || GameNetworkManager.Instance.localPlayerController.isPlayerDead)
			{
				return;
			}
			List<WalkieTalkie> list = new List<WalkieTalkie>();
			List<WalkieTalkie> list2 = new List<WalkieTalkie>();
			for (int i = 0; i < WalkieTalkie.allWalkieTalkies.Count; i++)
			{
				float num = Vector3.Distance(((Component)WalkieTalkie.allWalkieTalkies[i]).transform.position, ((Component)__instance).transform.position);
				if (num <= AudibleDistance)
				{
					if (((GrabbableObject)WalkieTalkie.allWalkieTalkies[i]).isBeingUsed)
					{
						list.Add(WalkieTalkie.allWalkieTalkies[i]);
					}
				}
				else
				{
					list2.Add(WalkieTalkie.allWalkieTalkies[i]);
				}
			}
			bool flag = list.Count > 0;
			if (flag != __instance.holdingWalkieTalkie)
			{
				___holdingWalkieTalkie = flag;
				for (int j = 0; j < list2.Count; j++)
				{
					if (j < list.Count)
					{
						list2[j].thisAudio.Stop();
					}
				}
			}
			if (!flag)
			{
				return;
			}
			PlayerControllerB val = ((!GameNetworkManager.Instance.localPlayerController.isPlayerDead || !((Object)(object)GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript != (Object)null)) ? GameNetworkManager.Instance.localPlayerController : GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript);
			for (int k = 0; k < StartOfRound.Instance.allPlayerScripts.Length; k++)
			{
				if ((!StartOfRound.Instance.allPlayerScripts[k].isPlayerControlled && !StartOfRound.Instance.allPlayerScripts[k].isPlayerDead) || (Object)(object)StartOfRound.Instance.allPlayerScripts[k] == (Object)(object)GameNetworkManager.Instance.localPlayerController || StartOfRound.Instance.allPlayerScripts[k].isPlayerDead)
				{
					continue;
				}
				PlayerControllerB val2 = StartOfRound.Instance.allPlayerScripts[k];
				if (!val2.holdingWalkieTalkie)
				{
					continue;
				}
				float num2 = Vector3.Distance(((Component)val).transform.position, ((Component)val2).transform.position);
				float num3 = float.MaxValue;
				float num4 = float.MaxValue;
				for (int l = 0; l < WalkieTalkie.allWalkieTalkies.Count; l++)
				{
					if (!((GrabbableObject)WalkieTalkie.allWalkieTalkies[l]).isBeingUsed)
					{
						continue;
					}
					float num5 = Vector3.Distance(((Component)WalkieTalkie.allWalkieTalkies[l].target).transform.position, ((Component)val).transform.position);
					if (num5 < num4)
					{
						num4 = num5;
					}
					if (!WalkieTalkie.allWalkieTalkies[l].speakingIntoWalkieTalkie)
					{
						float num6 = Vector3.Distance(((Component)WalkieTalkie.allWalkieTalkies[l]).transform.position, ((Component)val2).transform.position);
						if (num6 < num3)
						{
							num3 = num6;
						}
					}
				}
				float num7 = Mathf.Min(1f - Mathf.InverseLerp(AverageDistanceToHeldWalkie, WalkieRecordingRange, num3), 1f - Mathf.InverseLerp(AverageDistanceToHeldWalkie, WalkieRecordingRange, num4));
				float num8 = 1f - Mathf.InverseLerp(0f, PlayerToPlayerSpatialHearingRange, num2);
				val2.voicePlayerState.Volume = Mathf.Max(num7, num8);
			}
		}
	}
	[HarmonyPatch(typeof(WalkieTalkie))]
	internal class WalkieTalkiePatch
	{
		[HarmonyPatch("EnableWalkieTalkieListening")]
		[HarmonyPrefix]
		private static bool alwaysHearWalkieTalkiesEnableWalkieTalkieListeningPatch(bool enable)
		{
			if (!enable)
			{
				return false;
			}
			return true;
		}
	}
}

plugins/taffyko-NameplateTweaks/NameplateTweaks.dll

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

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("NameplateTweaks")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Configurable client-side mod for player username billboards. Speaking indicators, better visibility, etc.")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyInformationalVersion("1.0.2")]
[assembly: AssemblyProduct("NameplateTweaks")]
[assembly: AssemblyTitle("NameplateTweaks")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.2.0")]
[module: UnverifiableCode]
namespace NameplateTweaks;

[BepInPlugin("taffyko.NameplateTweaks", "NameplateTweaks", "1.0.2")]
public class Plugin : BaseUnityPlugin
{
	public const string modGUID = "taffyko.NameplateTweaks";

	public const string modName = "NameplateTweaks";

	public const string modVersion = "1.0.2";

	public static ConfigEntry<bool> ConfigEnableSpeakingIndicator;

	public static ConfigEntry<bool> ConfigVariableSpeakingIndicatorOpacity;

	public static ConfigEntry<bool> ConfigSpeakingIndicatorAlwaysVisible;

	public static ConfigEntry<float> ConfigNameplateScale;

	public static ConfigEntry<float> ConfigNameplateVisibilityDistance;

	public static ConfigEntry<bool> ConfigNameplateScaleWithDistance;

	public static ManualLogSource log;

	private readonly Harmony harmony = new Harmony("taffyko.NameplateTweaks");

	public static Vector3? OriginalNameplateScale = new Vector3(-0.0025f, 0.0025f, 0.0025f);

	private void Awake()
	{
		log = Logger.CreateLogSource("NameplateTweaks");
		log.LogInfo((object)"Loading taffyko.NameplateTweaks");
		ConfigEnableSpeakingIndicator = ((BaseUnityPlugin)this).Config.Bind<bool>("Speaking Indicator", "EnableSpeakingIndicator", true, "Enable a voice-activity speaking indicator above player nameplates");
		ConfigVariableSpeakingIndicatorOpacity = ((BaseUnityPlugin)this).Config.Bind<bool>("Speaking Indicator", "VariableSpeakingIndicatorOpacity", true, "Speaking indicator opacity changes depending on volume");
		ConfigSpeakingIndicatorAlwaysVisible = ((BaseUnityPlugin)this).Config.Bind<bool>("Speaking Indicator", "SpeakingIndicatorAlwaysVisible", true, "Display speaking indicators even when the nameplate is hidden");
		ConfigNameplateScale = ((BaseUnityPlugin)this).Config.Bind<float>("Nameplate", "NameplateScale", 1.5f, "Nameplate size multiplier (1.0 is the vanilla size)");
		ConfigNameplateVisibilityDistance = ((BaseUnityPlugin)this).Config.Bind<float>("Nameplate", "NameplateVisibilityDistance", 20f, "Distance from the camera within which nameplates are visible (0.0 reverts to vanilla behavior). The length of the ship is ~20 units, for reference");
		ConfigNameplateScaleWithDistance = ((BaseUnityPlugin)this).Config.Bind<bool>("Nameplate", "NameplateScaleWithDistance", false, "Scale nameplates so that they retain their apparent size as they get further away");
		harmony.PatchAll(Assembly.GetExecutingAssembly());
	}

	private void OnDestroy()
	{
	}
}
public class SpeakingIndicator : MonoBehaviour
{
	public PlayerControllerB player;

	public Canvas canvas;

	public GameObject canvasItem;

	public CanvasGroup canvasItemAlpha;

	public static Dictionary<PlayerControllerB, SpeakingIndicator> speakingIndicators = new Dictionary<PlayerControllerB, SpeakingIndicator>();

	private static Texture2D speakingIconTexture = null;

	public static Texture2D GetSpeakingIconTexture()
	{
		if ((Object)(object)speakingIconTexture != (Object)null)
		{
			return speakingIconTexture;
		}
		return GameObject.Find("PTTIcon").GetComponent<Image>().sprite.texture;
	}

	public static SpeakingIndicator GetSpeakingIndicator(PlayerControllerB player)
	{
		//IL_001c: 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_0028: Unknown result type (might be due to invalid IL or missing references)
		speakingIndicators.TryGetValue(player, out var value);
		if ((Object)(object)value == (Object)null)
		{
			GameObject val = new GameObject("SpeakingIndicator");
			val.SetActive(false);
			value = val.AddComponent<SpeakingIndicator>();
			value.player = player;
			((Component)value).transform.SetParent(((Component)player).transform, false);
			speakingIndicators.Add(player, value);
			val.SetActive(true);
		}
		return value;
	}

	public void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: 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)
		canvasItem = new GameObject("SpeakingIndicatorCanvasItem");
		canvasItem.transform.SetParent(player.usernameBillboard, false);
		canvasItem.AddComponent<CanvasRenderer>();
		canvasItemAlpha = canvasItem.AddComponent<CanvasGroup>();
		canvasItemAlpha.alpha = 0f;
		canvasItem.transform.localPosition = new Vector3(0f, 60f, 0f);
		canvasItem.AddComponent<Image>().sprite = Sprite.Create(GetSpeakingIconTexture(), new Rect(0f, 0f, 260f, 280f), new Vector2(130f, 140f), 100f);
	}

	private float lexp(float a, float b, float t)
	{
		return Mathf.Lerp(a, b, Mathf.Exp(0f - t));
	}

	public void Update()
	{
		VoicePlayerState voicePlayerState = player.voicePlayerState;
		if (voicePlayerState != null)
		{
			float num = Mathf.Clamp(voicePlayerState.Amplitude * 35f, 0f, 1f);
			if (Plugin.ConfigVariableSpeakingIndicatorOpacity.Value)
			{
				if (num > 0.01f)
				{
					canvasItemAlpha.alpha = lexp(canvasItemAlpha.alpha, num, Time.deltaTime * 100f);
				}
				else
				{
					canvasItemAlpha.alpha = lexp(canvasItemAlpha.alpha, num, Time.deltaTime * 50f);
				}
			}
			else if (num > 0.05f)
			{
				canvasItemAlpha.alpha = 1f;
			}
			else if (num < 0.01f)
			{
				canvasItemAlpha.alpha = 0f;
			}
		}
		if (!Plugin.ConfigSpeakingIndicatorAlwaysVisible.Value)
		{
			canvasItemAlpha.alpha = Math.Min(canvasItemAlpha.alpha, player.usernameAlpha.alpha);
		}
		if (!Plugin.ConfigEnableSpeakingIndicator.Value)
		{
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}

	public void OnDestroy()
	{
		speakingIndicators.Remove(player);
		Object.Destroy((Object)(object)canvasItem);
	}
}
[HarmonyPatch(typeof(PlayerControllerB))]
internal class PlayerControllerBPatches
{
	[HarmonyPatch("Update")]
	[HarmonyPostfix]
	private static void Update_Postfix(PlayerControllerB __instance)
	{
		//IL_0030: 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_0056: 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_008c: 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)
		//IL_0117: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: 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)
		((TMP_Text)__instance.usernameBillboardText).text = __instance.playerUsername;
		if (Plugin.ConfigEnableSpeakingIndicator.Value)
		{
			SpeakingIndicator.GetSpeakingIndicator(__instance);
		}
		__instance.usernameBillboard.position = new Vector3(__instance.playerGlobalHead.position.x, __instance.playerGlobalHead.position.y + 0.55f, __instance.playerGlobalHead.position.z);
		PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
		if ((Object)(object)localPlayerController != (Object)null)
		{
			float num = Vector3.Distance(((Component)localPlayerController.gameplayCamera).transform.position, __instance.usernameBillboard.position);
			if (num < Plugin.ConfigNameplateVisibilityDistance.Value)
			{
				__instance.usernameAlpha.alpha = 1f;
				((Behaviour)__instance.usernameBillboardText).enabled = true;
				((Component)__instance.usernameCanvas).gameObject.SetActive(true);
			}
			float num2 = 1f;
			if (Plugin.ConfigNameplateScaleWithDistance.Value)
			{
				num2 = 1f + Math.Max(0f, (num - 4f) * 0.11f);
			}
			__instance.usernameBillboard.localScale = Plugin.OriginalNameplateScale.Value * Plugin.ConfigNameplateScale.Value * num2;
		}
	}
}
public static class PluginInfo
{
	public const string PLUGIN_GUID = "NameplateTweaks";

	public const string PLUGIN_NAME = "NameplateTweaks";

	public const string PLUGIN_VERSION = "1.0.2";
}

plugins/tinyhoot-ShipLobby/ShipLobby/ShipLobby.dll

Decompiled a year ago
using System;
using System.Collections;
using System.Diagnostics;
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 Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("ShipLobby")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("ShipLobby")]
[assembly: AssemblyCopyright("Copyright © tinyhoot 2023")]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("1.0.2")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.2.0")]
[module: UnverifiableCode]
namespace ShipLobby
{
	[BepInPlugin("com.github.tinyhoot.ShipLobby", "ShipLobby", "1.0.2")]
	internal class ShipLobby : BaseUnityPlugin
	{
		public const string GUID = "com.github.tinyhoot.ShipLobby";

		public const string NAME = "ShipLobby";

		public const string VERSION = "1.0.2";

		internal static ManualLogSource Log;

		private void Awake()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			new Harmony("com.github.tinyhoot.ShipLobby").PatchAll(Assembly.GetExecutingAssembly());
		}
	}
}
namespace ShipLobby.Patches
{
	[HarmonyPatch]
	internal class GameNetworkManagerPatcher
	{
		private static QuickMenuManager _quickMenuManager;

		[HarmonyPostfix]
		[HarmonyPatch(typeof(GameNetworkManager), "Singleton_OnClientConnectedCallback")]
		private static void LogConnect()
		{
			ShipLobby.Log.LogDebug((object)"Player connected.");
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(GameNetworkManager), "Singleton_OnClientDisconnectCallback")]
		private static void LogDisconnect()
		{
			ShipLobby.Log.LogDebug((object)"Player disconnected.");
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(GameNetworkManager), "ConnectionApproval")]
		private static void FixConnectionApproval(GameNetworkManager __instance, ConnectionApprovalResponse response)
		{
			if (!response.Approved && !(response.Reason != "Game has already started!") && __instance.gameHasStarted && StartOfRound.Instance.inShipPhase)
			{
				ShipLobby.Log.LogDebug((object)"Approving incoming late connection.");
				response.Reason = "";
				response.Approved = true;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(QuickMenuManager), "InviteFriendsButton")]
		private static void FixFriendInviteButton()
		{
			if (GameNetworkManager.Instance.gameHasStarted && StartOfRound.Instance.inShipPhase)
			{
				GameNetworkManager.Instance.InviteFriendsUI();
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(GameNetworkManager), "LeaveLobbyAtGameStart")]
		private static bool PreventSteamLobbyLeaving(GameNetworkManager __instance)
		{
			ShipLobby.Log.LogDebug((object)"Preventing the closing of Steam lobby.");
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(StartOfRound), "StartGame")]
		private static void CloseSteamLobby(StartOfRound __instance)
		{
			if (((NetworkBehaviour)__instance).IsServer && __instance.inShipPhase)
			{
				ShipLobby.Log.LogDebug((object)"Setting lobby to not joinable.");
				GameNetworkManager.Instance.SetLobbyJoinable(false);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(StartOfRound), "EndOfGame")]
		private static IEnumerator ReopenSteamLobby(IEnumerator coroutine, StartOfRound __instance)
		{
			while (coroutine.MoveNext())
			{
				yield return coroutine.Current;
			}
			if (!((NetworkBehaviour)__instance).IsServer)
			{
				yield break;
			}
			yield return (object)new WaitForSeconds(0.5f);
			yield return (object)new WaitUntil((Func<bool>)(() => !__instance.firingPlayersCutsceneRunning));
			ShipLobby.Log.LogDebug((object)"Reopening lobby, setting to joinable.");
			GameNetworkManager instance = GameNetworkManager.Instance;
			if (instance.currentLobby.HasValue)
			{
				instance.SetLobbyJoinable(true);
				if ((Object)(object)_quickMenuManager == (Object)null)
				{
					_quickMenuManager = Object.FindObjectOfType<QuickMenuManager>();
				}
				_quickMenuManager.inviteFriendsTextAlpha.alpha = 1f;
			}
		}
	}
}

plugins/tinyhoot-ShipLoot/ShipLoot/ShipLoot.dll

Decompiled a year ago
using System;
using System.Collections;
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 System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.InputSystem;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("ShipLoot")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("ShipLoot")]
[assembly: AssemblyCopyright("Copyright © tinyhoot 2023")]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("1.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 ShipLoot
{
	[BepInPlugin("com.github.tinyhoot.ShipLoot", "ShipLoot", "1.0")]
	internal class ShipLoot : BaseUnityPlugin
	{
		public const string GUID = "com.github.tinyhoot.ShipLoot";

		public const string NAME = "ShipLoot";

		public const string VERSION = "1.0";

		internal static ManualLogSource Log;

		private void Awake()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			new Harmony("com.github.tinyhoot.ShipLoot").PatchAll(Assembly.GetExecutingAssembly());
		}
	}
}
namespace ShipLoot.Patches
{
	[HarmonyPatch]
	internal class HudManagerPatcher
	{
		private static GameObject _totalCounter;

		private static TextMeshProUGUI _textMesh;

		private static float _displayTimeLeft;

		private const float DisplayTime = 5f;

		[HarmonyPrefix]
		[HarmonyPatch(typeof(HUDManager), "PingScan_performed")]
		private static void OnScan(HUDManager __instance, CallbackContext context)
		{
			if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) && ((CallbackContext)(ref context)).performed && __instance.CanPlayerScan() && !(__instance.playerPingingScan > -0.5f) && (StartOfRound.Instance.inShipPhase || GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom))
			{
				if (!Object.op_Implicit((Object)(object)_totalCounter))
				{
					CopyValueCounter();
				}
				float num = CalculateLootValue();
				((TMP_Text)_textMesh).text = $"SHIP: ${num:F0}";
				_displayTimeLeft = 5f;
				if (!_totalCounter.activeSelf)
				{
					((MonoBehaviour)GameNetworkManager.Instance).StartCoroutine(ShipLootCoroutine());
				}
			}
		}

		private static IEnumerator ShipLootCoroutine()
		{
			_totalCounter.SetActive(true);
			while (_displayTimeLeft > 0f)
			{
				float displayTimeLeft = _displayTimeLeft;
				_displayTimeLeft = 0f;
				yield return (object)new WaitForSeconds(displayTimeLeft);
			}
			_totalCounter.SetActive(false);
		}

		private static float CalculateLootValue()
		{
			List<GrabbableObject> list = (from obj in GameObject.Find("/Environment/HangarShip").GetComponentsInChildren<GrabbableObject>()
				where ((Object)obj).name != "ClipboardManual" && ((Object)obj).name != "StickyNoteItem"
				select obj).ToList();
			ShipLoot.Log.LogDebug((object)"Calculating total ship scrap value.");
			CollectionExtensions.Do<GrabbableObject>((IEnumerable<GrabbableObject>)list, (Action<GrabbableObject>)delegate(GrabbableObject scrap)
			{
				ShipLoot.Log.LogDebug((object)$"{((Object)scrap).name} - ${scrap.scrapValue}");
			});
			return list.Sum((GrabbableObject scrap) => scrap.scrapValue);
		}

		private static void CopyValueCounter()
		{
			//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_0076: 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_008d: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.Find("/Systems/UI/Canvas/IngamePlayerHUD/BottomMiddle/ValueCounter");
			if (!Object.op_Implicit((Object)(object)val))
			{
				ShipLoot.Log.LogError((object)"Failed to find ValueCounter object to copy!");
			}
			_totalCounter = Object.Instantiate<GameObject>(val.gameObject, val.transform.parent, false);
			_totalCounter.transform.Translate(0f, 1f, 0f);
			Vector3 localPosition = _totalCounter.transform.localPosition;
			_totalCounter.transform.localPosition = new Vector3(localPosition.x + 50f, -50f, localPosition.z);
			_textMesh = _totalCounter.GetComponentInChildren<TextMeshProUGUI>();
		}
	}
}

plugins/Vachon-Not_So_Brutal_Company/NotSoBrutalCompany.dll

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

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
[assembly: AssemblyCompany("NotSoBrutalCompany")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Brutal mod  for Lethal Company")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion("1.4.0")]
[assembly: AssemblyProduct("NotSoBrutalCompany")]
[assembly: AssemblyTitle("NotSoBrutalCompany")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.4.0.0")]
[module: UnverifiableCode]
namespace NotSoBrutalCompany
{
	public class ConfigSettings
	{
		public ConfigEntry<bool> EnableDeadlineModification { get; set; }

		public ConfigEntry<int> DeadlineDays { get; set; }

		public ConfigEntry<bool> EnableQuotaModification { get; set; }

		public ConfigEntry<int> StartingQuota { get; set; }

		public ConfigEntry<int> QuotaIncrease { get; set; }

		public ConfigEntry<bool> EnableCreditModification { get; set; }

		public ConfigEntry<int> StartingCredits { get; set; }

		public ConfigEntry<int> PassiveCredits { get; set; }

		public ConfigEntry<bool> EnableScrapModification { get; set; }

		public ConfigEntry<int> MinScrapModifier { get; set; }

		public ConfigEntry<int> MaxScrapModifier { get; set; }

		public ConfigEntry<int> MinScrapValueModifier { get; set; }

		public ConfigEntry<int> MaxScrapValueModifier { get; set; }

		public ConfigEntry<bool> EnableEnemyModification { get; set; }

		public ConfigEntry<int> MaxInsideEnemyPowerModifier { get; set; }

		public ConfigEntry<int> MaxOutsideEnemyPowerModifier { get; set; }

		public ConfigEntry<int> MaxDaytimeEnemyPowerModifier { get; set; }

		public ConfigEntry<float> InsideEnemySpawnCurve1 { get; set; }

		public ConfigEntry<float> InsideEnemySpawnCurve2 { get; set; }

		public ConfigEntry<float> OutsideEnemySpawnCurve1 { get; set; }

		public ConfigEntry<float> OutsideEnemySpawnCurve2 { get; set; }

		public ConfigEntry<float> OutsideEnemySpawnCurve3 { get; set; }

		public ConfigEntry<float> DaytimeEnemySpawnCurve1 { get; set; }

		public ConfigEntry<float> DaytimeEnemySpawnCurve2 { get; set; }

		public ConfigEntry<bool> EnableHazardModification { get; set; }

		public ConfigEntry<float> TurretSpawnCurve1 { get; set; }

		public ConfigEntry<float> TurretSpawnCurve2 { get; set; }

		public ConfigEntry<float> MineSpawnCurve1 { get; set; }

		public ConfigEntry<float> MineSpawnCurve2 { get; set; }

		public ConfigEntry<bool> EventHidden { get; set; }

		public ConfigEntry<int> EventProbability { get; set; }

		public ConfigEntry<bool> EnableFlowermanCoilEvent { get; set; }

		public ConfigEntry<int> FlowermanCoilEventFlowermanMax { get; set; }

		public ConfigEntry<int> FlowermanCoilEventCoilHeadMax { get; set; }

		public ConfigEntry<bool> EnableDogEvent { get; set; }

		public ConfigEntry<bool> EnableHoardingBugsEvent { get; set; }

		public ConfigEntry<int> HoardingBugsEventHoardingMax { get; set; }

		public ConfigEntry<bool> EnableJetpackEvent { get; set; }

		public ConfigEntry<int> JetpackEventJetpackCount { get; set; }

		public ConfigEntry<bool> EnableLandmineEvent { get; set; }

		public ConfigEntry<bool> EnableLassoEvent { get; set; }

		public ConfigEntry<bool> EnableLittleGirlEvent { get; set; }

		public ConfigEntry<bool> EnableMonkeyEvent { get; set; }

		public ConfigEntry<bool> EnableRandomDeliveryEvent { get; set; }

		public ConfigEntry<bool> EnableSnareFleaEvent { get; set; }

		public ConfigEntry<int> SnareFleaEventSnareFleaMax { get; set; }

		public ConfigEntry<bool> EnableSpiderEvent { get; set; }

		public ConfigEntry<int> SpiderEventSpiderMax { get; set; }

		public ConfigEntry<bool> EnableThumperEvent { get; set; }

		public ConfigEntry<int> ThumperEventThumperMax { get; set; }

		public ConfigEntry<bool> EnableThunderEvent { get; set; }

		public ConfigEntry<bool> EnableTurretEvent { get; set; }

		public ConfigEntry<bool> EnableWalkiDeliveryEvent { get; set; }

		public ConfigEntry<bool> EnableCoilHeadEvent { get; set; }

		public ConfigEntry<int> CoilHeadEventCoilHeadMax { get; set; }

		public ConfigEntry<bool> EnableJesterEvent { get; set; }

		public ConfigEntry<int> JesterEventJesterMax { get; set; }

		public void LoadConfigs()
		{
			EnableDeadlineModification = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("Deadline", "DeadlineModification", false, "False to go back to vanilla dealine value or avoid conflicting with other mods.");
			DeadlineDays = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Deadline", "DeadlineDays", 3, "Days until deadline.");
			EnableQuotaModification = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("Quota", "EnableQuotaModification", true, "False to go back to vanilla quota values or avoid conflicting with other mods.");
			StartingQuota = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Quota", "StartingQuota", 500, "Starting quota.");
			QuotaIncrease = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Quota", "QuotaIncrease", 275, "Quota increase after the dealine.");
			EnableCreditModification = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("Credits", "EnableCreditModification", true, "False to go back to vanilla credit values or avoid conflicting with other mods.");
			StartingCredits = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Credits", "StartingCredits", 80, "Starting credits.");
			PassiveCredits = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Credits", "PassiveCredits", 120, "Passive credits at the start of every level.");
			EnableScrapModification = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("Scraps", "EnableScrapModification", true, "False to go back to vanilla scrap values or avoid conflicting with other mods.");
			MinScrapModifier = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Scraps", "MinScrapModifier", 0, "Added to the minimum total number of scraps in a level.");
			MaxScrapModifier = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Scraps", "MaxScrapModifier", 45, "Added to the maximum total number of scraps in a level.");
			MinScrapValueModifier = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Scraps", "MinScrapValueModifier", 0, "Added to the minimum total value of scraps in a level.");
			MaxScrapValueModifier = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Scraps", "MaxScrapValueModifier", 800, "Added to the maximum total value of scraps in a level.");
			EnableEnemyModification = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("Enemies", "EnableEnemyModification", true, "False to go back to vanilla enemy values or avoid conflicting with other mods.");
			MaxInsideEnemyPowerModifier = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Enemies", "MaxInsideEnemyPowerModifier", 2000, "Added to the maximum enemy power for inside enemies, this controls the maximum level difficulty.");
			MaxOutsideEnemyPowerModifier = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Enemies", "MaxOutsideEnemyPowerModifier", 20, "Added to the maximum enemy power for outside enemies, this controls the maximum level difficulty.");
			MaxDaytimeEnemyPowerModifier = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Enemies", "MaxDaytimeEnemyPowerModifier", 200, "Added to the maximum enemy power for daytime enemies, this controls the maximum level difficulty.");
			InsideEnemySpawnCurve1 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Enemies", "InsideEnemySpawnCurveValue1", 0.1f, "Spawn curve for inside enemies, start of the day.");
			InsideEnemySpawnCurve2 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Enemies", "InsideEnemySpawnCurveValue2", 500f, "Spawn curve for inside enemies, midday.");
			OutsideEnemySpawnCurve1 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Enemies", "OutsideEnemySpawnCurve1", -30f, "Spawn curve for outside enemies, start of the day.");
			OutsideEnemySpawnCurve2 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Enemies", "OutsideEnemySpawnCurve2", -30f, "Spawn curve for outside enemies, 4 hours bfore launch.");
			OutsideEnemySpawnCurve3 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Enemies", "OutsideEnemySpawnCurve3", 10f, "Spawn curve for outside enemies, 3 hours before launch");
			DaytimeEnemySpawnCurve1 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Enemies", "DaytimeEnemySpawnCurve1", 7f, "Spawn curve for daytime enemies, start of the day.");
			DaytimeEnemySpawnCurve2 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Enemies", "DaytimeEnemySpawnCurve2", 7f, "Spawn curve for daytime enemies, midday.");
			EnableHazardModification = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("Hazards", "EnableHazardModification", true, "False to go back to vanilla hazard values or avoid conflicting with other mods.");
			TurretSpawnCurve1 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Hazards", "TurretSpawnCurve1", 0f, "Spawn curve for turrets, first value. Increase the number of turrets in levels.");
			TurretSpawnCurve2 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Hazards", "TurretSpawnCurve2", 10f, "Spawn curve for turrets, second value. Increase the number of turrets in levels.");
			MineSpawnCurve1 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Hazards", "MineSpawnCurve1", 0f, "Spawn curve for mines, first value. Increase the number of mines in levels.");
			MineSpawnCurve2 = ((BaseUnityPlugin)Plugin.instance).Config.Bind<float>("Hazards", "MineSpawnCurve2", 70f, "Spawn curve for mines, second value. Increase the number of mines in levels.");
			EventHidden = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("Events", "EventHidden", false, "Set to true to hide events in the chat.");
			EventProbability = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("Events", "EventProbablity", 4, "Value from 0 to 10. 0 there's almost always an event and 10 there's never an event.");
			EnableFlowermanCoilEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("FlowermanCoilEvent", "EnableFlowermanCoilEvent", true, "Is the flowerman and coil (The deadliest combo of all time) event active.");
			FlowermanCoilEventFlowermanMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("FlowermanCoilEvent", "FlowermanCoilEventFlowermanMax", 3, "Maximum number of flowerman during the event (capped by power modifier).");
			FlowermanCoilEventCoilHeadMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("FlowermanCoilEvent", "FlowermanCoilEventCoilHeadMax", 5, "Maximum number of coil head during the event (capped by power modifier).");
			EnableDogEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("DogEvent", "EnableDogEvent", true, "Is the dog event(Who let the dogs out) active.");
			EnableHoardingBugsEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("HoardingBugsEvent", "EnableHoardingBugsEvent", true, "Is the hoarding bugs event(Kleptomania) active.");
			HoardingBugsEventHoardingMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("HoardingBugsEvent", "HoardingBugsEventHoardingMax", 15, "Maximum number of hoarding bugs during the event (capped by power modifier).");
			EnableJetpackEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("JetpackEvent", "EnableJetpackEvent", true, "Is the jetpack event(Jetpack delivery) active.");
			JetpackEventJetpackCount = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("JetpackEvent", "JetpackEventJetpackCount", 5, "Number of jetpacks during jetpack event.");
			EnableLandmineEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("LandmineEvent", "EnableLandmineEvent", true, "Is the landmine event(Landmine hell) active.");
			EnableLassoEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("LassoEvent", "EnableLassoEvent", true, "Is the lasso event(Lasso man is real) active.");
			EnableLittleGirlEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("LittleGirlEvent", "EnableLittleGirlEvent", true, "Is the little girl event(Sweet Little Girl) active.");
			EnableMonkeyEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("MonkeyEvent", "EnableMonkeyEvent", true, "Is the monkey event(Monke) active.");
			EnableRandomDeliveryEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("RandomDeliveryEvent", "EnableRandomDeliveryEvent", true, "Is the random delivery event(Lost delivery) active.");
			EnableSnareFleaEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("SnareFleaEvent", "EnableSnareFleaEvent", true, "Is the snare flea event(Ready to suffocate ?) active.");
			SnareFleaEventSnareFleaMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("SnareFleaEvent", "SnareFleaEventSnareFleaMax", 6, "Maximum number of snare flea during the event (capped by power modifier).");
			EnableSpiderEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("SpiderEvent", "EnableSpiderEvent", true, "Is the spider event(Arachnophobia) active.");
			SpiderEventSpiderMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("SpiderEvent", "SpiderEventSpiderMax", 6, "Maximum number of spiders during the event (capped by power modifier).");
			EnableThumperEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("ThumperEvent", "EnableThumperEvent", true, "Is the thumper event(Thump Thump Thump) active.");
			ThumperEventThumperMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("ThumperEvent", "ThumperEventThumperMax", 6, "Maximum number of thumper during the event (capped by power modifier).");
			EnableThunderEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("ThunderEvent", "EnableThunderEvent", true, "Is the thunder event(Thunderstruck) active.");
			EnableTurretEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("TurretEvent", "EnableTurretEvent", true, "Is the turret event(Turret hell) active.");
			EnableWalkiDeliveryEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("WalkiDeliveryEvent", "EnableWalkiDeliveryEvent", true, "Is the walki delivery event(Walkie delivery) active.");
			EnableCoilHeadEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("CoilHeadEvent", "EnableCoilHeadEvent", true, "Is the coil head event(Boing!) active.");
			CoilHeadEventCoilHeadMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("CoilHeadEvent", "CoilHeadEventCoilHeadMax", 5, "Maximum number of coil head during the event (capped by power modifier).");
			EnableJesterEvent = ((BaseUnityPlugin)Plugin.instance).Config.Bind<bool>("JesterEvent", "EnableJesterEvent", true, "Is the jester event(Thump Thump Thump) active.");
			JesterEventJesterMax = ((BaseUnityPlugin)Plugin.instance).Config.Bind<int>("JesterEvent", "JesterEventJesterMax", 4, "Maximum number of jester during the event (capped by power modifier).");
		}
	}
	[BepInPlugin("NotSoBrutalCompany", "NotSoBrutalCompany", "1.4.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static Plugin instance;

		public static ConfigSettings configSettings = new ConfigSettings();

		public static bool loaded;

		public static BrutalEvent gameEvent = null;

		internal static EventCreator eventCreator = new EventCreator();

		public static SelectableLevel lastLevel = null;

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

		private Harmony _harmony = new Harmony("NotSoBrutalCompany");

		public static ManualLogSource mls;

		private void Awake()
		{
			instance = this;
			configSettings.LoadConfigs();
			BrutalEventList.AddBaseEvents(configSettings);
			mls = Logger.CreateLogSource("NotSoBrutalCompany");
			mls.LogInfo((object)"Loaded Not so Brutal Company and applying patches.");
			_harmony.PatchAll(typeof(Plugin));
			mls = ((BaseUnityPlugin)this).Logger;
		}

		public void OnDestroy()
		{
		}

		[HarmonyPatch(typeof(TimeOfDay), "Awake")]
		[HarmonyPrefix]
		private static void QuotaAjuster(TimeOfDay __instance)
		{
			if (configSettings.EnableQuotaModification.Value)
			{
				__instance.quotaVariables.startingQuota = configSettings.StartingQuota.Value;
			}
			if (configSettings.EnableCreditModification.Value)
			{
				__instance.quotaVariables.startingCredits = configSettings.StartingCredits.Value;
				__instance.quotaVariables.baseIncrease = configSettings.QuotaIncrease.Value;
			}
			if (configSettings.EnableDeadlineModification.Value)
			{
				__instance.quotaVariables.deadlineDaysAmount = configSettings.DeadlineDays.Value;
			}
		}

		[HarmonyPatch(typeof(RoundManager), "LoadNewLevel")]
		[HarmonyPrefix]
		private static bool LoadNewLevel(ref SelectableLevel newLevel)
		{
			mls.LogInfo((object)"NotSoBrutalCompany logs");
			HUDManager.Instance.AddTextToChatOnServer("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", -1);
			ChangeLevelDifficulty(ref newLevel);
			if (gameEvent != null)
			{
				gameEvent.OnLoadNewLevelCleanup(ref lastLevel);
			}
			if (newLevel.sceneName == "CompanyBuilding")
			{
				gameEvent = new NoneEvent();
			}
			else
			{
				Terminal val = Object.FindObjectOfType<Terminal>();
				if (configSettings.EnableCreditModification.Value)
				{
					val.groupCredits += configSettings.PassiveCredits.Value;
				}
				int num = 0;
				do
				{
					gameEvent = eventCreator.GetRandomEventWithWeight(configSettings.EventProbability.Value);
					num++;
				}
				while (!gameEvent.IsValid(ref newLevel) && num < 4);
				if (num >= 4)
				{
					gameEvent = new NoneEvent();
				}
			}
			if (configSettings.EventHidden.Value)
			{
				HUDManager.Instance.AddTextToChatOnServer("<color=red>Level event:</color> <color=green>?</color>", -1);
			}
			else
			{
				HUDManager.Instance.AddTextToChatOnServer("<color=red>Level event:</color> <color=green>" + gameEvent.GetEventName() + "</color>", -1);
			}
			gameEvent.OnLoadNewLevel(ref newLevel, configSettings);
			lastLevel = newLevel;
			return true;
		}

		private static void ChangeLevelDifficulty(ref SelectableLevel newLevel)
		{
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: 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_01fd: 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_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Expected O, but got Unknown
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Expected O, but got Unknown
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: 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_0124: Expected O, but got Unknown
			//IL_0156: 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_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Expected O, but got Unknown
			if (difficultyModifiedLevels.Contains(newLevel.levelID))
			{
				return;
			}
			if (configSettings.EnableScrapModification.Value)
			{
				SelectableLevel obj = newLevel;
				obj.minScrap += configSettings.MinScrapModifier.Value;
				SelectableLevel obj2 = newLevel;
				obj2.maxScrap += configSettings.MaxScrapModifier.Value;
				SelectableLevel obj3 = newLevel;
				obj3.minTotalScrapValue += configSettings.MinScrapValueModifier.Value;
				SelectableLevel obj4 = newLevel;
				obj4.maxTotalScrapValue += configSettings.MaxScrapValueModifier.Value;
			}
			if (configSettings.EnableHazardModification.Value)
			{
				SpawnableMapObject[] spawnableMapObjects = newLevel.spawnableMapObjects;
				foreach (SpawnableMapObject val in spawnableMapObjects)
				{
					if ((Object)(object)val.prefabToSpawn.GetComponentInChildren<Turret>() != (Object)null)
					{
						val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
						{
							new Keyframe(0f, configSettings.TurretSpawnCurve1.Value),
							new Keyframe(1f, configSettings.TurretSpawnCurve2.Value)
						});
					}
					else if ((Object)(object)val.prefabToSpawn.GetComponentInChildren<Landmine>() != (Object)null)
					{
						val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
						{
							new Keyframe(0f, configSettings.MineSpawnCurve1.Value),
							new Keyframe(1f, configSettings.MineSpawnCurve2.Value)
						});
					}
				}
			}
			if (configSettings.EnableEnemyModification.Value)
			{
				newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, configSettings.InsideEnemySpawnCurve1.Value),
					new Keyframe(0.5f, configSettings.InsideEnemySpawnCurve2.Value)
				});
				newLevel.daytimeEnemySpawnChanceThroughDay = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, configSettings.DaytimeEnemySpawnCurve1.Value),
					new Keyframe(0.5f, configSettings.DaytimeEnemySpawnCurve2.Value)
				});
				newLevel.outsideEnemySpawnChanceThroughDay = new AnimationCurve((Keyframe[])(object)new Keyframe[3]
				{
					new Keyframe(0f, configSettings.OutsideEnemySpawnCurve1.Value),
					new Keyframe(20f, configSettings.OutsideEnemySpawnCurve2.Value),
					new Keyframe(21f, configSettings.OutsideEnemySpawnCurve3.Value)
				});
				SelectableLevel obj5 = newLevel;
				obj5.maxEnemyPowerCount += configSettings.MaxInsideEnemyPowerModifier.Value;
				SelectableLevel obj6 = newLevel;
				obj6.maxOutsideEnemyPowerCount += configSettings.MaxOutsideEnemyPowerModifier.Value;
				SelectableLevel obj7 = newLevel;
				obj7.maxDaytimeEnemyPowerCount += configSettings.MaxDaytimeEnemyPowerModifier.Value;
			}
			difficultyModifiedLevels.Add(newLevel.levelID);
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "NotSoBrutalCompany";

		public const string PLUGIN_NAME = "NotSoBrutalCompany";

		public const string PLUGIN_VERSION = "1.4.0";
	}
}
namespace NotSoBrutalCompany.ManualPatches
{
	[HarmonyPatch(typeof(TimeOfDay), "Start")]
	internal class Patch_QuotaAjuster
	{
		private static void Prefix(TimeOfDay __instance)
		{
			Plugin.mls.LogWarning((object)"Changing quota variables in patch!");
			__instance.quotaVariables.startingQuota = 1000;
			__instance.quotaVariables.startingCredits = 250;
			__instance.quotaVariables.baseIncrease = 500f;
			__instance.quotaVariables.randomizerMultiplier = 0f;
			__instance.quotaVariables.deadlineDaysAmount = 10;
		}
	}
}
namespace NotSoBrutalCompany.Heat
{
	public class HeatController
	{
	}
}
namespace NotSoBrutalCompany.Events
{
	internal class BrackenCoilEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new BrackenCoilEvent();
		}
	}
	internal class BrackenCoilEvent : BrutalEvent
	{
		private AnimationCurve oldAnimationCurve;

		private List<int> rarities = new List<int>();

		private int oldCoilMax;

		private int oldFlowerMax;

		public override string GetEventName()
		{
			return "The deadliest combo of all time";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			oldAnimationCurve = newLevel.enemySpawnChanceThroughoutDay;
			newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 500f)
			});
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				rarities.Add(newLevel.Enemies[i].rarity);
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<FlowermanAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldFlowerMax = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.FlowermanCoilEventFlowermanMax.Value;
				}
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<SpringManAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldCoilMax = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.FlowermanCoilEventCoilHeadMax.Value;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.enemySpawnChanceThroughoutDay = oldAnimationCurve;
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				newLevel.Enemies[i].rarity = rarities[i];
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<FlowermanAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldFlowerMax;
				}
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<SpringManAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldCoilMax;
				}
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			bool flag = false;
			bool flag2 = false;
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<FlowermanAI>() != (Object)null)
				{
					flag = true;
				}
				else if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<SpringManAI>() != (Object)null)
				{
					flag2 = true;
				}
			}
			if (flag && flag2)
			{
				return true;
			}
			return false;
		}
	}
	public abstract class BrutalEventCreator
	{
		public abstract BrutalEvent Create();
	}
	public abstract class BrutalEvent
	{
		public abstract string GetEventName();

		public abstract void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs);

		public virtual void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
		}

		public virtual bool IsValid(ref SelectableLevel newLevel)
		{
			return true;
		}
	}
	internal class CoilHeadEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new CoilHeadEvent();
		}
	}
	internal class CoilHeadEvent : BrutalEvent
	{
		private AnimationCurve oldAnimationCurve;

		private List<int> rarities = new List<int>();

		private int oldMaxCount;

		public override string GetEventName()
		{
			return "Boing!";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			oldAnimationCurve = newLevel.enemySpawnChanceThroughoutDay;
			newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 500f)
			});
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				rarities.Add(newLevel.Enemies[i].rarity);
				newLevel.Enemies[i].rarity = 0;
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<SpringManAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldMaxCount = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.CoilHeadEventCoilHeadMax.Value;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.enemySpawnChanceThroughoutDay = oldAnimationCurve;
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				newLevel.Enemies[i].rarity = rarities[i];
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<SpringManAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldMaxCount;
				}
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<SpringManAI>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal class DogEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new DogEvent();
		}
	}
	internal class DogEvent : BrutalEvent
	{
		private AnimationCurve oldOutsideSpawnChance;

		private List<int> rarities = new List<int>();

		public override string GetEventName()
		{
			return "Who let the dogs out";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_0037: 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_004d: 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_0061: Expected O, but got Unknown
			oldOutsideSpawnChance = newLevel.outsideEnemySpawnChanceThroughDay;
			newLevel.outsideEnemySpawnChanceThroughDay = new AnimationCurve((Keyframe[])(object)new Keyframe[3]
			{
				new Keyframe(0f, 3f),
				new Keyframe(20f, 3f),
				new Keyframe(21f, 3f)
			});
			for (int i = 0; i < newLevel.OutsideEnemies.Count; i++)
			{
				rarities.Add(newLevel.OutsideEnemies[i].rarity);
				newLevel.OutsideEnemies[i].rarity = 0;
				if ((Object)(object)newLevel.OutsideEnemies[i].enemyType.enemyPrefab.GetComponent<MouthDogAI>() != (Object)null)
				{
					newLevel.OutsideEnemies[i].rarity = 999;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.outsideEnemySpawnChanceThroughDay = oldOutsideSpawnChance;
			for (int i = 0; i < newLevel.OutsideEnemies.Count; i++)
			{
				newLevel.OutsideEnemies[i].rarity = rarities[i];
			}
		}
	}
	internal class EventCreator
	{
		private List<BrutalEventCreator> customEventOrder = new List<BrutalEventCreator>
		{
			new JesterEventCreator(),
			new CoilHeadEventCreator(),
			new JesterEventCreator()
		};

		private int customCurrentIndex;

		private int currentIndex;

		public BrutalEvent GetRandomEvent()
		{
			List<BrutalEventCreator> events = BrutalEventList.GetEvents();
			Random random = new Random();
			return events[random.Next(events.Count)].Create();
		}

		public BrutalEvent GetRandomEventWithWeight(int eventProbability)
		{
			if (new Random().Next(0, 10) < eventProbability)
			{
				return new NoneEvent();
			}
			return GetRandomEvent();
		}

		public BrutalEvent GetEventInOrder()
		{
			List<BrutalEventCreator> events = BrutalEventList.GetEvents();
			BrutalEventCreator brutalEventCreator = events[currentIndex];
			currentIndex++;
			if (currentIndex >= events.Count)
			{
				currentIndex = 0;
			}
			return brutalEventCreator.Create();
		}

		public BrutalEvent GetEventInCustomOrder()
		{
			BrutalEventCreator brutalEventCreator = customEventOrder[customCurrentIndex];
			customCurrentIndex++;
			if (customCurrentIndex >= customEventOrder.Count)
			{
				customCurrentIndex = 0;
			}
			return brutalEventCreator.Create();
		}
	}
	public static class BrutalEventList
	{
		private static List<BrutalEventCreator> events = new List<BrutalEventCreator>();

		public static List<BrutalEventCreator> GetEvents()
		{
			return events;
		}

		public static void AddEvent(BrutalEventCreator brutalEvent)
		{
			events.Add(brutalEvent);
		}

		internal static void AddBaseEvents(ConfigSettings configs)
		{
			if (configs.EnableFlowermanCoilEvent.Value)
			{
				AddEvent(new BrackenCoilEventCreator());
			}
			if (configs.EnableDogEvent.Value)
			{
				AddEvent(new DogEventCreator());
			}
			if (configs.EnableHoardingBugsEvent.Value)
			{
				AddEvent(new HoardingEventCreator());
			}
			if (configs.EnableJetpackEvent.Value)
			{
				AddEvent(new JetpackDeliveryCreator());
			}
			if (configs.EnableLandmineEvent.Value)
			{
				AddEvent(new LandmineEventCreator());
			}
			if (configs.EnableLassoEvent.Value)
			{
				AddEvent(new LassoEventCreator());
			}
			if (configs.EnableLittleGirlEvent.Value)
			{
				AddEvent(new LittleGirlEventCreator());
			}
			if (configs.EnableMonkeyEvent.Value)
			{
				AddEvent(new MonkeyEventCreator());
			}
			if (configs.EnableRandomDeliveryEvent.Value)
			{
				AddEvent(new RandomDeliveryEventCreator());
			}
			if (configs.EnableSnareFleaEvent.Value)
			{
				AddEvent(new SnareFleaEventCreator());
			}
			if (configs.EnableSpiderEvent.Value)
			{
				AddEvent(new SpiderEventCreator());
			}
			if (configs.EnableThumperEvent.Value)
			{
				AddEvent(new ThumperEventCreator());
			}
			if (configs.EnableThunderEvent.Value)
			{
				AddEvent(new ThunderEventCreator());
			}
			if (configs.EnableTurretEvent.Value)
			{
				AddEvent(new TurretEventCreator());
			}
			if (configs.EnableWalkiDeliveryEvent.Value)
			{
				AddEvent(new WalkiDeliveryEventCreator());
			}
			if (configs.EnableCoilHeadEvent.Value)
			{
				AddEvent(new CoilHeadEventCreator());
			}
			if (configs.EnableJesterEvent.Value)
			{
				AddEvent(new JesterEventCreator());
			}
		}
	}
	internal class GoldMineEvent : BrutalEvent
	{
		public override string GetEventName()
		{
			return "Gold Mine";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			foreach (SpawnableItemWithRarity item in newLevel.spawnableScrap)
			{
				_ = item;
			}
		}
	}
	internal class HoardingEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new HoardingEvent();
		}
	}
	internal class HoardingEvent : BrutalEvent
	{
		private AnimationCurve oldAnimationCurve;

		private List<int> rarities = new List<int>();

		private int oldMaxCount;

		public override string GetEventName()
		{
			return "Kleptomania";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			oldAnimationCurve = newLevel.enemySpawnChanceThroughoutDay;
			newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 500f)
			});
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				rarities.Add(newLevel.Enemies[i].rarity);
				newLevel.Enemies[i].rarity = 0;
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<HoarderBugAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldMaxCount = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.HoardingBugsEventHoardingMax.Value;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.enemySpawnChanceThroughoutDay = oldAnimationCurve;
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				newLevel.Enemies[i].rarity = rarities[i];
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<HoarderBugAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldMaxCount;
				}
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<HoarderBugAI>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal class JesterEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new JesterEvent();
		}
	}
	internal class JesterEvent : BrutalEvent
	{
		private AnimationCurve oldAnimationCurve;

		private List<int> rarities = new List<int>();

		private int oldMaxCount;

		public override string GetEventName()
		{
			return "Jack-In-The-Box";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			oldAnimationCurve = newLevel.enemySpawnChanceThroughoutDay;
			newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 500f)
			});
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				rarities.Add(newLevel.Enemies[i].rarity);
				newLevel.Enemies[i].rarity = 0;
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<JesterAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldMaxCount = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.JesterEventJesterMax.Value;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.enemySpawnChanceThroughoutDay = oldAnimationCurve;
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				newLevel.Enemies[i].rarity = rarities[i];
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<JesterAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldMaxCount;
				}
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<JesterAI>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal class JetpackDeliveryCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new JetpackDelivery();
		}
	}
	internal class JetpackDelivery : BrutalEvent
	{
		public override string GetEventName()
		{
			return "Jetpack delivery";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			int value = configs.JetpackEventJetpackCount.Value;
			int item = 9;
			Terminal val = Object.FindObjectOfType<Terminal>();
			for (int i = 0; i < value; i++)
			{
				val.orderedItemsFromTerminal.Add(item);
			}
		}
	}
	internal class LandmineEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new LandmineEvent();
		}
	}
	internal class LandmineEvent : BrutalEvent
	{
		private AnimationCurve oldCurve;

		public override string GetEventName()
		{
			return "Landmine hell";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//IL_0042: 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_0058: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			SpawnableMapObject[] spawnableMapObjects = newLevel.spawnableMapObjects;
			foreach (SpawnableMapObject val in spawnableMapObjects)
			{
				if ((Object)(object)val.prefabToSpawn.GetComponentInChildren<Landmine>() != (Object)null)
				{
					oldCurve = val.numberToSpawn;
					val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
					{
						new Keyframe(0f, 120f),
						new Keyframe(1f, 68f)
					});
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			SpawnableMapObject[] spawnableMapObjects = newLevel.spawnableMapObjects;
			foreach (SpawnableMapObject val in spawnableMapObjects)
			{
				if ((Object)(object)val.prefabToSpawn.GetComponentInChildren<Turret>() != (Object)null)
				{
					val.numberToSpawn = oldCurve;
				}
			}
		}
	}
	internal class LassoEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new LassoEvent();
		}
	}
	internal class LassoEvent : BrutalEvent
	{
		public override string GetEventName()
		{
			return "Lasso man is real";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Expected O, but got Unknown
			bool flag = false;
			bool flag2 = false;
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<LassoManAI>() != (Object)null)
				{
					flag = true;
				}
			}
			if (!flag)
			{
				SelectableLevel[] levels = StartOfRound.Instance.levels;
				for (int i = 0; i < levels.Length; i++)
				{
					foreach (SpawnableEnemyWithRarity enemy2 in levels[i].Enemies)
					{
						if ((Object)(object)enemy2.enemyType.enemyPrefab.GetComponent<LassoManAI>() != (Object)null && !flag2)
						{
							flag2 = true;
							newLevel.Enemies.Add(enemy2);
						}
					}
				}
			}
			foreach (SpawnableEnemyWithRarity enemy3 in newLevel.Enemies)
			{
				if ((Object)(object)enemy3.enemyType.enemyPrefab.GetComponent<LassoManAI>() != (Object)null)
				{
					enemy3.rarity = 999;
					enemy3.enemyType.probabilityCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
					{
						new Keyframe(0f, 10000f)
					});
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			for (int num = newLevel.Enemies.Count - 1; num >= 0; num--)
			{
				if ((Object)(object)newLevel.Enemies[num].enemyType.enemyPrefab.GetComponent<LassoManAI>() != (Object)null)
				{
					newLevel.Enemies.RemoveAt(num);
				}
			}
		}
	}
	internal class LittleGirlEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new LittleGirlEvent();
		}
	}
	internal class LittleGirlEvent : BrutalEvent
	{
		private int oldRarity;

		public override string GetEventName()
		{
			return "Sweet Little Girl";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<DressGirlAI>() != (Object)null)
				{
					oldRarity = newLevel.Enemies[i].rarity;
					newLevel.Enemies[i].rarity = 999;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<DressGirlAI>() != (Object)null)
				{
					oldRarity = newLevel.Enemies[i].rarity;
				}
			}
		}
	}
	internal class MonkeyEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new MonkeyEvent();
		}
	}
	internal class MonkeyEvent : BrutalEvent
	{
		private AnimationCurve oldOutsideSpawnChance;

		private List<int> rarities = new List<int>();

		public override string GetEventName()
		{
			return "Monke";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_0037: 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_004d: 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_0061: Expected O, but got Unknown
			oldOutsideSpawnChance = newLevel.outsideEnemySpawnChanceThroughDay;
			newLevel.outsideEnemySpawnChanceThroughDay = new AnimationCurve((Keyframe[])(object)new Keyframe[3]
			{
				new Keyframe(0f, 3f),
				new Keyframe(20f, 3f),
				new Keyframe(21f, 3f)
			});
			for (int i = 0; i < newLevel.OutsideEnemies.Count; i++)
			{
				rarities.Add(newLevel.OutsideEnemies[i].rarity);
				newLevel.OutsideEnemies[i].rarity = 0;
				if ((Object)(object)newLevel.OutsideEnemies[i].enemyType.enemyPrefab.GetComponent<BaboonBirdAI>() != (Object)null)
				{
					newLevel.OutsideEnemies[i].rarity = 999;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.outsideEnemySpawnChanceThroughDay = oldOutsideSpawnChance;
			for (int i = 0; i < newLevel.OutsideEnemies.Count; i++)
			{
				newLevel.OutsideEnemies[i].rarity = rarities[i];
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity outsideEnemy in newLevel.OutsideEnemies)
			{
				if ((Object)(object)outsideEnemy.enemyType.enemyPrefab.GetComponent<BaboonBirdAI>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}
	}
	public class NoneEvent : BrutalEvent
	{
		public override string GetEventName()
		{
			return "None";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings config)
		{
		}
	}
	internal class RandomDeliveryEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new RandomDeliveryEvent();
		}
	}
	internal class RandomDeliveryEvent : BrutalEvent
	{
		public override string GetEventName()
		{
			return "Lost delivery";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			int num = Random.Range(2, 9);
			for (int i = 0; i < num; i++)
			{
				int item = Random.Range(0, 6);
				Object.FindObjectOfType<Terminal>().orderedItemsFromTerminal.Add(item);
			}
		}
	}
	internal class SnareFleaEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new SnareFleaEvent();
		}
	}
	internal class SnareFleaEvent : BrutalEvent
	{
		private AnimationCurve oldAnimationCurve;

		private List<int> rarities = new List<int>();

		private int oldMaxCount;

		public override string GetEventName()
		{
			return "Ready to suffocate ?";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			oldAnimationCurve = newLevel.enemySpawnChanceThroughoutDay;
			newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 500f)
			});
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				rarities.Add(newLevel.Enemies[i].rarity);
				newLevel.Enemies[i].rarity = 0;
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<CentipedeAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldMaxCount = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.SnareFleaEventSnareFleaMax.Value;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.enemySpawnChanceThroughoutDay = oldAnimationCurve;
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				newLevel.Enemies[i].rarity = rarities[i];
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<CentipedeAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldMaxCount;
				}
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<CentipedeAI>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal class SpiderEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new SpiderEvent();
		}
	}
	internal class SpiderEvent : BrutalEvent
	{
		private AnimationCurve oldAnimationCurve;

		private List<int> rarities = new List<int>();

		private int oldMaxCount;

		public override string GetEventName()
		{
			return "Arachnophobia";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			oldAnimationCurve = newLevel.enemySpawnChanceThroughoutDay;
			newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 500f)
			});
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				rarities.Add(newLevel.Enemies[i].rarity);
				newLevel.Enemies[i].rarity = 0;
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<SandSpiderAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldMaxCount = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.SpiderEventSpiderMax.Value;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.enemySpawnChanceThroughoutDay = oldAnimationCurve;
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				newLevel.Enemies[i].rarity = rarities[i];
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<SandSpiderAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldMaxCount;
				}
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<SandSpiderAI>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal class ThumperEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new ThumperEvent();
		}
	}
	internal class ThumperEvent : BrutalEvent
	{
		private AnimationCurve oldAnimationCurve;

		private List<int> rarities = new List<int>();

		private int oldMaxCount;

		public override string GetEventName()
		{
			return "Thump Thump Thump";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			oldAnimationCurve = newLevel.enemySpawnChanceThroughoutDay;
			newLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 500f)
			});
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				rarities.Add(newLevel.Enemies[i].rarity);
				newLevel.Enemies[i].rarity = 0;
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<CrawlerAI>() != (Object)null)
				{
					newLevel.Enemies[i].rarity = 999;
					oldMaxCount = newLevel.Enemies[i].enemyType.MaxCount;
					newLevel.Enemies[i].enemyType.MaxCount = configs.ThumperEventThumperMax.Value;
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			newLevel.enemySpawnChanceThroughoutDay = oldAnimationCurve;
			for (int i = 0; i < newLevel.Enemies.Count; i++)
			{
				newLevel.Enemies[i].rarity = rarities[i];
				if ((Object)(object)newLevel.Enemies[i].enemyType.enemyPrefab.GetComponent<CrawlerAI>() != (Object)null)
				{
					newLevel.Enemies[i].enemyType.MaxCount = oldMaxCount;
				}
			}
		}

		public override bool IsValid(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent<CrawlerAI>() != (Object)null)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal class ThunderEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new ThunderEvent();
		}
	}
	internal class ThunderEvent : BrutalEvent
	{
		private LevelWeatherType oldType;

		private bool oldOverrideWeather;

		public override string GetEventName()
		{
			return "Thunderstruck";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: 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)
			oldType = newLevel.overrideWeatherType;
			oldOverrideWeather = newLevel.overrideWeather;
			newLevel.currentWeather = (LevelWeatherType)2;
			newLevel.overrideWeather = false;
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			newLevel.currentWeather = oldType;
			newLevel.overrideWeather = oldOverrideWeather;
		}
	}
	internal class TurretEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new TurretEvent();
		}
	}
	internal class TurretEvent : BrutalEvent
	{
		private AnimationCurve oldCurve;

		public override string GetEventName()
		{
			return "Turret hell";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			//IL_0042: 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_0058: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			SpawnableMapObject[] spawnableMapObjects = newLevel.spawnableMapObjects;
			foreach (SpawnableMapObject val in spawnableMapObjects)
			{
				if ((Object)(object)val.prefabToSpawn.GetComponentInChildren<Turret>() != (Object)null)
				{
					oldCurve = val.numberToSpawn;
					val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
					{
						new Keyframe(0f, 100f),
						new Keyframe(1f, 13f)
					});
				}
			}
		}

		public override void OnLoadNewLevelCleanup(ref SelectableLevel newLevel)
		{
			SpawnableMapObject[] spawnableMapObjects = newLevel.spawnableMapObjects;
			foreach (SpawnableMapObject val in spawnableMapObjects)
			{
				if ((Object)(object)val.prefabToSpawn.GetComponentInChildren<Turret>() != (Object)null)
				{
					val.numberToSpawn = oldCurve;
				}
			}
		}
	}
	internal class WalkiDeliveryEventCreator : BrutalEventCreator
	{
		public override BrutalEvent Create()
		{
			return new WalkiDeliveryEvent();
		}
	}
	internal class WalkiDeliveryEvent : BrutalEvent
	{
		public override string GetEventName()
		{
			return "Walkie delivery";
		}

		public override void OnLoadNewLevel(ref SelectableLevel newLevel, ConfigSettings configs)
		{
			Terminal val = Object.FindObjectOfType<Terminal>();
			int num = val.orderedItemsFromTerminal.Count;
			if (num < 5)
			{
				num = 5;
			}
			for (int i = 0; i < num; i++)
			{
				val.orderedItemsFromTerminal.Add(0);
			}
		}
	}
}

plugins/Venterok-HullBreaker_Company/HullBreakerCompany.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 System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using HullBreakerCompany.Events;
using HullBreakerCompany.Hull;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("HullBreakerCompany")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Making it more challenging to work for the company")]
[assembly: AssemblyFileVersion("1.3.7.0")]
[assembly: AssemblyInformationalVersion("1.3.7")]
[assembly: AssemblyProduct("HullBreakerCompany")]
[assembly: AssemblyTitle("HullBreakerCompany")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.3.7.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 HullBreakerCompany
{
	[BepInPlugin("HullBreakerCompany", "HullBreakerCompany", "1.3.7")]
	public class Plugin : BaseUnityPlugin
	{
		private static Dictionary<int, SelectableLevelState> _levelStates = new Dictionary<int, SelectableLevelState>();

		private static bool _loaded;

		public static ManualLogSource Mls;

		public static bool OneForAllIsActive;

		public static bool BountyIsActive;

		public static int DaysPassed;

		public static float BunkerEnemyScale;

		public static float LandMineTurretScale;

		public static bool UseShortChatMessages;

		public static bool EnableEventMessages;

		public static bool UseHullBreakerLevelSettings;

		public static bool UseDefaultGameSettings;

		public static int MaxEnemyPowerCount;

		public static int MaxOutsideEnemyPowerCount;

		public static int MaxDaytimeEnemyPowerCount;

		public static int MinScrap;

		public static int MaxScrap;

		public static int MinTotalScrapValue;

		public static int MaxTotalScrapValue;

		public static bool ChangeQuotaValue;

		public static int QuotaIncrease;

		public static bool IncreaseEventCountPerDay;

		public static int EventCount;

		public static List<SpawnableItemWithRarity> NotModifiedSpawnableItemsWithRarity = new List<SpawnableItemWithRarity>();

		public static Dictionary<string, Type> EnemyBase = new Dictionary<string, Type>
		{
			{
				"flowerman",
				typeof(FlowermanAI)
			},
			{
				"hoarderbug",
				typeof(HoarderBugAI)
			},
			{
				"springman",
				typeof(SpringManAI)
			},
			{
				"crawler",
				typeof(CrawlerAI)
			},
			{
				"sandspider",
				typeof(SandSpiderAI)
			},
			{
				"jester",
				typeof(JesterAI)
			},
			{
				"centipede",
				typeof(CentipedeAI)
			},
			{
				"blobai",
				typeof(BlobAI)
			},
			{
				"dressgirl",
				typeof(DressGirlAI)
			},
			{
				"pufferenemy",
				typeof(PufferAI)
			},
			{
				"eyelessdogs",
				typeof(MouthDogAI)
			},
			{
				"forestgiant",
				typeof(ForestGiantAI)
			},
			{
				"sandworm",
				typeof(SandWormAI)
			},
			{
				"baboonbird",
				typeof(BaboonBirdAI)
			}
		};

		public static List<HullEvent> EventDictionary = new List<HullEvent>
		{
			new FlowerManEvent(),
			new LandMineEvent(),
			new HoarderBugEvent(),
			new SpringManEvent(),
			new LizardsEvent(),
			new ArachnophobiaEvent(),
			new BeeEvent(),
			new SlimeEvent(),
			new DevochkaPizdecEvent(),
			new EnemyBountyEvent(),
			new OneForAllEvent(),
			new OpenTheNoorEvent(),
			new OnAPowderKegEvent(),
			new OutSideEnemyDayEvent(),
			new HellEvent(),
			new NothingEvent(),
			new HackedTurretsEvent(),
			new BabkinPogrebEvent(),
			new HullBreakEvent()
		};

		private Harmony _harmony = new Harmony("HULLBREAKER");

		private void Awake()
		{
			Mls = Logger.CreateLogSource("HULLBREAKER 1.3.7");
			Mls.LogInfo((object)"Ready to break hull; HullBreakerCompany");
			_harmony.PatchAll(typeof(Plugin));
			if (!_loaded)
			{
				Initialize();
			}
		}

		public void Start()
		{
			if (!_loaded)
			{
				Initialize();
			}
		}

		public void OnDestroy()
		{
			if (!_loaded)
			{
				Initialize();
			}
		}

		public void Initialize()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			ConfigManager.SetConfigValue();
			GameObject val = new GameObject("HullManager");
			Object.DontDestroyOnLoad((Object)(object)val);
			((Object)val).hideFlags = (HideFlags)61;
			val.AddComponent<HullManager>();
			Mls.LogInfo((object)"HullManager created");
			CustomEventLoader.LoadCustomEvents();
			_loaded = true;
		}

		[HarmonyPatch(typeof(RoundManager), "LoadNewLevel")]
		[HarmonyPrefix]
		private static bool ModifiedLoad(ref SelectableLevel newLevel)
		{
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_041a: Expected O, but got Unknown
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0432: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_0441: Expected O, but got Unknown
			//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04db: Expected O, but got Unknown
			Mls.LogInfo((object)("Client is host: " + ((NetworkBehaviour)RoundManager.Instance).IsHost));
			if (!((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				return true;
			}
			CustomEventLoader.DebugLoadCustomEvents();
			int levelID = newLevel.levelID;
			if (!_levelStates.ContainsKey(levelID))
			{
				_levelStates[levelID] = new SelectableLevelState(newLevel);
			}
			else
			{
				_levelStates[levelID].RestoreState(newLevel);
			}
			if (newLevel.levelID == 3)
			{
				Mls.LogInfo((object)"Level is company, skipping");
				DaysPassed = 0;
				return true;
			}
			DaysPassed++;
			Mls.LogInfo((object)$"Days passed: {DaysPassed}");
			BountyIsActive = false;
			OneForAllIsActive = false;
			ResetLevelUnits(newLevel);
			SelectableLevel val = newLevel;
			List<string> randomGameEvents = RandomSelector.GetRandomGameEvents();
			Dictionary<Type, int> dictionary = new Dictionary<Type, int>();
			Dictionary<Type, int> dictionary2 = new Dictionary<Type, int>();
			dictionary.Clear();
			NotModifiedSpawnableItemsWithRarity.Clear();
			foreach (SpawnableItemWithRarity item in val.spawnableScrap)
			{
				NotModifiedSpawnableItemsWithRarity.Add(item);
			}
			if (EventCount != 0 && EnableEventMessages)
			{
				HUDManager.Instance.AddTextToChatOnServer("<color=red>NOTES ABOUT MOON:</color>\"", -1);
			}
			foreach (string gameEvent in randomGameEvents)
			{
				try
				{
					HullEvent hullEvent = EventDictionary.FirstOrDefault((HullEvent e) => e.ID() == gameEvent);
					if (hullEvent != null)
					{
						hullEvent.Execute(newLevel, dictionary, dictionary2);
						Mls.LogInfo((object)("Event: " + gameEvent));
						UpdateRarity(newLevel.Enemies, dictionary);
						UpdateRarity(newLevel.OutsideEnemies, dictionary2);
					}
				}
				catch (NullReferenceException ex)
				{
					Mls.LogError((object)$"NullReferenceException caught while processing event: {gameEvent}. Exception message: {ex.Message}. Caused : {ex.InnerException}");
				}
			}
			HullManager.LogEnemyRarity(newLevel.Enemies, "⬛⬛⬛⬛⬛⬛ENEMIES RARITY⬛⬛⬛⬛⬛⬛");
			HullManager.LogEnemyRarity(newLevel.DaytimeEnemies, "⬛⬛⬛⬛⬛⬛DAYTIME ENEMIES RARITY⬛⬛⬛⬛⬛⬛");
			HullManager.LogEnemyRarity(newLevel.OutsideEnemies, "⬛⬛⬛⬛⬛⬛OUTSIDE ENEMIES RARITY⬛⬛⬛⬛⬛⬛");
			if (!randomGameEvents.Contains("Hell"))
			{
				dictionary.Add(typeof(JesterAI), Random.Range(1, 8));
			}
			if (!randomGameEvents.Contains("Bee"))
			{
				using IEnumerator<SpawnableEnemyWithRarity> enumerator3 = val.DaytimeEnemies.Where((SpawnableEnemyWithRarity unit) => (Object)(object)unit.enemyType.enemyPrefab.GetComponent<RedLocustBees>() != (Object)null).GetEnumerator();
				if (enumerator3.MoveNext())
				{
					SpawnableEnemyWithRarity current2 = enumerator3.Current;
					current2.rarity = 22;
				}
			}
			if (!randomGameEvents.Contains("SpringMan"))
			{
				dictionary.Add(typeof(SpringManAI), Random.Range(10, 32));
			}
			if (UseHullBreakerLevelSettings)
			{
				val.maxEnemyPowerCount += 16;
				val.maxOutsideEnemyPowerCount += 20;
				val.maxScrap += Random.Range(6, 24);
				val.maxTotalScrapValue += Random.Range(400, 800);
				val.daytimeEnemySpawnChanceThroughDay = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, 5f),
					new Keyframe(0.5f, 5f)
				});
				val.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
				{
					new Keyframe(0f, 256f)
				});
			}
			else if (UseDefaultGameSettings)
			{
				Mls.LogInfo((object)"Default settings");
			}
			else
			{
				val.maxEnemyPowerCount = MaxEnemyPowerCount;
				val.maxOutsideEnemyPowerCount = MaxOutsideEnemyPowerCount;
				val.maxDaytimeEnemyPowerCount = MaxDaytimeEnemyPowerCount;
				val.minScrap = MinScrap;
				val.maxScrap = MaxScrap;
				val.minTotalScrapValue = MinTotalScrapValue;
				val.maxTotalScrapValue = MaxTotalScrapValue;
				val.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
				{
					new Keyframe(0f, BunkerEnemyScale)
				});
			}
			newLevel = val;
			return true;
		}

		private static void UpdateRarity(List<SpawnableEnemyWithRarity> enemies, Dictionary<Type, int> componentRarity)
		{
			if (componentRarity.Count <= 0)
			{
				return;
			}
			foreach (SpawnableEnemyWithRarity enemy in enemies)
			{
				foreach (KeyValuePair<Type, int> item in componentRarity)
				{
					if ((Object)(object)enemy.enemyType.enemyPrefab.GetComponent(item.Key) == (Object)null)
					{
						continue;
					}
					enemy.rarity = item.Value;
					componentRarity.Remove(item.Key);
					break;
				}
			}
		}

		public static void LevelUnits(SelectableLevel n, bool turret = false, bool landmine = false)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			Mls.LogInfo((object)$"Turret: {turret}, Landmine: {landmine}");
			AnimationCurve numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
			{
				new Keyframe(0f, LandMineTurretScale),
				new Keyframe(1f, 25f)
			});
			SpawnableMapObject[] spawnableMapObjects = n.spawnableMapObjects;
			foreach (SpawnableMapObject val in spawnableMapObjects)
			{
				Landmine componentInChildren = val.prefabToSpawn.GetComponentInChildren<Landmine>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					val.numberToSpawn = numberToSpawn;
				}
			}
		}

		private static void ResetLevelUnits(SelectableLevel level)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//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_0053: Expected O, but got Unknown
			SpawnableMapObject[] spawnableMapObjects = level.spawnableMapObjects;
			foreach (SpawnableMapObject val in spawnableMapObjects)
			{
				Landmine componentInChildren = val.prefabToSpawn.GetComponentInChildren<Landmine>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
					{
						new Keyframe(0f, 2.5f)
					});
				}
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(EnemyAI), "KillEnemyServerRpc")]
		private static void EnemyBounty()
		{
			Mls.LogInfo((object)$"Enemy killed, bounty is active: {BountyIsActive}");
			if (BountyIsActive)
			{
				Terminal val = Object.FindObjectOfType<Terminal>();
				val.groupCredits += 30;
				val.SyncGroupCreditsServerRpc(val.groupCredits, val.numberOfItemsInDropship);
				HullManager.SendChatEventMessage("<color=green>Workers get paid for killing enemy</color>");
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(PlayerControllerB), "KillPlayerServerRpc")]
		private static void OneForAll()
		{
			Mls.LogInfo((object)$"Player killed, one for all is active: {OneForAllIsActive}");
			if (OneForAllIsActive)
			{
				HullManager hullManager = Object.FindObjectOfType<HullManager>();
				hullManager.timeOfDay.votedShipToLeaveEarlyThisRound = true;
				hullManager.timeOfDay.SetShipLeaveEarlyServerRpc();
				HullManager.SendChatEventMessage("<color=red>One of the workers died, the ship will go into orbit in an hour</color>");
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(GameNetworkManager), "StartHost")]
		private static void ResetDayPassed()
		{
			DaysPassed = 0;
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "HullBreakerCompany";

		public const string PLUGIN_NAME = "HullBreakerCompany";

		public const string PLUGIN_VERSION = "1.3.7";
	}
}
namespace HullBreakerCompany.Hull
{
	public class ConfigManager
	{
		private static string _configPath = Path.Combine(Paths.ConfigPath, "HullBreakerCompany.cfg");

		private static ConfigFile _configFile;

		public static T GetConfigValue<T>(string key, T defaultValue, string description = null)
		{
			EnsureConfigExists();
			return _configFile.Bind<T>("Settings", key, defaultValue, description).Value;
		}

		public static void SetConfigValue()
		{
			Plugin.LandMineTurretScale = GetConfigValue("LandMineTurretScale", 64, "Should change amount of Landmines & Turrets when these events are active: (Landmine & Turret)");
			Plugin.UseShortChatMessages = GetConfigValue("UseShortChatMessages", defaultValue: false, "Use short event message (one/two words), can add surprise effect & difficulty");
			Plugin.EnableEventMessages = GetConfigValue("EnableEventMessages", defaultValue: true, "Enable chat event messages");
			Plugin.UseHullBreakerLevelSettings = GetConfigValue("UseHullBreakerLevelSettings", defaultValue: true, "Use HullBreaker level settings, if false, use default level settings");
			Plugin.UseDefaultGameSettings = GetConfigValue("UseDefaultLevelSettings", defaultValue: false, "Use default level settings, if false, you can change on one's own");
			Plugin.ChangeQuotaValue = GetConfigValue("ChangeQuota", defaultValue: true, "Change quota");
			Plugin.QuotaIncrease = GetConfigValue("IncreasedQuota", 256, "Increased quota");
			Plugin.MaxEnemyPowerCount = GetConfigValue("MaxEnemyPowerCount", 10, "Max enemy power count");
			Plugin.MaxOutsideEnemyPowerCount = GetConfigValue("MaxOutsideEnemyPowerCount", 10, "Max outside enemy power count");
			Plugin.MaxDaytimeEnemyPowerCount = GetConfigValue("MaxDaytimeEnemyPowerCount", 20, "Max daytime enemy power count");
			Plugin.MinScrap = GetConfigValue("MinScrap", 10, "Min scrap");
			Plugin.MaxScrap = GetConfigValue("MaxScrap", 15, "Max scrap");
			Plugin.MinTotalScrapValue = GetConfigValue("MinTotalScrapValue", 300, "Min total scrap value");
			Plugin.MaxTotalScrapValue = GetConfigValue("MaxTotalScrapValue", 700, "Max total scrap value");
			Plugin.BunkerEnemyScale = GetConfigValue("BunkerEnemyScale", 256, "Should change global bunker enemy spawn rate, not sure if its work");
			Plugin.IncreaseEventCountPerDay = GetConfigValue("IncreaseEventCountPerDay", defaultValue: false, "The number of events will increase every day. Visit the company building to reset");
			Plugin.EventCount = GetConfigValue("EventCount", 3, "The number of events that will be active at the same time");
		}

		public static Dictionary<string, int> GetWeights()
		{
			EnsureConfigExists();
			Dictionary<string, int> dictionary = new Dictionary<string, int>();
			foreach (HullEvent item in Plugin.EventDictionary)
			{
				dictionary[item.ID()] = _configFile.Bind<int>("Weights", item.ID(), item.GetWeight(), item.GetDescription()).Value;
			}
			return dictionary;
		}

		private static void EnsureConfigExists()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			if (_configFile == null)
			{
				if (!File.Exists(_configPath))
				{
					CreateDefaultConfigFile();
				}
				_configFile = new ConfigFile(_configPath, true);
			}
		}

		private static void CreateDefaultConfigFile()
		{
			using StreamWriter streamWriter = File.CreateText(_configPath);
			streamWriter.WriteLine("[Weights]");
			foreach (HullEvent item in Plugin.EventDictionary)
			{
				streamWriter.WriteLine(item.ID() + "=" + item.GetWeight());
			}
		}
	}
	public class CustomEventLoader
	{
		public static void LoadCustomEvents()
		{
			List<Dictionary<string, string>> list = LoadEventDataFromCfgFiles();
			if (list.Count == 0)
			{
				return;
			}
			foreach (Dictionary<string, string> item in list)
			{
				CustomEvent customEvent = new CustomEvent();
				customEvent.SetID(item["EventID"]);
				customEvent.SetWeight(int.Parse(item["EventWeight"]));
				customEvent.Rarity = int.Parse(item["EnemyRarity"]);
				if (item.ContainsKey("SpawnableEnemies"))
				{
					customEvent.EnemySpawnList = new HashSet<string>(item["SpawnableEnemies"].Split(',')).ToList();
				}
				if (item.ContainsKey("SpawnableOutsideEnemies"))
				{
					customEvent.OutsideSpawnList = new HashSet<string>(item["SpawnableOutsideEnemies"].Split(',')).ToList();
				}
				customEvent.SetMessage(item["InGameMessage"]);
				customEvent.SetShortMessage(item["InGameShortMessage"]);
				Plugin.EventDictionary.Add(customEvent);
			}
		}

		private static List<Dictionary<string, string>> LoadEventDataFromCfgFiles()
		{
			string text = Paths.BepInExRootPath + "\\HullEvents";
			if (!Directory.Exists(text))
			{
				Plugin.Mls.LogError((object)("Directory does not exist: " + text));
				return new List<Dictionary<string, string>>();
			}
			string[] files = Directory.GetFiles(text, "*.cfg");
			List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
			string[] array = files;
			foreach (string path in array)
			{
				string[] array2 = File.ReadAllLines(path);
				Dictionary<string, string> dictionary = new Dictionary<string, string>();
				string[] array3 = array2;
				foreach (string text2 in array3)
				{
					if (!text2.StartsWith("[") && !string.IsNullOrWhiteSpace(text2))
					{
						string[] array4 = text2.Split('=');
						if (array4.Length == 2)
						{
							string key = array4[0].Trim();
							string value = array4[1].Trim();
							dictionary[key] = value;
						}
					}
				}
				list.Add(dictionary);
				Plugin.Mls.LogInfo((object)("Loaded event: " + dictionary["EventID"]));
			}
			return list;
		}

		public static void AddEvent(HullEvent newEvent)
		{
			Plugin.Mls.LogInfo((object)("Adding new event" + newEvent.ID() + " to dictionary"));
			Plugin.EventDictionary.Add(newEvent);
		}

		public static void DebugLoadCustomEvents()
		{
			foreach (HullEvent item in Plugin.EventDictionary)
			{
				if (item is CustomEvent customEvent)
				{
					Plugin.Mls.LogInfo((object)("Event ID: " + customEvent.ID()));
					Plugin.Mls.LogInfo((object)("Spawnable Enemies: " + string.Join(", ", customEvent.EnemySpawnList)));
					Plugin.Mls.LogInfo((object)("Message: " + customEvent.GetMessage()));
				}
			}
		}
	}
	public abstract class HullEvent
	{
		public abstract string ID();

		public virtual int GetWeight()
		{
			return 1;
		}

		public virtual string GetDescription()
		{
			return "Default description";
		}

		public virtual string GetMessage()
		{
			return "Default message";
		}

		public virtual string GetShortMessage()
		{
			return "SHORT";
		}

		public virtual void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
		}
	}
	public class HullManager : MonoBehaviour
	{
		public TimeOfDay timeOfDay;

		public static HullManager Instance { get; private set; }

		public void Update()
		{
			if ((Object)(object)timeOfDay == (Object)null)
			{
				timeOfDay = Object.FindFirstObjectByType<TimeOfDay>();
			}
			else if (Plugin.ChangeQuotaValue)
			{
				timeOfDay.quotaVariables.baseIncrease = Plugin.QuotaIncrease;
			}
		}

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
				Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			}
			else
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}

		public void AddMoney(int amount)
		{
			Terminal val = Object.FindObjectOfType<Terminal>();
			val.groupCredits += amount;
			val.SyncGroupCreditsServerRpc(val.groupCredits, val.numberOfItemsInDropship);
		}

		public void ExecuteAfterDelay(Action action, float delay)
		{
			((MonoBehaviour)this).StartCoroutine(DelayedExecution(action, delay));
		}

		private IEnumerator DelayedExecution(Action action, float delay)
		{
			yield return (object)new WaitForSeconds(delay);
			action();
		}

		public static void SendChatEventMessage(HullEvent hullEvent)
		{
			if ((Object)(object)HUDManager.Instance != (Object)null && hullEvent != null && Plugin.EnableEventMessages)
			{
				HUDManager.Instance.AddTextToChatOnServer(Plugin.UseShortChatMessages ? hullEvent.GetShortMessage() : hullEvent.GetMessage(), -1);
			}
		}

		public static void SendChatEventMessage(string message)
		{
			if ((Object)(object)HUDManager.Instance != (Object)null && message != null && Plugin.EnableEventMessages)
			{
				HUDManager.Instance.AddTextToChatOnServer(message, -1);
			}
		}

		public static void LogEnemyRarity(List<SpawnableEnemyWithRarity> enemies, string title)
		{
			Plugin.Mls.LogInfo((object)"");
			Plugin.Mls.LogInfo((object)title);
			foreach (SpawnableEnemyWithRarity enemy in enemies)
			{
				Plugin.Mls.LogInfo((object)$"{((Object)enemy.enemyType.enemyPrefab).name} - {enemy.rarity}");
			}
		}
	}
	public abstract class RandomSelector
	{
		private static Random _random = new Random();

		public static List<string> GetRandomGameEvents()
		{
			int count = (Plugin.IncreaseEventCountPerDay ? Plugin.DaysPassed : Plugin.EventCount);
			return GetWeightedRandomGameEvents(ConfigManager.GetWeights(), count);
		}

		private static List<T> GetWeightedRandomGameEvents<T>(Dictionary<T, int> weights, int count)
		{
			int maxValue = weights.Where((KeyValuePair<T, int> x) => x.Value > 0).Sum((KeyValuePair<T, int> x) => x.Value);
			HashSet<T> hashSet = new HashSet<T>();
			while (hashSet.Count < count)
			{
				int num = _random.Next(maxValue);
				foreach (KeyValuePair<T, int> weight in weights)
				{
					if (weight.Value != 0)
					{
						if (num < weight.Value)
						{
							hashSet.Add(weight.Key);
							break;
						}
						num -= weight.Value;
					}
				}
			}
			return hashSet.ToList();
		}

		private static void Shuffle<T>(IList<T> list)
		{
			int num = list.Count;
			while (num > 1)
			{
				num--;
				int num2 = _random.Next(num + 1);
				int index = num2;
				int index2 = num;
				T value = list[num];
				T value2 = list[num2];
				list[index] = value;
				list[index2] = value2;
			}
		}
	}
	public class SelectableLevelState
	{
		public int MinScrap;

		public int MaxScrap;

		public int MinTotalScrapValue;

		public int MaxTotalScrapValue;

		public int MaxEnemyPowerCount = 8;

		public int MaxOutsideEnemyPowerCount = 15;

		public int MaxDaytimeEnemyPowerCount = 20;

		public AnimationCurve EnemySpawnChanceThroughoutDay;

		public AnimationCurve OutsideEnemySpawnChanceThroughDay;

		public AnimationCurve DaytimeEnemySpawnChanceThroughDay;

		public List<SpawnableEnemyWithRarity> EnemyList = new List<SpawnableEnemyWithRarity>();

		public List<SpawnableEnemyWithRarity> OutsideEnemyList = new List<SpawnableEnemyWithRarity>();

		public List<SpawnableEnemyWithRarity> DaytimeEnemyList = new List<SpawnableEnemyWithRarity>();

		public SelectableLevelState(SelectableLevel level)
		{
			MinScrap = level.minScrap;
			MaxScrap = level.maxScrap;
			MinTotalScrapValue = level.minTotalScrapValue;
			MaxTotalScrapValue = level.maxTotalScrapValue;
			MaxEnemyPowerCount = level.maxEnemyPowerCount;
			MaxOutsideEnemyPowerCount = level.maxOutsideEnemyPowerCount;
			MaxDaytimeEnemyPowerCount = level.maxDaytimeEnemyPowerCount;
			EnemySpawnChanceThroughoutDay = level.enemySpawnChanceThroughoutDay;
			OutsideEnemySpawnChanceThroughDay = level.outsideEnemySpawnChanceThroughDay;
			DaytimeEnemySpawnChanceThroughDay = level.daytimeEnemySpawnChanceThroughDay;
			CloneEnemies(level.Enemies, EnemyList);
			CloneEnemies(level.OutsideEnemies, OutsideEnemyList);
			CloneEnemies(level.DaytimeEnemies, DaytimeEnemyList);
		}

		public void RestoreState(SelectableLevel level)
		{
			level.minScrap = MinScrap;
			level.maxScrap = MaxScrap;
			level.minTotalScrapValue = MinTotalScrapValue;
			level.maxTotalScrapValue = MaxTotalScrapValue;
			level.maxEnemyPowerCount = MaxEnemyPowerCount;
			level.maxOutsideEnemyPowerCount = MaxOutsideEnemyPowerCount;
			level.maxDaytimeEnemyPowerCount = MaxDaytimeEnemyPowerCount;
			level.enemySpawnChanceThroughoutDay = EnemySpawnChanceThroughoutDay;
			level.outsideEnemySpawnChanceThroughDay = OutsideEnemySpawnChanceThroughDay;
			level.daytimeEnemySpawnChanceThroughDay = DaytimeEnemySpawnChanceThroughDay;
			level.Enemies.Clear();
			CloneEnemies(EnemyList, level.Enemies);
			level.OutsideEnemies.Clear();
			CloneEnemies(OutsideEnemyList, level.OutsideEnemies);
			level.DaytimeEnemies.Clear();
			CloneEnemies(DaytimeEnemyList, level.DaytimeEnemies);
		}

		private void CloneEnemies(List<SpawnableEnemyWithRarity> source, List<SpawnableEnemyWithRarity> destination)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: 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_0032: Expected O, but got Unknown
			foreach (SpawnableEnemyWithRarity item2 in source)
			{
				SpawnableEnemyWithRarity item = new SpawnableEnemyWithRarity
				{
					enemyType = item2.enemyType,
					rarity = item2.rarity
				};
				destination.Add(item);
			}
		}
	}
}
namespace HullBreakerCompany.Events
{
	public class ArachnophobiaEvent : HullEvent
	{
		public override string ID()
		{
			return "Arachnophobia";
		}

		public override int GetWeight()
		{
			return 20;
		}

		public override string GetDescription()
		{
			return "Increased chance of spider spawning";
		}

		public override string GetMessage()
		{
			return "<color=white>Possible habitat of spiders</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>ARACHNOPHOBIA</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(SandSpiderAI), 256);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class BabkinPogrebEvent : HullEvent
	{
		public override string ID()
		{
			return "BabkinPogreb";
		}

		public override int GetWeight()
		{
			return 10;
		}

		public override string GetDescription()
		{
			return "Only jars of pickles spawn on the moon";
		}

		public override string GetMessage()
		{
			return "<color=white>On the this moon, something strange happened with scrap...</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>ITEM MYSTERY</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			try
			{
				if ((Object)(object)HullManager.Instance == (Object)null)
				{
					Plugin.Mls.LogError((object)"HullManager.Instance is null");
					return;
				}
				if ((Object)(object)level == (Object)null)
				{
					Plugin.Mls.LogError((object)"level is null");
					return;
				}
				level.spawnableScrap.RemoveAll((SpawnableItemWithRarity item) => item.spawnableItem.itemName != "Jar of pickles");
				if (level.spawnableScrap.Count == 0)
				{
					Plugin.Mls.LogError((object)"No jars of pickles found in spawnableScrap list!");
					DelayedReturnList(level);
					return;
				}
				foreach (SpawnableItemWithRarity item in level.spawnableScrap.Where((SpawnableItemWithRarity item) => item.spawnableItem.itemName == "Jar of pickles"))
				{
					item.rarity = 100;
				}
				HullManager.Instance.ExecuteAfterDelay(delegate
				{
					DelayedReturnList(level);
				}, 12f);
				HullManager.SendChatEventMessage(this);
			}
			catch (ArgumentOutOfRangeException ex)
			{
				Plugin.Mls.LogError((object)("ArgumentOutOfRangeException caught in BabkinPogrebEvent.Execute: " + ex.Message));
			}
		}

		private void DelayedReturnList(SelectableLevel level)
		{
			Plugin.Mls.LogInfo((object)"Resetting spawnable items...");
			level.spawnableScrap.Clear();
			foreach (SpawnableItemWithRarity item in Plugin.NotModifiedSpawnableItemsWithRarity)
			{
				level.spawnableScrap.Add(item);
			}
		}
	}
	public class BeeEvent : HullEvent
	{
		public override string ID()
		{
			return "Bee";
		}

		public override int GetWeight()
		{
			return 30;
		}

		public override string GetDescription()
		{
			return "Increased chance of bee hives spawning";
		}

		public override string GetMessage()
		{
			return "<color=white>Possibly a large amount of bee hives</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>ANNOYING BUZZING</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			using (IEnumerator<SpawnableEnemyWithRarity> enumerator = level.DaytimeEnemies.Where((SpawnableEnemyWithRarity unit) => (Object)(object)unit.enemyType.enemyPrefab.GetComponent<RedLocustBees>() != (Object)null).GetEnumerator())
			{
				if (enumerator.MoveNext())
				{
					SpawnableEnemyWithRarity current = enumerator.Current;
					current.rarity = 256;
				}
			}
			HullManager.SendChatEventMessage(this);
		}
	}
	public class CustomEvent : HullEvent
	{
		private string _id;

		private int _weight;

		private string _message;

		private string _shortMessage;

		public List<string> EnemySpawnList = new List<string>();

		public List<string> OutsideSpawnList = new List<string>();

		public int Rarity = 1;

		public override string ID()
		{
			return _id;
		}

		public void SetID(string value)
		{
			_id = value;
		}

		public void SetWeight(int value)
		{
			_weight = value;
		}

		public override int GetWeight()
		{
			return _weight;
		}

		public void SetMessage(string value)
		{
			_message = value;
		}

		public void SetShortMessage(string value)
		{
			_shortMessage = value;
		}

		public override string GetMessage()
		{
			return _message;
		}

		public override string GetShortMessage()
		{
			return _shortMessage;
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> componentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			foreach (string item in EnemySpawnList.TakeWhile((string enemy) => enemy != "off"))
			{
				componentRarity.Add(Plugin.EnemyBase[item], Rarity);
			}
			foreach (string item2 in OutsideSpawnList.TakeWhile((string enemy) => enemy != "off"))
			{
				outsideComponentRarity.Add(Plugin.EnemyBase[item2], Rarity);
			}
			HullManager.SendChatEventMessage(Plugin.UseShortChatMessages ? GetShortMessage() : GetMessage());
		}
	}
	public class DevochkaPizdecEvent : HullEvent
	{
		public override string ID()
		{
			return "DevochkaPizdec";
		}

		public override int GetWeight()
		{
			return 5;
		}

		public override string GetDescription()
		{
			return "Increased chance of phantom girl spawn";
		}

		public override string GetMessage()
		{
			return "<color=white>A lot of workers are going crazy here</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>COTARD SYNDROME</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(DressGirlAI), 1024);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class EnemyBountyEvent : HullEvent
	{
		public override string ID()
		{
			return "EnemyBounty";
		}

		public override int GetWeight()
		{
			return 50;
		}

		public override string GetDescription()
		{
			return "Company pays money for killing the enemies / 60 per enemy";
		}

		public override string GetMessage()
		{
			return "<color=white>Company pays money for killing the enemies!</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>ENEMY BOUNTY</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			Plugin.BountyIsActive = true;
			HullManager.SendChatEventMessage(this);
		}
	}
	public class FlowerManEvent : HullEvent
	{
		public override string ID()
		{
			return "FlowerMan";
		}

		public override int GetWeight()
		{
			return 20;
		}

		public override string GetDescription()
		{
			return "Increased chance of flowerman spawn";
		}

		public override string GetMessage()
		{
			return "<color=white>So many eyes in the dark, carefully</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>WHITE EYES...</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(FlowermanAI), 256);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class HackedTurretsEvent : HullEvent
	{
		public override string ID()
		{
			return "HackedTurrets";
		}

		public override int GetWeight()
		{
			return 10;
		}

		public override string GetDescription()
		{
			return "Turrets dont work on the moon";
		}

		public override string GetMessage()
		{
			return "<color=white>The company's hackers have disabled all turrets on this moon, you can breathe easy</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>SYSTEM FAILURE</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			if ((Object)(object)HullManager.Instance == (Object)null)
			{
				Plugin.Mls.LogError((object)"HullManager.Instance is null");
				return;
			}
			if ((Object)(object)level == (Object)null)
			{
				Plugin.Mls.LogError((object)"level is null");
				return;
			}
			HullManager.Instance.ExecuteAfterDelay(delegate
			{
				HackTurrets();
			}, 16f);
			HullManager.SendChatEventMessage(this);
		}

		private void HackTurrets()
		{
			Turret[] array = Object.FindObjectsOfType<Turret>();
			Turret[] array2 = array;
			foreach (Turret val in array2)
			{
				val.ToggleTurretServerRpc(false);
			}
		}
	}
	public class HellEvent : HullEvent
	{
		public override string ID()
		{
			return "Hell";
		}

		public override int GetWeight()
		{
			return 1;
		}

		public override string GetDescription()
		{
			return "Increased chance of spawning Jester and more enemies";
		}

		public override string GetMessage()
		{
			return "<color=orange>It says here that there is total hell happening on the this moon</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>HELL</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(JesterAI), 64);
			HullManager.SendChatEventMessage(this);
			RoundManager.Instance.hourTimeBetweenEnemySpawnBatches = 1;
			HullManager.Instance.ExecuteAfterDelay(delegate
			{
				Hell();
			}, 16f);
		}

		private void Hell()
		{
			EnemyVent[] array = Object.FindObjectsOfType<EnemyVent>();
			for (int i = 0; i < 8; i++)
			{
				if (array.Length != 0)
				{
					EnemyVent val = array[Random.Range(0, array.Length)];
					RoundManager.Instance.SpawnEnemyFromVent(val);
				}
			}
		}
	}
	public class HoarderBugEvent : HullEvent
	{
		public override string ID()
		{
			return "HoarderBug";
		}

		public override int GetWeight()
		{
			return 50;
		}

		public override string GetDescription()
		{
			return "Increased chance of hoarder bug spawn";
		}

		public override string GetMessage()
		{
			return "<color=white>Keep an eye on the loot, Hoarding Bugs nearby</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>BUG INVASION</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(HoarderBugAI), 512);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class HullBreakEvent : HullEvent
	{
		public override string ID()
		{
			return "HullBreak";
		}

		public override int GetWeight()
		{
			return 7;
		}

		public override string GetDescription()
		{
			return "Getting money for visiting this moon";
		}

		public override string GetMessage()
		{
			return "<color=green>Take a break, the company is sending money for visiting the moon</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>TAKE A BREAK</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			HullManager.Instance.AddMoney(120);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class LandMineEvent : HullEvent
	{
		public override string ID()
		{
			return "LandMine";
		}

		public override int GetWeight()
		{
			return 30;
		}

		public override string GetDescription()
		{
			return "Increased chance of landmines spawning";
		}

		public override string GetMessage()
		{
			return "<color=white>Watch your step, there are a lot of landmines</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>LANDMINE</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			Plugin.LevelUnits(level, turret: false, landmine: true);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class LizardsEvent : HullEvent
	{
		public override string ID()
		{
			return "Lizards";
		}

		public override int GetWeight()
		{
			return 15;
		}

		public override string GetDescription()
		{
			return "Increased chance of puffers spawn";
		}

		public override string GetMessage()
		{
			return "<color=white>Horrible smell from toxic lizards</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>LIZARDSSS</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(PufferAI), 64);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class NothingEvent : HullEvent
	{
		public override string ID()
		{
			return "Nothing";
		}

		public override int GetWeight()
		{
			return 60;
		}

		public override string GetDescription()
		{
			return "Nothing happens";
		}

		public override string GetMessage()
		{
			return "<color=white>---</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>---</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			HullManager.SendChatEventMessage(this);
		}
	}
	public class OnAPowderKegEvent : HullEvent
	{
		public override string ID()
		{
			return "OnAPowderKeg";
		}

		public override int GetWeight()
		{
			return 10;
		}

		public override string GetDescription()
		{
			return "Landmines can detonate at any time";
		}

		public override string GetMessage()
		{
			return "<color=red>CAUTION,</color> <color=white>landmines can detonate at any time</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=red>ON A POWDER KEG</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			HullManager.Instance.ExecuteAfterDelay(delegate
			{
				DetonateLandMine();
			}, Random.Range(30, 680));
			HullManager.SendChatEventMessage(this);
		}

		private void DetonateLandMine()
		{
			Landmine[] array = Object.FindObjectsOfType<Landmine>();
			Landmine[] array2 = array;
			foreach (Landmine val in array2)
			{
				val.ExplodeMineServerRpc();
			}
		}
	}
	public class OneForAllEvent : HullEvent
	{
		public override string ID()
		{
			return "OneForAll";
		}

		public override int GetWeight()
		{
			return 5;
		}

		public override string GetDescription()
		{
			return "The ship will fly into orbit in an hour if one of the workers dies";
		}

		public override string GetMessage()
		{
			return "<color=white>The ship will fly into orbit in an hour if one of the workers dies</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=red>ONE FOR ALL!</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			Plugin.OneForAllIsActive = true;
			HullManager.SendChatEventMessage(this);
		}
	}
	public class OpenTheNoorEvent : HullEvent
	{
		public override string ID()
		{
			return "OpenTheNoor";
		}

		public override int GetWeight()
		{
			return 20;
		}

		public override string GetDescription()
		{
			return "All big doors are locked in the level";
		}

		public override string GetMessage()
		{
			return "<color=white>All big doors are locked in the level</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>OPEN THE NOOR...</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			if ((Object)(object)HullManager.Instance == (Object)null)
			{
				Plugin.Mls.LogError((object)"HullManager.Instance is null");
				return;
			}
			if ((Object)(object)level == (Object)null)
			{
				Plugin.Mls.LogError((object)"level is null");
				return;
			}
			HullManager.Instance.ExecuteAfterDelay(delegate
			{
				CloseBigDoors();
			}, 16f);
			HullManager.SendChatEventMessage(this);
		}

		private void CloseBigDoors()
		{
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				val.SetDoorOpenServerRpc(false);
			}
		}
	}
	public class OutSideEnemyDayEvent : HullEvent
	{
		public override string ID()
		{
			return "OutSideEnemyDay";
		}

		public override int GetWeight()
		{
			return 5;
		}

		public override string GetDescription()
		{
			return "Increased amount of enemies on the surface during the daytime";
		}

		public override string GetMessage()
		{
			return "<color=white>Increased amount of enemies on the surface during the daytime</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=red>SILENCE SEASON</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			level.outsideEnemySpawnChanceThroughDay = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, 512f)
			});
			HullManager.SendChatEventMessage(this);
		}
	}
	public class SlimeEvent : HullEvent
	{
		public override string ID()
		{
			return "Slime";
		}

		public override int GetWeight()
		{
			return 20;
		}

		public override string GetDescription()
		{
			return "Increased chance of slime spawn";
		}

		public override string GetMessage()
		{
			return "<color=white>Inhabited with slime</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>SO SLIMY</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(BlobAI), 48);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class SpringManEvent : HullEvent
	{
		public override string ID()
		{
			return "SpringMan";
		}

		public override int GetWeight()
		{
			return 10;
		}

		public override string GetDescription()
		{
			return "Increased chance of spring man spawning (coil-head)";
		}

		public override string GetMessage()
		{
			return "<color=white>It's impossible not to look at them</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>SKULL COILS</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			enemyComponentRarity.Add(typeof(SpringManAI), 128);
			HullManager.SendChatEventMessage(this);
		}
	}
	public class TurretEvent : HullEvent
	{
		public override string ID()
		{
			return "Turret";
		}

		public override int GetWeight()
		{
			return 5;
		}

		public override string GetDescription()
		{
			return "Increased chance of turrets spawning";
		}

		public override string GetMessage()
		{
			return "<color=white>Alert, turrets detected</color>";
		}

		public override string GetShortMessage()
		{
			return "<color=white>TURRETS</color>";
		}

		public override void Execute(SelectableLevel level, Dictionary<Type, int> enemyComponentRarity, Dictionary<Type, int> outsideComponentRarity)
		{
			Plugin.LevelUnits(level, turret: true);
			HullManager.SendChatEventMessage(this);
		}
	}
}

plugins/Verity-TooManySuits/TooManySuits.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("TooManySuits")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("TooManySuits")]
[assembly: AssemblyTitle("TooManySuits")]
[assembly: AssemblyVersion("1.0.0.0")]
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;
		}
	}
}
namespace TooManySuits
{
	public class LocalPlayer
	{
		public static PlayerControllerB localPlayer;

		public static bool isActive()
		{
			return (Object)(object)localPlayer != (Object)null;
		}

		public static void PlayerControllerStart(PlayerControllerB __instance)
		{
			if (NetworkManager.Singleton.LocalClientId == __instance.playerClientId)
			{
				localPlayer = __instance;
			}
		}
	}
	[BepInPlugin("verity.TooManySuits", "Too Many Suits", "1.0.3")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource LogSource;

		public static ConfigEntry<string> NextButton;

		public static ConfigEntry<string> BackButton;

		public static ConfigEntry<float> TextScale;

		private void Awake()
		{
			//IL_007c: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Expected O, but got Unknown
			LogSource = ((BaseUnityPlugin)this).Logger;
			NextButton = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Next-Page-Keybind", "<Keyboard>/n", "Next page button.");
			BackButton = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Back-Page-Keybind", "<Keyboard>/b", "Back page button.");
			TextScale = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Text-Scale", 0.003f, "Size of the text above the suit rack.");
			GameObject val = new GameObject("TooManySuits");
			val.AddComponent<PluginLoader>();
			((Object)val).hideFlags = (HideFlags)61;
			Object.DontDestroyOnLoad((Object)val);
		}
	}
	public class PluginLoader : MonoBehaviour
	{
		private class Hooks
		{
			public static bool SetUI;

			public static GameObject SuitPanel;

			public static void HookStartGame()
			{
				Object.Instantiate<GameObject>(suitSelectBundle.LoadAsset<GameObject>("SuitSelect"));
				SuitPanel = GameObject.Find("SuitPanel");
				SuitPanel.SetActive(false);
				SetUI = true;
			}
		}

		private readonly Harmony Harmony = new Harmony("TooManySuits");

		private InputAction moveRightAction;

		private InputAction moveLeftAction;

		private int currentPage;

		private const int suitsPerPage = 13;

		private int suitsLength;

		private UnlockableSuit[] allSuits;

		private static AssetBundle suitSelectBundle;

		private void Awake()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Expected O, but got Unknown
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Expected O, but got Unknown
			Plugin.LogSource.LogInfo((object)"TooManySuits Mod Loaded.");
			moveRightAction = new InputAction((string)null, (InputActionType)0, Plugin.NextButton.Value, (string)null, (string)null, (string)null);
			moveRightAction.performed += MoveRightAction;
			moveRightAction.Enable();
			moveLeftAction = new InputAction((string)null, (InputActionType)0, Plugin.BackButton.Value, (string)null, (string)null, (string)null);
			moveLeftAction.performed += MoveLeftAction;
			moveLeftAction.Enable();
			MethodInfo method = typeof(StartOfRound).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic);
			MethodInfo method2 = typeof(Hooks).GetMethod("HookStartGame");
			Harmony.Patch((MethodBase)method, new HarmonyMethod(method2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			MethodInfo method3 = typeof(PlayerControllerB).GetMethod("Start", BindingFlags.Instance | BindingFlags.NonPublic);
			MethodInfo method4 = typeof(LocalPlayer).GetMethod("PlayerControllerStart");
			Harmony.Patch((MethodBase)method3, (HarmonyMethod)null, new HarmonyMethod(method4), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			suitSelectBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "suitselect"));
		}

		private void Update()
		{
			if (!((Object)(object)StartOfRound.Instance == (Object)null))
			{
				allSuits = (from suit in Resources.FindObjectsOfTypeAll<UnlockableSuit>()
					orderby suit.syncedSuitID.Value
					select suit).ToArray();
				DisplaySuits();
			}
		}

		private void DisplaySuits()
		{
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			if (allSuits.Length == 0)
			{
				return;
			}
			int num = currentPage * 13;
			int num2 = Mathf.Min(num + 13, allSuits.Length);
			int num3 = 0;
			for (int i = 0; i < allSuits.Length; i++)
			{
				UnlockableSuit val = allSuits[i];
				AutoParentToShip component = ((Component)val).gameObject.GetComponent<AutoParentToShip>();
				if (!((Object)(object)component == (Object)null))
				{
					bool flag = i >= num && i < num2;
					((Component)val).gameObject.SetActive(flag);
					if (flag)
					{
						component.overrideOffset = true;
						component.positionOffset = new Vector3(-2.45f, 2.75f, -8.41f) + StartOfRound.Instance.rightmostSuitPosition.forward * (0.18f * (float)num3);
						component.rotationOffset = new Vector3(0f, 90f, 0f);
						num3++;
					}
				}
			}
			suitsLength = allSuits.Length;
			if (!LocalPlayer.isActive())
			{
				return;
			}
			if (LocalPlayer.localPlayer.isInHangarShipRoom)
			{
				((TMP_Text)Hooks.SuitPanel.GetComponentInChildren<TextMeshProUGUI>()).text = $"Page {currentPage + 1}/{suitsLength / 13 + 1}";
				Hooks.SuitPanel.SetActive(true);
				return;
			}
			Hooks.SuitPanel.SetActive(false);
			if (Hooks.SetUI)
			{
				Hooks.SetUI = false;
				Hooks.SuitPanel.GetComponentInParent<Canvas>().renderMode = (RenderMode)2;
				Hooks.SuitPanel.GetComponentInParent<Canvas>().worldCamera = LocalPlayer.localPlayer.gameplayCamera;
				Transform transform = Hooks.SuitPanel.transform;
				Bounds bounds = StartOfRound.Instance.shipBounds.bounds;
				transform.position = ((Bounds)(ref bounds)).center - new Vector3(2.8992f, 0.7998f, 2f);
				Hooks.SuitPanel.transform.rotation = Quaternion.Euler(0f, 180f, 0f);
				Hooks.SuitPanel.transform.localScale = new Vector3(Plugin.TextScale.Value, Plugin.TextScale.Value, Plugin.TextScale.Value);
				Hooks.SuitPanel.SetActive(true);
			}
		}

		private void MoveRightAction(CallbackContext obj)
		{
			currentPage = Mathf.Min(currentPage + 1, Mathf.CeilToInt((float)suitsLength / 13f) - 1);
		}

		private void MoveLeftAction(CallbackContext obj)
		{
			currentPage = Mathf.Max(currentPage - 1, 0);
		}
	}
}

plugins/x753-Mimics/Mimics.dll

Decompiled a year ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using DunGen;
using GameNetcodeStuff;
using HarmonyLib;
using LethalCompanyMimics.Properties;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Events;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Mimics")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("A mod that adds mimics to Lethal Company")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.1")]
[assembly: AssemblyProduct("Mimics")]
[assembly: AssemblyTitle("Mimics")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.1.0")]
[module: UnverifiableCode]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace LethalCompanyMimics.Properties
{
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	internal class Resources
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static ResourceManager ResourceManager
		{
			get
			{
				if (resourceMan == null)
				{
					ResourceManager resourceManager = new ResourceManager("LethalCompanyMimics.Properties.Resources", typeof(Resources).Assembly);
					resourceMan = resourceManager;
				}
				return resourceMan;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static CultureInfo Culture
		{
			get
			{
				return resourceCulture;
			}
			set
			{
				resourceCulture = value;
			}
		}

		internal static byte[] mimicdoor
		{
			get
			{
				object @object = ResourceManager.GetObject("mimicdoor", resourceCulture);
				return (byte[])@object;
			}
		}

		internal Resources()
		{
		}
	}
}
namespace Mimics
{
	[BepInPlugin("x753.Mimics", "Mimics", "1.1.1")]
	public class Mimics : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(GameNetworkManager))]
		internal class GameNetworkManagerPatch
		{
			[HarmonyPatch("Start")]
			[HarmonyPostfix]
			private static void StartPatch()
			{
				((Component)GameNetworkManager.Instance).GetComponent<NetworkManager>().AddNetworkPrefab(MimicNetworkerPrefab);
			}
		}

		[HarmonyPatch(typeof(RoundManager))]
		internal class RoundManagerPatch
		{
			[HarmonyPatch("SetExitIDs")]
			[HarmonyPostfix]
			private static void SetExitIDsPatch(ref RoundManager __instance, Vector3 mainEntrancePosition)
			{
				//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: 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_0118: Unknown result type (might be due to invalid IL or missing references)
				//IL_012b: Unknown result type (might be due to invalid IL or missing references)
				//IL_013f: 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_0154: 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_0167: Unknown result type (might be due to invalid IL or missing references)
				//IL_0173: Unknown result type (might be due to invalid IL or missing references)
				//IL_0499: Unknown result type (might be due to invalid IL or missing references)
				//IL_04aa: Unknown result type (might be due to invalid IL or missing references)
				//IL_04af: Unknown result type (might be due to invalid IL or missing references)
				//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
				//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_01f6: 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_0216: 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_0225: Unknown result type (might be due to invalid IL or missing references)
				//IL_022a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0230: 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)
				//IL_0241: Unknown result type (might be due to invalid IL or missing references)
				//IL_024b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0504: Unknown result type (might be due to invalid IL or missing references)
				//IL_052c: Unknown result type (might be due to invalid IL or missing references)
				//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_02de: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
				//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_05ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_06c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_06d1: Expected O, but got Unknown
				//IL_075c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0783: Unknown result type (might be due to invalid IL or missing references)
				//IL_07b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_07ef: Unknown result type (might be due to invalid IL or missing references)
				if (((NetworkBehaviour)__instance).IsServer && (Object)(object)MimicNetworker.Instance == (Object)null)
				{
					GameObject val = Object.Instantiate<GameObject>(MimicNetworkerPrefab);
					val.GetComponent<NetworkObject>().Spawn(true);
				}
				MimicDoor.allMimics = new List<MimicDoor>();
				int num = 0;
				Dungeon currentDungeon = __instance.dungeonGenerator.Generator.CurrentDungeon;
				List<Doorway> list = new List<Doorway>();
				Bounds val3 = default(Bounds);
				foreach (Tile allTile in currentDungeon.AllTiles)
				{
					foreach (Doorway unusedDoorway in allTile.UnusedDoorways)
					{
						if (unusedDoorway.HasDoorPrefabInstance || (Object)(object)((Component)unusedDoorway).GetComponentInChildren<SpawnSyncedObject>(true) == (Object)null)
						{
							continue;
						}
						GameObject gameObject = ((Component)((Component)((Component)unusedDoorway).GetComponentInChildren<SpawnSyncedObject>(true)).transform.parent).gameObject;
						if (!((Object)gameObject).name.StartsWith("AlleyExitDoorContainer") || gameObject.activeSelf)
						{
							continue;
						}
						bool flag = false;
						Matrix4x4 val2 = Matrix4x4.TRS(((Component)unusedDoorway).transform.position, ((Component)unusedDoorway).transform.rotation, new Vector3(1f, 1f, 1f));
						((Bounds)(ref val3))..ctor(new Vector3(0f, 1.5f, 5.5f), new Vector3(2f, 6f, 8f));
						((Bounds)(ref val3)).center = ((Matrix4x4)(ref val2)).MultiplyPoint3x4(((Bounds)(ref val3)).center);
						Collider[] array = Physics.OverlapBox(((Bounds)(ref val3)).center, ((Bounds)(ref val3)).extents, ((Component)unusedDoorway).transform.rotation, LayerMask.GetMask(new string[3] { "Room", "Railing", "MapHazards" }));
						Collider[] array2 = array;
						int num2 = 0;
						if (num2 < array2.Length)
						{
							Collider val4 = array2[num2];
							flag = true;
						}
						if (flag)
						{
							continue;
						}
						foreach (Tile allTile2 in currentDungeon.AllTiles)
						{
							if (!((Object)(object)allTile == (Object)(object)allTile2))
							{
								Vector3 origin = ((Component)unusedDoorway).transform.position + 5f * ((Component)unusedDoorway).transform.forward;
								Bounds val5 = UnityUtil.CalculateProxyBounds(((Component)allTile2).gameObject, true, Vector3.up);
								Ray val6 = default(Ray);
								((Ray)(ref val6)).origin = origin;
								((Ray)(ref val6)).direction = Vector3.up;
								if (((Bounds)(ref val5)).IntersectRay(val6) && (((Object)allTile2).name.Contains("Catwalk") || ((Object)allTile2).name.Contains("LargeForkTile") || ((Object)allTile2).name.Contains("4x4BigStair") || ((Object)allTile2).name.Contains("ElevatorConnector") || (((Object)allTile2).name.Contains("StartRoom") && !((Object)allTile2).name.Contains("Manor"))))
								{
									flag = true;
								}
								val6 = default(Ray);
								((Ray)(ref val6)).origin = origin;
								((Ray)(ref val6)).direction = Vector3.down;
								if (((Bounds)(ref val5)).IntersectRay(val6) && (((Object)allTile2).name.Contains("MediumRoomHallway1B") || ((Object)allTile2).name.Contains("LargeForkTile") || ((Object)allTile2).name.Contains("4x4BigStair") || ((Object)allTile2).name.Contains("ElevatorConnector") || ((Object)allTile2).name.Contains("StartRoom")))
								{
									flag = true;
								}
							}
						}
						if (!flag)
						{
							list.Add(unusedDoorway);
						}
					}
				}
				Shuffle(list, StartOfRound.Instance.randomMapSeed);
				List<Vector3> list2 = new List<Vector3>();
				foreach (Doorway item in list)
				{
					GameObject gameObject2 = ((Component)((Component)((Component)item).GetComponentInChildren<SpawnSyncedObject>(true)).transform.parent).gameObject;
					int num3 = 0;
					int num4 = 0;
					int[] spawnRates = SpawnRates;
					foreach (int num5 in spawnRates)
					{
						num4 += num5;
					}
					Random random = new Random(StartOfRound.Instance.randomMapSeed + 753);
					int num6 = random.Next(0, num4);
					int num7 = 0;
					for (int j = 0; j < SpawnRates.Length; j++)
					{
						if (num6 < SpawnRates[j] + num7)
						{
							num3 = j;
							break;
						}
						num7 += SpawnRates[j];
					}
					if (num3 == num && num3 != 6)
					{
						break;
					}
					bool flag2 = false;
					Vector3 val7 = ((Component)item).transform.position + 5f * ((Component)item).transform.forward;
					foreach (Vector3 item2 in list2)
					{
						if (Vector3.Distance(val7, item2) < 4f)
						{
							flag2 = true;
							break;
						}
					}
					if (flag2)
					{
						continue;
					}
					list2.Add(val7);
					GameObject val8 = Object.Instantiate<GameObject>(MimicPrefab, ((Component)item).transform);
					val8.transform.position = gameObject2.transform.position;
					MimicDoor component = val8.GetComponent<MimicDoor>();
					AudioSource[] componentsInChildren = val8.GetComponentsInChildren<AudioSource>(true);
					foreach (AudioSource val9 in componentsInChildren)
					{
						val9.outputAudioMixerGroup = StartOfRound.Instance.ship3DAudio.outputAudioMixerGroup;
					}
					MimicDoor.allMimics.Add(component);
					component.mimicIndex = num;
					num++;
					GameObject gameObject3 = ((Component)((Component)item).transform.GetChild(0)).gameObject;
					gameObject3.SetActive(false);
					Bounds bounds = ((Collider)component.frameBox).bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					bounds = ((Collider)component.frameBox).bounds;
					Collider[] array3 = Physics.OverlapBox(center, ((Bounds)(ref bounds)).extents, Quaternion.identity);
					foreach (Collider val10 in array3)
					{
						if (((Object)((Component)val10).gameObject).name.Contains("Shelf"))
						{
							((Component)val10).gameObject.SetActive(false);
						}
					}
					Light componentInChildren = gameObject2.GetComponentInChildren<Light>(true);
					((Component)componentInChildren).transform.parent.SetParent(val8.transform);
					MeshRenderer[] componentsInChildren2 = val8.GetComponentsInChildren<MeshRenderer>();
					MeshRenderer[] array4 = componentsInChildren2;
					foreach (MeshRenderer val11 in array4)
					{
						Material[] materials = ((Renderer)val11).materials;
						foreach (Material val12 in materials)
						{
							val12.shader = ((Renderer)gameObject3.GetComponentInChildren<MeshRenderer>(true)).material.shader;
							val12.renderQueue = ((Renderer)gameObject3.GetComponentInChildren<MeshRenderer>(true)).material.renderQueue;
						}
					}
					component.interactTrigger.onInteract = new InteractEvent();
					((UnityEvent<PlayerControllerB>)(object)component.interactTrigger.onInteract).AddListener((UnityAction<PlayerControllerB>)component.TouchMimic);
					if (!MimicPerfection)
					{
						Random random2 = new Random(StartOfRound.Instance.randomMapSeed + num);
						switch (random2.Next(0, DifficultyLevel))
						{
						case 0:
							((Renderer)val8.GetComponentsInChildren<MeshRenderer>()[0]).material.color = new Color(0.489f, 0.2415526f, 0.1479868f);
							((Renderer)val8.GetComponentsInChildren<MeshRenderer>()[1]).material.color = new Color(0.489f, 0.2415526f, 0.1479868f);
							break;
						case 1:
							((Component)((Component)componentInChildren).transform.parent).GetComponent<Renderer>().materials[1].color = new Color(0f, 0f, 0f);
							((Component)((Component)componentInChildren).transform.parent).GetComponent<Renderer>().materials[1].SetColor("_EmissiveColor", new Color(7.3772f, 0.4f, 0f));
							componentInChildren.colorTemperature += 1000f;
							break;
						case 2:
							component.interactTrigger.hoverTip = "Feed : [LMB]";
							component.interactTrigger.holdTip = "Feed : [LMB]";
							break;
						case 3:
							component.interactTrigger.hoverIcon = component.LostFingersIcon;
							break;
						case 4:
							component.interactTrigger.holdTip = "DIE : [LMB]";
							component.interactTrigger.timeToHold = 0.5f;
							break;
						case 5:
							component.interactTrigger.timeToHold = 1.7f;
							break;
						default:
							component.interactTrigger.hoverTip = "BUG, REPORT TO DEVELOPER";
							break;
						}
					}
				}
			}
		}

		private const string modGUID = "x753.Mimics";

		private const string modName = "Mimics";

		private const string modVersion = "1.1.1";

		private readonly Harmony harmony = new Harmony("x753.Mimics");

		private static Mimics Instance;

		public static GameObject MimicPrefab;

		public static GameObject MimicNetworkerPrefab;

		public static int[] SpawnRates;

		public static int DifficultyLevel;

		public static bool MimicPerfection;

		private void Awake()
		{
			AssetBundle val = AssetBundle.LoadFromMemory(Resources.mimicdoor);
			MimicPrefab = val.LoadAsset<GameObject>("Assets/MimicDoor.prefab");
			MimicNetworkerPrefab = val.LoadAsset<GameObject>("Assets/MimicNetworker.prefab");
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Mimics is loaded!");
			SpawnRates = new int[7]
			{
				((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rate", "Zero Mimics", 1, "Weight of zero mimics spawning").Value,
				((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rate", "One Mimic", 64, "Weight of one mimic spawning").Value,
				((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rate", "Two Mimics", 29, "Weight of two mimics spawning").Value,
				((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rate", "Three Mimics", 4, "Weight of three mimics spawning").Value,
				((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rate", "Four Mimics", 1, "Weight of four mimics spawning").Value,
				((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rate", "Five Mimics", 1, "Weight of five mimics spawning").Value,
				((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rate", "Maximum Mimics", 0, "Weight of maximum mimics spawning").Value
			};
			DifficultyLevel = ((BaseUnityPlugin)this).Config.Bind<int>("Difficulty", "Difficulty Level", 4, "How many different possibilities for imperfections should mimics have? Max 6. Anything lower than 5 is for cowards.").Value;
			if (DifficultyLevel < 1)
			{
				DifficultyLevel = 1;
			}
			if (DifficultyLevel > 6)
			{
				DifficultyLevel = 6;
			}
			MimicPerfection = ((BaseUnityPlugin)this).Config.Bind<bool>("Difficulty", "Perfect Mimics", false, "Select this if you want mimics to be identical to the real thing in every way. NOT RECOMMENDED.").Value;
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}

		public static void Shuffle<T>(IList<T> list, int seed)
		{
			Random random = new Random(seed);
			int num = list.Count;
			while (num > 1)
			{
				num--;
				int index = random.Next(num + 1);
				T value = list[index];
				list[index] = list[num];
				list[num] = value;
			}
		}
	}
	public class MimicNetworker : NetworkBehaviour
	{
		public static MimicNetworker Instance;

		private void Awake()
		{
			Instance = this;
		}

		public void MimicAttack(int playerId, int mimicIndex)
		{
			if (((NetworkBehaviour)this).IsOwner)
			{
				Instance.MimicAttackClientRpc(playerId, mimicIndex);
			}
			else
			{
				Instance.MimicAttackServerRpc(playerId, mimicIndex);
			}
		}

		[ClientRpc]
		public void MimicAttackClientRpc(int playerId, int mimicIndex)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: 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_0071: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2885019175u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					BytePacker.WriteValueBitPacked(val2, mimicIndex);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2885019175u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((MonoBehaviour)this).StartCoroutine(MimicDoor.allMimics[mimicIndex].Attack(playerId));
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MimicAttackServerRpc(int playerId, int mimicIndex)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: 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_0071: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1024971481u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					BytePacker.WriteValueBitPacked(val2, mimicIndex);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1024971481u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					Instance.MimicAttackClientRpc(playerId, mimicIndex);
				}
			}
		}

		protected override void __initializeVariables()
		{
			((NetworkBehaviour)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_MimicNetworker()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(2885019175u, new RpcReceiveHandler(__rpc_handler_2885019175));
			NetworkManager.__rpc_func_table.Add(1024971481u, new RpcReceiveHandler(__rpc_handler_1024971481));
		}

		private static void __rpc_handler_2885019175(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0043: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				int mimicIndex = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref mimicIndex);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((MimicNetworker)(object)target).MimicAttackClientRpc(playerId, mimicIndex);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1024971481(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0043: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				int mimicIndex = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref mimicIndex);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((MimicNetworker)(object)target).MimicAttackServerRpc(playerId, mimicIndex);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "MimicNetworker";
		}
	}
	public class MimicDoor : MonoBehaviour
	{
		public GameObject playerTarget;

		public BoxCollider frameBox;

		public Sprite LostFingersIcon;

		public Animator mimicAnimator;

		public GameObject grabPoint;

		public InteractTrigger interactTrigger;

		private bool attacking;

		public static List<MimicDoor> allMimics;

		public int mimicIndex;

		private void Awake()
		{
		}

		public void TouchMimic(PlayerControllerB player)
		{
			if (!attacking)
			{
				MimicNetworker.Instance.MimicAttack((int)player.playerClientId, mimicIndex);
			}
		}

		public IEnumerator Attack(int playerId)
		{
			attacking = true;
			interactTrigger.interactable = false;
			PlayerControllerB player = StartOfRound.Instance.allPlayerScripts[playerId];
			mimicAnimator.SetTrigger("Attack");
			playerTarget.transform.position = ((Component)player).transform.position;
			yield return (object)new WaitForSeconds(0.1f);
			playerTarget.transform.position = ((Component)player).transform.position;
			yield return (object)new WaitForSeconds(0.1f);
			playerTarget.transform.position = ((Component)player).transform.position;
			yield return (object)new WaitForSeconds(0.1f);
			playerTarget.transform.position = ((Component)player).transform.position;
			yield return (object)new WaitForSeconds(0.1f);
			float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)frameBox).transform.position);
			if (num < 8f)
			{
				HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
			}
			else if (num < 14f)
			{
				HUDManager.Instance.ShakeCamera((ScreenShakeType)0);
			}
			yield return (object)new WaitForSeconds(0.2f);
			if (((NetworkBehaviour)player).IsOwner && Vector3.Distance(((Component)player).transform.position, ((Component)this).transform.position) < 30f)
			{
				player.KillPlayer(Vector3.zero, true, (CauseOfDeath)0, 0);
			}
			float startTime = Time.timeSinceLevelLoad;
			yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)player.deadBody != (Object)null || Time.timeSinceLevelLoad - startTime > 4f));
			if ((Object)(object)player.deadBody != (Object)null)
			{
				player.deadBody.attachedTo = grabPoint.transform;
				player.deadBody.attachedLimb = player.deadBody.bodyParts[5];
				player.deadBody.matchPositionExactly = true;
				for (int i = 0; i < player.deadBody.bodyParts.Length; i++)
				{
					((Component)player.deadBody.bodyParts[i]).GetComponent<Collider>().excludeLayers = LayerMask.op_Implicit(-1);
				}
			}
			yield return (object)new WaitForSeconds(2f);
			if ((Object)(object)player.deadBody != (Object)null)
			{
				player.deadBody.attachedTo = null;
				player.deadBody.attachedLimb = null;
				player.deadBody.matchPositionExactly = false;
				((Component)((Component)player.deadBody).transform.GetChild(0)).gameObject.SetActive(false);
				player.deadBody = null;
			}
			yield return (object)new WaitForSeconds(4.5f);
			attacking = false;
			interactTrigger.interactable = true;
		}
	}
}

plugins/x753-More_Suits/MoreSuits.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 HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("MoreSuits")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("A mod that adds more suit options to Lethal Company")]
[assembly: AssemblyFileVersion("1.3.3.0")]
[assembly: AssemblyInformationalVersion("1.3.3")]
[assembly: AssemblyProduct("MoreSuits")]
[assembly: AssemblyTitle("MoreSuits")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.3.3.0")]
[module: UnverifiableCode]
namespace MoreSuits;

[BepInPlugin("x753.More_Suits", "More Suits", "1.3.3")]
public class MoreSuitsMod : BaseUnityPlugin
{
	[HarmonyPatch(typeof(StartOfRound))]
	internal class StartOfRoundPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPrefix]
		private static void StartPatch(ref StartOfRound __instance)
		{
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039f: Expected O, but got Unknown
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Expected O, but got Unknown
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (SuitsAdded)
				{
					return;
				}
				for (int i = 0; i < __instance.unlockablesList.unlockables.Count; i++)
				{
					UnlockableItem val = __instance.unlockablesList.unlockables[i];
					if (!((Object)(object)val.suitMaterial != (Object)null) || !val.alreadyUnlocked)
					{
						continue;
					}
					List<string> list = Directory.GetDirectories(Paths.PluginPath, "moresuits", SearchOption.AllDirectories).ToList();
					List<string> list2 = new List<string>();
					List<string> list3 = DisabledSuits.Value.ToLower().Replace(".png", "").Split(',')
						.ToList();
					List<string> list4 = new List<string>();
					if (!LoadAllSuits.Value)
					{
						foreach (string item in list)
						{
							if (File.Exists(Path.Combine(item, "!less-suits.txt")))
							{
								string[] collection = new string[9] { "glow", "kirby", "knuckles", "luigi", "mario", "minion", "skeleton", "slayer", "smile" };
								list4.AddRange(collection);
								break;
							}
						}
					}
					foreach (string item2 in list)
					{
						if (item2 != "")
						{
							string[] files = Directory.GetFiles(item2, "*.png");
							list2.AddRange(files);
						}
					}
					list2.Sort();
					foreach (string item3 in list2)
					{
						if (list3.Contains(Path.GetFileNameWithoutExtension(item3).ToLower()))
						{
							continue;
						}
						string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
						if (list4.Contains(Path.GetFileNameWithoutExtension(item3).ToLower()) && item3.Contains(directoryName))
						{
							continue;
						}
						UnlockableItem val2;
						Material val3;
						if (Path.GetFileNameWithoutExtension(item3).ToLower() == "default")
						{
							val2 = val;
							val3 = val2.suitMaterial;
						}
						else
						{
							val2 = JsonUtility.FromJson<UnlockableItem>(JsonUtility.ToJson((object)val));
							val3 = Object.Instantiate<Material>(val2.suitMaterial);
						}
						byte[] array = File.ReadAllBytes(item3);
						Texture2D val4 = new Texture2D(2, 2);
						ImageConversion.LoadImage(val4, array);
						val3.mainTexture = (Texture)(object)val4;
						val2.unlockableName = Path.GetFileNameWithoutExtension(item3);
						try
						{
							string path = Path.Combine(Path.GetDirectoryName(item3), "advanced", val2.unlockableName + ".json");
							if (File.Exists(path))
							{
								string[] array2 = File.ReadAllLines(path);
								for (int j = 0; j < array2.Length; j++)
								{
									string[] array3 = array2[j].Trim().Split(':');
									if (array3.Length != 2)
									{
										continue;
									}
									string text = array3[0].Trim('"', ' ', ',');
									string text2 = array3[1].Trim('"', ' ', ',');
									float result2;
									Vector4 vector;
									if (text == "PRICE" && int.TryParse(text2, out var result))
									{
										try
										{
											AddToRotatingShop(val2, result, __instance.unlockablesList.unlockables.Count);
										}
										catch (Exception ex)
										{
											Debug.Log((object)("Something went wrong with More Suits! Could not add a suit to the rotating shop. Error: " + ex));
										}
									}
									else if (text2 == "KEYWORD")
									{
										val3.EnableKeyword(text);
									}
									else if (text2.Contains(".png"))
									{
										byte[] array4 = File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(item3), "advanced", text2));
										Texture2D val5 = new Texture2D(2, 2);
										ImageConversion.LoadImage(val5, array4);
										val3.SetTexture(text, (Texture)(object)val5);
									}
									else if (float.TryParse(text2, out result2))
									{
										val3.SetFloat(text, result2);
									}
									else if (TryParseVector4(text2, out vector))
									{
										val3.SetVector(text, vector);
									}
								}
							}
						}
						catch (Exception ex2)
						{
							Debug.Log((object)("Something went wrong with More Suits! Error: " + ex2));
						}
						val2.suitMaterial = val3;
						if (val2.unlockableName.ToLower() != "default")
						{
							__instance.unlockablesList.unlockables.Add(val2);
						}
					}
					SuitsAdded = true;
					break;
				}
			}
			catch (Exception ex3)
			{
				Debug.Log((object)("Something went wrong with More Suits! Error: " + ex3));
			}
		}

		[HarmonyPatch("PositionSuitsOnRack")]
		[HarmonyPrefix]
		private static bool PositionSuitsOnRackPatch(ref StartOfRound __instance)
		{
			//IL_0065: 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_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_008c: 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_00a5: Unknown result type (might be due to invalid IL or missing references)
			List<UnlockableSuit> list = (from suit in Object.FindObjectsOfType<UnlockableSuit>().ToList()
				orderby suit.syncedSuitID.Value
				select suit).ToList();
			int num = 0;
			foreach (UnlockableSuit item in list)
			{
				AutoParentToShip component = ((Component)item).gameObject.GetComponent<AutoParentToShip>();
				component.overrideOffset = true;
				component.positionOffset = new Vector3(-2.45f, 2.75f, -8.41f) + __instance.rightmostSuitPosition.forward * 0.18f * (float)num;
				component.rotationOffset = new Vector3(0f, 90f, 0f);
				num++;
			}
			return false;
		}
	}

	private const string modGUID = "x753.More_Suits";

	private const string modName = "More Suits";

	private const string modVersion = "1.3.3";

	private readonly Harmony harmony = new Harmony("x753.More_Suits");

	private static MoreSuitsMod Instance;

	public static bool SuitsAdded;

	public static ConfigEntry<string> DisabledSuits;

	public static ConfigEntry<bool> LoadAllSuits;

	private static TerminalNode cancelPurchase;

	private static TerminalKeyword buyKeyword;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		DisabledSuits = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Disabled Suit List", "UglySuit751.png,UglySuit752.png,UglySuit753.png", "Comma-separated list of suits that shouldn't be loaded");
		LoadAllSuits = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Ignore !less-suits.txt", false, "If true, ignores the !less-suits.txt file and will attempt to load every suit, except those in the disabled list. This should be true if you're not worried about having too many suits.");
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin More Suits is loaded!");
	}

	private static void AddToRotatingShop(UnlockableItem newSuit, int price, int unlockableID)
	{
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Expected O, but got Unknown
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b7: Expected O, but got Unknown
		//IL_027b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0282: Expected O, but got Unknown
		Terminal val = Object.FindObjectOfType<Terminal>();
		for (int i = 0; i < val.terminalNodes.allKeywords.Length; i++)
		{
			if (((Object)val.terminalNodes.allKeywords[i]).name == "Buy")
			{
				buyKeyword = val.terminalNodes.allKeywords[i];
				break;
			}
		}
		newSuit.alreadyUnlocked = false;
		newSuit.shopSelectionNode = ScriptableObject.CreateInstance<TerminalNode>();
		((Object)newSuit.shopSelectionNode).name = newSuit.unlockableName + "SuitBuy1";
		newSuit.shopSelectionNode.creatureName = newSuit.unlockableName + " suit";
		newSuit.shopSelectionNode.displayText = "You have requested to order " + newSuit.unlockableName + " suits.\nTotal cost of item: [totalCost].\n\nPlease CONFIRM or DENY.\n\n";
		newSuit.shopSelectionNode.clearPreviousText = true;
		newSuit.shopSelectionNode.shipUnlockableID = unlockableID;
		newSuit.shopSelectionNode.itemCost = price;
		newSuit.shopSelectionNode.overrideOptions = true;
		CompatibleNoun val2 = new CompatibleNoun();
		val2.noun = ScriptableObject.CreateInstance<TerminalKeyword>();
		val2.noun.word = "confirm";
		val2.noun.isVerb = true;
		val2.result = ScriptableObject.CreateInstance<TerminalNode>();
		((Object)val2.result).name = newSuit.unlockableName + "SuitBuyConfirm";
		val2.result.creatureName = "";
		val2.result.displayText = "Ordered " + newSuit.unlockableName + " suits! Your new balance is [playerCredits].\n\n";
		val2.result.clearPreviousText = true;
		val2.result.shipUnlockableID = unlockableID;
		val2.result.buyUnlockable = true;
		val2.result.itemCost = price;
		val2.result.terminalEvent = "";
		CompatibleNoun val3 = new CompatibleNoun();
		val3.noun = ScriptableObject.CreateInstance<TerminalKeyword>();
		val3.noun.word = "deny";
		val3.noun.isVerb = true;
		if ((Object)(object)cancelPurchase == (Object)null)
		{
			cancelPurchase = ScriptableObject.CreateInstance<TerminalNode>();
		}
		val3.result = cancelPurchase;
		((Object)val3.result).name = "MoreSuitsCancelPurchase";
		val3.result.displayText = "Cancelled order.\n";
		newSuit.shopSelectionNode.terminalOptions = (CompatibleNoun[])(object)new CompatibleNoun[2] { val2, val3 };
		TerminalKeyword val4 = ScriptableObject.CreateInstance<TerminalKeyword>();
		((Object)val4).name = newSuit.unlockableName + "Suit";
		val4.word = newSuit.unlockableName.ToLower() + " suit";
		val4.defaultVerb = buyKeyword;
		CompatibleNoun val5 = new CompatibleNoun();
		val5.noun = val4;
		val5.result = newSuit.shopSelectionNode;
		List<CompatibleNoun> list = buyKeyword.compatibleNouns.ToList();
		list.Add(val5);
		buyKeyword.compatibleNouns = list.ToArray();
		List<TerminalKeyword> list2 = val.terminalNodes.allKeywords.ToList();
		list2.Add(val4);
		list2.Add(val2.noun);
		list2.Add(val3.noun);
		val.terminalNodes.allKeywords = list2.ToArray();
	}

	public static bool TryParseVector4(string input, out Vector4 vector)
	{
		//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_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		vector = Vector4.zero;
		string[] array = input.Split(',');
		if (array.Length == 4 && float.TryParse(array[0], out var result) && float.TryParse(array[1], out var result2) && float.TryParse(array[2], out var result3) && float.TryParse(array[3], out var result4))
		{
			vector = new Vector4(result, result2, result3, result4);
			return true;
		}
		return false;
	}
}

plugins/xCeezy-LethalEscape/LethalEscape/LethalEscape.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 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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LethalEscape")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A template for Lethal Company")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LethalEscape")]
[assembly: AssemblyTitle("LethalEscape")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LethalEscape
{
	[BepInPlugin("xCeezy.LethalEscape", "Lethal Escape", "0.5")]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "xCeezy.LethalEscape";

		private const string modName = "Lethal Escape";

		private const string modVersion = "0.5";

		private Harmony _harmony = new Harmony("LethalEscape");

		public static ManualLogSource mls;

		public static float TimeStartTeleport;

		public static ConfigEntry<bool> CanThumperEscape;

		public static ConfigEntry<bool> CanBrackenEscape;

		public static ConfigEntry<bool> CanJesterEscape;

		public static ConfigEntry<bool> CanHoardingBugEscape;

		public static ConfigEntry<bool> CanCoilHeadEscape;

		private void Awake()
		{
			CanThumperEscape = ((BaseUnityPlugin)this).Config.Bind<bool>("Can Monster Escape", "ThumperEscape", true, "Whether or not the Thumper can escape");
			CanBrackenEscape = ((BaseUnityPlugin)this).Config.Bind<bool>("Can Monster Escape", "BrackenEscape", true, "Whether or not the Bracken can escape");
			CanJesterEscape = ((BaseUnityPlugin)this).Config.Bind<bool>("Can Monster Escape", "JesterEscape", true, "Whether or not the Jester can escape");
			CanHoardingBugEscape = ((BaseUnityPlugin)this).Config.Bind<bool>("Can Monster Escape", "HoardingBugEscape", true, "Whether or not the Hoarding Bugs can escape");
			CanCoilHeadEscape = ((BaseUnityPlugin)this).Config.Bind<bool>("Can Monster Escape", "CoilHeadEscape", true, "Whether or not Coil Head can escape");
			mls = Logger.CreateLogSource("GameMaster");
			mls.LogInfo((object)"Loaded xCeezy.LethalEscape. Patching.");
			_harmony.PatchAll(typeof(Plugin));
		}

		[HarmonyPatch(typeof(CrawlerAI), "Start")]
		[HarmonyPrefix]
		private static void CrawlerLEPrefixStart(CrawlerAI __instance)
		{
			((EnemyAI)__instance).enemyType.isOutsideEnemy = false;
		}

		[HarmonyPatch(typeof(CrawlerAI), "Update")]
		[HarmonyPrefix]
		private static void CrawlerLEPrefixAI(CrawlerAI __instance)
		{
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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)
			if (!CanThumperEscape.Value)
			{
				return;
			}
			if (!((EnemyAI)__instance).enemyType.isOutsideEnemy)
			{
				if (Math.Round((double)Time.time / 0.01) * 0.01 / 5.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 5.0))
				{
					Transform val = ((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0);
					if (Vector3.Magnitude(val.position - ((Component)__instance).transform.position) > 50f)
					{
						Debug.Log((object)":Lethal Escape: FAILSAFE ACTIVATED AI STATE IS INSIDE BUT THEY ARE OUTSIDE POTENTIALLY?!?!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
						SendEnemyOutside((EnemyAI)(object)__instance);
					}
				}
				if (((EnemyAI)__instance).currentBehaviourStateIndex != 0 && __instance.noticePlayerTimer < -5f && (Object)(object)((EnemyAI)__instance).targetPlayer != (Object)null && !((EnemyAI)__instance).targetPlayer.isInsideFactory)
				{
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
			else if (Math.Round((double)Time.time / 0.01) * 0.01 / 10.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 10.0))
			{
				((EnemyAI)__instance).allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode");
				if (Vector3.Magnitude(((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0).position - ((Component)__instance).transform.position) > 50f)
				{
					Debug.Log((object)":Lethal Escape: AI IS OUTSIDE TYPE BUT IS STILL STUCK IN FACILITY SETTING OUTSIDE!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
		}

		[HarmonyPatch(typeof(JesterAI), "Start")]
		[HarmonyPrefix]
		private static void JesterLEPrefixStart(JesterAI __instance)
		{
			((EnemyAI)__instance).enemyType.isOutsideEnemy = false;
		}

		[HarmonyPatch(typeof(JesterAI), "Update")]
		[HarmonyPrefix]
		private static void JesterLEPrefixAI(JesterAI __instance)
		{
			//IL_020f: 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_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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)
			if (!CanJesterEscape.Value)
			{
				return;
			}
			if (!((EnemyAI)__instance).enemyType.isOutsideEnemy)
			{
				if (Math.Round((double)Time.time / 0.01) * 0.01 / 5.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 5.0))
				{
					Transform val = ((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0);
					if (Vector3.Magnitude(val.position - ((Component)__instance).transform.position) > 50f)
					{
						Debug.Log((object)":Lethal Escape: FAILSAFE ACTIVATED AI STATE IS INSIDE BUT THEY ARE OUTSIDE POTENTIALLY?!?!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
						SendEnemyOutside((EnemyAI)(object)__instance);
					}
				}
				if (((EnemyAI)__instance).currentBehaviourStateIndex == 2)
				{
					if (((EnemyAI)__instance).agent.speed == 0f && ((EnemyAI)__instance).stunNormalizedTimer <= 0f && (Object)(object)((EnemyAI)__instance).targetPlayer != (Object)null && !((EnemyAI)__instance).targetPlayer.isInsideFactory)
					{
						__instance.popUpTimer = -4f;
					}
					if (!((EnemyAI)__instance).enemyType.isOutsideEnemy && __instance.popUpTimer == -4f && ((Object)(object)((EnemyAI)__instance).targetPlayer == (Object)null || !((EnemyAI)__instance).targetPlayer.isInsideFactory))
					{
						((EnemyAI)__instance).currentBehaviourStateIndex = 0;
						SendEnemyOutside((EnemyAI)(object)__instance);
					}
				}
			}
			else if (Math.Round((double)Time.time / 0.01) * 0.01 / 10.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 10.0))
			{
				((EnemyAI)__instance).allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode");
				if (Vector3.Magnitude(((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0).position - ((Component)__instance).transform.position) > 50f)
				{
					Debug.Log((object)":Lethal Escape: AI IS OUTSIDE TYPE BUT IS STILL STUCK IN FACILITY SETTING OUTSIDE!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
		}

		[HarmonyPatch(typeof(FlowermanAI), "Start")]
		[HarmonyPrefix]
		private static void FlowermanAILEPrefixStart(FlowermanAI __instance)
		{
			TimeStartTeleport = 0f;
			((EnemyAI)__instance).enemyType.isOutsideEnemy = false;
		}

		[HarmonyPatch(typeof(FlowermanAI), "Update")]
		[HarmonyPrefix]
		private static void FlowermanAILEPrefixAI(FlowermanAI __instance)
		{
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: 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)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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)
			if (!CanBrackenEscape.Value)
			{
				return;
			}
			if (!((EnemyAI)__instance).enemyType.isOutsideEnemy)
			{
				if (Math.Round((double)Time.time / 0.01) * 0.01 / 5.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 5.0))
				{
					Transform val = ((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0);
					if (Vector3.Magnitude(val.position - ((Component)__instance).transform.position) > 50f)
					{
						Debug.Log((object)":Lethal Escape: FAILSAFE ACTIVATED AI STATE IS INSIDE BUT THEY ARE OUTSIDE POTENTIALLY?!?!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
						SendEnemyOutside((EnemyAI)(object)__instance);
					}
				}
				if ((Object)(object)((EnemyAI)__instance).targetPlayer != (Object)null && !((EnemyAI)__instance).targetPlayer.isInsideFactory && (((EnemyAI)__instance).currentBehaviourStateIndex == 1 || __instance.evadeStealthTimer > 0f) && Time.time - TimeStartTeleport >= 10f)
				{
					TimeStartTeleport = Time.time;
				}
				if (Time.time - TimeStartTeleport > 5f && Time.time - TimeStartTeleport < 10f)
				{
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
			else if (Math.Round((double)Time.time / 0.01) * 0.01 / 10.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 10.0))
			{
				((EnemyAI)__instance).allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode");
				if (Vector3.Magnitude(((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0).position - ((Component)__instance).transform.position) > 50f)
				{
					Debug.Log((object)":Lethal Escape: AI IS OUTSIDE TYPE BUT IS STILL STUCK IN FACILITY SETTING OUTSIDE!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
		}

		[HarmonyPatch(typeof(HoarderBugAI), "Start")]
		[HarmonyPrefix]
		private static void HoarderBugAILEPrefixStart(HoarderBugAI __instance)
		{
			((EnemyAI)__instance).enemyType.isOutsideEnemy = false;
		}

		[HarmonyPatch(typeof(HoarderBugAI), "Update")]
		[HarmonyPrefix]
		private static void HoardingBugAILEPrefixAI(HoarderBugAI __instance)
		{
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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)
			if (!CanHoardingBugEscape.Value)
			{
				return;
			}
			if (!((EnemyAI)__instance).enemyType.isOutsideEnemy)
			{
				if (Math.Round((double)Time.time / 0.01) * 0.01 / 5.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 5.0))
				{
					Transform val = ((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0);
					if (Vector3.Magnitude(val.position - ((Component)__instance).transform.position) > 50f)
					{
						Debug.Log((object)":Lethal Escape: FAILSAFE ACTIVATED AI STATE IS INSIDE BUT THEY ARE OUTSIDE POTENTIALLY?!?!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
						SendEnemyOutside((EnemyAI)(object)__instance);
					}
				}
				if ((Object)(object)((EnemyAI)__instance).targetPlayer != (Object)null && !((EnemyAI)__instance).targetPlayer.isInsideFactory && __instance.searchForPlayer.inProgress)
				{
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
			else if (Math.Round((double)Time.time / 0.01) * 0.01 / 10.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 10.0))
			{
				((EnemyAI)__instance).allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode");
				if (Vector3.Magnitude(((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0).position - ((Component)__instance).transform.position) > 50f)
				{
					Debug.Log((object)":Lethal Escape: AI IS OUTSIDE TYPE BUT IS STILL STUCK IN FACILITY SETTING OUTSIDE!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
		}

		[HarmonyPatch(typeof(EnemyAI), "Start")]
		[HarmonyPrefix]
		private static void CoilHeadAILEPrefixAIStart(EnemyAI __instance)
		{
			if (((object)__instance).GetType().ToString() == "SpringManAI")
			{
				__instance.enemyType.isOutsideEnemy = false;
			}
		}

		[HarmonyPatch(typeof(SpringManAI), "Update")]
		[HarmonyPrefix]
		private static void CoilHeadAILEPrefixAI(SpringManAI __instance)
		{
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: 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_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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)
			if (!CanCoilHeadEscape.Value)
			{
				return;
			}
			if (!((EnemyAI)__instance).enemyType.isOutsideEnemy)
			{
				if (Math.Round((double)Time.time / 0.01) * 0.01 / 5.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 5.0))
				{
					Transform val = ((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0);
					if (Vector3.Magnitude(val.position - ((Component)__instance).transform.position) > 50f)
					{
						Debug.Log((object)":Lethal Escape: FAILSAFE ACTIVATED AI STATE IS INSIDE BUT THEY ARE OUTSIDE POTENTIALLY?!?!!!!!!!!!!!!!!!!!!!!!!///////////////////////////////////////////////////////////////");
						SendEnemyOutside((EnemyAI)(object)__instance);
					}
				}
				if ((Object)(object)((EnemyAI)__instance).targetPlayer != (Object)null && !((EnemyAI)__instance).targetPlayer.isInsideFactory)
				{
					SendEnemyOutside((EnemyAI)(object)__instance, SpawnOnDoor: false);
				}
			}
			else if (Math.Round((double)Time.time / 0.01) * 0.01 / 10.0 == Math.Round(Math.Round((double)Time.time / 0.01) * 0.01 / 10.0))
			{
				((EnemyAI)__instance).allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode");
				if (Vector3.Magnitude(((EnemyAI)__instance).ChooseClosestNodeToPosition(((Component)__instance).transform.position, false, 0).position - ((Component)__instance).transform.position) > 50f)
				{
					SendEnemyOutside((EnemyAI)(object)__instance);
				}
			}
		}

		public static void SendEnemyInside(EnemyAI __instance)
		{
			//IL_006e: 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_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_00c5: 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_00a1: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			__instance.enemyType.isOutsideEnemy = false;
			__instance.allAINodes = GameObject.FindGameObjectsWithTag("AINode");
			EntranceTeleport[] array = Object.FindObjectsOfType<EntranceTeleport>(false);
			for (int i = 0; i < array.Length; i++)
			{
				if (array[i].entranceId == 0 && !array[i].isEntranceToBuilding)
				{
					__instance.serverPosition = array[i].entrancePoint.position;
					break;
				}
			}
			Transform val = __instance.ChooseClosestNodeToPosition(__instance.serverPosition, false, 0);
			if (Vector3.Magnitude(val.position - __instance.serverPosition) > 10f)
			{
				__instance.serverPosition = val.position;
				((Component)__instance).transform.position = __instance.serverPosition;
			}
			((Component)__instance).transform.position = __instance.serverPosition;
			__instance.agent.Warp(__instance.serverPosition);
			__instance.SyncPositionToClients();
		}

		public static void SendEnemyOutside(EnemyAI __instance, bool SpawnOnDoor = true)
		{
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: 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)
			//IL_012e: 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_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_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: 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_0154: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			__instance.enemyType.isOutsideEnemy = true;
			__instance.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode");
			EntranceTeleport[] array = Object.FindObjectsOfType<EntranceTeleport>(false);
			float num = 999f;
			for (int i = 0; i < array.Length; i++)
			{
				if (!array[i].isEntranceToBuilding)
				{
					continue;
				}
				for (int j = 0; j < StartOfRound.Instance.connectedPlayersAmount + 1; j++)
				{
					if (!StartOfRound.Instance.allPlayerScripts[j].isInsideFactory & (Vector3.Magnitude(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position - array[i].entrancePoint.position) < num))
					{
						num = Vector3.Magnitude(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position - array[i].entrancePoint.position);
						__instance.serverPosition = array[i].entrancePoint.position;
					}
				}
			}
			Transform val = __instance.ChooseClosestNodeToPosition(__instance.serverPosition, false, 0);
			if (Vector3.Magnitude(val.position - __instance.serverPosition) > 10f || !SpawnOnDoor)
			{
				__instance.serverPosition = val.position;
				((Component)__instance).transform.position = __instance.serverPosition;
			}
			((Component)__instance).transform.position = __instance.serverPosition;
			__instance.agent.Warp(__instance.serverPosition);
			__instance.SyncPositionToClients();
			if ((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null)
			{
				__instance.EnableEnemyMesh(!StartOfRound.Instance.hangarDoorsClosed || !GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom, false);
			}
		}
	}
}