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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user