@@ -28,24 +28,26 @@ Depot *GetDepotByTile(TileIndex tile)
FOR_ALL_DEPOTS(depot) {
if (depot->xy == tile) return depot;
}
return NULL;
/**
* Clean up a depot
*/
Depot::~Depot()
{
if (CleaningPool()) return;
/* Clear the depot from all order-lists */
RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, this->index);
/* Delete the depot-window */
DeleteWindowById(WC_VEHICLE_DEPOT, this->xy);
this->xy = 0;
void InitializeDepots()
_Depot_pool.CleanPool();
_Depot_pool.AddBlockToPool();