depot_map.h File Reference

Map related accessors for depots. More...

#include "station_map.h"

Go to the source code of this file.

Functions

static bool IsDepotTypeTile (TileIndex tile, TransportType type)
 Check if a tile is a depot and it is a depot of the given type.
static bool IsDepotTile (TileIndex tile)
 Is the given tile a tile with a depot on it?
static DepotID GetDepotIndex (TileIndex t)
 Get the index of which depot is attached to the tile.

Detailed Description

Map related accessors for depots.

Definition in file depot_map.h.


Function Documentation

static DepotID GetDepotIndex ( TileIndex  t  )  [inline, static]

Get the index of which depot is attached to the tile.

Parameters:
t the tile
Precondition:
IsRailDepotTile(t) || IsRoadDepotTile(t) || IsShipDepotTile(t)
Returns:
DepotID

Definition at line 51 of file depot_map.h.

References _m, IsRailDepotTile(), IsRoadDepotTile(), IsShipDepotTile(), and Tile::m2.

Referenced by AIVehicleList_Depot::AIVehicleList_Depot(), Train::FindClosestDepot(), RoadVehicle::FindClosestDepot(), FixTTDDepots(), AIOrder::InsertOrder(), DepotWindow::OnClick(), DepotWindow::OnQueryTextFinished(), DepotWindow::SetStringParameters(), and Depot::~Depot().

static bool IsDepotTile ( TileIndex  tile  )  [inline, static]

Is the given tile a tile with a depot on it?

Parameters:
tile the tile to check
Returns:
true if and only if there is a depot on the tile.

Definition at line 40 of file depot_map.h.

References IsHangarTile(), IsRailDepotTile(), IsRoadDepotTile(), and IsShipDepotTile().

Referenced by CmdBuildVehicle(), CmdDepotMassAutoReplace(), FixTTDDepots(), Vehicle::ShowVisualEffect(), and Depot::~Depot().


Generated on Sun Jun 5 04:20:09 2011 for OpenTTD by  doxygen 1.6.1