Ejemplo n.º 1
0
 protected override void OnExecute(ConnectorIn input)
 {
     if (Vessel.currentStage > 0)
     {
         if (!Vessel.Landed || In("IgnoreLanded").AsBool())
         {
             double maxFuelInStage = Vessel.CurrentStageFuelMax(DefaultResources.LiquidFuel, DefaultResources.Oxidizer, DefaultResources.SolidFuel);
             if (maxFuelInStage > 0)
             {
                 if (!Vessel.CurrentStageHasFuel())
                 {
                     if (!hasTriggered)
                     {
                         hasTriggered = true;
                         ExecuteNext();
                     }
                 }
                 else
                 {
                     hasTriggered = false;
                 }
             }
             else
             {
                 hasTriggered = false;
             }
         }
         else
         {
             hasTriggered = false;
         }
     }
     else
     {
         hasTriggered = false;
     }
 }