예제 #1
0
        public static void Patch()
        {
            QuickLogger.Info("Started patching " + QuickLogger.GetAssemblyVersion());
            QuickLogger.DebugLogsEnabled = false;

            var defenseSystem = new CyclopsAutoDefense();

            defenseSystem.Patch();

            var antiParasites = new CyclopsParasiteRemover();

            antiParasites.Patch();

            var defenseSystemMk2 = new CyclopsAutoDefenseMk2(defenseSystem);

            defenseSystemMk2.Patch();

            DisplayTexts.Main.Patch();

            var harmony = new Harmony("com.cyclopsautozapper.psmod");

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            QuickLogger.Info("Finished Patching");
        }
예제 #2
0
        public CyclopsAutoDefenseMk2(CyclopsAutoDefense zapperMk1)
            : base("CyclopsZapperModuleMk2",
                   "Cyclops Auto Defense System Mk2",
                   "Self contained, automated, anti-predator electrical defense system for the Cyclops.")
        {
            autoDefenseMk1      = zapperMk1.TechType;
            OnFinishedPatching += () =>
            {
                MCUServices.Register.CyclopsUpgradeHandler((SubRoot cyclops) =>
                                                           { return(new UpgradeHandler(this.TechType, cyclops)
                    {
                        MaxCount = 1
                    }); });

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

                MCUServices.Register.AuxCyclopsManager <AutoDefenserMk2>((SubRoot cyclops) =>
                                                                         { return(new AutoDefenserMk2(this.TechType, cyclops)); });
            };
        }
예제 #3
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");
        }