From 7fdde2fec0f3038ef0c85218ba55ed83f082a8c1 Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 14 Feb 2009 21:05:57 +0000 Subject: (svn r15483) -Change [API CHANGE]: Remove AIIndustry::GetProduction, use AIIndustry::GetLastMonthProduction instead. --- src/ai/api/ai_industry.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/ai/api/ai_industry.cpp') diff --git a/src/ai/api/ai_industry.cpp b/src/ai/api/ai_industry.cpp index 6876b270b..6ef383672 100644 --- a/src/ai/api/ai_industry.cpp +++ b/src/ai/api/ai_industry.cpp @@ -38,20 +38,6 @@ return industry_name; } -/* static */ int32 AIIndustry::GetProduction(IndustryID industry_id, CargoID cargo_id) -{ - if (!IsValidIndustry(industry_id)) return -1; - if (!AICargo::IsValidCargo(cargo_id)) return -1; - - const Industry *i = ::GetIndustry(industry_id); - - for (byte j = 0; j < lengthof(i->produced_cargo); j++) { - if (i->produced_cargo[j] == cargo_id) return i->production_rate[j] * 8; - } - - return -1; -} - /* static */ bool AIIndustry::IsCargoAccepted(IndustryID industry_id, CargoID cargo_id) { if (!IsValidIndustry(industry_id)) return false; -- cgit v1.2.3-54-g00ecf