1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-08 22:13:30 +08:00

MechaDronesTweaks 1.1.1

This commit is contained in:
2023-07-11 16:10:52 +08:00
parent a0ae2f2101
commit bf6808f565
4 changed files with 37 additions and 2 deletions

View File

@@ -299,6 +299,33 @@ public static class MechaDronesTweaks
}
}
[HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), MethodType.Constructor)]
private static IEnumerable<CodeInstruction> BuildTool_Reform_Constructor_Transpiler(
IEnumerable<CodeInstruction> instructions)
{
if (!largerAreaForTerraform)
{
foreach (var instr in instructions)
{
yield return instr;
}
}
else
{
foreach (var instr in instructions)
{
if (instr.opcode == OpCodes.Ldc_I4_S && instr.OperandIs(100))
{
yield return new CodeInstruction(OpCodes.Ldc_I4, 900);
}
else
{
yield return instr;
}
}
}
}
[HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), nameof(BuildTool_Reform.ReformAction))]
private static IEnumerable<CodeInstruction> BuildTool_Reform_ReformAction_Transpiler(
IEnumerable<CodeInstruction> instructions)