summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_engine.hpp.sq
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-02 15:52:29 +0000
committeryexo <yexo@openttd.org>2010-01-02 15:52:29 +0000
commitfe67e85700988303c6e0148fa6212bf3904c8fca (patch)
tree84c8f9073611d231b11fa755b46c051ccc587ade /src/ai/api/ai_engine.hpp.sq
parentea75e7da60300bd0b1913a1a19ea554da21a592c (diff)
downloadopenttd-fe67e85700988303c6e0148fa6212bf3904c8fca.tar.xz
(svn r18687) -Add [NoAI]: AIEngine::IsBuildable to check if you can build a certain engine.
-Change: AIEngine::IsValidEngine will now also return true when you have at least one vehicle of that type even if you can't build it anymore.
Diffstat (limited to 'src/ai/api/ai_engine.hpp.sq')
-rw-r--r--src/ai/api/ai_engine.hpp.sq1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ai/api/ai_engine.hpp.sq b/src/ai/api/ai_engine.hpp.sq
index 78f9a1c06..594f7bd5e 100644
--- a/src/ai/api/ai_engine.hpp.sq
+++ b/src/ai/api/ai_engine.hpp.sq
@@ -27,6 +27,7 @@ void SQAIEngine_Register(Squirrel *engine)
SQAIEngine.AddConstructor<void (AIEngine::*)(), 1>(engine, "x");
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::IsValidEngine, "IsValidEngine", 2, ".i");
+ SQAIEngine.DefSQStaticMethod(engine, &AIEngine::IsBuildable, "IsBuildable", 2, ".i");
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetName, "GetName", 2, ".i");
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetCargoType, "GetCargoType", 2, ".i");
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::CanRefitCargo, "CanRefitCargo", 3, ".ii");