diff --git a/MechaDronesTweaks/MechaDronesTweaks.cs b/MechaDronesTweaks/MechaDronesTweaks.cs index 9e374f1..0e668b4 100644 --- a/MechaDronesTweaks/MechaDronesTweaks.cs +++ b/MechaDronesTweaks/MechaDronesTweaks.cs @@ -299,6 +299,33 @@ public static class MechaDronesTweaks } } + [HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), MethodType.Constructor)] + private static IEnumerable BuildTool_Reform_Constructor_Transpiler( + IEnumerable 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 BuildTool_Reform_ReformAction_Transpiler( IEnumerable instructions) diff --git a/MechaDronesTweaks/MechaDronesTweaks.csproj b/MechaDronesTweaks/MechaDronesTweaks.csproj index bc516fc..14080d8 100644 --- a/MechaDronesTweaks/MechaDronesTweaks.csproj +++ b/MechaDronesTweaks/MechaDronesTweaks.csproj @@ -5,7 +5,7 @@ MechaDronesTweaks org.soardev.mechadronestweaks DSP MOD - MechaDronesTweaks - 1.1.0 + 1.1.1 true latest diff --git a/MechaDronesTweaks/README.md b/MechaDronesTweaks/README.md index fecea26..44ff8d3 100644 --- a/MechaDronesTweaks/README.md +++ b/MechaDronesTweaks/README.md @@ -3,6 +3,14 @@ #### Some tweaks for mecha drones(Successor to FastDrones MOD) #### 机甲建设机调整(FastDrones MOD的后继者) +## Updates + +* 1.1.1 + * Fixed crash in `LargeAreaForTerraform` functions. + +* 1.1.0 + * Added `RemoveBuildRangeLimit`, `LargerAreaForUpgradeAndDismantle` and `LargerAreaForTerraform` options (Check Usage for details). + ## Usage * Inspired by [FastDrones](https://dsp.thunderstore.io/package/dkoppstein/FastDrones/), but patching IL codes, consuming less CPU to reduce lags on massive builds especially blueprints' put. * Does not affect current game-saves, which means: diff --git a/MechaDronesTweaks/package/manifest.json b/MechaDronesTweaks/package/manifest.json index e93ccf1..a68ad3b 100644 --- a/MechaDronesTweaks/package/manifest.json +++ b/MechaDronesTweaks/package/manifest.json @@ -1,6 +1,6 @@ { "name": "MechaDronesTweaks", - "version_number": "1.1.0", + "version_number": "1.1.1", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/MechaDronesTweaks", "description": "Some tweaks for mecha drones and build functions(Successor to FastDrones MOD) / 机甲建设机和建设功能调整(FastDrones MOD的后继者)", "dependencies": [