using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; using HarmonyLib; internal class Dayuppy_ZoomMapPatches { [HarmonyPatch] public class XUiC_MapAreaUpdate { private static IEnumerable TargetMethods() { yield return AccessTools.Method(typeof(XUiC_MapArea), nameof(XUiC_MapArea.Update)); yield return AccessTools.Method(typeof(XUiC_MapArea), "onMapScrolled"); } public static IEnumerable Transpiler(IEnumerable instructions) { List codes = new List(instructions); float newMaxZoomOut = 50f; for(int i = 0; i < codes.Count; i++) { if(codes[i].opcode == OpCodes.Ldc_R4 && codes[i].operand is 6.15f) { codes[i].operand = newMaxZoomOut; break; } } return codes; } } }