(svn r21663) -Add: [NoAI]: AIRail::GetName() to get the name of a railtype

This commit is contained in:
yexo
2010-12-29 23:20:12 +00:00
parent 23bb300721
commit 1bdea024a3
6 changed files with 28 additions and 0 deletions

View File

@@ -96,6 +96,18 @@ public:
BT_WAYPOINT, ///< Build a rail waypoint
};
/**
* Get the name of a rail type.
* @param rail_type The rail type to get the name of.
* @pre IsRailTypeAvailable(rail_type).
* @return The name the rail type has.
* @note Since there is no string with only the name of the track, the text which
* is shown in the dropdown where you can chose a track type is returned. This
* means that the name could be something like "Maglev construction" instead
* of just "Maglev".
*/
static char *GetName(RailType rail_type);
/**
* Checks whether the given tile is actually a tile with rail that can be
* used to traverse a tile. This excludes rail depots but includes