Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
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<MethodInfo> TargetMethods()
{
yield return AccessTools.Method(typeof(XUiC_MapArea), nameof(XUiC_MapArea.Update));
yield return AccessTools.Method(typeof(XUiC_MapArea), "onMapScrolled");
}
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
List<CodeInstruction> codes = new List<CodeInstruction>(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;
}
}
}