Chatterer.chatterer.load_plugin_settings C# (CSharp) Method

load_plugin_settings() private method

private load_plugin_settings ( ) : void
return void
        private void load_plugin_settings()
        {
            if (debugging) Debug.Log("[CHATR] load_plugin_settings() START");

            destroy_all_beep_players();
            chatter_array.Clear();
            beepsource_list.Clear();

            plugin_settings_node = new ConfigNode();
            plugin_settings_node = ConfigNode.Load(settings_path + "plugin.cfg");

            if (plugin_settings_node != null)
            {
                //if (debugging) Debug.Log("[CHATR] plugin_settings != null");
                //Load settings specific to plugin.cfg
                if (plugin_settings_node.HasValue("debugging")) debugging = Boolean.Parse(plugin_settings_node.GetValue("debugging"));
                if (plugin_settings_node.HasValue("use_vessel_settings")) use_vessel_settings = Boolean.Parse(plugin_settings_node.GetValue("use_vessel_settings"));
                if (plugin_settings_node.HasValue("http_update_check")) http_update_check = Boolean.Parse(plugin_settings_node.GetValue("http_update_check"));
                if (plugin_settings_node.HasValue("disable_beeps_during_chatter")) disable_beeps_during_chatter = Boolean.Parse(plugin_settings_node.GetValue("disable_beeps_during_chatter"));
                if (plugin_settings_node.HasValue("insta_chatter_key")) insta_chatter_key = (KeyCode)Enum.Parse(typeof(KeyCode), plugin_settings_node.GetValue("insta_chatter_key"));
                if (plugin_settings_node.HasValue("insta_sstv_key")) insta_sstv_key = (KeyCode)Enum.Parse(typeof(KeyCode), plugin_settings_node.GetValue("insta_sstv_key"));
                if (plugin_settings_node.HasValue("show_advanced_options")) show_advanced_options = Boolean.Parse(plugin_settings_node.GetValue("show_advanced_options"));

                load_shared_settings(plugin_settings_node); //load settings shared between both configs

            }
            else
            {
                if (debugging) Debug.LogWarning("[CHATR] plugin.cfg missing or unreadable");
            }

            //if (chatter_exists && chatter_array.Count == 0)
            if (chatter_array.Count == 0)
            {
                if (debugging) Debug.Log("[CHATR] No audiosets found in config, adding defaults");
                add_default_audiosets();
                load_chatter_audio();   //load audio in case there is none
            }

            if (beeps_exists && beepsource_list.Count == 0)
            {
                if (debugging) Debug.LogWarning("[CHATR] beepsource_list.Count == 0, adding default 3");
                add_default_beepsources();
            }

            if (aae_backgrounds_exist && backgroundsource_list.Count == 0)
            {
                if (debugging) Debug.LogWarning("[CHATR] backgroundsource_list.Count == 0, adding default 2");
                add_default_backgroundsources();
            }

            if (debugging) Debug.Log("[CHATR] load_plugin_settings() END");
        }
chatterer