summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_stationlist.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_stationlist.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_stationlist.hpp.sq')
-rw-r--r--src/ai/api/ai_stationlist.hpp.sq4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ai/api/ai_stationlist.hpp.sq b/src/ai/api/ai_stationlist.hpp.sq
index 104797ec1..b80addbdf 100644
--- a/src/ai/api/ai_stationlist.hpp.sq
+++ b/src/ai/api/ai_stationlist.hpp.sq
@@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIStationList *>(HSQUIRRELVM vm, AIStationList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList", res, NULL, DefSQDestructorCallback<AIStationList>); return 1; }
} // namespace SQConvert
+template <> const char *GetClassName<AIStationList>() { return "AIStationList"; }
+
void SQAIStationList_Register(Squirrel *engine)
{
DefSQClass <AIStationList> SQAIStationList("AIStationList");
@@ -38,6 +40,8 @@ namespace SQConvert {
template <> int Return<AIStationList_Vehicle *>(HSQUIRRELVM vm, AIStationList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_Vehicle", res, NULL, DefSQDestructorCallback<AIStationList_Vehicle>); return 1; }
} // namespace SQConvert
+template <> const char *GetClassName<AIStationList_Vehicle>() { return "AIStationList_Vehicle"; }
+
void SQAIStationList_Vehicle_Register(Squirrel *engine)
{
DefSQClass <AIStationList_Vehicle> SQAIStationList_Vehicle("AIStationList_Vehicle");