using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("FastReelMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("FastReelMod")] [assembly: AssemblyTitle("FastReelMod")] [assembly: AssemblyVersion("1.0.0.0")] namespace FastReelMod; [BepInPlugin("com.mod.fastreel", "Fast Reel Mod", "1.0.0")] public class FastReelMod : BaseUnityPlugin { private void Awake() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) new Harmony("com.mod.fastreel").PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"FastReelMod loaded!"); } } [HarmonyPatch(typeof(FishingRod), "FixedUpdate")] public class FishingRod_FixedUpdate_Patch { private static void Prefix(FishingRod __instance) { if (Keyboard.current != null && ((ButtonControl)Keyboard.current.leftShiftKey).isPressed && Traverse.Create((object)__instance).Field("_isReelingIn").GetValue()) { Traverse obj = Traverse.Create((object)__instance).Field("_curReelSpeedMulti"); float value = obj.GetValue(); obj.SetValue((object)Mathf.Max(value, 6f)); } } }