Beispiel #1
0
        public static void Patch()
        {
            MCUServices.Logger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion());

            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 = new Harmony("com.cyclopsnuclearreactor.psmod");

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            MCUServices.Logger.Info("Finished patching");
        }
Beispiel #2
0
        public static void Patch()
        {
            QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion());

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif
            try
            {
                CyNukReactorBuildable.PatchSMLHelper();
                CyNukeEnhancerMk1.PatchSMLHelper();
                CyNukeEnhancerMk2.PatchSMLHelper();

                RegisterWithMoreCyclopsUpgrades();

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

                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }