Decompiled source of CursedDLLs v1.6.2

plugins/Cursed.BetterBipods.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using FistVR;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.BetterBipods;

[BepInPlugin("dll.cursed.betterbipods", "CursedDlls - Better Bipods", "1.6")]
public class BetterBipodsPlugin : BaseUnityPlugin
{
	private static ConfigEntry<bool> _pluginEnabled;

	private void Awake()
	{
		_pluginEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PluginEnabled", false, "Enables BetterBipods. With BetterBipods, bipods will have balanced recoil, more rearward than upward.");
		if (_pluginEnabled.Value)
		{
			Harmony.CreateAndPatchAll(typeof(BetterBipodsPlugin), (string)null);
		}
	}

	[HarmonyPatch(typeof(FVRFireArmBipod), "UpdateBipod")]
	[HarmonyPrefix]
	public static void RemoveBipodRecoil(ref float ___RecoilDamping)
	{
		___RecoilDamping = 0f;
	}

	[HarmonyPatch(typeof(FVRFireArmBipod), "UpdateBipod")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> RemoveBipodUpRecoil(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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_0022: Expected O, but got Unknown
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Expected O, but got Unknown
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Expected O, but got Unknown
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Expected O, but got Unknown
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(true, (CodeMatch[])(object)new CodeMatch[3]
		{
			new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null),
			new CodeMatch((OpCode?)OpCodes.Call, (object)AccessTools.Method(typeof(Vector3), "Distance", (Type[])null, (Type[])null), (string)null),
			new CodeMatch((OpCode?)OpCodes.Stloc_S, (object)null, (string)null)
		}).Insert((CodeInstruction[])(object)new CodeInstruction[2]
		{
			new CodeInstruction(OpCodes.Pop, (object)null),
			new CodeInstruction(OpCodes.Ldc_R4, (object)0f)
		}).InstructionEnumeration();
	}
}

plugins/Cursed.FullAuto.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using FistVR;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.FullAuto;

[BepInPlugin("dll.cursed.fullauto", "CursedDlls - Full Auto", "1.6")]
public class FullAutoPlugin : BaseUnityPlugin
{
	private static readonly FastInvokeHandler UpdateSafetyPos = MethodInvoker.GetHandler(AccessTools.Method(typeof(Handgun), "UpdateSafetyPos", (Type[])null, (Type[])null), false);

	private static ConfigEntry<bool> _pluginEnabled;

	private void Awake()
	{
		_pluginEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PluginEnabled", false, "Enables FullAuto. FullAuto makes all closed bolt rifles and handguns have a full auto safety setting.");
		if (_pluginEnabled.Value)
		{
			Harmony.CreateAndPatchAll(typeof(FullAutoPlugin), (string)null);
		}
	}

	[HarmonyPatch(typeof(ClosedBoltWeapon), "Awake")]
	[HarmonyPostfix]
	public static void PostAwake(ClosedBoltWeapon __instance)
	{
		//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_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_006c: Expected O, but got Unknown
		if (__instance.FireSelector_Modes.Length != 0 && !__instance.FireSelector_Modes.Any((FireSelectorMode t) => (int)t.ModeType == 3))
		{
			List<FireSelectorMode> list = new List<FireSelectorMode>(__instance.FireSelector_Modes);
			FireSelectorMode item = new FireSelectorMode
			{
				ModeType = (FireSelectorModeType)3,
				SelectorPosition = __instance.FireSelector_Modes[__instance.FireSelector_Modes.Length - 1].SelectorPosition
			};
			list.Add(item);
			__instance.FireSelector_Modes = list.ToArray();
		}
	}

	[HarmonyPatch(typeof(Handgun), "Awake")]
	[HarmonyPostfix]
	public static void PostAwake(Handgun __instance)
	{
		//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_0058: 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_0060: Expected O, but got Unknown
		if (__instance.FireSelectorModes.Length != 0 && !__instance.FireSelectorModes.Any((FireSelectorMode t) => (int)t.ModeType == 2))
		{
			FireSelectorMode item = new FireSelectorMode
			{
				SelectorPosition = __instance.FireSelectorModes[__instance.FireSelectorModes.Length - 1].SelectorPosition,
				ModeType = (FireSelectorModeType)2
			};
			__instance.FireSelectorModes = new List<FireSelectorMode>(__instance.FireSelectorModes) { item }.ToArray();
		}
	}

	[HarmonyPatch(typeof(Handgun), "ToggleSafety")]
	[HarmonyPrefix]
	public static bool ToggleSafetyPrefix(Handgun __instance, ref int ___m_fireSelectorMode, ref bool ___m_isSafetyEngaged, ref bool ___m_isHammerCocked, ref bool __result)
	{
		//IL_002f: 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_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Invalid comparison between Unknown and I4
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Invalid comparison between Unknown and I4
		if (!__instance.HasSafety)
		{
			__result = false;
			return false;
		}
		if (__instance.DoesSafetyRequireSlideForward && (int)__instance.Slide.CurPos != 0)
		{
			__result = false;
			return false;
		}
		if ((int)__instance.Slide.CurPos == 0 || (int)__instance.Slide.CurPos >= 2)
		{
			if (___m_isSafetyEngaged)
			{
				((FVRFireArm)__instance).PlayAudioEvent((FirearmAudioEventType)14, 1f);
				___m_isSafetyEngaged = false;
				if (__instance.DoesSafetyDisengageCockHammer)
				{
					__instance.CockHammer(true);
				}
				___m_fireSelectorMode = 0;
			}
			else if ((int)__instance.FireSelectorModes[___m_fireSelectorMode].ModeType != 2)
			{
				((FVRFireArm)__instance).PlayAudioEvent((FirearmAudioEventType)14, 0.7f);
				___m_fireSelectorMode = (___m_fireSelectorMode + 1) % __instance.FireSelectorModes.Length;
			}
			else
			{
				___m_fireSelectorMode = 0;
				if (!__instance.DoesSafetyRequireCockedHammer || ___m_isHammerCocked)
				{
					___m_isSafetyEngaged = true;
					if (__instance.DoesSafetyEngagingDecock)
					{
						__instance.DeCockHammer(true, true);
					}
					((FVRFireArm)__instance).PlayAudioEvent((FirearmAudioEventType)14, 1f);
				}
			}
			UpdateSafetyPos.Invoke((object)__instance, new object[0]);
			__result = true;
			return false;
		}
		__result = false;
		return false;
	}
}

plugins/Cursed.LoadScene.dll

Decompiled a month ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
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.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.LoadScene;

[BepInPlugin("dll.cursed.loadscene", "CursedDlls - Load Scene", "1.6")]
public class LoadScenePlugin : BaseUnityPlugin
{
	private static ConfigEntry<string> _sceneLoad1;

	private static ConfigEntry<string> _sceneLoad2;

	private static ConfigEntry<string> _sceneLoad3;

	private static ConfigEntry<string> _sceneLoad4;

	private static ConfigEntry<string> _sceneLoad5;

	private static ConfigEntry<string> _sceneLoad6;

	private static ConfigEntry<string> _sceneLoad7;

	private static ConfigEntry<string> _sceneLoad8;

	private static ConfigEntry<string> _sceneLoad9;

	private static ConfigEntry<string> _sceneLoad0;

	private static ConfigEntry<KeyboardShortcut> _sceneReload;

	private static ConfigEntry<KeyboardShortcut> _sceneLoadModifier;

