diff options
author | Peter Nelson <peter1138@openttd.org> | 2019-02-05 08:23:25 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-02-06 07:40:55 +0000 |
commit | e3b440c9c50b39092a2f887dba9370b21369f2cb (patch) | |
tree | 2c91e502fdcaa94012a30c69ec3d565c560601d2 /src/rail.h | |
parent | 4764d1c45e7d82bc35f6fcb25012f5cfe545ce6c (diff) | |
download | openttd-e3b440c9c50b39092a2f887dba9370b21369f2cb.tar.xz |
Add #5006: Flag to hide rail type from construction.
Diffstat (limited to 'src/rail.h')
-rw-r--r-- | src/rail.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rail.h b/src/rail.h index b7258d301..83d1d9b7a 100644 --- a/src/rail.h +++ b/src/rail.h @@ -26,10 +26,12 @@ enum RailTypeFlags { RTF_CATENARY = 0, ///< Bit number for drawing a catenary. RTF_NO_LEVEL_CROSSING = 1, ///< Bit number for disallowing level crossings. + RTF_HIDDEN = 2, ///< Bit number for hiding from selection. RTFB_NONE = 0, ///< All flags cleared. RTFB_CATENARY = 1 << RTF_CATENARY, ///< Value for drawing a catenary. RTFB_NO_LEVEL_CROSSING = 1 << RTF_NO_LEVEL_CROSSING, ///< Value for disallowing level crossings. + RTFB_HIDDEN = 1 << RTF_HIDDEN, ///< Value for hiding from selection. }; DECLARE_ENUM_AS_BIT_SET(RailTypeFlags) @@ -419,6 +421,7 @@ Foundation GetRailFoundation(Slope tileh, TrackBits bits); bool HasRailtypeAvail(const CompanyID company, const RailType railtype); +bool HasAnyRailtypesAvail(const CompanyID company); bool ValParamRailtype(const RailType rail); RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date); @@ -434,6 +437,7 @@ RailType AllocateRailType(RailTypeLabel label); extern RailType _sorted_railtypes[RAILTYPE_END]; extern uint8 _sorted_railtypes_size; +extern RailTypes _railtypes_hidden_mask; /** * Loop header for iterating over railtypes, sorted by sortorder. |