summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_base.hpp.sq
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-12 22:25:53 +0000
committerrubidium <rubidium@openttd.org>2009-02-12 22:25:53 +0000
commit0111a10d7ad304e6e6722e849e28fc9c6afe6d16 (patch)
tree3e221a4c240d5e3816d46d5d1e22664047944955 /src/ai/api/ai_base.hpp.sq
parent87bc20e7dd9f75e5f3b84dafad720ba9baae9604 (diff)
downloadopenttd-0111a10d7ad304e6e6722e849e28fc9c6afe6d16.tar.xz
(svn r15460) -Fix [NoAI]: don't require an instance to exist in the scope for static functions and limit exposure of the internal function GetClassName.
Diffstat (limited to 'src/ai/api/ai_base.hpp.sq')
-rw-r--r--src/ai/api/ai_base.hpp.sq13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ai/api/ai_base.hpp.sq b/src/ai/api/ai_base.hpp.sq
index 577301936..28e69ab6a 100644
--- a/src/ai/api/ai_base.hpp.sq
+++ b/src/ai/api/ai_base.hpp.sq
@@ -17,13 +17,12 @@ void SQAIBase_Register(Squirrel *engine) {
SQAIBase.PreRegister(engine);
SQAIBase.AddConstructor<void (AIBase::*)(), 1>(engine, "x");
- SQAIBase.DefSQStaticMethod(engine, &AIBase::GetClassName, "GetClassName", 1, "x");
- SQAIBase.DefSQStaticMethod(engine, &AIBase::Rand, "Rand", 1, "x");
- SQAIBase.DefSQStaticMethod(engine, &AIBase::RandItem, "RandItem", 2, "xi");
- SQAIBase.DefSQStaticMethod(engine, &AIBase::RandRange, "RandRange", 2, "xi");
- SQAIBase.DefSQStaticMethod(engine, &AIBase::RandRangeItem, "RandRangeItem", 3, "xii");
- SQAIBase.DefSQStaticMethod(engine, &AIBase::Chance, "Chance", 3, "xii");
- SQAIBase.DefSQStaticMethod(engine, &AIBase::ChanceItem, "ChanceItem", 4, "xiii");
+ SQAIBase.DefSQStaticMethod(engine, &AIBase::Rand, "Rand", 1, "?");
+ SQAIBase.DefSQStaticMethod(engine, &AIBase::RandItem, "RandItem", 2, "?i");
+ SQAIBase.DefSQStaticMethod(engine, &AIBase::RandRange, "RandRange", 2, "?i");
+ SQAIBase.DefSQStaticMethod(engine, &AIBase::RandRangeItem, "RandRangeItem", 3, "?ii");
+ SQAIBase.DefSQStaticMethod(engine, &AIBase::Chance, "Chance", 3, "?ii");
+ SQAIBase.DefSQStaticMethod(engine, &AIBase::ChanceItem, "ChanceItem", 4, "?iii");
SQAIBase.PostRegister(engine);
}