Exemple #1
0
        /*  First step is to consider every vessel within Max_refuel_radius and
         *      determine whether it is a hub airport control tower.
         *      [kmk] disable this
         */
        public static void refuel_hub_airport(Vessel vessel)
        {
            disqual = null;

            /*  Find all vessels within the refueling apron radius.  One of them may be a hub control tower.
             *      In that case, we can refuel.
             */
            List <Vessel> nearby = find_locale(vessel.mainBody, vessel.longitude, vessel.latitude, Max_refuel_radius);

            foreach (var tower in nearby)
            {
                if (check_airport(tower))
                {
                    Telemagic.logTM($"refueling {vessel.vesselName}");
                    Telemagic.refuel(vessel);
                    return;
                }
            }
            if (disqual != null)
            {
                Telemagic.message(vessel, $"{disqual} at {name}");
            }
        }