• Content count

  • Joined

  • Last visited

Community Reputation

6 Neutral

About Spork

  • Rank
    Junior Member
  1. Sure. The storage locker capacity code I posted above turned out to be wrong. It increased the storage on EVERYTHING, Storage Lockers, Fridge, Food Box, Conveyor box, etc. It was kinda cool, but after playing with it, it turned out having a large refrigerator caused lag issues when clicking on it. Version 2 just increases the Storage Locker and is working great in the new game I'm playing. Attached DLL below. The storage size is set to 1000 tons, take it or leave it. If you want a storage mod with a capacity other than 1000 tons you'll have to compile your own (not that hard), here is the correct code. using Harmony; using UnityEngine; namespace Patches { public static class LargeStorageLockerMod { [HarmonyPatch(typeof(StorageLockerConfig), "DoPostConfigureComplete")] public static class StorageLockerConfigPatch { public static void Postfix(StorageLockerConfig __instance, ref GameObject go) { Storage storage = go.AddOrGet<Storage>(); storage.capacityKg = 1000000f; } } } } LargeStorageLockerMod.dll
  2. Nevermind, I finally figured it out. Here is the code I used to do it if anyone else is looking to do the same. I'm not sure if it's the correct way to go about it, but it works. [HarmonyPatch(typeof(Storage), "OnPrefabInit")] public static class StorageMod { public static void Prefix(Storage __instance) { AccessTools.Field(typeof(Storage), "capacityKg").SetValue(__instance, 50000f); } }
  3. Can someone please make a mod that increases the storage capacity on the Storage Lockers. I've had some success making mods for some other buildings but after hours of trying I can't figure out how to change the storage size on the lockers. Great job on the ModLoader btw, I've had a lot of fun messing around with it.