Beispiel #1
0
        public void OnEnabled()
        {
            enabled           = true;
            TreeRoot.OnStop  += OnBotStop;
            TreeRoot.OnStart += OnBotStart;

            settings = AgilSettings.Load();
            Database.LoadAgilData();
        }
Beispiel #2
0
        private void SettingsButtonClick(object sender, EventArgs e)
        {
            if (!File.Exists(Directories.AGIL_SETTINGS))
            {
                var settings = new AgilSettings();
                DataLoader.YamlSave(Directories.AGIL_SETTINGS, settings);
            }

            Process.Start("notepad.exe", Directories.AGIL_SETTINGS);
        }
Beispiel #3
0
        public static AgilSettings Load()
        {
            var settings = DataLoader.YamlLoad <AgilSettings>(Directories.AGIL_SETTINGS);

            if (settings == null)
            {
                settings = new AgilSettings();
                DataLoader.YamlSave(Directories.AGIL_SETTINGS, settings);
                Logger.AgilMessage("Failed to load settings, recreating the file.");
            }

            Logger.AgilMessage("Loaded settings.");
            return(settings);
        }
Beispiel #4
0
        public void Reload()
        {
            Unhook();

            DataCompiler.CompileStatWeights();
            settings = AgilSettings.Load();
            Database.LoadAgilData();

            if (!enabled || !botRunning)
            {
                return;
            }
            Hook();
        }