Esempio n. 1
0
        public void toggleupdate()
        {
            //Manipulate this parent part of the module | this.part.####
            //Get the engines module of the part
            ModuleEngines engineModule = PropulsionTech.getEnginesModule(this.part);

            //MaxThrust = engineModule.maxThrust;

            MaxThrust = ToggleMaxThrust(engineModule, Thrustpct, ref booToggle);
            //engineModule.propellants.

            //Inverse the boolean indicator
            //booToggle = !booToggle;

            //#### DEBUG ####
            info  = "Burst toggleupdate\n";
            info += "MaxThrust " + MaxThrust + "\n";
            info += "maxFuelFlow " + maxFuelFlow + "\n";
            info += "booToggle " + booToggle;
            Debug.Log(info);
            //#### DEBUG ####

            //Update the event text
            Events["toggleupdate"].guiName = (booToggle ? "MaxThrust (burst) " + MaxThrust : "MaxThrust (base) " + MaxThrust);
        }
Esempio n. 2
0
        //Initialize the event text based on the input
        public override void OnStart(PartModule.StartState state)
        {
            ModuleEngines engineModule = PropulsionTech.getEnginesModule(this.part);

            MaxThrust = engineModule.maxThrust;

            //#### DEBUG ####
            //info = "Burst OnStart\n";
            //info += "MaxThrust " + MaxThrust + "\n";
            //info += "maxFuelFlow " + maxFuelFlow + "\n";
            //info += "booToggle " + booToggle;
            //Debug.LogError(info);
            //#### DEBUG ####

            //                                                  true                                false
            Events["toggleupdate"].guiName = (booToggle ? "MaxThrust (burst) " + MaxThrust : "MaxThrust (base) " + MaxThrust);
        }