예제 #1
0
        private static void Governor()
        {
            if (Operation == Operations.Broken)
            {
                return;
            }
            if (Operation == Operations.Stabilizing)                                    // Ramming outrigger into ground
            {
                Foot.Enabled = true;
                Foot.Lock();
                Foot.AutoLock = true;
            }
            if (Operation == Operations.StabilizeCorrecting)                // Elastic Wheel Compression
            {
                Foot.Enabled  = true;
                Foot.AutoLock = false;
                Foot.Unlock();
            }
            if (!Operations.IsMoving(Operation) && Foot.IsLocked)                            // Automatically secures piston only when attached to ground
            {
                OutRiggerSecure();
            }
            else                                                                            // Otherwise avoids Klang-tom Forces (Piston Force on Self Locked Landing Gear)
            {
                OutRiggerRelease();
            }
            if (Operation != Operations.Retracted)                          // Driving or movement confusing ResolveOperation
            {
                Cockpit.HandBrake = true;
            }
            if (Operation == Operations.Retracted)                          // Attaching to random items in transit
            {
                Foot.Enabled  = true;
                Foot.AutoLock = false;
                Foot.Unlock();
            }
            if ((Cockpit.GetShipSpeed() > (Math.Abs(Piston.Velocity) * MoveDectect) && Operation != Operations.Retracted) || Operation == Operations.Extended)                // Falling over while extended
            {
                Foot.Enabled = true;
                Foot.Lock();

                Foot.AutoLock = true;
            }
        }