(svn r23146) -Change: [NewGRF v8] Make callback 22 return a probability to use instead of property 18.

This commit is contained in:
frosch
2011-11-08 17:26:13 +00:00
parent b374b92bfb
commit b98c7763de
7 changed files with 33 additions and 23 deletions

View File

@@ -91,7 +91,7 @@
{
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" */
@@ -103,7 +103,7 @@
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;