EditorPressurized() public method

public EditorPressurized ( ) : bool
return bool
Ejemplo n.º 1
0
        public virtual void Update()
        {
            if (!(ullageSet is Ullage.UllageSet && ShowPropStatus))
            {
                return;
            }
            if (HighLogic.LoadedSceneIsEditor && !(part.PartActionWindow is UIPartActionWindow))
            {
                return;
            }

            if (HighLogic.LoadedSceneIsEditor && pressureFed)
            {
                ullageSet.EditorPressurized();
            }

            if (pressureFed && !ullageSet.PressureOK())
            {
                propellantStatus = "<color=red>Needs high pressure tanks</color>";
            }
            else if (HighLogic.LoadedSceneIsFlight && ullage && RFSettings.Instance.simulateUllage)
            {
                propellantStatus = ullageSet.GetUllageState(out Color ullageColor);
                part.stackIcon.SetIconColor(ullageColor);
            }
            else
            {
                propellantStatus = pressureFed ? "Feed pressure OK" : "Nominal";
            }
        }
        public virtual void Update()
        {
            if (!(ullageSet is Ullage.UllageSet && ShowPropStatus))
            {
                return;
            }
            if (HighLogic.LoadedSceneIsEditor && !(part.PartActionWindow is UIPartActionWindow))
            {
                return;
            }

            if (HighLogic.LoadedSceneIsEditor && pressureFed)
            {
                ullageSet.EditorPressurized();
            }

            if (pressureFed && !ullageSet.PressureOK())
            {
                propellantStatus = "<color=red>Needs high pressure tanks</color>";
            }
            else if (HighLogic.LoadedSceneIsFlight && ullage && RFSettings.Instance.simulateUllage)
            {
                propellantStatus = ullageSet.GetUllageState(out Color ullageColor);
                part.stackIcon.SetIconColor(ullageColor);
            }
            else
            {
                propellantStatus = pressureFed ? "Feed pressure OK" : "Nominal";
            }

            //if (HighLogic.LoadedSceneIsEditor)
            //{
            //    // set ignitionThreshold based on propellant set, for MJ
            //    foreach (Propellant p in propellants)
            //    {
            //        p.totalResourceCapacity *
            //    }
            //}
            //else if (HighLogic.LoadedSceneIsFlight)
            //{
            //    // set ignitionThreshold based on propellant set, for MJ
            //    ignitionThreshold
            //}
        }
Ejemplo n.º 3
0
 public override void FixedUpdate()
 {
     if (HighLogic.LoadedSceneIsEditor)
     {
         if (ullageSet != null && pressureFed)
         {
             if (ullageSet.EditorPressurized()) // we need to recheck each frame. Expensive, but short of messages....
             {
                 propellantStatus = "Feed pressure OK";
             }
             else
             {
                 propellantStatus = "Feed pressure too low";
             }
         }
         else
         {
             propellantStatus = "OK";
         }
     }
     needSetPropStatus = true;
     base.FixedUpdate();
     if (needSetPropStatus && showPropStatus)
     {
         if (pressureFed && !ullageSet.PressureOK())
         {
             propellantStatus = "Feed pressure too low";
         }
         else if (ullage && RFSettings.Instance.simulateUllage)
         {
             propellantStatus = ullageSet.GetUllageState(out ullageColor);
             part.stackIcon.SetIconColor(ullageColor);
         }
         else
         {
             propellantStatus = "Nominal";
         }
     }
 }
Ejemplo n.º 4
0
 public override void FixedUpdate()
 {
     if (HighLogic.LoadedSceneIsEditor)
     {
         if (ullageSet != null && pressureFed)
         {
             if (ullageSet.EditorPressurized()) // we need to recheck each frame. Expensive, but short of messages....
             {
                 propellantStatus = "Feed pressure OK";
             }
             else
             {
                 propellantStatus = "Feed pressure too low";
             }
         }
         else
         {
             propellantStatus = "OK";
         }
     }
     base.FixedUpdate();
 }