summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-11-08 17:26:13 +0000
committerfrosch <frosch@openttd.org>2011-11-08 17:26:13 +0000
commitb98c7763de42eda4b3d19604bc3f33452b9b05e4 (patch)
tree3a0092e76fa25fd7d025cefe8e105875b99c5c8f /src/ai
parentb374b92bfb06745d21701d398bb0c78a395498b4 (diff)
downloadopenttd-b98c7763de42eda4b3d19604bc3f33452b9b05e4.tar.xz
(svn r23146) -Change: [NewGRF v8] Make callback 22 return a probability to use instead of property 18.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_industrytype.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/api/ai_industrytype.cpp b/src/ai/api/ai_industrytype.cpp
index 121a7756f..bd28df289 100644
--- a/src/ai/api/ai_industrytype.cpp
+++ b/src/ai/api/ai_industrytype.cpp
@@ -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;