File diff r18299:b635b66c1adb → r18300:87ebd90f3b7f
src/ai/api/ai_industrytype.cpp
Show inline comments
 
@@ -88,25 +88,25 @@
 
}
 

	
 
/* static */ bool AIIndustryType::CanBuildIndustry(IndustryType industry_type)
 
{
 
	if (!IsValidIndustryType(industry_type)) return false;
 

	
 
	if (!::CheckIfCallBackAllowsAvailability(industry_type, IACT_USERCREATION)) return false;
 
	if (::GetIndustryProbabilityCallback(industry_type, IACT_USERCREATION, 1) == 0) return false;
 
	if (!::GetIndustrySpec(industry_type)->IsRawIndustry()) return true;
 

	
 
	/* raw_industry_construction == 1 means "Build as other industries" */
 
	return _settings_game.construction.raw_industry_construction == 1;
 
}
 

	
 
/* static */ bool AIIndustryType::CanProspectIndustry(IndustryType industry_type)
 
{
 
	if (!IsValidIndustryType(industry_type)) return false;
 

	
 
	if (!::GetIndustrySpec(industry_type)->IsRawIndustry()) return false;
 
	if (!::CheckIfCallBackAllowsAvailability(industry_type, IACT_USERCREATION)) return false;
 
	if (::GetIndustryProbabilityCallback(industry_type, IACT_USERCREATION, 1) == 0) return false;
 

	
 
	/* raw_industry_construction == 2 means "prospect" */
 
	return _settings_game.construction.raw_industry_construction == 2;
 
}
 

	
 
/* static */ bool AIIndustryType::BuildIndustry(IndustryType industry_type, TileIndex tile)