Ejemplo n.º 1
0
        internal static bool Prefix(Vehicle __instance, int slotID, TechType techType, ref ItemsContainer __result)
        {
            if (!StorageModuleMgr.IsStorageModule(techType))
            {
                return(true);
            }
            var callingMethodName = new StackFrame(2).GetMethod().Name;

            __result = StorageModuleMgr.GetStorageInSlot(ref __instance, slotID, techType, callingMethodName);
            return(false);
        }
Ejemplo n.º 2
0
        public static void Patch()
        {
            CraftTreeHandler.AddTabNode(
                CraftTree.Type.Workbench,
                WorkBenchTab,
                "Storage Modules",
                SpriteManager.Get(TechType.VehicleStorageModule));

            StorageModuleMgr.RegisterModules();

            CraftDataHandler.SetQuickSlotType(TechType.VehicleStorageModule, QuickSlotType.Instant);

            var harmony = HarmonyInstance.Create("Yamitatsu.BetterVehicleStorage");

            harmony.PatchAll(Assembly.GetExecutingAssembly());
        }
Ejemplo n.º 3
0
 internal static bool Prefix(SeaMoth __instance, Pickupable pickupable, bool verbose, ref bool __result)
 {
     __result = StorageModuleMgr.IsAllowedToRemove(__instance, pickupable, verbose);
     return(false);
 }
Ejemplo n.º 4
0
 internal static void Postfix(ref SeaMoth __instance, TechType techType, int slotID)
 {
     StorageModuleMgr.OnUpgradeModuleUse(__instance, techType, slotID);
 }
Ejemplo n.º 5
0
 internal static void Postfix(ref SeaMoth __instance, int slotID, TechType techType, bool added)
 {
     StorageModuleMgr.UpdateSeamothStorage(ref __instance, slotID, techType, added);
 }
 internal static void Postfix(ref uGUI_ItemsContainer __instance, int width, int height)
 {
     StorageModuleMgr.fixOnResize(ref __instance, width, height);
 }
        internal static bool Prefix(Equipment __instance, string slot, ref TechType __result)
        {
            var callingMethodName = new StackFrame(2).GetMethod().Name;

            return(StorageModuleMgr.GetTechTypeInSlot(__instance, slot, ref __result, callingMethodName));
        }
 internal static bool Prefix(Equipment __instance, string slot, Pickupable pickupable, bool verbose,
                             ref bool __result)
 {
     return(StorageModuleMgr.AllowedToAdd(__instance, slot, pickupable, verbose, ref __result));
 }
 internal static void Postfix(Exosuit __instance)
 {
     StorageModuleMgr.UpdateExosuitStorageSize(ref __instance);
 }
 internal static void Postfix(ref Exosuit __instance, TechType techType, int slotID)
 {
     StorageModuleMgr.OnUpgradeModuleUseFromExosuit(__instance, techType, slotID);
 }
 internal static void Postfix(ref Exosuit __instance, int slotID, TechType techType, bool added)
 {
     StorageModuleMgr.UpdateExosuitStorage(ref __instance, slotID, techType, added);
 }