	public void Awake()
	{
		//IL_0018: 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)
		_sceneReload = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", "Reload", new KeyboardShortcut((KeyCode)32, (KeyCode[])(object)new KeyCode[0]), "Controls what key(s) you need to press to reload the current scene.");
		_sceneLoadModifier = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", "Modifier", new KeyboardShortcut((KeyCode)306, (KeyCode[])(object)new KeyCode[0]), "Controls what key(s) you need to press to load scenes.");
		_sceneLoad0 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad0", "", "What scene will load when [Modifier]+0 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad1 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad1", "", "What scene will load when [Modifier]+1 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad2 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad2", "", "What scene will load when [Modifier]+2 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad3 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad3", "", "What scene will load when [Modifier]+3 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad4 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad4", "", "What scene will load when [Modifier]+4 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad5 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad5", "", "What scene will load when [Modifier]+5 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad6 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad6", "", "What scene will load when [Modifier]+6 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad7 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad7", "", "What scene will load when [Modifier]+7 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad8 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad8", "", "What scene will load when [Modifier]+8 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
		_sceneLoad9 = ((BaseUnityPlugin)this).Config.Bind<string>("General", "SceneLoad9", "", "What scene will load when [Modifier]+9 is pressed. If you type a scene name wrong, you will be stuck in a loading purgatory!");
	}

	public void Update()
	{
		//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_000d: 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_0029: 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)
		KeyboardShortcut value = _sceneLoadModifier.Value;
		if (Input.GetKey(((KeyboardShortcut)(ref value)).MainKey))
		{
			value = _sceneReload.Value;
			if (Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey))
			{
				Scene activeScene = SceneManager.GetActiveScene();
				SteamVR_LoadLevel.Begin(((Scene)(ref activeScene)).name, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad0.Value) && Input.GetKeyDown((KeyCode)48))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad0.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad1.Value) && Input.GetKeyDown((KeyCode)49))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad1.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad2.Value) && Input.GetKeyDown((KeyCode)50))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad2.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad3.Value) && Input.GetKeyDown((KeyCode)51))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad3.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad4.Value) && Input.GetKeyDown((KeyCode)52))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad4.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad5.Value) && Input.GetKeyDown((KeyCode)53))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad5.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad6.Value) && Input.GetKeyDown((KeyCode)54))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad6.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad7.Value) && Input.GetKeyDown((KeyCode)55))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad7.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad8.Value) && Input.GetKeyDown((KeyCode)56))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad8.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
			else if (!string.IsNullOrEmpty(_sceneLoad9.Value) && Input.GetKeyDown((KeyCode)57))
			{
				SteamVR_LoadLevel.Begin(_sceneLoad9.Value, false, 0.5f, 0f, 0f, 0f, 1f);
			}
		}
	}
}

plugins/Cursed.RemoveAttachmentChecks.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using FistVR;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.RemoveAttachmentChecks;

[BepInPlugin("dll.cursed.removeattachmentchecks", "CursedDlls - Remove Attachment Checks", "1.6")]
public class RemoveAttachmentChecksPlugin : BaseUnityPlugin
{
	private static ConfigEntry<bool> _pluginEnabled;

	private static ConfigEntry<bool> _allAttachmentsAreScalable;

	private static ConfigEntry<bool> _easyAttachmentAttaching;

	private static ConfigEntry<bool> _removeAttachmentsAtAnyTime;

	private static ConfigEntry<bool> _enableBiDirectionalAttachments;

	private static ConfigEntry<bool> _typeChecksDisabled;

	private void Awake()
	{
		_pluginEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PluginEnabled", false, "Enables RemoveAttachmentChecks. RemoveAttachmentChecks, as it says on the tin, removes a lot of checks related to attachments.");
		_allAttachmentsAreScalable = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "AllAttachmentsAreScalable", false, "Allows all attachments to be scalable, regardless of if it should be able to scale to its mount.");
		_removeAttachmentsAtAnyTime = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "RemoveAttachmentsAtAnyTime", false, "Allows the removal of attachments even when other attachments are on that attachment. Warning: becomes very janky when it comes to muzzle devices!");
		_easyAttachmentAttaching = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "EasyAttachmentAttaching", false, "Similar to easy magazine loading, but for attachments! You have the range between the muzzle point and hand radially, so there should be ample space to make stupid stuff.");
		_enableBiDirectionalAttachments = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "EnableBiDirectionalAttachments", false, "Enables attachments to be placed in any direction on rails. (For example, backwards muzzle devices)");
		_typeChecksDisabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "TypeChecksDisabled", false, "Disables type checking on attachments. This lets you put any kind of attachment on any attachment point, regardless of type.");
		if (_pluginEnabled.Value)
		{
			Harmony.CreateAndPatchAll(typeof(RemoveAttachmentChecksPlugin), (string)null);
		}
	}

	public static bool TypeCheck(bool condition)
	{
		if (!condition)
		{
			return _typeChecksDisabled.Value;
		}
		return true;
	}

	[HarmonyPatch(typeof(Revolver), "Awake")]
	[HarmonyPrefix]
	public static bool AddSuppressorAttachableToRevolver(Revolver __instance)
	{
		__instance.AllowsSuppressor = true;
		return true;
	}

	[HarmonyPatch(typeof(FVRFireArmAttachmentSensor), "OnTriggerEnter")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PatchAttachmentTypeCheckTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "Type"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Bne_Un || i.opcode == OpCodes.Bne_Un_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			m.Advance(1).SetOpcodeAndAdvance(OpCodes.Brfalse).Advance(-1)
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ceq, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(RemoveAttachmentChecksPlugin), "TypeCheck", (Type[])null, (Type[])null))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmAttachment), "UpdateSnappingBasedOnDistance")]
	[HarmonyPatch(typeof(Suppressor), "UpdateSnappingBasedOnDistance")]
	[HarmonyPrefix]
	public static bool FVRFireArmAttachment_UpdateSnappingBasedOnDistance(FVRFireArmAttachment __instance)
	{
		//IL_0067: 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_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)
		if (_easyAttachmentAttaching.Value && (Object)(object)((FVRInteractiveObject)__instance).m_hand.OtherHand.CurrentInteractable != (Object)null && ((FVRInteractiveObject)__instance).m_hand.OtherHand.CurrentInteractable is FVRFireArm)
		{
			FVRInteractiveObject currentInteractable = ((FVRInteractiveObject)__instance).m_hand.OtherHand.CurrentInteractable;
			FVRFireArm val = (FVRFireArm)(object)((currentInteractable is FVRFireArm) ? currentInteractable : null);
			float num = Vector3.Distance(((Component)((FVRInteractiveObject)__instance).m_hand.OtherHand).transform.position, val.CurrentMuzzle.position) + 0.25f;
			float num2 = Vector3.Distance(((Component)__instance).transform.position, ((Component)val).transform.position);
			((FVRInteractiveObject)__instance).SetAllCollidersToLayer(false, (num2 <= num) ? "NoCol" : "Default");
		}
		return true;
	}

	[HarmonyPatch(typeof(FVRFireArmAttachment), "EndInteraction")]
	[HarmonyPrefix]
	public static bool FVRFireArmAttachment_EndInteraction(FVRFireArmAttachment __instance)
	{
		((FVRInteractiveObject)__instance).SetAllCollidersToLayer(false, "Default");
		return true;
	}

	[HarmonyPatch(typeof(FVRFireArmAttachmentInterface), "HasAttachmentsOnIt")]
	[HarmonyPrefix]
	public static bool FVRFireArmAttachmentInterface_HasAttachmentsOnIt(FVRFireArmAttachmentInterface __instance, ref bool __result)
	{
		__result = false;
		return !_removeAttachmentsAtAnyTime.Value;
	}

	[HarmonyPatch(typeof(FVRFireArmAttachmentMount), "CanThisRescale")]
	[HarmonyPrefix]
	public static bool FVRFireArmAttachmentMount_CanThisRescale(FVRFireArmAttachmentMount __instance, ref bool __result)
	{
		__result = true;
		return !_allAttachmentsAreScalable.Value;
	}

	[HarmonyPatch(typeof(FVRFireArmAttachment), "AttachToMount")]
	[HarmonyPatch(typeof(FVRFireArmAttachment), "GetRotTarget")]
	[HarmonyPrefix]
	public static void FVRFireArmAttachment_SetBiDirectional(ref bool ___IsBiDirectional)
	{
		if (!___IsBiDirectional)
		{
			___IsBiDirectional = _enableBiDirectionalAttachments.Value;
		}
	}

	[HarmonyPatch(typeof(FVRFireArmAttachmentMount), "Awake")]
	[HarmonyPostfix]
	public static void FVRFireArmAttachmentMount_RemoveMaxAttachmentLimit(ref int ___m_maxAttachments)
	{
		___m_maxAttachments = int.MaxValue;
	}
}

