示例#1
0
 /// <summary>
 /// Here when a ship loads in the editor or rolling out to the launchpad.
 /// </summary>
 /// <param name="ship"></param>
 internal static void OnShipLoaded(ShipConstruct ship)
 {
     for (int i = 0; i < ship.parts.Count; ++i)
     {
         Part part = ship.parts[i];
         ModuleSimpleFuelSwitch module = TryFind(part);
         if (module != null)
         {
             module.OnShipLoaded();
         }
     }
 }
示例#2
0
 /// <summary>
 /// Here when a vessel is loaded in flight.
 /// </summary>
 /// <param name="vessel"></param>
 internal static void OnVesselLoaded(Vessel vessel)
 {
     for (int i = 0; i < vessel.parts.Count; ++i)
     {
         Part part = vessel.parts[i];
         ModuleSimpleFuelSwitch module = TryFind(part);
         if (module != null)
         {
             module.OnShipLoaded();
         }
     }
 }