(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.
This commit is contained in:
yexo
2010-01-02 15:52:29 +00:00
parent 2f29975421
commit 8f50437298
9 changed files with 186 additions and 5 deletions

View File

@@ -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");