plugins/Cursed.RemoveMagCheck.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using FistVR;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace RemoveMagCheck;

[BepInPlugin("dll.cursed.removemagcheck", "CursedDlls - Remove Magazine (and clip) Checks", "1.6")]
public class RemoveMagCheckPlugin : BaseUnityPlugin
{
	private static ConfigEntry<bool> _pluginEnabled;

	private static ConfigEntry<bool> _typeChecksDisabled;

	private void Awake()
	{
		_pluginEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PluginEnabled", false, "Enables RemoveMagCheck. RemoveMagCheck, as it says on the tin, removes checks related to magazines, but also includes clips.");
		_typeChecksDisabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "TypeChecksDisabled", true, "Disables type checking on magazines and clips. This lets you insert any mag or clip of any type into any gun.");
		if (_pluginEnabled.Value)
		{
			Harmony.CreateAndPatchAll(typeof(RemoveMagCheckPlugin), (string)null);
		}
	}

	public static bool TypeCheck(bool condition)
	{
		if (!condition)
		{
			return _typeChecksDisabled.Value;
		}
		return true;
	}

	[HarmonyPatch(typeof(FVRFireArmMagazine), "FVRFixedUpdate")]
	[HarmonyPatch(typeof(FVRFireArmMagazine), "UpdateInteraction")]
	[HarmonyPatch(typeof(FVRFireArmMagazine), "Release")]
	[HarmonyPatch(typeof(FVRFireArmMagazine), "ReleaseFromSecondarySlot")]
	[HarmonyPatch(typeof(FVRFireArmReloadTriggerMag), "OnTriggerEnter")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PatchMagazineTypeChecksTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "MagazineType"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Bne_Un || i.opcode == OpCodes.Bne_Un_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			m.Advance(1).SetOpcodeAndAdvance(OpCodes.Brfalse).Advance(-1)
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ceq, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(RemoveMagCheckPlugin), "TypeCheck", (Type[])null, (Type[])null))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmClipTriggerClip), "OnTriggerEnter")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PatchClipTypeCheckTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "ClipType"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Bne_Un || i.opcode == OpCodes.Bne_Un_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			m.Advance(1).SetOpcodeAndAdvance(OpCodes.Brfalse).Advance(-1)
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ceq, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(RemoveMagCheckPlugin), "TypeCheck", (Type[])null, (Type[])null))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}
}

plugins/Cursed.RemoveRoundTypeCheck.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using FistVR;
using HarmonyLib;
using Sodalite.Api;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.RemoveRoundTypeCheck;

[BepInPlugin("dll.cursed.removeroundtypecheck", "CursedDlls - Remove RoundType Checks", "1.6")]
public class RemoveRoundTypeCheckPlugin : BaseUnityPlugin
{
	private class AMPatches
	{
		[HarmonyPatch(typeof(AM), "getRoundMaterial")]
		[HarmonyPrefix]
		public static bool AM_getRoundMaterial(FireArmRoundType rType, FireArmRoundClass rClass, Dictionary<FireArmRoundType, Dictionary<FireArmRoundClass, DisplayDataClass>> ___TypeDic, ref Material __result)
		{
			//IL_0002: 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_001e: 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)
			try
			{
				__result = ___TypeDic[rType][rClass].Material;
				return false;
			}
			catch
			{
				Debug.LogError((object)$"Attempted to spawn round with rType {rType} and rClass {rClass} - AM doesn't have this!");
				__result = ___TypeDic[(FireArmRoundType)998][(FireArmRoundClass)50].Material;
				return false;
			}
		}

		[HarmonyPatch(typeof(AM), "getRoundMesh")]
		[HarmonyPrefix]
		public static bool AM_getRoundMesh(FireArmRoundType rType, FireArmRoundClass rClass, Dictionary<FireArmRoundType, Dictionary<FireArmRoundClass, DisplayDataClass>> ___TypeDic, ref Mesh __result)
		{
			//IL_0002: 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_001e: 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)
			try
			{
				__result = ___TypeDic[rType][rClass].Mesh;
				return false;
			}
			catch
			{
				Debug.LogError((object)$"Attempted to spawn round with rType {rType} and rClass {rClass} - AM doesn't have this!");
				__result = ___TypeDic[(FireArmRoundType)998][(FireArmRoundClass)50].Mesh;
				return false;
			}
		}

		[HarmonyPatch(typeof(AM), "getRoundSelfPrefab")]
		[HarmonyPrefix]
		public static bool AM_getRoundSelfPrefab(FireArmRoundType rType, FireArmRoundClass rClass, Dictionary<FireArmRoundType, Dictionary<FireArmRoundClass, DisplayDataClass>> ___TypeDic, ref FVRObject __result)
		{
			//IL_0002: 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_001e: 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)
			try
			{
				__result = ___TypeDic[rType][rClass].ObjectID;
				return false;
			}
			catch
			{
				Debug.LogError((object)$"Attempted to spawn round with rType {rType} and rClass {rClass} - AM doesn't have this!");
				__result = ___TypeDic[(FireArmRoundType)998][(FireArmRoundClass)50].ObjectID;
				return false;
			}
		}
	}

	private static ConfigEntry<bool> _pluginEnabled;

	private static ConfigEntry<bool> _typeChecksDisabled;

	private static ConfigEntry<bool> _unlimitedPalmAmount;

	private static ConfigEntry<float> _timeSinceRoundInsertedOverride;

