Exemplo n.º 1
0
            void Helmet()
            {
                if (FlightGlobals.currentMainBody?.atmosphereContainsOxygen != true)
                {
                    return;
                }

                if (helmetTime < (helmetDelay ?? 1))
                {
                    helmetTime += Time.deltaTime;
                }
                else
                {
                    double pressure = FlightGlobals.getStaticPressure();

                    if (helmetHidden != !(pressure < helmetLowPressure || pressure > helmetHighPressure || helmetLowPressure == helmetHighPressure))
                    {
                        if (helmetHidden)
                        {
                            helmetTime = 0;
                        }

                        helmetHidden = eva.CanSafelyRemoveHelmet() && !helmetHidden;

                        eva.ToggleHelmetAndNeckRing(!helmetHidden, !helmetHidden);
                    }
                }
            }