OpenTTD Source 20250312-master-gcdcc6b491d
league_type.h
Go to the documentation of this file.
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 */
7
10#ifndef LEAGUE_TYPE_H
11#define LEAGUE_TYPE_H
12
13#include "core/pool_type.hpp"
14
16enum LinkType : uint8_t {
17 LT_NONE = 0,
18 LT_TILE = 1,
20 LT_TOWN = 3,
23};
24
25typedef uint32_t LinkTargetID;
26
27struct Link {
28 LinkType type = LT_NONE;
29 LinkTargetID target = 0;
30
31 Link() {}
32 Link(LinkType type, LinkTargetID target) : type{type}, target{target} {}
33};
34
36struct LeagueTable;
37
40
41#endif /* LEAGUE_TYPE_H */
LinkType
Types of the possible link targets.
Definition league_type.h:16
@ LT_COMPANY
Link a company.
Definition league_type.h:21
@ LT_STORY_PAGE
Link a story page.
Definition league_type.h:22
@ LT_TILE
Link a tile.
Definition league_type.h:18
@ LT_NONE
No link.
Definition league_type.h:17
@ LT_INDUSTRY
Link an industry.
Definition league_type.h:19
@ LT_TOWN
Link a town.
Definition league_type.h:20
uint32_t LinkTargetID
Contains either tile, industry ID, town ID, story page ID or company ID.
Definition league_type.h:25
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Struct about league table elements.
Definition league_base.h:32
Struct about custom league tables.
Definition league_base.h:55