summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_industry.hpp.sq
blob: 399ed384ef7e5a44d9b22030cc070b0668155170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* $Id$ */
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */

#include "ai_industry.hpp"

namespace SQConvert {
	/* Allow AIIndustry to be used as Squirrel parameter */
	template <> AIIndustry *GetParam(ForceType<AIIndustry *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustry *)instance; }
	template <> AIIndustry &GetParam(ForceType<AIIndustry &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustry *)instance; }
	template <> const AIIndustry *GetParam(ForceType<const AIIndustry *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustry *)instance; }
	template <> const AIIndustry &GetParam(ForceType<const AIIndustry &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustry *)instance; }
	template <> int Return<AIIndustry *>(HSQUIRRELVM vm, AIIndustry *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustry", res, NULL, DefSQDestructorCallback<AIIndustry>); return 1; }
}; // namespace SQConvert

void SQAIIndustry_Register(Squirrel *engine) {
	DefSQClass <AIIndustry> SQAIIndustry("AIIndustry");
	SQAIIndustry.PreRegister(engine);
	SQAIIndustry.AddConstructor<void (AIIndustry::*)(), 1>(engine, "x");

	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetMaxIndustryID,           "GetMaxIndustryID",           1, "?");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetIndustryCount,           "GetIndustryCount",           1, "?");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsValidIndustry,            "IsValidIndustry",            2, "?i");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetName,                    "GetName",                    2, "?i");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsCargoAccepted,            "IsCargoAccepted",            3, "?ii");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetStockpiledCargo,         "GetStockpiledCargo",         3, "?ii");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLastMonthProduction,     "GetLastMonthProduction",     3, "?ii");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLastMonthTransported,    "GetLastMonthTransported",    3, "?ii");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLocation,                "GetLocation",                2, "?i");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetAmountOfStationsAround,  "GetAmountOfStationsAround",  2, "?i");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, "?ii");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDistanceSquareToTile,    "GetDistanceSquareToTile",    3, "?ii");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsBuiltOnWater,             "IsBuiltOnWater",             2, "?i");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::HasHeliportAndDock,         "HasHeliportAndDock",         2, "?i");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetHeliportAndDockLocation, "GetHeliportAndDockLocation", 2, "?i");
	SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetIndustryType,            "GetIndustryType",            2, "?i");

	SQAIIndustry.PostRegister(engine);
}