summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_industry.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-01-23 22:09:31 +0000
committerfrosch <frosch@openttd.org>2009-01-23 22:09:31 +0000
commita1d4b792e8b412f9b4a3525554257fada2302124 (patch)
treea684a4b2e814389040ffa69997da5301631bfe62 /src/ai/api/ai_industry.hpp
parent7b5bccb3299543c42b3fd14d2830e9d9aa37b62d (diff)
downloadopenttd-a1d4b792e8b412f9b4a3525554257fada2302124.tar.xz
(svn r15241) -Fix (r15027): NoAI API was not aware of certain newindustries 'features'.
Diffstat (limited to 'src/ai/api/ai_industry.hpp')
-rw-r--r--src/ai/api/ai_industry.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ai/api/ai_industry.hpp b/src/ai/api/ai_industry.hpp
index ed44cada5..501b06087 100644
--- a/src/ai/api/ai_industry.hpp
+++ b/src/ai/api/ai_industry.hpp
@@ -47,6 +47,10 @@ public:
/**
* Gets the production of a cargo of the industry.
+ * WARNING This function does not neccessarily return useful values for newindustries.
+ * An industry produces at least the returned amount per month,
+ * but the function can also return 0, when the industry produces lots of cargo.
+ * GetLastMonthProduction() is more robust.
* @param industry_id The index of the industry.
* @param cargo_id The index of the cargo.
* @pre IsValidIndustry(industry_id).
@@ -62,7 +66,7 @@ public:
* @param cargo_id The index of the cargo.
* @pre IsValidIndustry(industry_id).
* @pre AICargo::IsValidCargo(cargo_id).
- * @return The production of the cargo for this industry.
+ * @return True if and only if the industry accepts the cargo.
*/
static bool IsCargoAccepted(IndustryID industry_id, CargoID cargo_id);