diff options
author | yexo <yexo@openttd.org> | 2010-08-07 20:51:53 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-08-07 20:51:53 +0000 |
commit | 178f74c31cd79ac248308a6fa389e5aa223b0895 (patch) | |
tree | e782722a0c69d4242fffc9e12fad9409679221d0 /bin/ai | |
parent | af9d8824bd7d08fa512f34c02c238d0042d060a7 (diff) | |
download | openttd-178f74c31cd79ac248308a6fa389e5aa223b0895.tar.xz |
(svn r20399) -Change: [NoAI] AIIndustry::IsCargoAccepted now returns 3 possible values so AIs can detect a temporaral refusal from an industry to accept some cargo type
Diffstat (limited to 'bin/ai')
-rw-r--r-- | bin/ai/compat_0.7.nut | 6 | ||||
-rw-r--r-- | bin/ai/compat_1.0.nut | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut index 4c45e4fdb..0cb9857e6 100644 --- a/bin/ai/compat_0.7.nut +++ b/bin/ai/compat_0.7.nut @@ -310,3 +310,9 @@ function() { return !this.IsEnd(); } + +AIIndustry._IsCargoAccepted <- AIIndustry.IsCargoAccepted; +AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id) +{ + return AIIndustry._IsCargoAccepted(industry_id, cargo_id) != AIIndustry.CAS_NOT_ACCEPTED; +} diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut index c28f33531..267b85871 100644 --- a/bin/ai/compat_1.0.nut +++ b/bin/ai/compat_1.0.nut @@ -61,3 +61,9 @@ function() { return !this.IsEnd(); } + +AIIndustry._IsCargoAccepted <- AIIndustry.IsCargoAccepted; +AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id) +{ + return AIIndustry._IsCargoAccepted(industry_id, cargo_id) != AIIndustry.CAS_NOT_ACCEPTED; +} |