summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_order.hpp.sq
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-13 20:52:39 +0000
committerrubidium <rubidium@openttd.org>2011-11-13 20:52:39 +0000
commit3f7eb71b17da7840678c68953729aff156cc500b (patch)
tree5d71bc9aae9a9bc39ae15c1794f85d7e14987628 /src/ai/api/ai_order.hpp.sq
parentb7a655bf4cafc68e14cade593e8b1aca7f04f7dd (diff)
downloadopenttd-3f7eb71b17da7840678c68953729aff156cc500b.tar.xz
(svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically
Diffstat (limited to 'src/ai/api/ai_order.hpp.sq')
-rw-r--r--src/ai/api/ai_order.hpp.sq2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ai/api/ai_order.hpp.sq b/src/ai/api/ai_order.hpp.sq
index 9a289bdf0..1296b3c0a 100644
--- a/src/ai/api/ai_order.hpp.sq
+++ b/src/ai/api/ai_order.hpp.sq
@@ -34,6 +34,8 @@ namespace SQConvert {
template <> int Return<AIOrder *>(HSQUIRRELVM vm, AIOrder *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIOrder", res, NULL, DefSQDestructorCallback<AIOrder>); return 1; }
} // namespace SQConvert
+template <> const char *GetClassName<AIOrder>() { return "AIOrder"; }
+
void SQAIOrder_Register(Squirrel *engine)
{
DefSQClass <AIOrder> SQAIOrder("AIOrder");