Fix #10490: Allow ships to exit depots if another is not moving at the exit point...
[openttd-github.git] / src / transport_type.h
blob5ad7202020482f09e0c48e60a8fdb67a1dfb1aeb
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file transport_type.h Base types related to transport. */
10 #ifndef TRANSPORT_TYPE_H
11 #define TRANSPORT_TYPE_H
13 #include "core/enum_type.hpp"
15 /** Type for the company global vehicle unit number. */
16 typedef uint16_t UnitID;
18 /** Available types of transport */
19 enum TransportType : byte {
20 /* These constants are for now linked to the representation of bridges
21 * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge.
22 * In an ideal world, these constants would be used everywhere when
23 * accessing tunnels and bridges. For now, you should just not change
24 * the values for road and rail.
26 TRANSPORT_BEGIN = 0, ///< Begin of the iterator.
27 TRANSPORT_RAIL = TRANSPORT_BEGIN, ///< Transport by train
28 TRANSPORT_ROAD, ///< Transport by road vehicle
29 TRANSPORT_WATER, ///< Transport over water
30 TRANSPORT_AIR, ///< Transport through air
31 TRANSPORT_END, ///< End of iterations.
32 INVALID_TRANSPORT = 0xff, ///< Sentinel for invalid transport types.
35 #endif /* TRANSPORT_TYPE_H */