summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_industry.hpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-08-27 13:50:07 +0000
committersmatz <smatz@openttd.org>2009-08-27 13:50:07 +0000
commit713f5d44ce5328c785f172f7cf798407e6d78fcd (patch)
treeda8a764a78fd23592a27e441595380c9ee2d2022 /src/ai/api/ai_industry.hpp
parent072ce4bb17dcb02e8e832f46e4fcadfd7c4be944 (diff)
downloadopenttd-713f5d44ce5328c785f172f7cf798407e6d78fcd.tar.xz
(svn r17294) -Add [NoAI]: AITown::GetLastMonthTransportedPercentage and AIIndustry::GetLastMonthTransportedPercentage
Diffstat (limited to 'src/ai/api/ai_industry.hpp')
-rw-r--r--src/ai/api/ai_industry.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ai/api/ai_industry.hpp b/src/ai/api/ai_industry.hpp
index ec74b690e..cbaa9f407 100644
--- a/src/ai/api/ai_industry.hpp
+++ b/src/ai/api/ai_industry.hpp
@@ -85,6 +85,16 @@ public:
static int32 GetLastMonthTransported(IndustryID industry_id, CargoID cargo_id);
/**
+ * Get the percentage of cargo transported from an industry last month.
+ * @param industry_id The index of the industry.
+ * @param cargo_id The index of the cargo.
+ * @pre IsValidIndustry(industry_id).
+ * @pre AICargo::IsValidCargo(cargo_id).
+ * @return The percentage of given cargo transported from this industry last month.
+ */
+ static int32 GetLastMonthTransportedPercentage(IndustryID industry_id, CargoID cargo_id);
+
+ /**
* Gets the location of the industry.
* @param industry_id The index of the industry.
* @pre IsValidIndustry(industry_id).