From bae06d7278da1ea99a0a209fafcf4604ed0b1745 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Fri, 23 Aug 2024 17:28:06 +0800 Subject: [PATCH] Fix water pump anywhere --- CheatEnabler/PlanetPatch.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CheatEnabler/PlanetPatch.cs b/CheatEnabler/PlanetPatch.cs index 509aea4..bdfa3ff 100644 --- a/CheatEnabler/PlanetPatch.cs +++ b/CheatEnabler/PlanetPatch.cs @@ -49,9 +49,9 @@ public static class PlanetPatch { var matcher = new CodeMatcher(instructions, generator); matcher.MatchForward(false, - new CodeMatch(instr => instr.opcode == OpCodes.Ldc_I4_S && instr.OperandIs(23)) + new CodeMatch(instr => instr.opcode == OpCodes.Ldc_I4_S && instr.OperandIs((int)EBuildCondition.NeedWater)) ).Advance(1).MatchForward(false, - new CodeMatch(instr => instr.opcode == OpCodes.Ldc_I4_S && instr.OperandIs(23)) + new CodeMatch(instr => instr.opcode == OpCodes.Ldc_I4_S && instr.OperandIs((int)EBuildCondition.NeedWater)) ); matcher.Repeat(codeMatcher => { @@ -60,6 +60,7 @@ public static class PlanetPatch return matcher.InstructionEnumeration(); } } + private static class TerraformAnyway { private static Harmony _patch;