@@ -3565,24 +3565,25 @@ static void AiStateBuildAircraftVehicles
const AiBuildRec *aib = (&_players_ai[p->index].src) + _players_ai[p->index].order_list_blocks[i];
const Station *st = GetStationByTile(aib->use_tile);
if (st == NULL || !(st->facilities & FACIL_AIRPORT)) continue;
AirportFTAClass::Flags flags = st->Airport()->flags;
if (!(flags & AirportFTAClass::AIRPLANES)) forbidden |= AIR_CTOL | AIR_FAST; // no planes for heliports / oil rigs
if (flags & AirportFTAClass::SHORT_STRIP) forbidden |= AIR_FAST; // no fast planes for small airports
}
veh = AiChooseAircraftToBuild(p->player_money, forbidden);
if (veh == INVALID_ENGINE) return;
if (GetStationByTile(tile)->Airport()->nof_depots == 0) return;
/* XXX - Have the AI pick the hangar terminal in an airport. Eg get airport-type
* and offset to the FIRST depot because the AI picks the st->xy tile */
tile += ToTileIndexDiff(GetStationByTile(tile)->Airport()->airport_depots[0]);
if (CmdFailed(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_AIRCRAFT))) return;
loco_id = _new_vehicle_id;
for (i = 0; _players_ai[p->index].order_list_blocks[i] != 0xFF; i++) {
AiBuildRec *aib = (&_players_ai[p->index].src) + _players_ai[p->index].order_list_blocks[i];
bool is_pass = (_players_ai[p->index].cargo_type == CT_PASSENGERS || _players_ai[p->index].cargo_type == CT_MAIL);
Order order;
Status change: