Exemple #1
0
        // Support config file parsing
        private static void ParseSupport()
        {
            // for each profile
            foreach (ConfigNode profile_node in Lib.ParseConfigs("Profile"))
            {
                // get the name
                string name = Lib.ConfigValue(profile_node, "name", string.Empty);

                // if this is a Kerbalism Support profile
                if (name == "KerbalismSupport")
                {
                    // get the mod name and directory
                    string modname = Lib.ConfigValue(profile_node, "modname", string.Empty);
                    string moddir  = Lib.ConfigValue(profile_node, "moddir", string.Empty);

                    // if the mods directory exists
                    if (Lib.GameDirectoryExist(moddir))
                    {
                        // log profile and mod name
                        Lib.Log(Lib.BuildString("importing Kerbalism Support profile for mod: ", modname));

                        // parse nodes
                        Nodeparse(profile_node);

                        // done a Support profile now on to the next
                    }
                }
            }
        }