mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 21:33:28 +08:00
minor fix
This commit is contained in:
@@ -1794,12 +1794,13 @@ public static class FactoryPatch
|
|||||||
);
|
);
|
||||||
var inst = matcher.InstructionAt(1).Clone();
|
var inst = matcher.InstructionAt(1).Clone();
|
||||||
var pos2 = matcher.Pos + 2;
|
var pos2 = matcher.Pos + 2;
|
||||||
matcher.Start().Advance(pos).RemoveInstructions(pos2 - pos)
|
matcher.Start().Advance(pos);
|
||||||
.Insert(
|
var labels = matcher.Labels;
|
||||||
new CodeInstruction(OpCodes.Ldloc_1),
|
matcher.RemoveInstructions(pos2 - pos).Insert(
|
||||||
new CodeInstruction(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(Player), nameof(Player.inhandItemCount))),
|
new CodeInstruction(OpCodes.Ldloc_1).WithLabels(labels),
|
||||||
inst
|
new CodeInstruction(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(Player), nameof(Player.inhandItemCount))),
|
||||||
);
|
inst
|
||||||
|
);
|
||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user