Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of NutcrackerConfig v1.0.0
NutcrackerConfig/NutcrackerConfig.dll
Decompiled 18 hours agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("EnhancedNutcracker")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("EnhancedNutcracker")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b597a258-9ea4-49a3-bad2-c601e448f3c6")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace NutcrackerConfig; [BepInPlugin("yazirushi.NutcrackerConfig", "NutcrackerConfig", "1.0.0")] public class NutcrackerConfig : BaseUnityPlugin { public enum State { Vanilla, Reloading, Aiming } private readonly Harmony harmony = new Harmony("yazirushi.NutcrackerConfig"); internal static ManualLogSource mls; public static ConfigEntry<int> StartHuntTiming; public static ConfigEntry<int> FastShotTiming; public static ConfigEntry<int> SecondShotTiming; public static ConfigEntry<float> ShotWaitTime_Fast; public static ConfigEntry<float> ShotWaitTime_Second; public static ConfigEntry<float> ShotWaitTime_Normal; public static ConfigEntry<float> AfterWaitTime; public static ConfigEntry<float> SoundPitch_Min; public static ConfigEntry<float> SoundPitch_Max; public static ConfigEntry<int> MultiShot; public static ConfigEntry<float> ReloadTime_Start; public static ConfigEntry<float> ReloadTime_Main; public static ConfigEntry<float> ReloadTime_End; public static ConfigEntry<int> GunValue; public static ConfigEntry<int> GunShell; public static ConfigEntry<State> IgnoreTiming; public static ConfigEntry<int> DamageClamp; public static ConfigEntry<float> MoveSpeed_HuntAim; public static ConfigEntry<float> MoveSpeed_NormalAim; public static ConfigEntry<float> MoveSpeed_Stun; public static ConfigEntry<float> MoveSpeed_Walk; public static ConfigEntry<float> MoveSpeed_Specter; public static ConfigEntry<float> MoveSpeed_Chase; public static ConfigEntry<float> MoveSpeed_Reload; public static ConfigEntry<float> MoveSpeed_NearChase; public static ConfigEntry<bool> DebugLog; private void Awake() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Expected O, but got Unknown //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Expected O, but got Unknown //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Expected O, but got Unknown //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Expected O, but got Unknown //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Expected O, but got Unknown //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Expected O, but got Unknown //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Expected O, but got Unknown //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Expected O, but got Unknown //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Expected O, but got Unknown StartHuntTiming = ((BaseUnityPlugin)this).Config.Bind<int>("Aim Setting", "Start Hunt Timing", 3, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); FastShotTiming = ((BaseUnityPlugin)this).Config.Bind<int>("Aim Setting", "Fast Shot Timing", 1, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); SecondShotTiming = ((BaseUnityPlugin)this).Config.Bind<int>("Aim Setting", "Second Shot Timing", 1, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); ShotWaitTime_Fast = ((BaseUnityPlugin)this).Config.Bind<float>("Aim Setting", "Shot Wait Time (Fast)", 0.5f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); ShotWaitTime_Second = ((BaseUnityPlugin)this).Config.Bind<float>("Aim Setting", "Shot Wait Time (Second)", 1.3f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); ShotWaitTime_Normal = ((BaseUnityPlugin)this).Config.Bind<float>("Aim Setting", "Shot Wait Time (Normal)", 1.75f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); SoundPitch_Min = ((BaseUnityPlugin)this).Config.Bind<float>("Aim Setting", "Sound Pitch (Min)", 0.9f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); SoundPitch_Max = ((BaseUnityPlugin)this).Config.Bind<float>("Aim Setting", "Sound Pitch (Max)", 1.1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MultiShot = ((BaseUnityPlugin)this).Config.Bind<int>("Aim Setting", "Multi Shot", 1, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); AfterWaitTime = ((BaseUnityPlugin)this).Config.Bind<float>("Aim Setting", "After Shot Wait Time", 0.35f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); ReloadTime_Start = ((BaseUnityPlugin)this).Config.Bind<float>("Reload Setting", "Reload Time (Start)", 0.32f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); ReloadTime_Main = ((BaseUnityPlugin)this).Config.Bind<float>("Reload Setting", "Reload Time (Main)", 0.92f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); ReloadTime_End = ((BaseUnityPlugin)this).Config.Bind<float>("Reload Setting", "Reload Time (End)", 0.5f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); GunValue = ((BaseUnityPlugin)this).Config.Bind<int>("Gun Setting", "Gun Value", 60, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); GunShell = ((BaseUnityPlugin)this).Config.Bind<int>("Gun Setting", "Gun Shell", 2, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); IgnoreTiming = ((BaseUnityPlugin)this).Config.Bind<State>("Hit Setting", "Ignore Timing", State.Vanilla, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); DamageClamp = ((BaseUnityPlugin)this).Config.Bind<int>("Hit Setting", "Damage Clamp", 0, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_HuntAim = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (HuntAim)", 2.25f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_NormalAim = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (NormalAim)", 0f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_Stun = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (Stun)", 0f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_Walk = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (Walk)", 5.5f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_Specter = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (Specter)", 0f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_Chase = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (Chase)", 7f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_Reload = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (Reload)", 0f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); MoveSpeed_NearChase = ((BaseUnityPlugin)this).Config.Bind<float>("Move Setting", "Move Speed (NearChase(Un used?))", 0f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); DebugLog = ((BaseUnityPlugin)this).Config.Bind<bool>("Debug", "Log (Un used)", false, new ConfigDescription("Whether to output debug logs", (AcceptableValueBase)null, Array.Empty<object>())); mls = ((BaseUnityPlugin)this).Logger; mls.LogInfo((object)"Starting NutcrackerConfig..."); harmony.PatchAll(); } } [HarmonyPatch(typeof(NutcrackerEnemyAI), "Update")] public class UpdatePatch { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown List<CodeInstruction> list = instructions.ToList(); list.RemoveAt(59); list.Insert(59, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(UpdatePatch), "GetMoveSpeed_Stun", (Type[])null, (Type[])null))); list.RemoveAt(129); list.Insert(129, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(UpdatePatch), "GetMoveSpeed_Walk", (Type[])null, (Type[])null))); list.RemoveAt(214); list.Insert(214, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(UpdatePatch), "GetMoveSpeed_Specter", (Type[])null, (Type[])null))); list.RemoveAt(297); list.Insert(297, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(UpdatePatch), "GetMoveSpeed_Reload", (Type[])null, (Type[])null))); list.RemoveAt(302); list.Insert(302, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(UpdatePatch), "GetMoveSpeed_Chase", (Type[])null, (Type[])null))); list.RemoveAt(446); list.Insert(446, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(UpdatePatch), "GetMoveSpeed_NearChase", (Type[])null, (Type[])null))); return list; } public static float GetMoveSpeed_Stun() { return NutcrackerConfig.MoveSpeed_Stun.Value; } public static float GetMoveSpeed_Walk() { return NutcrackerConfig.MoveSpeed_Walk.Value; } public static float GetMoveSpeed_Specter() { return NutcrackerConfig.MoveSpeed_Specter.Value; } public static float GetMoveSpeed_Chase() { return NutcrackerConfig.MoveSpeed_Chase.Value; } public static float GetMoveSpeed_Reload() { return NutcrackerConfig.MoveSpeed_Reload.Value; } public static float GetMoveSpeed_NearChase() { return NutcrackerConfig.MoveSpeed_NearChase.Value; } } [HarmonyPatch(typeof(NutcrackerEnemyAI), "HitEnemy")] public class HitPatch { private static readonly FieldInfo inAiming = AccessTools.Field(typeof(NutcrackerEnemyAI), "aimingGun"); private static readonly FieldInfo inInspecting = AccessTools.Field(typeof(NutcrackerEnemyAI), "isInspecting"); private static readonly FieldInfo inReloading = AccessTools.Field(typeof(NutcrackerEnemyAI), "reloadingGun"); private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown List<CodeInstruction> list = instructions.ToList(); Label label = generator.DefineLabel(); list.RemoveRange(11, 6); list.Insert(11, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(HitPatch), "StateCheck", (Type[])null, (Type[])null))); list.Insert(12, new CodeInstruction(OpCodes.Brfalse_S, (object)label)); list.Insert(25, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(HitPatch), "DamageCheck", (Type[])null, (Type[])null))); list.Insert(28, CodeInstructionExtensions.WithLabels(new CodeInstruction(OpCodes.Nop, (object)null), new Label[1] { label })); return list; } private static bool StateCheck(NutcrackerEnemyAI __instance) { return NutcrackerConfig.IgnoreTiming.Value switch { NutcrackerConfig.State.Vanilla => (bool)inInspecting.GetValue(__instance) || ((EnemyAI)__instance).currentBehaviourStateIndex == 2, NutcrackerConfig.State.Reloading => (bool)inReloading.GetValue(__instance), NutcrackerConfig.State.Aiming => (bool)inAiming.GetValue(__instance), _ => (bool)inInspecting.GetValue(__instance) || ((EnemyAI)__instance).currentBehaviourStateIndex == 2, }; } private static int DamageCheck(int damage) { if (NutcrackerConfig.DamageClamp.Value == 0) { return damage; } return Mathf.Clamp(damage, 0, NutcrackerConfig.DamageClamp.Value); } } [HarmonyPatch(typeof(NutcrackerEnemyAI), "GrabGun")] public class GrabPatch { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown List<CodeInstruction> list = instructions.ToList(); list.RemoveAt(17); list.Insert(17, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(GrabPatch), "GetGunValue", (Type[])null, (Type[])null))); list.RemoveAt(47); list.Insert(47, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(GrabPatch), "GetGunShell", (Type[])null, (Type[])null))); return list; } public static int GetGunValue() { return NutcrackerConfig.GunValue.Value; } public static int GetGunShell() { return NutcrackerConfig.GunShell.Value; } } [HarmonyPatch(typeof(NutcrackerEnemyAI), "ReloadGunClientRpc")] public class ReloadPatch_1 { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown List<CodeInstruction> list = instructions.ToList(); list.RemoveAt(58); list.Insert(58, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(ReloadPatch_1), "GetGunShell", (Type[])null, (Type[])null))); return list; } public static int GetGunShell() { return NutcrackerConfig.GunShell.Value; } } [HarmonyPatch] public class ReloadPatch_2 { private static MethodBase TargetMethod() { Type type = AccessTools.FirstInner(typeof(NutcrackerEnemyAI), (Func<Type, bool>)((Type t) => t.Name.Contains("ReloadGun"))); return AccessTools.Method(type, "MoveNext", (Type[])null, (Type[])null); } private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown List<CodeInstruction> list = instructions.ToList(); list.RemoveAt(30); list.Insert(30, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(ReloadPatch_2), "GetReloadTime_Start", (Type[])null, (Type[])null))); list.RemoveAt(48); list.Insert(48, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(ReloadPatch_2), "GetReloadTime_Main", (Type[])null, (Type[])null))); list.RemoveAt(71); list.Insert(71, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(ReloadPatch_2), "GetReloadTime_End", (Type[])null, (Type[])null))); return list; } public static float GetReloadTime_Start() { return NutcrackerConfig.ReloadTime_Start.Value; } public static float GetReloadTime_Main() { return NutcrackerConfig.ReloadTime_Main.Value; } public static float GetReloadTime_End() { return NutcrackerConfig.ReloadTime_End.Value; } } [HarmonyPatch] internal class AimGunPatch { private static Dictionary<object, int> shot_counter = new Dictionary<object, int>(); private static Dictionary<object, int> shell_memory = new Dictionary<object, int>(); private static MethodBase TargetMethod() { Type type = AccessTools.FirstInner(typeof(NutcrackerEnemyAI), (Func<Type, bool>)((Type t) => t.Name.Contains("AimGun"))); return AccessTools.Method(type, "MoveNext", (Type[])null, (Type[])null); } private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown List<CodeInstruction> list = instructions.ToList(); Label label = generator.DefineLabel(); Label label2 = generator.DefineLabel(); list.RemoveAt(42); list.Insert(42, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetStartHuntTiming", (Type[])null, (Type[])null))); list.RemoveAt(45); list.Insert(45, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetAimMoveSpeed_Hunt", (Type[])null, (Type[])null))); list.RemoveAt(49); list.Insert(49, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetAimMoveSpeed_Normal", (Type[])null, (Type[])null))); list.RemoveAt(60); list.Insert(60, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetFastShotTiming", (Type[])null, (Type[])null))); list.RemoveAt(63); list.Insert(63, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetWaitTime_Fast", (Type[])null, (Type[])null))); list.RemoveAt(78); list.Insert(78, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetSecondShotTiming", (Type[])null, (Type[])null))); list.RemoveAt(81); list.Insert(81, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetWaitTime_Second", (Type[])null, (Type[])null))); list.RemoveAt(94); list.Insert(94, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetWaitTime_Normal", (Type[])null, (Type[])null))); list.Insert(116, new CodeInstruction(OpCodes.Br, (object)label2)); list.Insert(117, CodeInstructionExtensions.WithLabels(new CodeInstruction(OpCodes.Nop, (object)null), new Label[1] { label })); list.RemoveAt(127); list.Insert(127, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetAfterWaitTime", (Type[])null, (Type[])null))); list.Insert(138, CodeInstructionExtensions.WithLabels(new CodeInstruction(OpCodes.Nop, (object)null), new Label[1] { label2 })); list.Insert(139, new CodeInstruction(OpCodes.Ldarg_0, (object)null)); list.Insert(140, new CodeInstruction(OpCodes.Ldloc_1, (object)null)); list.Insert(141, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "MultiShotCheck", (Type[])null, (Type[])null))); list.Insert(142, new CodeInstruction(OpCodes.Brfalse_S, (object)label)); list.RemoveAt(157); list.Insert(157, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetSoundPitch_Min", (Type[])null, (Type[])null))); list.RemoveAt(158); list.Insert(158, new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(AimGunPatch), "GetSoundPitch_Max", (Type[])null, (Type[])null))); return list; } public static bool MultiShotCheck(object coroutine, NutcrackerEnemyAI nutcracker) { if (!shot_counter.ContainsKey(coroutine)) { shot_counter.Add(coroutine, -1); int shellsLoaded = nutcracker.gun.shellsLoaded; shell_memory.Add(coroutine, shellsLoaded); } shot_counter[coroutine]++; bool flag = shot_counter[coroutine] >= NutcrackerConfig.MultiShot.Value; if (flag) { shot_counter.Remove(coroutine); nutcracker.gun.shellsLoaded = shell_memory[coroutine] - 1; shell_memory.Remove(coroutine); } return flag; } public static int GetStartHuntTiming() { return NutcrackerConfig.StartHuntTiming.Value; } public static int GetFastShotTiming() { return NutcrackerConfig.FastShotTiming.Value; } public static int GetSecondShotTiming() { return NutcrackerConfig.SecondShotTiming.Value; } public static float GetAimMoveSpeed_Hunt() { return NutcrackerConfig.MoveSpeed_HuntAim.Value; } public static float GetAimMoveSpeed_Normal() { return NutcrackerConfig.MoveSpeed_NormalAim.Value; } public static float GetWaitTime_Fast() { return NutcrackerConfig.ShotWaitTime_Fast.Value; } public static float GetWaitTime_Second() { return NutcrackerConfig.ShotWaitTime_Second.Value; } public static float GetWaitTime_Normal() { return NutcrackerConfig.ShotWaitTime_Normal.Value; } public static float GetAfterWaitTime() { return NutcrackerConfig.AfterWaitTime.Value; } public static float GetSoundPitch_Min() { return NutcrackerConfig.SoundPitch_Min.Value; } public static float GetSoundPitch_Max() { return NutcrackerConfig.SoundPitch_Max.Value; } }