public static void Patch()
        {
#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
#endif

            try
            {
                QuickLogger.Info("Started patching - " + QuickLogger.GetAssemblyVersion());

                CrossModUpdates();

                CraftTreeHandler.AddTabNode(CraftTree.Type.Workbench, WorkBenchTab, "Armor Modules", SpriteManager.Get(TechType.VehicleArmorPlating));

                //Handle SpeedBooster
                var speedModule = new SpeedBooster();
                speedModule.Patch();

                //Handle HullArmorUpgrades
                var hullArmorMk2Module = new HullArmorMk2();
                hullArmorMk2Module.Patch();

                var hullArmorMk3Module = new HullArmorMk3(hullArmorMk2Module.TechType);
                hullArmorMk3Module.Patch();

                var hullArmorMk4Module = new HullArmorMk4(hullArmorMk3Module.TechType);
                hullArmorMk4Module.Patch();

                //Handle Config Options
                var configOptions = new UpgradeOptions();
                configOptions.Initialize();

                VehicleUpgrader.SetBonusSpeedMultipliers(configOptions.SeamothBonusSpeedMultiplier, configOptions.ExosuitBonusSpeedMultiplier);

                var harmony = HarmonyInstance.Create("com.upgradedvehicles.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
        public static void Patch()
        {
            try
            {
                MCUServices.Logger.Info("Started patching " + QuickLogger.GetAssemblyVersion());

                var booster = new BioReactorBooster();
                booster.Patch();

                var reactor = new CyBioReactor(booster);
                reactor.Patch();

                var harmony = HarmonyInstance.Create("com.morecyclopsupgrades.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                MCUServices.Register.AuxCyclopsManager <BioAuxCyclopsManager>((SubRoot cyclops) =>
                {
                    return(new BioAuxCyclopsManager(cyclops));
                });

                MCUServices.Register.CyclopsCharger <BioChargeHandler>((SubRoot cyclops) =>
                {
                    return(new BioChargeHandler(booster.TechType, cyclops));
                });

                MCUServices.Register.CyclopsUpgradeHandler((SubRoot cyclops) =>
                {
                    return(new BioBoosterUpgradeHandler(booster.TechType, cyclops));
                });

                MCUServices.Register.PdaIconOverlay(booster.TechType, (uGUI_ItemIcon icon, InventoryItem upgradeModule) =>
                {
                    return(new BoosterOverlay(icon, upgradeModule));
                });

                MCUServices.Logger.Info("Finished Patching");
            }
            catch (Exception ex)
            {
                MCUServices.Logger.Error(ex);
            }
        }
Esempio n. 3
0
        public static void Patch()
        {
            QuickLogger.Info($"Started patching. Version: {QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly())}");

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif
            Configuration = Mod.LoadConfiguration();
            FCSDemoBuidable.PatchHelper();

            try
            {
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 4
0
        public static void Patch()
        {
            try
            {
                QuickLogger.Message("Started patching - " + QuickLogger.GetAssemblyVersion());

                HandleCrossModUpdates();
                HandleSpeedBooster();
                HandleConfigOptions();

                var harmony = HarmonyInstance.Create("com.upgradedvehicles.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Message("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error("EXCEPTION on Patch: " + ex.ToString());
            }
        }
        public static void Patch()
        {
            QuickLogger.Info("Started patching " + QuickLogger.GetAssemblyVersion());

            // If enabled, patch the Auxiliary Upgrade Console as a new buildable.
            if (ModConfig.Main.AuxConsoleEnabled)
            {
                var console = new AuxCyUpgradeConsole();
                console.Patch();
            }
            else
            {
                // SMLHelper now handles previously used but now disabled TechTypes
                QuickLogger.Info("Auxiliary Upgrade Console disabled by config settings");
            }

            Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "com.morecyclopsupgrades.psmod");

            QuickLogger.Info("Finished Patching");
        }
Esempio n. 6
0
        public static void Patch()
        {
            QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly()));

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                HorizontalDuckBuildable.PatchHelper();

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 7
0
        public static void Patch()
        {
            QuickLogger.Info("Start patching. Version: " + QuickLogger.GetAssemblyVersion());

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                var harmony = HarmonyInstance.Create("com.betterbioreactor.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 8
0
        public static void Patch()
        {
            Version = QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly());
            QuickLogger.Info($"Started patching. Version: {Version}");
            QuickLogger.ModName = Mod.ModFriendlyName;


#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                GlobalBundle = FcAssetBundlesService.PublicAPI.GetAssetBundleByName(FcAssetBundlesService.PublicAPI
                                                                                    .GlobalBundleName);

                if (GlobalBundle == null)
                {
                    QuickLogger.Error("Global Bundle has returned null stopping patching");
                    throw new FileNotFoundException("Bundle failed to load");
                }

                Configuration = Mod.LoadConfiguration();

                AddTechFabricatorItems();

                var alterraGen = new AlterraGenBuildable();
                alterraGen.Patch();

                //var harmony = new Harmony("com.alterragen.fcstudios");

                //harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 9
0
        public static void Patch()
        {
            QuickLogger.Info($"Started patching. Version {QuickLogger.GetAssemblyVersion()}");

            try
            {
                CustomCraft2Config.CheckLogLevel();

                RestoreAssets();

                HelpFilesWriter.HandleHelpFiles();

                WorkingFileParser.HandleWorkingFiles();

                QuickLogger.Info("Finished patching.");
            }
            catch (Exception ex)
            {
                QuickLogger.Error($"Critical error during patching{Environment.NewLine}{ex}");
            }
        }
        public static void Patch()
        {
            try
            {
                QuickLogger.Info($"Started patching. Version {QuickLogger.GetAssemblyVersion()}");

                var thermalMk2 = new CyclopsThermalChargerMk2();
                thermalMk2.Patch();

                MCUServices.Register.CyclopsUpgradeHandler(thermalMk2);
                MCUServices.Register.CyclopsCharger <ThermalCharger>(thermalMk2);
                MCUServices.Register.PdaIconOverlay(TechType.CyclopsThermalReactorModule, thermalMk2);
                MCUServices.Register.PdaIconOverlay(thermalMk2.TechType, thermalMk2);

                QuickLogger.Info($"Finished patching.");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 11
0
        public static void Patch()
        {
            try
            {
                QuickLogger.Info("Started patching " + QuickLogger.GetAssemblyVersion());

                // If enabled, patch the Auxiliary Upgrade Console as a new buildable.
                var console = new AuxCyUpgradeConsole();
                console.Patch(ModConfig.Main.AuxConsoleEnabled);

                var harmony = HarmonyInstance.Create("com.morecyclopsupgrades.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished Patching");
            }
            catch
            {
                QuickLogger.Error($"Critical error in patching");
                throw; // Rethrow for QModManager to catch and report
            }
        }
Esempio n. 12
0
        public static void Patch()
        {
            QuickLogger.Info("Start patching. Version: " + QuickLogger.GetAssemblyVersion());

            try
            {
                CbCore.PatchCraftingTabs();
                PackReader.PatchTextPacks();

                // Packs from external mods are patched as they arrive.
                // They can still be patched in even after the harmony patches have completed.

                var harmony = HarmonyInstance.Create("com.custombatteries.mod");
                EnergyMixinPatcher.Patch(harmony);

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 13
0
        public static void Patch()
        {
            var assembly = Assembly.GetExecutingAssembly();

            QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion(assembly));

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif
#if USE_ExStorageDepot
            QuickLogger.Info("Ex-Storage Version");
#endif
            try
            {
                Configuration = Mod.LoadConfiguration();
                Configuration.Convert();

                OptionsPanelHandler.RegisterModOptions(new Options());

                AddItemsToTechFabricator();

                GlobalBundle = FcAssetBundlesService.PublicAPI.GetAssetBundleByName(FcAssetBundlesService.PublicAPI.GlobalBundleName);

                FCSDeepDrillerBuildable.PatchHelper();

                SandSpawnable.PatchHelper();

                var harmony = new Harmony("com.fcsdeepdriller.fcstudios");

                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
        public static void Patch()
        {
            Version = QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly());
            QuickLogger.Info($"Started patching. Version: {Version}");


#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                GlobalBundle = FcAssetBundlesService.PublicAPI.GetAssetBundleByName(FcAssetBundlesService.PublicAPI.GlobalBundleName);

                if (GlobalBundle == null)
                {
                    QuickLogger.Error("Global Bundle has returned null stopping patching");
                    throw new FileNotFoundException("Bundle failed to load");
                }

                Configuration = Mod.LoadConfiguration();

                QuickLogger.Info($"Storage:{Configuration.Config.StorageHeight}X{Configuration.Config.StorageWidth}");

                AddTechFabricatorItems();

                SeaCookerBuildable.PatchSMLHelper();

                var harmony = HarmonyInstance.Create("com.seacooker.fcstudios");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 15
0
        public static void Patch()
        {
            try
            {
                QuickLogger.Info(
                    $"Started patching. Version: {QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly())}");

#if DEBUG
                QuickLogger.DebugLogsEnabled = true;
                QuickLogger.Debug("Debug logs enabled");
#endif

                AddTechFabricatorItems();

                HarmonyInstance.Create("com.oxstationvehicles.fcs").PatchAll(Assembly.GetExecutingAssembly());
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 16
0
        public static void Patch()
        {
            Configuration = Mod.LoadConfiguration();

            var assembly = Assembly.GetExecutingAssembly();

            QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion(assembly));


#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                LoadAssetBundle();

                OptionsPanelHandler.RegisterModOptions(new Options());

                GlobalBundle = FcAssetBundlesService.PublicAPI.GetAssetBundleByName(FcAssetBundlesService.PublicAPI.GlobalBundleName);

                AddTechFabricatorItems();

                ARSSeaBreezeFCS32Buildable.PatchHelper();

                var harmony = HarmonyInstance.Create("com.arsseabreezefcs32.fcstudios");

                harmony.PatchAll(assembly);

                QuickLogger.Info("Finished patching");

                QuickLogger.Debug($"{Configuration.StorageLimit}");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 17
0
        public static void Patch()
        {
            QuickLogger.Info("Started patching " + QuickLogger.GetAssemblyVersion());

            var defenseSystem = new CyclopsAutoDefense();

            defenseSystem.Patch();

            var antiParasites = new CyclopsParasiteRemover();

            antiParasites.Patch();

            var defenseSystemMk2 = new CyclopsAutoDefenseMk2(defenseSystem);

            defenseSystemMk2.Patch();

            var harmony = HarmonyInstance.Create("com.cyclopsautozapper.psmod");

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            QuickLogger.Info("Finished Patching");
        }
        public static void Patch()
        {
            var version = QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly());

            QuickLogger.Info($"Started patching. Version: {version}");


#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif
            try
            {
                GlobalBundle = FcAssetBundlesService.PublicAPI.GetAssetBundleByName(FcAssetBundlesService.PublicAPI.GlobalBundleName);


                if (GlobalBundle == null)
                {
                    QuickLogger.Error("Global Bundle has returned null stopping patching");
                    throw new FileNotFoundException("Bundle failed to load");
                }

                AddItemsToTechFabricator();

                GaspodCollectorBuildable.PatchHelper();

                Configuration = Mod.LoadConfiguration();

                var harmony = HarmonyInstance.Create("com.gaspodcollector.fcstudios");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 19
0
        public static void Patch()
        {
            Version = QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly());
            QuickLogger.Info($"Started patching. Version: {Version}");


#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                GlobalBundle = FcAssetBundlesService.PublicAPI.GetAssetBundleByName(FcAssetBundlesService.PublicAPI.GlobalBundleName);

                GlobalBundle.LoadAllAssets <Sprite>();

                if (GlobalBundle == null)
                {
                    QuickLogger.Error("Global Bundle has returned null stopping patching");
                    throw new FileNotFoundException("Bundle failed to load");
                }

                Configuration = Mod.LoadConfiguration();

                AddItemsToTechFabricator();

                SetWater();

                MiniFountainFilterBuildable.PatchSMLHelper();

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
        public static void Patch()
        {
            QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion());

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                CubeGeneratorBuildable.PatchSMLHelper();

                var harmony = HarmonyInstance.Create("com.ioncubegenerator.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
        /// <summary>
        /// Main patching method. For use by QModManager only.
        /// </summary>
        public static void Patch()
        {
            try
            {
                QuickLogger.Info("Started patching " + QuickLogger.GetAssemblyVersion());

                QuickLogger.DebugLogsEnabled = settings.DebugLogsEnabled;
                QuickLogger.Info($"Debug logging is {(QuickLogger.DebugLogsEnabled ? "en" : "dis")}abled");

                RemoveOldConfigs();

                PatchAuxUpgradeConsole();

                var harmony = HarmonyInstance.Create("com.morecyclopsupgrades.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished Patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 22
0
        public static void Patch()
        {
            QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion());

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            try
            {
                FabCraftCraftable.PatchSMLHelper();

                var harmony = HarmonyInstance.Create("com.fcsaipowercellsocket.fcstudios");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 23
0
        public static void Patch()
        {
            MCUServices.Logger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion());

            try
            {
                CyNukReactorBuildable.PatchSMLHelper();
                CyNukeEnhancerMk1.PatchSMLHelper();
                CyNukeEnhancerMk2.PatchSMLHelper();

                MCUServices.Logger.Debug("Registering with MoreCyclopsUpgrades");

                MCUServices.Register.CyclopsCharger <CyNukeChargeManager>((SubRoot cyclops) =>
                {
                    return(new CyNukeChargeManager(cyclops));
                });

                MCUServices.Register.CyclopsUpgradeHandler((SubRoot cyclops) =>
                {
                    return(new CyNukeEnhancerHandler(cyclops));
                });

                MCUServices.Register.AuxCyclopsManager <CyNukeManager>((SubRoot cyclops) =>
                {
                    return(new CyNukeManager(cyclops));
                });

                var harmony = HarmonyInstance.Create("com.cyclopsnuclearreactor.psmod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                MCUServices.Logger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                MCUServices.Logger.Error(ex);
            }
        }
Esempio n. 24
0
        public static void Patch()
        {
            var assembly = Assembly.GetExecutingAssembly();

            QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion(assembly));

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
            //TODO remove on release
            //AIWindSurferBuildable.PatchSMLHelper();
#endif

            try
            {
                LoadAssetBundle();

                AddItemsToTechFabricator();

                AISolutionsData.PatchHelper();
                AIJetStreamT242Buildable.PatchSMLHelper();
                AIMarineMonitorBuildable.PatchSMLHelper();

                var harmony = HarmonyInstance.Create("com.aijetstreamt242.fcstudios");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                QuickLogger.Info("Finished patching");

                QuickLogger.Debug("Unload Bundle");
                //Bundle.Unload(false);
                QuickLogger.Debug("Bundle Unloaded");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex.Message);
            }
        }
Esempio n. 25
0
        public static void Patch()
        {
            MCUServices.Logger.Info("Started patching v" + QuickLogger.GetAssemblyVersion());

            var nuclearModule  = new CyclopsNuclearModule();
            var depletedModule = new DepletedNuclearModule(nuclearModule);

            nuclearModule.Patch();
            depletedModule.Patch();

            var nuclearFabricator = new NuclearFabricator(nuclearModule);

            nuclearFabricator.AddCraftNode(TechType.ReactorRod);
            nuclearFabricator.AddCraftNode(nuclearModule.TechType);
            nuclearFabricator.AddCraftNode("RReactorRodDUMMY");    // Optional - Refill nuclear reactor rod (old)
            nuclearFabricator.AddCraftNode("ReplenishReactorRod"); // Optional - Refill nuclear reactor rod (new)
            nuclearFabricator.AddCraftNode("CyNukeUpgrade1");      // Optional - Cyclops Nuclear Reactor Enhancer Mk1
            nuclearFabricator.AddCraftNode("CyNukeUpgrade2");      // Optional - Cyclops Nuclear Reactor Enhancer Mk2
            nuclearFabricator.Patch();

            MCUServices.Register.CyclopsUpgradeHandler((SubRoot cyclops) =>
            {
                return(new NuclearUpgradeHandler(nuclearModule.TechType, cyclops));
            });

            MCUServices.Register.CyclopsCharger <NuclearChargeHandler>((SubRoot cyclops) =>
            {
                return(new NuclearChargeHandler(cyclops, nuclearModule.TechType));
            });

            MCUServices.Register.PdaIconOverlay(nuclearModule.TechType, (uGUI_ItemIcon icon, InventoryItem upgradeModule) =>
            {
                return(new NuclearIconOverlay(icon, upgradeModule));
            });

            MCUServices.Logger.Info("Finished patching");
        }
        public static void Patch()
        {
            try
            {
                QuickLogger.Info($"Started patching. Version {QuickLogger.GetAssemblyVersion()}");

                var solar1 = new CyclopsSolarCharger();
                var solar2 = new CyclopsSolarChargerMk2(solar1);

                solar1.Patch();
                solar2.Patch();

                MCUServices.Register.CyclopsCharger <SolarCharger>(solar2);
                MCUServices.Register.CyclopsUpgradeHandler(solar2);
                MCUServices.Register.PdaIconOverlay(solar1.TechType, solar2);
                MCUServices.Register.PdaIconOverlay(solar2.TechType, solar2);

                QuickLogger.Info($"Finished patching.");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
        public static void Patch()
        {
            MCUServices.Logger.Info($"Started patching. Version {QuickLogger.GetAssemblyVersion()}");

            var engineMk2Upgrade = new PowerUpgradeModuleMk2();
            var engineMk3Upgrade = new PowerUpgradeModuleMk3(engineMk2Upgrade);

            engineMk2Upgrade.Patch();
            engineMk3Upgrade.Patch();

            LanguageHandler.SetLanguageLine(EngineOverlay.BonusKey, "[Bonus Efficiency]");
            LanguageHandler.SetLanguageLine(EngineOverlay.TotalKey, "[Total Efficiency]");

            MCUServices.Register.CyclopsUpgradeHandler((SubRoot cyclops) =>
            {
                return(new EngineHandler(engineMk2Upgrade, engineMk3Upgrade, cyclops));
            });

            MCUServices.Register.PdaIconOverlay(TechType.PowerUpgradeModule, CreateEngineOverlay);
            MCUServices.Register.PdaIconOverlay(engineMk2Upgrade.TechType, CreateEngineOverlay);
            MCUServices.Register.PdaIconOverlay(engineMk3Upgrade.TechType, CreateEngineOverlay);

            MCUServices.Logger.Info($"Finished patching.");
        }
Esempio n. 28
0
        // This mod is intended to be replaced by the VModFabricator
        // But since some people still want it, it's kept up and maintained.
        public static void Patch()
        {
            QuickLogger.Info("Started patching " + QuickLogger.GetAssemblyVersion());

            // Remove all original Cyclops fabricator nodes
            foreach (string origNodeID in NodeCollections.OriginalCyclopsModuleCraftingNodes)
            {
                CraftTreeHandler.RemoveNode(CraftTree.Type.CyclopsFabricator, origNodeID);
            }

            // Recreates all the tabs from the Vehicle Upgrade Console

            foreach (ModulesTab tab in NodeCollections.UpgradeModuleTabs)
            {
                CraftTreeHandler.AddTabNode(CraftTree.Type.CyclopsFabricator, tab.TabID, tab.TabName, tab.TabSprite);

                foreach (TechType craftTypeID in tab.CraftNodes)
                {
                    CraftTreeHandler.AddCraftingNode(CraftTree.Type.CyclopsFabricator, craftTypeID, tab.TabID);
                }
            }

            QuickLogger.Info("Patching complete");
        }
Esempio n. 29
0
        public static void Patch()
        {
            QuickLogger.Info($"Started patching. Version: {QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly())}");

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            var harmony = HarmonyInstance.Create("com.fcsdemo.fcstudios");
            harmony.PatchAll(Assembly.GetExecutingAssembly());

            Configuration = Mod.LoadConfiguration();
            FCSDemoBuidable.PatchHelper();

            try
            {
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Esempio n. 30
0
        public static void Patch()
        {
            try
            {
                QuickLogger.Info(
                    $"Started patching. Version: {QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly())}");

#if DEBUG
                QuickLogger.DebugLogsEnabled = true;
                QuickLogger.Debug("Debug logs enabled");
#endif

                AddTechFabricatorItems();

                MCUServices.Register.CyclopsUpgradeHandler((SubRoot cyclops) => new UpgradeHandler(Mod.ModuleTechType, cyclops));

                HarmonyInstance.Create("com.oxstationcyclops.fcs").PatchAll(Assembly.GetExecutingAssembly());
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }