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:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user