summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_rail.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-07-10 10:54:30 +0000
committerfrosch <frosch@openttd.org>2010-07-10 10:54:30 +0000
commit969c059feae435ff5cabb2f33d10d939b318ec02 (patch)
treed5daa0d05cd4f59342be87002abe60b1bd2826d0 /src/ai/api/ai_rail.hpp
parent1055c2b0fd8feb8a4a3eb039c3170d7ee8160b46 (diff)
downloadopenttd-969c059feae435ff5cabb2f33d10d939b318ec02.tar.xz
(svn r20107) -Add: [NoAI] AIIndustryType::INDUSTRYTYPE_TOWN and AIIndustryType::INDUSTRYTYPE_UNKNOWN for AIRail::BuildNewGRFRailStation(). Note that BuildNewGRFRailStation() now checks the passed industry type for validity.
Diffstat (limited to 'src/ai/api/ai_rail.hpp')
-rw-r--r--src/ai/api/ai_rail.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ai/api/ai_rail.hpp b/src/ai/api/ai_rail.hpp
index 26d649aa4..97bedcb21 100644
--- a/src/ai/api/ai_rail.hpp
+++ b/src/ai/api/ai_rail.hpp
@@ -261,8 +261,8 @@ public:
* @param platform_length The length of each platform.
* @param station_id The station to join, AIStation::STATION_NEW or AIStation::STATION_JOIN_ADJACENT.
* @param cargo_id The CargoID of the cargo that will be transported from / to this station.
- * @param source_industry The IndustryType of the industry you'll transport goods from.
- * @param goal_industry The IndustryType of the industry you'll transport goods to.
+ * @param source_industry The IndustryType of the industry you'll transport goods from, AIIndustryType::INDUSTRYTYPE_UNKNOWN or AIIndustryType::INDUSTRYTYPE_TOWN.
+ * @param goal_industry The IndustryType of the industry you'll transport goods to, AIIndustryType::INDUSTRYTYPE_UNKNOWN or AIIndustryType::INDUSTRYTYPE_TOWN.
* @param distance The manhattan distance you'll transport the cargo over.
* @param source_station True if this is the source station, false otherwise.
* @pre IsRailTypeAvailable(GetCurrentRailType()).
@@ -271,6 +271,8 @@ public:
* @pre num_platforms > 0 && num_platforms <= 255.
* @pre platform_length > 0 && platform_length <= 255.
* @pre station_id == AIStation::STATION_NEW || station_id == AIStation::STATION_JOIN_ADJACENT || AIStation::IsValidStation(station_id).
+ * @pre source_industry == AIIndustryType::INDUSTRYTYPE_UNKNOWN || source_industry == AIIndustryType::INDUSTRYTYPE_TOWN || AIIndustryType::IsValidIndustryType(source_industry).
+ * @pre goal_industry == AIIndustryType::INDUSTRYTYPE_UNKNOWN || goal_industry == AIIndustryType::INDUSTRYTYPE_TOWN || AIIndustryType::IsValidIndustryType(goal_industry).
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
* @exception AIError::ERR_AREA_NOT_CLEAR
* @exception AIError::ERR_FLAT_LAND_REQUIRED