summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_industrytype.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ai/api/ai_industrytype.cpp b/src/ai/api/ai_industrytype.cpp
index 1f2084565..8bf892c8e 100644
--- a/src/ai/api/ai_industrytype.cpp
+++ b/src/ai/api/ai_industrytype.cpp
@@ -39,7 +39,8 @@
/* static */ Money AIIndustryType::GetConstructionCost(IndustryType industry_type)
{
- if (!IsValidIndustryType(industry_type)) return false;
+ if (!IsValidIndustryType(industry_type)) return -1;
+ if (::GetIndustrySpec(industry_type)->IsRawIndustry() && _settings_game.construction.raw_industry_construction == 0) return -1;
return ::GetIndustrySpec(industry_type)->GetConstructionCost();
}