Loading

Paste #ptdil1uqf

  1.         bool hangar_in_o = false;
  2.         const Order *o;
  3.  
  4.         /* Is there at least an airport with a hangar in the orders? */
  5.         FOR_VEHICLE_ORDERS(v, o) {
  6.             if (o->IsType(OT_GOTO_STATION)) {
  7.                 const Station *ost = Station::Get(o->GetDestination());
  8.                 if (CanVehicleUseStation(v, ost) && (ost->airport.HasHangar() ||
  9.                             /* Helicopters can be serviced at helipads as long as there is no pending replace and serviceathelipad is enabled */
  10.                             (v->subtype == AIR_HELICOPTER && !v->HasPendingReplace() && _settings_game.order.serviceathelipad && ost->airport.GetFTA()->num_helipads))) {
  11.                     hangar_in_o = true;
  12.                     break;
  13.                 }
  14.             }
  15.         }

Comments