예제 #1
0
        public void UpdatePartConfig()
        {
            Log("Updating part config");

            enabled = ActiveConfiguration;
            active  = enabled;

            List <PartModule> testFlightModules = TestFlightUtil.GetAllTestFlightModulesForAlias(this.part, Alias);

            for (int i = 0; i < testFlightModules.Count; i++)
            {
                testFlightModules[i].enabled = enabled;
            }

            if (Events == null)
            {
                return;
            }

            BaseEvent toggleRNDGUIEvent = Events["ToggleRNDGUI"];

            if (toggleRNDGUIEvent != null)
            {
                toggleRNDGUIEvent.guiActiveEditor = enabled;
                toggleRNDGUIEvent.guiName         = string.Format("R&D {0}", Alias);
            }
        }