Beispiel #1
0
        public static void Patch()
        {
            HarmonyHelper.Patch();
            new HorizontalWallLocker().Patch();

            Logger.Log("Patched");
        }
Beispiel #2
0
        public static void Patch()
        {
            HarmonyHelper.Patch();
            new ESS().Patch();

            Common.Logger.Log("Patched");
        }
 public static bool Init()
 {
     try
     {
         MethodInfo methodBase;
         MethodInfo methodPatcher;
         {
             Logger.Log("Started patching Farmer");
             methodBase    = typeof(Player).GetMethod("getItemCount", BindingFlags.Instance | BindingFlags.Public);
             methodPatcher = typeof(FarmerPatcher).GetMethod("Prefix", BindingFlags.Static | BindingFlags.NonPublic);
             Logger.Log("Trying to patch...");
             if (!HarmonyHelper.Patch(methodBase, methodPatcher))
             {
                 return(false);
             }
         }
         {
             Logger.Log("Started patching consumeIngredients");
             methodBase    = typeof(CraftingRecipe).GetMethod("consumeIngredients", BindingFlags.Instance | BindingFlags.Public);
             methodPatcher = typeof(ConsumeIngredientsPatcher).GetMethod("Prefix", BindingFlags.Static | BindingFlags.NonPublic);
             Logger.Log("Trying to patch...");
             if (!HarmonyHelper.Patch(methodBase, methodPatcher))
             {
                 return(false);
             }
         }
     }
     catch (Exception e)
     {
         Logger.Error(e.ToString());
         return(false);
     }
     return(true);
 }
Beispiel #4
0
        public static void Patch()
        {
            try
            {
                HarmonyHelper.Patch();

                Logger.Log("Patched successfully!");

                PFC_Config.Enable = PlayerPrefsExtra.GetBool("pfcEnable", true);

                Logger.Log("Obtained values from config");

                OptionsPanelHandler.RegisterModOptions(new Options("Pickup Full Carry-alls"));

                Logger.Log("Registered mod options");

                ItemActionHelper.RegisterAction(MouseButton.Middle, TechType.LuggageBag, InventoryOpener.OnMiddleClick, "open storage", InventoryOpener.Condition);
                ItemActionHelper.RegisterAction(MouseButton.Middle, TechType.SmallStorage, InventoryOpener.OnMiddleClick, "open storage", InventoryOpener.Condition);

                /*
                 * ItemActionHandler.RegisterMiddleClickAction(TechType.LuggageBag, InventoryOpener.OnMiddleClick, "open storage");
                 * ItemActionHandler.RegisterMiddleClickAction(TechType.SmallStorage, InventoryOpener.OnMiddleClick, "open storage");
                 *
                 * Logger.Log("Registered middle click actions");
                 */
            }
            catch (Exception e)
            {
                Logger.Exception(e, LoggedWhen.Initializing);
            }
        }
Beispiel #5
0
        public static void Patch()
        {
            HarmonyHelper.Patch();

            new LightweightUltraHighCapacityTank().Patch();
            new UltraGlideSwimChargeFins().Patch();
            new ReinforcedStillsuit().Patch();

            AlexejheroYTB.Common.Logger.Log("Patched");
        }
Beispiel #6
0
        public static void Patch()
        {
            HarmonyHelper.Patch();
            Logger.Log("Patched successfully!");

            IBA_Config.Enable = PlayerPrefsExtra.GetBool("ibaEnable", true);
            Logger.Log("Obtained values from config");

            OptionsPanelHandler.RegisterModOptions(new Options("Instant Bulkhead Animations"));
            Logger.Log("Registered mod options");
        }
Beispiel #7
0
        public static void Patch()
        {
            TechType techType = TechTypeHandler.AddTechType("CyclopsInceptionModule", "Cyclops Inception Module", "Uses precursor technology to shrink any other cyclops near the docking hatch, allowing them to dock.");

            CraftDataHandler.SetEquipmentType(techType, EquipmentType.CyclopsModule);
            CraftDataHandler.AddToGroup(TechGroup.Cyclops, TechCategory.CyclopsUpgrades, techType);
            UpgradeManager.RegisterReusableHandlerCreator(() => new InceptionUpgrade(techType));

            Hooks.Update += InceptionManager.UpdateUndockTime;

            HarmonyHelper.Patch();
        }
Beispiel #8
0
        public static void Patch()
        {
            try
            {
                HarmonyHelper.Patch();

                Logger.Log("Patched successfully!");
            }
            catch (Exception e)
            {
                Logger.Exception(e, LoggedWhen.Initializing);
            }
        }
Beispiel #9
0
        public static void Patch()
        {
            HarmonyHelper.Patch();
            Logger.Log("Patched successfully!");

            PFC_Config.Enable = PlayerPrefsExtra.GetBool("pfcEnable", true);
            Logger.Log("Obtained values from config");

            OptionsPanelHandler.RegisterModOptions(new Options("Pickup Full Carry-alls"));
            Logger.Log("Registered mod options");

            ItemActionHandler.RegisterMiddleClickAction(TechType.LuggageBag, InventoryOpener.OnMiddleClick, "open storage", InventoryOpener.Condition);
            ItemActionHandler.RegisterMiddleClickAction(TechType.SmallStorage, InventoryOpener.OnMiddleClick, "open storage", InventoryOpener.Condition);
        }
Beispiel #10
0
        public static void Patch()
        {
            HarmonyHelper.Patch();

            Logger.Log($"Patched successfully!");

            CDC_Config.Min = PlayerPrefs.GetInt("cdcMin", 1);
            CDC_Config.Max = PlayerPrefs.GetInt("cdcMax", 3);

            Logger.Log("Obtained min/max values from config");

            OptionsPanelHandler.RegisterModOptions(new Options("Configurable Drillable Count"));

            Logger.Log("Registered mod options");
        }
Beispiel #11
0
        public static void Patch()
        {
            try
            {
                HarmonyHelper.Patch();

                Logger.Log("Patched successfully!");

                LanguageHandler.SetLanguageLine("Tooltip_Bleach", "NaClO. Sodium hypochlorite bleach. Sanitizing applications.\n(If you cannot drink it, you need to craft a new one)");

                Logger.Log("Updated Bleach tooltip");
            }
            catch (Exception e)
            {
                Logger.Exception(e, LoggedWhen.Initializing);
            }
        }
Beispiel #12
0
 public static void Patch()
 {
     HarmonyHelper.Patch();
     new Radio().Patch();
     ControlItems.Patch();
 }