Пример #1
0
        private static void BotVoid()
        {
            LocalizationController.SetLanguage(Config.language);
            while (true)
            {
                Thread.Sleep(100);
                if (Config.sleepenabled)
                {
                    Sleeping.Sleep();
                }

                if ((DateTime.Now - _lastdefinv).TotalSeconds >= 10)
                {
                    if (Config.autoupgrade)
                    {
                        Buildings.AutoUpgrade(Config.upgradeonlyfactory);
                    }

                    if (Config.autoship)
                    {
                        Outposts.ConfirmOutpost();
                        Upgradable.UpgradeUpgradable();
                        Contractor.UpgradeContractor();
                        Ships.AutoShip();
                    }

                    if (Config.collectfish)
                    {
                        FishPier.CollectFish();
                    }

                    if (Config.collectmuseum)
                    {
                        Museum.CollectMuseum();
                    }

                    if (Config.collectfactory)
                    {
                        Buildings.CollectMaterials();
                    }

                    if (Config.prodfactory)
                    {
                        Factories.ProduceFactories();
                    }

                    if (Config.finishupgrade)
                    {
                        Buildings.FinishUpgrade();
                    }

                    _lastdefinv = DateTime.Now;
                }

                if (Config.barrelhack && (DateTime.Now - _lastbarrel).TotalSeconds >= Config.barrelinterval)
                {
                    Barrels.CollectBarrel();
                    _lastbarrel = DateTime.Now;
                }
            }
        }