	private void Awake()
	{
		_pluginEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PluginEnabled", false, "Enables RemoveRoundTypeCheck. RemoveRoundTypeCheck, as it says on the tin, removes the RoundType check, but also allows for unlimited palming amounts and modifying round insertion time.");
		_typeChecksDisabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "TypeChecksDisabled", true, "Disables type checking on rounds. This lets you insert any round you want into any gun, magazine, clip, speedloader, or collection of palmed rounds.");
		_unlimitedPalmAmount = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "UnlimitedPalmAmount", true, "Removes the limit on palm amounts. This lets you palm as many rounds as you want to.");
		_timeSinceRoundInsertedOverride = ((BaseUnityPlugin)this).Config.Bind<float>("General", "TimeSinceRoundInsertedOverride", 0.3f, "Overrides how long it takes for a round to be inserted into a clip or magazine.");
		LeaderboardAPI.LeaderboardDisabled.TakeLock();
		if (_pluginEnabled.Value)
		{
			Harmony.CreateAndPatchAll(typeof(RemoveRoundTypeCheckPlugin), (string)null);
		}
		else
		{
			Harmony.CreateAndPatchAll(typeof(AMPatches), (string)null);
		}
	}

	public static bool TypeCheck(bool condition)
	{
		if (!condition)
		{
			return _typeChecksDisabled.Value;
		}
		return true;
	}

	public static bool PalmAmount(int proxies, int maxpalm)
	{
		return proxies < (_unlimitedPalmAmount.Value ? int.MaxValue : maxpalm);
	}

	[HarmonyPatch(typeof(FVRFireArmMagazine), "AddRound", new Type[]
	{
		typeof(FireArmRoundClass),
		typeof(bool),
		typeof(bool)
	})]
	[HarmonyPatch(typeof(FVRFireArmClip), "AddRound", new Type[]
	{
		typeof(FireArmRoundClass),
		typeof(bool),
		typeof(bool)
	})]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> AddRoundByClass(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdloc(i, (LocalBuilder)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdarg(i, (int?)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Stfld && ((FieldInfo)i.operand).Name == "LR_Class"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Expected O, but got Unknown
			CodeInstruction instruction = m.Instruction;
			m.Advance(2);
			Type declaringType = (m.Operand as MemberInfo).DeclaringType;
			Type type = null;
			int pos = m.Pos;
			m.Advance(-m.Pos);
			if (m.Opcode == OpCodes.Ldarg_0)
			{
				m.Advance(1);
				if (m.Opcode == OpCodes.Ldfld)
				{
					type = (m.Operand as MemberInfo).DeclaringType;
					m.Advance(pos).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { instruction }).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
					{
						new CodeInstruction(OpCodes.Ldarg_0, (object)null)
					})
						.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
						{
							new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(type, "RoundType"))
						})
						.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
						{
							new CodeInstruction(OpCodes.Stfld, (object)AccessTools.Field(declaringType, "LR_Type"))
						});
				}
				else
				{
					m.Advance(pos - 1);
				}
			}
			else
			{
				m.Advance(pos);
			}
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmMagazine), "AddRound", new Type[]
	{
		typeof(FVRFireArmRound),
		typeof(bool),
		typeof(bool),
		typeof(bool)
	})]
	[HarmonyPatch(typeof(FVRFireArmClip), "AddRound", new Type[]
	{
		typeof(FVRFireArmRound),
		typeof(bool),
		typeof(bool)
	})]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> AddRoundByRound(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdloc(i, (LocalBuilder)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdarg(i, (int?)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "RoundClass"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Stfld && ((FieldInfo)i.operand).Name == "LR_Class"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Expected O, but got Unknown
			CodeInstruction instruction = m.Instruction;
			m.Advance(2);
			Type declaringType = (m.Operand as MemberInfo).DeclaringType;
			m.Advance(1);
			Type declaringType2 = (m.Operand as MemberInfo).DeclaringType;
			m.Advance(1).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { instruction }).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_1, (object)null)
			})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(declaringType, "RoundType"))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Stfld, (object)AccessTools.Field(declaringType2, "LR_Type"))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmMagazine), "DuplicateFromSpawnLock")]
	[HarmonyPatch(typeof(FVRFireArmClip), "DuplicateFromSpawnLock")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> DuplicateFromSpawnLockRoundType(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdloc(i, (LocalBuilder)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldelem_Ref), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "LR_Class"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Stfld && ((FieldInfo)i.operand).Name == "LR_Class"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Expected O, but got Unknown
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Expected O, but got Unknown
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Expected O, but got Unknown
			CodeInstruction instruction = m.Instruction;
			m.Advance(2);
			Type declaringType = (m.Operand as MemberInfo).DeclaringType;
			m.Advance(-8);
			CodeInstruction instruction2 = m.Instruction;
			m.Advance(1);
			FieldInfo fieldInfo = m.Operand as FieldInfo;
			m.Advance(9).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { instruction2 }).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldfld, (object)fieldInfo)
			})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { instruction })
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldelem_Ref, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldarg_0, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldfld, (object)fieldInfo)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { instruction })
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldelem_Ref, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(declaringType, "LR_Type"))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Stfld, (object)AccessTools.Field(declaringType, "LR_Type"))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "AddProxy")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> RoundAddProxy(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdloc(i, (LocalBuilder)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdarg(i, (int?)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Stfld && ((FieldInfo)i.operand).Name == "Class"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Expected O, but got Unknown
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Expected O, but got Unknown
			CodeInstruction instruction = m.Instruction;
			m.Advance(3).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { instruction }).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_2, (object)null)
			})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Callvirt, (object)AccessTools.Method(typeof(AnvilAsset), "GetGameObject", (Type[])null, (Type[])null))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Callvirt, (object)AccessTools.Method(typeof(GameObject), "GetComponent", (Type[])null, new Type[1] { typeof(FVRFireArmRound) }))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(typeof(FVRFireArmRound), "RoundType"))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Stfld, (object)AccessTools.Field(typeof(ProxyRound), "Type"))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "PalmRound")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> RoundPalmRound(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdloc(i, (LocalBuilder)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdarg(i, (int?)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "RoundClass"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Stfld && ((FieldInfo)i.operand).Name == "Class"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Expected O, but got Unknown
			CodeInstruction instruction = m.Instruction;
			m.Advance(4).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { instruction }).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldarg_1, (object)null)
			})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(typeof(FVRFireArmRound), "RoundType"))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Stfld, (object)AccessTools.Field(typeof(ProxyRound), "Type"))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "Awake")]
	[HarmonyPrefix]
	public static bool AddChamberableToRound(FVRFireArmRound __instance)
	{
		__instance.isManuallyChamberable = true;
		return true;
	}

	[HarmonyPatch(typeof(FVRFireArmClip), "UpdateInteraction")]
	[HarmonyPatch(typeof(FVRFireArmMagazine), "UpdateInteraction")]
	[HarmonyPatch(typeof(FVRFireArmRound), "UpdateInteraction")]
	[HarmonyPatch(typeof(FVRFireArmRound), "FVRFixedUpdate")]
	[HarmonyPatch(typeof(FVRFireArmRound), "GetNumRoundsPulled")]
	[HarmonyPatch(typeof(FVRFireArmRound), "DuplicateFromSpawnLock")]
	[HarmonyPatch(typeof(FVRFireArmRound), "OnTriggerEnter")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PatchRoundTypeChecksTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdloc(i, (LocalBuilder)null) || CodeInstructionExtensions.IsLdarg(i, (int?)null)), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "RoundType"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Bne_Un || i.opcode == OpCodes.Bne_Un_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			m.Advance(2).SetOpcodeAndAdvance(OpCodes.Brfalse).Advance(-1)
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ceq, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(RemoveRoundTypeCheckPlugin), "TypeCheck", (Type[])null, (Type[])null))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(Speedloader), "OnTriggerEnter")]
	[HarmonyPatch(typeof(Speedloader), "UpdateInteraction")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PatchSpeedloaderRoundTypeChecksTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "Type"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Bne_Un || i.opcode == OpCodes.Bne_Un_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			m.Advance(1).SetOpcodeAndAdvance(OpCodes.Brfalse).Advance(-1)
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ceq, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(RemoveRoundTypeCheckPlugin), "TypeCheck", (Type[])null, (Type[])null))
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "FVRFixedUpdate")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PatchSpeedloaderRoundLoadingTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Stfld), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldarg_0), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "m_hoverOverReloadTrigger"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "SpeedloaderChamber"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Expected O, but got Unknown
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Expected O, but got Unknown
			m.Advance(2).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(typeof(FVRFireArmRound), "m_hoverOverReloadTrigger"))
			}).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(typeof(FVRFireArmMagazineReloadTrigger), "SpeedloaderChamber"))
			})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldarg_0, (object)null)
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(typeof(FVRFireArmRound), "RoundType"))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Stfld, (object)AccessTools.Field(typeof(SpeedloaderChamber), "Type"))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldarg_0, (object)null)
				});
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFirearmBeltDisplayData), "PullPushBelt")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PatchBeltDisplayDataTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "LR_Class"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldc_I4_0), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldc_I4_0), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Callvirt && ((MethodInfo)i.operand).Name == "AddRound"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Expected O, but got Unknown
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Expected O, but got Unknown
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Expected O, but got Unknown
			m.SetOperandAndAdvance((object)AccessTools.Field(typeof(FVRLoadedRound), "LR_Type")).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldloc_S, (object)5)
			}).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.Field(typeof(FVRLoadedRound), "LR_Class"))
			})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AM), "GetRoundSelfPrefab", (Type[])null, (Type[])null))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Callvirt, (object)AccessTools.Method(typeof(AnvilAsset), "GetGameObject", (Type[])null, (Type[])null))
				})
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Callvirt, (object)AccessTools.Method(typeof(GameObject), "GetComponent", (Type[])null, new Type[1] { typeof(FVRFireArmRound) }))
				})
				.Advance(2)
				.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Ldc_I4_0, (object)null)
				})
				.SetOperandAndAdvance((object)AccessTools.Method(typeof(FVRFireArmMagazine), "AddRound", new Type[4]
				{
					typeof(FVRFireArmRound),
					typeof(bool),
					typeof(bool),
					typeof(bool)
				}, (Type[])null));
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmMagazine), "UpdateInteraction")]
	[HarmonyPatch(typeof(FVRFireArmClip), "UpdateInteraction")]
	[HarmonyPatch(typeof(Speedloader), "UpdateInteraction")]
	[HarmonyPatch(typeof(FVRFireArmRound), "UpdateInteraction")]
	[HarmonyPatch(typeof(FVRFireArmRound), "OnTriggerEnter")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> MaxPalmedAmountOverride(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "MaxPalmedAmount"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Bge || i.opcode == OpCodes.Bge_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			m.Advance(1).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(RemoveRoundTypeCheckPlugin), "PalmAmount", (Type[])null, (Type[])null))
			}).SetOpcodeAndAdvance(OpCodes.Brfalse);
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "OnTriggerEnter")]
	[HarmonyPatch(typeof(FVRFireArmRound), "OnTriggerExit")]
	[HarmonyPatch(typeof(FVRFireArmRound), "UpdateInteraction")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> IsPalmableNoOp(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldarg_0), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "isPalmable"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Brfalse || i.opcode == OpCodes.Brfalse_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			m.SetOpcodeAndAdvance(OpCodes.Nop).SetOpcodeAndAdvance(OpCodes.Nop).SetOpcodeAndAdvance(OpCodes.Nop);
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "UpdateInteraction")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> DisableIsPalmable(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldarg_0), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldfld && ((FieldInfo)i.operand).Name == "MaxPalmedAmount"), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldc_I4_1), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ble || i.opcode == OpCodes.Ble_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			m.SetOpcodeAndAdvance(OpCodes.Nop).SetOpcodeAndAdvance(OpCodes.Nop).SetOpcodeAndAdvance(OpCodes.Nop)
				.SetOpcodeAndAdvance(OpCodes.Nop);
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "FVRFixedUpdate")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> TimeSinceRoundInsertedOverride(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Callvirt && ((MethodInfo)i.operand).Name.Contains("TimeSinceRoundInserted")), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => CodeInstructionExtensions.IsLdloc(i, (LocalBuilder)null) || i.opcode == OpCodes.Ldc_R4), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ble_Un || i.opcode == OpCodes.Ble_Un_S), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			m.Advance(1).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldsfld, (object)AccessTools.Field(typeof(RemoveRoundTypeCheckPlugin), "_timeSinceRoundInsertedOverride"))
			}).SetInstructionAndAdvance(new CodeInstruction(OpCodes.Callvirt, (object)AccessTools.PropertyGetter(typeof(ConfigEntry<float>), "Value")));
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(FVRFireArmRound), "BeginInteraction")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> PickUpCooldownOverride(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: 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: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
		{
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldarg_0), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Ldc_R4), (string)null),
			new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction i) => i.opcode == OpCodes.Stfld && ((FieldInfo)i.operand).Name == "m_pickUpCooldown"), (string)null)
		}).Repeat((Action<CodeMatcher>)delegate(CodeMatcher m)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			m.Advance(1).InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1]
			{
				new CodeInstruction(OpCodes.Ldsfld, (object)AccessTools.Field(typeof(RemoveRoundTypeCheckPlugin), "_timeSinceRoundInsertedOverride"))
			}).SetInstructionAndAdvance(new CodeInstruction(OpCodes.Callvirt, (object)AccessTools.PropertyGetter(typeof(ConfigEntry<float>), "Value")));
		}, (Action<string>)null).InstructionEnumeration();
	}

	[HarmonyPatch(typeof(AmmoSpawnerV2), "LoadIntoHeldObjects")]
	[HarmonyPrefix]
	public static bool AmmoSpawnerV2_LoadIntoHeldObjects(FireArmRoundType ___m_curAmmoType, FireArmRoundClass ___m_curAmmoClass)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//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_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_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: 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_0221: 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_0091: 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)
		//IL_0272: Unknown result type (might be due to invalid IL or missing references)
		//IL_0277: 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_011b: 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_02ed: 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_01b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ca: 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_0244: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_031f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0320: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 0; i < GM.CurrentMovementManager.Hands.Length; i++)
		{
			if (!((Object)(object)GM.CurrentMovementManager.Hands[i].CurrentInteractable != (Object)null) || !(GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRPhysicalObject))
			{
				continue;
			}
			if (GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRFireArmMagazine)
			{
				FVRInteractiveObject currentInteractable = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				FVRFireArmMagazine val = (FVRFireArmMagazine)(object)((currentInteractable is FVRFireArmMagazine) ? currentInteractable : null);
				if (TypeCheck(val.RoundType == ___m_curAmmoType))
				{
					val.m_numRounds = 0;
					for (int j = 0; j < val.LoadedRounds.Length; j++)
					{
						val.AddRound(((AnvilAsset)AM.GetRoundSelfPrefab(___m_curAmmoType, ___m_curAmmoClass)).GetGameObject().GetComponent<FVRFireArmRound>(), false, true, false);
					}
					val.UpdateBulletDisplay();
				}
			}
			else if (GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRFireArmClip)
			{
				FVRInteractiveObject currentInteractable2 = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				FVRFireArmClip val2 = (FVRFireArmClip)(object)((currentInteractable2 is FVRFireArmClip) ? currentInteractable2 : null);
				if (TypeCheck(val2.RoundType == ___m_curAmmoType))
				{
					val2.m_numRounds = 0;
					for (int k = 0; k < val2.LoadedRounds.Length; k++)
					{
						val2.AddRound(((AnvilAsset)AM.GetRoundSelfPrefab(___m_curAmmoType, ___m_curAmmoClass)).GetGameObject().GetComponent<FVRFireArmRound>(), false, true);
					}
					val2.UpdateBulletDisplay();
				}
			}
			else if (GM.CurrentMovementManager.Hands[i].CurrentInteractable is Speedloader)
			{
				FVRInteractiveObject currentInteractable3 = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				Speedloader val3 = (Speedloader)(object)((currentInteractable3 is Speedloader) ? currentInteractable3 : null);
				if (TypeCheck(val3.Chambers[0].Type == ___m_curAmmoType))
				{
					for (int l = 0; l < val3.Chambers.Count; l++)
					{
						val3.Chambers[l].Type = ___m_curAmmoType;
						val3.Chambers[l].Load(___m_curAmmoClass, false);
					}
				}
			}
			else
			{
				if (!(GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRFireArm))
				{
					continue;
				}
				FVRInteractiveObject currentInteractable4 = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				FVRFireArm val4 = (FVRFireArm)(object)((currentInteractable4 is FVRFireArm) ? currentInteractable4 : null);
				if (TypeCheck(val4.RoundType == ___m_curAmmoType))
				{
					for (int m = 0; m < val4.FChambers.Count; m++)
					{
						val4.FChambers[m].SetRound(((AnvilAsset)AM.GetRoundSelfPrefab(___m_curAmmoType, ___m_curAmmoClass)).GetGameObject().GetComponent<FVRFireArmRound>(), false);
					}
				}
				if (TypeCheck(val4.RoundType == ___m_curAmmoType) && (Object)(object)val4.Magazine != (Object)null)
				{
					val4.Magazine.m_numRounds = 0;
					for (int n = 0; n < val4.Magazine.LoadedRounds.Length; n++)
					{
						val4.Magazine.AddRound(((AnvilAsset)AM.GetRoundSelfPrefab(___m_curAmmoType, ___m_curAmmoClass)).GetGameObject().GetComponent<FVRFireArmRound>(), false, true, false);
					}
					val4.Magazine.UpdateBulletDisplay();
				}
				if (TypeCheck(val4.RoundType == ___m_curAmmoType) && (Object)(object)val4.Clip != (Object)null)
				{
					val4.Clip.m_numRounds = 0;
					for (int num = 0; num < val4.Clip.LoadedRounds.Length; num++)
					{
						val4.Clip.AddRound(((AnvilAsset)AM.GetRoundSelfPrefab(___m_curAmmoType, ___m_curAmmoClass)).GetGameObject().GetComponent<FVRFireArmRound>(), false, true);
					}
					val4.Clip.UpdateBulletDisplay();
				}
			}
		}
		return false;
	}

	[HarmonyPatch(typeof(AmmoSpawnerV2), "CheckFillButton")]
	[HarmonyPrefix]
	public static bool AmmoSpawnerV2_CheckFillButton(AmmoSpawnerV2 __instance, FireArmRoundType ___m_curAmmoType, ref bool ___m_hasHeldType, ref FireArmRoundType ___heldType)
	{
		//IL_0040: 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_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Expected I4, but got Unknown
		//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_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d2: Expected I4, but got Unknown
		//IL_00d4: 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_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: Expected I4, but got Unknown
		//IL_0141: 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_018a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Expected I4, but got Unknown
		//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)
		bool flag = false;
		for (int i = 0; i < GM.CurrentMovementManager.Hands.Length; i++)
		{
			if (!((Object)(object)GM.CurrentMovementManager.Hands[i].CurrentInteractable != (Object)null) || !(GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRPhysicalObject))
			{
				continue;
			}
			if (GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRFireArmMagazine)
			{
				FVRInteractiveObject currentInteractable = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				FVRFireArmMagazine val = (FVRFireArmMagazine)(object)((currentInteractable is FVRFireArmMagazine) ? currentInteractable : null);
				___m_hasHeldType = true;
				___heldType = (FireArmRoundType)(int)val.RoundType;
				if (TypeCheck(val.RoundType == ___m_curAmmoType))
				{
					flag = true;
				}
			}
			else if (GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRFireArmClip)
			{
				FVRInteractiveObject currentInteractable2 = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				FVRFireArmClip val2 = (FVRFireArmClip)(object)((currentInteractable2 is FVRFireArmClip) ? currentInteractable2 : null);
				___m_hasHeldType = true;
				___heldType = (FireArmRoundType)(int)val2.RoundType;
				if (TypeCheck(val2.RoundType == ___m_curAmmoType))
				{
					flag = true;
				}
			}
			else if (GM.CurrentMovementManager.Hands[i].CurrentInteractable is Speedloader)
			{
				FVRInteractiveObject currentInteractable3 = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				Speedloader val3 = (Speedloader)(object)((currentInteractable3 is Speedloader) ? currentInteractable3 : null);
				___m_hasHeldType = true;
				___heldType = (FireArmRoundType)(int)val3.Chambers[0].Type;
				if (TypeCheck(val3.Chambers[0].Type == ___m_curAmmoType))
				{
					flag = true;
				}
			}
			else if (GM.CurrentMovementManager.Hands[i].CurrentInteractable is FVRFireArm)
			{
				FVRInteractiveObject currentInteractable4 = GM.CurrentMovementManager.Hands[i].CurrentInteractable;
				FVRFireArm val4 = (FVRFireArm)(object)((currentInteractable4 is FVRFireArm) ? currentInteractable4 : null);
				___m_hasHeldType = true;
				___heldType = (FireArmRoundType)(int)val4.RoundType;
				if (TypeCheck(val4.RoundType == ___m_curAmmoType) || (Object)(object)val4.Magazine != (Object)null || (Object)(object)val4.Clip != (Object)null)
				{
					flag = true;
				}
			}
		}
		if (flag && !__instance.BTNGO_Fill.activeSelf)
		{
			__instance.BTNGO_Fill.SetActive(true);
		}
		else if (!flag && __instance.BTNGO_Fill.activeSelf)
		{
			__instance.BTNGO_Fill.SetActive(false);
		}
		if (___m_hasHeldType && !__instance.BTNGO_Select.activeSelf)
		{
			__instance.BTNGO_Select.SetActive(true);
		}
		else if (!___m_hasHeldType && __instance.BTNGO_Select.activeSelf)
		{
			__instance.BTNGO_Select.SetActive(false);
		}
		return false;
	}

	[HarmonyPatch(typeof(FVRFireArmClip), "LoadOneRoundFromClipToMag")]
	[HarmonyPrefix]
	public static bool FVRFireArmClip_LoadOneRoundFromClipToMag(FVRFireArmClip __instance)
	{
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance.FireArm == (Object)null || (Object)(object)__instance.FireArm.Magazine == (Object)null || __instance.FireArm.Magazine.IsFull() || !__instance.HasARound())
		{
			return false;
		}
		FVRFireArmRound component = __instance.RemoveRound(false).GetComponent<FVRFireArmRound>();
		SM.PlayGenericSound(__instance.LoadFromClipToMag, ((Component)__instance).transform.position);
		__instance.FireArm.Magazine.AddRound(component, false, true, false);
		return false;
	}

	[HarmonyPatch(typeof(Speedloader), "DuplicateFromSpawnLock")]
	[HarmonyPrefix]
	public static bool Speedloader_DuplicateFromSpawnLock(Speedloader __instance, ref GameObject __result, FVRViveHand hand)
	{
		//IL_0011: 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_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_00b4: 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)
		GameObject val = Object.Instantiate<GameObject>(((AnvilAsset)((FVRPhysicalObject)__instance).ObjectWrapper).GetGameObject(), ((FVRInteractiveObject)__instance).Transform.position, ((FVRInteractiveObject)__instance).Transform.rotation);
		FVRPhysicalObject component = val.GetComponent<FVRPhysicalObject>();
		hand.ForceSetInteractable((FVRInteractiveObject)(object)component);
		component.SetQuickBeltSlot((FVRQuickBeltSlot)null);
		((FVRInteractiveObject)component).BeginInteraction(hand);
		Speedloader component2 = val.GetComponent<Speedloader>();
		for (int i = 0; i < __instance.Chambers.Count; i++)
		{
			component2.Chambers[i].Type = __instance.Chambers[i].Type;
			if (__instance.Chambers[i].IsLoaded)
			{
				component2.Chambers[i].Load(__instance.Chambers[i].LoadedClass, false);
			}
			else
			{
				component2.Chambers[i].Unload();
			}
		}
		__result = val;
		return false;
	}

	[HarmonyPatch(typeof(RevolverCylinder), "LoadFromSpeedLoader")]
	[HarmonyPrefix]
	public static bool RevolverCylinder_LoadFromSpeedLoader(RevolverCylinder __instance, Speedloader loader)
	{
		//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_009a: Unknown result type (might be due to invalid IL or missing references)
		__instance.SpeedLoaderID = ((FVRPhysicalObject)loader).ObjectWrapper.ItemID;
		__instance.m_hasSpeedLoadedIn = true;
		bool flag = false;
		for (int i = 0; i < loader.Chambers.Count; i++)
		{
			if (i < __instance.Revolver.Chambers.Length && loader.Chambers[i].IsLoaded && !__instance.Revolver.Chambers[i].IsFull)
			{
				__instance.Revolver.Chambers[i].RoundType = loader.Chambers[i].Type;
				__instance.Revolver.Chambers[i].Autochamber(loader.Chambers[i].Unload());
				if (loader.Chambers[i].IsSpent)
				{
					__instance.Revolver.Chambers[i].Fire();
				}
				flag = true;
			}
		}
		if (flag)
		{
			((FVRFireArm)__instance.Revolver).PlayAudioEvent((FirearmAudioEventType)20, 1f);
			GameObject moonClip = __instance.MoonClip;
			if (moonClip != null)
			{
				moonClip.SetActive(true);
			}
		}
		return false;
	}

	[HarmonyPatch(typeof(RevolvingShotgun), "LoadCylinder")]
	[HarmonyPrefix]
	public static bool RevolvingShotgun_LoadCylinder(RevolvingShotgun __instance, Speedloader s, ref int ___m_curChamber, ref bool __result)
	{
		//IL_0040: 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_0096: Unknown result type (might be due to invalid IL or missing references)
		if (__instance.CylinderLoaded)
		{
			return false;
		}
		__instance.CylinderLoaded = true;
		((Component)__instance.ProxyCylinder).gameObject.SetActive(__instance.CylinderLoaded);
		((FVRFireArm)__instance).PlayAudioEvent((FirearmAudioEventType)20, 1f);
		___m_curChamber = 0;
		__instance.ProxyCylinder.localRotation = __instance.GetLocalRotationFromCylinder(___m_curChamber);
		for (int i = 0; i < __instance.Chambers.Length; i++)
		{
			if (s.Chambers[i].IsLoaded)
			{
				__instance.Chambers[i].RoundType = s.Chambers[i].Type;
				__instance.Chambers[i].Autochamber(s.Chambers[i].LoadedClass);
				__instance.Chambers[i].IsSpent = s.Chambers[i].IsSpent;
			}
			else
			{
				__instance.Chambers[i].Unload();
			}
			__instance.Chambers[i].UpdateProxyDisplay();
		}
		__result = true;
		return false;
	}

	[HarmonyPatch(typeof(RevolvingShotgun), "EjectCylinder")]
	[HarmonyPrefix]
	public static bool RevolvingShotgun_EjectCylinder(RevolvingShotgun __instance, ref Speedloader __result)
	{
		//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_0056: 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_00d7: 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_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_00ac: Unknown result type (might be due to invalid IL or missing references)
		Speedloader component = Object.Instantiate<GameObject>(__instance.CylinderPrefab, __instance.CyclinderMountPoint.position, __instance.CyclinderMountPoint.rotation).GetComponent<Speedloader>();
		((FVRFireArm)__instance).PlayAudioEvent((FirearmAudioEventType)21, 1f);
		for (int i = 0; i < component.Chambers.Count; i++)
		{
			if (!__instance.Chambers[i].IsFull)
			{
				component.Chambers[i].Unload();
			}
			else if (__instance.Chambers[i].IsSpent)
			{
				component.Chambers[i].Type = __instance.Chambers[i].GetRound().RoundType;
				component.Chambers[i].LoadEmpty(__instance.Chambers[i].GetRound().RoundClass, false);
			}
			else
			{
				component.Chambers[i].Type = __instance.Chambers[i].GetRound().RoundType;
				component.Chambers[i].Load(__instance.Chambers[i].GetRound().RoundClass, false);
			}
			__instance.Chambers[i].UpdateProxyDisplay();
		}
		((FVRFireArm)__instance).EjectDelay = 0.4f;
		__instance.CylinderLoaded = false;
		((Component)__instance.ProxyCylinder).gameObject.SetActive(__instance.CylinderLoaded);
		__result = component;
		return false;
	}

	[HarmonyPatch(typeof(SpeedloaderChamber), "LoadEmpty")]
	[HarmonyPrefix]
	public static bool SpeedloaderChamber_LoadEmpty(SpeedloaderChamber __instance, FireArmRoundClass rclass, bool playSound = false)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: 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_0047: 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_0081: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
		__instance.IsLoaded = true;
		__instance.IsSpent = true;
		__instance.LoadedClass = rclass;
		if ((Object)(object)((AnvilAsset)AM.GetRoundSelfPrefab(__instance.Type, __instance.LoadedClass)).GetGameObject().GetComponent<FVRFireArmRound>().FiredRenderer != (Object)null)
		{
			__instance.Filter.mesh = ((Component)((AnvilAsset)AM.GetRoundSelfPrefab(__instance.Type, __instance.LoadedClass)).GetGameObject().GetComponent<FVRFireArmRound>().FiredRenderer).gameObject.GetComponent<MeshFilter>().sharedMesh;
			__instance.LoadedRenderer.material = AM.GetRoundMaterial(__instance.Type, __instance.LoadedClass);
			__instance.LoadedRenderer.enabled = true;
			if (playSound && (Object)(object)__instance.SpeedLoader.ProfileOverride != (Object)null)
			{
				SM.PlayGenericSound(__instance.SpeedLoader.ProfileOverride.MagazineInsertRound, ((Component)__instance).transform.position);
			}
		}
		else
		{
			__instance.IsLoaded = false;
			__instance.LoadedRenderer.enabled = false;
		}
		return false;
	}
}

