Fix #10490: Allow ships to exit depots if another is not moving at the exit point...
[openttd-github.git] / src / league_type.h
blob335edd78b317fcac647663be98e6513a59279e6e
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 league_type.h basic types related to league tables */
10 #ifndef LEAGUE_TYPE_H
11 #define LEAGUE_TYPE_H
13 /** Types of the possible link targets. */
14 enum LinkType : byte {
15 LT_NONE = 0, ///< No link
16 LT_TILE = 1, ///< Link a tile
17 LT_INDUSTRY = 2, ///< Link an industry
18 LT_TOWN = 3, ///< Link a town
19 LT_COMPANY = 4, ///< Link a company
20 LT_STORY_PAGE = 5, ///< Link a story page
23 typedef uint32_t LinkTargetID; ///< Contains either tile, industry ID, town ID, story page ID or company ID
25 struct Link {
26 LinkType type;
27 LinkTargetID target;
28 Link(LinkType type, LinkTargetID target): type{type}, target{target} {}
29 Link(): Link(LT_NONE, 0) {}
32 typedef uint8_t LeagueTableID; ///< ID of a league table
33 struct LeagueTable;
34 static const LeagueTableID INVALID_LEAGUE_TABLE = 0xFF; ///< Invalid/unknown index of LeagueTable
36 typedef uint16_t LeagueTableElementID; ///< ID of a league table element
37 struct LeagueTableElement;
38 static const LeagueTableElementID INVALID_LEAGUE_TABLE_ELEMENT = 0xFFFF; ///< Invalid/unknown index of LeagueTableElement
40 #endif /* LEAGUE_TYPE_H */