summaryrefslogtreecommitdiff
path: root/src/script/api/ai
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-04-06 12:36:33 +0000
committerrubidium <rubidium@openttd.org>2013-04-06 12:36:33 +0000
commit7a3d549f2f2b372fd97fce6795a49b7c49823548 (patch)
tree4201a25b4a42fa803bda5b12a94d8b64dce6ce77 /src/script/api/ai
parentb2292122b660372f253a8e0813e24366cbd049dc (diff)
downloadopenttd-7a3d549f2f2b372fd97fce6795a49b7c49823548.tar.xz
(svn r25150) -Fix [FS#5514]: [Script] The was no way to differentiate between a cargo-station combination with or without rating, so introduce [AI|GS]Station::HasRating and let GetRating return -1 when there is no rating
Diffstat (limited to 'src/script/api/ai')
-rw-r--r--src/script/api/ai/ai_station.hpp.sq1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_station.hpp.sq b/src/script/api/ai/ai_station.hpp.sq
index 620f378b9..60e7a9cce 100644
--- a/src/script/api/ai/ai_station.hpp.sq
+++ b/src/script/api/ai/ai_station.hpp.sq
@@ -47,6 +47,7 @@ void SQAIStation_Register(Squirrel *engine)
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::IsValidStation, "IsValidStation", 2, ".i");
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetStationID, "GetStationID", 2, ".i");
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaiting, "GetCargoWaiting", 3, ".ii");
+ SQAIStation.DefSQStaticMethod(engine, &ScriptStation::HasCargoRating, "HasCargoRating", 3, ".ii");
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoRating, "GetCargoRating", 3, ".ii");
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCoverageRadius, "GetCoverageRadius", 2, ".i");
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetStationCoverageRadius, "GetStationCoverageRadius", 2, ".i");