summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_industry.hpp
diff options
context:
space:
mode:
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).