(svn r18276) -Fix: [NoAI] Make AIIndustryType::GetConstructionCost() return -1, if the industry is neither buildable nor prospectable.

This commit is contained in:
frosch
2009-11-24 17:56:45 +00:00
parent 904a937437
commit f4fb782fbf
2 changed files with 8 additions and 7 deletions

View File

@@ -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();
}