1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 15:33:31 +08:00

Minor code cleanup

This commit is contained in:
2022-09-09 22:18:40 +08:00
parent b3d80b7d8b
commit a6ebd39b11

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
using BepInEx; using BepInEx;
using HarmonyLib; using HarmonyLib;
@@ -94,8 +93,6 @@ public class CheatEnabler : BaseUnityPlugin
private class AlwaysInfiniteResource private class AlwaysInfiniteResource
{ {
private static FieldInfo _rmulField = AccessTools.Field(typeof(GameDesc), nameof(GameDesc.resourceMultiplier));
[HarmonyTranspiler] [HarmonyTranspiler]
[HarmonyPatch(typeof(GameDesc), "isInfiniteResource", MethodType.Getter)] [HarmonyPatch(typeof(GameDesc), "isInfiniteResource", MethodType.Getter)]
private static IEnumerable<CodeInstruction> ForceInfiniteResource(IEnumerable<CodeInstruction> instructions) private static IEnumerable<CodeInstruction> ForceInfiniteResource(IEnumerable<CodeInstruction> instructions)