using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("NoHaulerValueLimit")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NoHaulerValueLimit")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("69fbca97-56ec-44b5-8c14-a1ef4c1d0b87")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace InfiniteHaulerCapacity; [BepInPlugin("com.nuke_land.InfiniteHaulerCapacity", "Infinite Hauler Capacity", "1.0.0")] public class Plugin : BaseUnityPlugin { [HarmonyPatch(typeof(ItemValuableBox))] public static class Patches { [HarmonyPatch(/*Could not decode attribute arguments.*/)] [HarmonyPostfix] public static void ConstructorPostfix(ItemValuableBox __instance) { if ((Object)(object)__instance != (Object)null) { Traverse.Create((object)__instance).Field("valueLimit").SetValue((object)1E+09f); } } [HarmonyPatch(typeof(ItemValuableBox), "OnObjectsFound")] [HarmonyPrefix] public static bool OnObjectsFoundPrefix(ItemValuableBox __instance, ref List foundObjects) { Traverse.Create((object)__instance).Field("valueLimit").SetValue((object)1E+09f); return true; } [HarmonyPatch(typeof(ItemValuableBox), "UpdateValue")] [HarmonyPrefix] public static bool UpdateValuePrefix(ItemValuableBox __instance, ref float newValue) { Traverse.Create((object)__instance).Field("valueLimit").SetValue((object)1E+09f); return true; } [HarmonyPatch(typeof(ItemValuableBox), "Update")] [HarmonyPostfix] public static void UpdatePostfix(ItemValuableBox __instance) { if ((Object)(object)__instance != (Object)null) { Traverse.Create((object)__instance).Field("valueLimit").SetValue((object)1E+09f); } } } private void Awake() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)"Infinite Hauler Capacity mod LOADED!"); new Harmony("com.nuke_land.InfiniteHaulerCapacity").PatchAll(); } }