mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 21:33:28 +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)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<AssemblyName>MechaDronesTweaks</AssemblyName>
|
||||
<BepInExPluginGuid>org.soardev.mechadronestweaks</BepInExPluginGuid>
|
||||
<Description>DSP MOD - MechaDronesTweaks</Description>
|
||||
<Version>1.1.0</Version>
|
||||
<Version>1.1.1</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user