mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 15:33:31 +08:00
minor fix
This commit is contained in:
@@ -89,6 +89,17 @@ public static class FactoryPatch
|
|||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), MethodType.Constructor)]
|
||||||
|
private static IEnumerable<CodeInstruction> BuildTool_Reform_Constructor_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
|
{
|
||||||
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
|
matcher.MatchForward(false,
|
||||||
|
new CodeMatch(ci => ci.opcode == OpCodes.Ldc_I4_S && ci.OperandIs(100))
|
||||||
|
);
|
||||||
|
matcher.Repeat(m => m.SetAndAdvance(OpCodes.Ldc_I4, 900));
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
}
|
||||||
|
|
||||||
public static class NightLight
|
public static class NightLight
|
||||||
{
|
{
|
||||||
private static Harmony _patch;
|
private static Harmony _patch;
|
||||||
@@ -495,17 +506,6 @@ public static class FactoryPatch
|
|||||||
_patch = null;
|
_patch = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), MethodType.Constructor)]
|
|
||||||
private static IEnumerable<CodeInstruction> BuildTool_Reform_Constructor_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
|
||||||
{
|
|
||||||
var matcher = new CodeMatcher(instructions, generator);
|
|
||||||
matcher.MatchForward(false,
|
|
||||||
new CodeMatch(ci => ci.opcode == OpCodes.Ldc_I4_S && ci.OperandIs(100))
|
|
||||||
);
|
|
||||||
matcher.Repeat(m => m.SetAndAdvance(OpCodes.Ldc_I4, 900));
|
|
||||||
return matcher.InstructionEnumeration();
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), nameof(BuildTool_Reform.ReformAction))]
|
[HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), nameof(BuildTool_Reform.ReformAction))]
|
||||||
private static IEnumerable<CodeInstruction> BuildTool_Reform_ReformAction_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
private static IEnumerable<CodeInstruction> BuildTool_Reform_ReformAction_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user