Begin work on auto pricer
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using HarmonyLib;
|
||||||
|
|
||||||
|
namespace DavesPhatStore {
|
||||||
|
[HarmonyPatch]
|
||||||
|
public class AutoPricer {
|
||||||
|
[HarmonyTranspiler]
|
||||||
|
[HarmonyPatch(typeof(PlayerNetwork), "Update")]
|
||||||
|
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) {
|
||||||
|
var codes = new List<CodeInstruction>(instructions);
|
||||||
|
|
||||||
|
for (int i = 0; i < codes.Count; i++) {
|
||||||
|
var codeInstruction = codes[i];
|
||||||
|
if (codeInstruction.operand != null) {
|
||||||
|
Console.WriteLine(
|
||||||
|
$"'{codeInstruction.opcode}': '{codeInstruction.operand}'/'{codeInstruction.operand.GetType()}'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return codes.AsEnumerable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -35,6 +35,7 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="AutoPricer.cs" />
|
||||||
<Compile Include="Class1.cs"/>
|
<Compile Include="Class1.cs"/>
|
||||||
<Compile Include="EmployeeBuffs.cs" />
|
<Compile Include="EmployeeBuffs.cs" />
|
||||||
<Compile Include="PlayerFaking.cs" />
|
<Compile Include="PlayerFaking.cs" />
|
||||||
|
Reference in New Issue
Block a user