station_map.c
author belugas
Fri, 11 Aug 2006 03:07:46 +0000
changeset 4248 5dc4cb2f45b0
parent 3882 86380e989bad
permissions -rw-r--r--
(svn r5839) Fix : A ship in a depot must be stopped before allowed to be cloned.
As this is standard behaviour for all other vehicle types...
/* $Id$ */

#include "stdafx.h"
#include "openttd.h"
#include "station_map.h"


StationType GetStationType(TileIndex t)
{
	assert(IsTileType(t, MP_STATION));
	if (IsRailwayStation(t)) return STATION_RAIL;
	if (IsAirport(t)) return STATION_AIRPORT;
	if (IsTruckStop(t)) return STATION_TRUCK;
	if (IsBusStop(t)) return STATION_BUS;
	if (IsOilRig(t)) return STATION_OILRIG;
	if (IsDock(t)) return STATION_DOCK;
	assert(IsBuoy_(t));
	return STATION_BUOY;
}