plugins/Cursed.SuppressAssemblyLoadErrors.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.SuppressAssemblyLoadErrors;

[BepInPlugin("dll.cursed.suppressassemblyloaderrors", "CursedDlls - Suppress Assembly.GetTypes errors", "1.6")]
public class SuppressAssemblyLoadErrors : BaseUnityPlugin
{
	internal static ManualLogSource logger;

	private void Awake()
	{
		logger = ((BaseUnityPlugin)this).Logger;
		Harmony.CreateAndPatchAll(typeof(SuppressAssemblyLoadErrors), (string)null);
	}

	[HarmonyPatch(typeof(Assembly), "GetTypes", new Type[] { })]
	[HarmonyFinalizer]
	public static void HandleReflectionTypeLoad(ref Exception __exception, ref Type[] __result)
	{
		if (__exception != null && __exception is ReflectionTypeLoadException ex)
		{
			__exception = null;
			__result = ex.Types.Where((Type t) => (object)t != null).ToArray();
			logger.LogDebug((object)("Encountered ReflectionTypeLoadException which was suppressed. Full error: \n$" + TypeLoader.TypeLoadExceptionToString(ex)));
		}
	}
}

plugins/Cursed.TimeScale.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using FistVR;
using HarmonyLib;
using UnityEngine;
using UnityEngine.UI;
using Valve.VR;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.TimeScale;

