summaryrefslogtreecommitdiff
path: root/src/rail_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rail_map.h')
-rw-r--r--src/rail_map.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/rail_map.h b/src/rail_map.h
index 008fb39ef..2789b419a 100644
--- a/src/rail_map.h
+++ b/src/rail_map.h
@@ -72,7 +72,18 @@ static inline void SetHasSignals(TileIndex tile, bool signals)
}
/**
- * Is this tile a rail depot?
+ * Is this rail tile a rail waypoint?
+ * @param t the tile to get the information from
+ * @pre IsTileType(t, MP_RAILWAY)
+ * @return true if and only if the tile is a rail waypoint
+ */
+static inline bool IsRailWaypoint(TileIndex t)
+{
+ return GetRailTileType(t) == RAIL_TILE_WAYPOINT;
+}
+
+/**
+ * Is this rail tile a rail depot?
* @param t the tile to get the information from
* @pre IsTileType(t, MP_RAILWAY)
* @return true if and only if the tile is a rail depot
@@ -83,17 +94,16 @@ static inline bool IsRailDepot(TileIndex t)
}
/**
- * Is this tile a rail waypoint?
+ * Is this tile rail tile and a rail depot?
* @param t the tile to get the information from
* @pre IsTileType(t, MP_RAILWAY)
- * @return true if and only if the tile is a rail waypoint
+ * @return true if and only if the tile is a rail depot
*/
-static inline bool IsRailWaypoint(TileIndex t)
+static inline bool IsRailDepotTile(TileIndex t)
{
- return GetRailTileType(t) == RAIL_TILE_WAYPOINT;
+ return IsTileType(t, MP_RAILWAY) && IsRailDepot(t);
}
-
/**
* Gets the rail type of the given tile
* @param t the tile to get the rail type from