Creates a list of vehicles that have orders to a given depot. More...
#include <script_vehiclelist.hpp>
Public Member Functions | |
ScriptVehicleList_Depot (TileIndex tile) |
Creates a list of vehicles that have orders to a given depot.
The list is created with a tile. If the tile is part of an airport all aircraft having a depot order on a hangar of that airport will be returned. For all other vehicle types the tile has to be a depot or an empty list will be returned. ai game
Definition at line 51 of file script_vehiclelist.hpp.
ScriptVehicleList_Depot::ScriptVehicleList_Depot | ( | TileIndex | tile | ) |
tile | The tile of the depot to get the list of vehicles from, which have orders to it. |
Definition at line 47 of file script_vehiclelist.cpp.
References ScriptList::AddItem(), FOR_ALL_VEHICLES, ScriptObject::GetCompany(), GetDepotIndex(), Order::GetDestination(), GetStationIndex(), GetTileType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, IsAirport(), Vehicle::IsPrimaryVehicle(), IsRailDepot(), IsRoadDepot(), IsShipDepot(), Order::IsType(), ScriptMap::IsValidTile(), MP_RAILWAY, MP_ROAD, MP_STATION, MP_WATER, Vehicle::owner, OWNER_DEITY, and BaseVehicle::type.