[BepInPlugin("dll.cursed.timescale", "CursedDlls - Time Scaler", "1.6")]
public class TimeScaleFixPlugin : BaseUnityPlugin
{
	private static ConfigEntry<bool> _pluginEnabled;

	private static ConfigEntry<float> _timeScaleIncrement;

	private static ConfigEntry<string> _wristMenuDateTimeFormat;

	private void Awake()
	{
		_pluginEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PluginEnabled", false, "Enables TimeScaleFix. TimeScaleFix adds a few fixes for timescale editing, such as pitching game sounds and adding a timescale to the wrist menu.");
		_timeScaleIncrement = ((BaseUnityPlugin)this).Config.Bind<float>("General", "TimeScaleIncrement", 0.125f, "How much time scale is increased/decreased at a time");
		_wristMenuDateTimeFormat = ((BaseUnityPlugin)this).Config.Bind<string>("General", "WristMenuDateTimeFormat", "hh:mm:ss tt", "What the format of the wrist menu's clock is. Search for \"Custom date and time format strings\" to see the elligible characters you can use.");
		if (_pluginEnabled.Value)
		{
			Harmony val = Harmony.CreateAndPatchAll(typeof(TimeScaleFixPlugin), (string)null);
			MethodInfo methodInfo = AccessTools.Method(typeof(FVRWristMenu), "Update", (Type[])null, (Type[])null);
			if ((object)methodInfo != null && Harmony.GetPatchInfo((MethodBase)methodInfo).Postfixes.Count > 1)
			{
				val.Unpatch((MethodBase)methodInfo, (HarmonyPatchType)0, val.Id);
			}
		}
	}

	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	[HarmonyPrefix]
	public static void FixPitch(ref float value)
	{
		value *= Time.timeScale;
	}

	[HarmonyPatch(typeof(FVRWristMenu), "TurnClockWise")]
	[HarmonyPatch(typeof(FVRWristMenuSection_MoveMode), "BTN_TurnClockwise")]
	[HarmonyPrefix]
	public static bool IncreaseTimeScale()
	{
		DiffTimeScale(1);
		return false;
	}

	[HarmonyPatch(typeof(FVRWristMenu), "TurnCounterClockWise")]
	[HarmonyPatch(typeof(FVRWristMenuSection_MoveMode), "BTM_TurnCounterClockwise")]
	[HarmonyPrefix]
	public static bool DecreaseTimeScale()
	{
		DiffTimeScale(-1);
		return false;
	}

	[HarmonyPatch(typeof(FVRWristMenu), "Awake")]
	[HarmonyPostfix]
	public static void OverflowClockText(FVRWristMenu __instance)
	{
		__instance.SetSelectedButton(0);
		__instance.Clock.verticalOverflow = (VerticalWrapMode)1;
		__instance.Clock.horizontalOverflow = (HorizontalWrapMode)1;
	}

	[HarmonyPatch(typeof(FVRWristMenu), "Update")]
	[HarmonyPostfix]
	public static void UpdateTimeScaleText(FVRWristMenu __instance, bool ___m_isActive)
	{
		if (!___m_isActive)
		{
			return;
		}
		__instance.Clock.text = "Time Scale: " + Time.timeScale.ToString(CultureInfo.InvariantCulture);
		if (!string.IsNullOrEmpty(_wristMenuDateTimeFormat.Value))
		{
			try
			{
				Text clock = __instance.Clock;
				clock.text = clock.text + "\n" + DateTime.Now.ToString(_wristMenuDateTimeFormat.Value);
			}
			catch
			{
			}
		}
	}

	private static void DiffTimeScale(int dir)
	{
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		Time.timeScale += _timeScaleIncrement.Value * (float)dir;
		Time.fixedDeltaTime = Time.timeScale / SteamVR.instance.hmd_DisplayFrequency;
		Time.timeScale = Mathf.Clamp(Time.timeScale, 0f, 1f);
		SM.PlayGlobalUISound((GlobalUISound)0, GM.CurrentPlayerBody.Head.position);
	}
}

plugins/Cursed.UnlockAll.dll

Decompiled a month 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.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using FistVR;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cursed.UnlockAll;

[BepInPlugin("dll.cursed.unlockall", "CursedDlls - Unlock All Items", "1.6")]
public class UnlockAllPlugin : BaseUnityPlugin
{
	private static ConfigEntry<bool> _pluginEnabled;

	private static ConfigEntry<bool> _overwriteRewardsTxt;

	private void Awake()
	{
		_pluginEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PluginEnabled", false, "Enables UnlockAll. UnlockAll treats every object in the spawner as unlocked, as well as adding every object in the game to the spawner.");
		_overwriteRewardsTxt = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "OverwriteRewardsTxt", false, "Overwrites the contents of Rewards.txt with every unlocked object. Even if this is false, however, all reward items will show in the Item Spawner.");
		if (_pluginEnabled.Value)
		{
			Harmony.CreateAndPatchAll(typeof(UnlockAllPlugin), (string)null);
		}
	}

	public static ItemSpawnerID[] AddFVRObjects(FVRObject[] fvrObjects)
	{
		//IL_00a2: 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_00b5: Invalid comparison between Unknown and I4
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Invalid comparison between Unknown and I4
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		List<FVRObject> list = new List<FVRObject>(fvrObjects);
		list.Reverse();
		List<ItemSpawnerID> list2 = new List<ItemSpawnerID>(Resources.LoadAll<ItemSpawnerID>("ItemSpawnerIDs"));
		foreach (ItemSpawnerID item in list2)
		{
			if ((Object)(object)item.MainObject != (Object)null)
			{
				list.Remove(item.MainObject);
			}
			if ((Object)(object)item.SecondObject != (Object)null)
			{
				list.Remove(item.SecondObject);
			}
		}
		foreach (FVRObject item2 in list)
		{
			if (!((Object)(object)item2 == (Object)null) && (int)item2.Category != 0 && (int)item2.Category != 51 && (int)item2.Category != 60)
			{
				ItemSpawnerID val = ScriptableObject.CreateInstance<ItemSpawnerID>();
				val.DisplayName = item2.DisplayName;
				val.SubHeading = item2.ItemID;
				val.Category = (EItemCategory)6;
				val.SubCategory = (ESubCategory)0;
				val.ItemID = "zzz_" + item2.ItemID + "_uncat";
				val.MainObject = item2;
				val.Secondaries = (ItemSpawnerID[])(object)new ItemSpawnerID[0];
				val.Secondaries_ByStringID = new List<string>();
				val.TutorialBlocks = new List<string>();
				val.ModTags = new List<string> { "UnlockAll - FVRObjects" };
				val.UsesHugeSpawnPad = true;
				list2.Add(val);
			}
		}
		return list2.ToArray();
	}

	[HarmonyPatch(typeof(IM), "GenerateItemDBs")]
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> GenerateItemDBsTranspiler(IEnumerable<CodeInstruction> instrs)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Expected O, but got Unknown
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Expected O, but got Unknown
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		return new CodeMatcher(instrs, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"ItemSpawnerIDs", (string)null),
			new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null)
		}).SetInstructionAndAdvance(new CodeInstruction(OpCodes.Ldloc_S, (object)2)).SetOperandAndAdvance((object)AccessTools.Method(typeof(UnlockAllPlugin), "AddFVRObjects", (Type[])null, (Type[])null))
			.InstructionEnumeration();
	}

	[HarmonyPatch(typeof(IM), "GenerateItemDBs")]
	[HarmonyPrefix]
	public static bool AddUncategorizedSubCategory(IM __instance)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: 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_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Expected O, but got Unknown
		SubCategory item = new SubCategory
		{
			Subcat = (ESubCategory)0,
			DisplayName = "UNCATEGORIZED",
			DoesDisplay_Sandbox = true,
			DoesDisplay_Unlocks = true,
			Sprite = null
		};
		List<SubCategory> list = __instance.CatDefs.Categories[6].Subcats.ToList();
		list.Add(item);
		__instance.CatDefs.Categories[6].Subcats = list.ToArray();
		return true;
	}

	[HarmonyPatch(typeof(RewardUnlocks), "IsRewardUnlocked", new Type[] { typeof(string) })]
	[HarmonyPrefix]
	public static bool IsRewardUnlockedPrefix(RewardUnlocks __instance, ref bool __result, string ID)
	{
		if (!__instance.Rewards.Contains(ID) && _overwriteRewardsTxt.Value)
		{
			__instance.UnlockReward(ID);
			GM.Rewards.SaveToFile();
		}
		__result = true;
		return false;
	}

	[HarmonyPatch(typeof(RewardUnlocks), "IsRewardUnlocked", new Type[] { typeof(ItemSpawnerID) })]
	[HarmonyPrefix]
	public static bool IsRewardUnlockedPrefix(RewardUnlocks __instance, ref bool __result, ItemSpawnerID ID)
	{
		__result = __instance.IsRewardUnlocked(ID.ItemID);
		return false;
	}
}

monomod/Assembly-CSharp.Cursed.RemoveRoundTypeCheck.mm.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace FistVR;

public class patch_FVRFireArmClip : FVRFireArmClip
{
	public class FVRLoadedRound
	{
		[NonSerialized]
		public FireArmRoundType LR_Type;

		public FireArmRoundClass LR_Class;

		public Mesh LR_Mesh;

		public Material LR_Material;

		public FVRObject LR_ObjectWrapper;

		public GameObject LR_ProjectilePrefab;
	}

	public FVRLoadedRound[] LoadedRounds;
}
public class patch_FVRFireArmRound : FVRFireArmRound
{
	public class ProxyRound
	{
		public GameObject GO;

		public MeshFilter Filter;

		public Renderer Renderer;

		public FireArmRoundType Type;

		public FireArmRoundClass Class;

		public FVRObject ObjectWrapper;
	}

	public List<ProxyRound> ProxyRounds;

	public void UpdateProxyRenderers()
	{
		//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)
		//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_0036: 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_0052: 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_006f: 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)
		if (ProxyRounds.Count <= 0)
		{
			return;
		}
		for (int i = 0; i < ProxyRounds.Count; i++)
		{
			FireArmRoundType val = ProxyRounds[i].Type;
			FireArmRoundClass @class = ProxyRounds[i].Class;
			if ((int)val == 0)
			{
				val = base.RoundType;
			}
			ProxyRounds[i].Filter.mesh = AM.GetRoundMesh(val, @class);
			ProxyRounds[i].Renderer.material = AM.GetRoundMaterial(val, @class);
		}
	}
}
public class patch_FVRLoadedRound : FVRLoadedRound
{
	[NonSerialized]
	public FireArmRoundType LR_Type;
}