src/ai/api/ai_industrylist_valuator.hpp.sq
author truebrain
Sun, 24 Feb 2008 23:00:00 +0000
branchnoai
changeset 9756 7e637829cbd3
parent 9753 7209db94ad12
child 9778 38560cd27070
permissions -rw-r--r--
(svn r12241) [NoAI] -Fix r12236: global search/replace to the unreadable documentation! WHOHO! (tnx Progman)
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     1
#include "ai_industrylist_valuator.hpp"
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     2
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     3
namespace SQConvert {
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
     4
	/* Allow AIIndustryList_vProduction to be used as Squirrel parameter */
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
     5
	template <> AIIndustryList_vProduction *GetParam(ForceType<AIIndustryList_vProduction *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vProduction *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
     6
	template <> AIIndustryList_vProduction &GetParam(ForceType<AIIndustryList_vProduction &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vProduction *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
     7
	template <> const AIIndustryList_vProduction *GetParam(ForceType<const AIIndustryList_vProduction *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vProduction *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
     8
	template <> const AIIndustryList_vProduction &GetParam(ForceType<const AIIndustryList_vProduction &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vProduction *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
     9
	template <> int Return<AIIndustryList_vProduction *>(HSQUIRRELVM vm, AIIndustryList_vProduction *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_vProduction", res, NULL, DefSQDestructorCallback<AIIndustryList_vProduction>); return 1; }
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    10
}; // namespace SQConvert
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    11
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    12
void SQAIIndustryList_vProduction_Register(Squirrel *engine) {
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    13
	DefSQClass <AIIndustryList_vProduction> SQAIIndustryList_vProduction("AIIndustryList_vProduction");
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    14
	SQAIIndustryList_vProduction.PreRegister(engine);
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    15
	SQAIIndustryList_vProduction.AddConstructor<void (AIIndustryList_vProduction::*)(CargoID cargo_type), 2>(engine, "xi");
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    16
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    17
	SQAIIndustryList_vProduction.DefSQStaticMethod(engine, &AIIndustryList_vProduction::GetClassName, "GetClassName", 1, "x");
9710
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9680
diff changeset
    18
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    19
	SQAIIndustryList_vProduction.PostRegister(engine);
9710
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9680
diff changeset
    20
}
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9680
diff changeset
    21
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9680
diff changeset
    22
namespace SQConvert {
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    23
	/* Allow AIIndustryList_vCargoAccepted to be used as Squirrel parameter */
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    24
	template <> AIIndustryList_vCargoAccepted *GetParam(ForceType<AIIndustryList_vCargoAccepted *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vCargoAccepted *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    25
	template <> AIIndustryList_vCargoAccepted &GetParam(ForceType<AIIndustryList_vCargoAccepted &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vCargoAccepted *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    26
	template <> const AIIndustryList_vCargoAccepted *GetParam(ForceType<const AIIndustryList_vCargoAccepted *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vCargoAccepted *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    27
	template <> const AIIndustryList_vCargoAccepted &GetParam(ForceType<const AIIndustryList_vCargoAccepted &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vCargoAccepted *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    28
	template <> int Return<AIIndustryList_vCargoAccepted *>(HSQUIRRELVM vm, AIIndustryList_vCargoAccepted *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_vCargoAccepted", res, NULL, DefSQDestructorCallback<AIIndustryList_vCargoAccepted>); return 1; }
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    29
}; // namespace SQConvert
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    30
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    31
void SQAIIndustryList_vCargoAccepted_Register(Squirrel *engine) {
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    32
	DefSQClass <AIIndustryList_vCargoAccepted> SQAIIndustryList_vCargoAccepted("AIIndustryList_vCargoAccepted");
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    33
	SQAIIndustryList_vCargoAccepted.PreRegister(engine);
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    34
	SQAIIndustryList_vCargoAccepted.AddConstructor<void (AIIndustryList_vCargoAccepted::*)(CargoID cargo_type), 2>(engine, "xi");
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    35
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    36
	SQAIIndustryList_vCargoAccepted.DefSQStaticMethod(engine, &AIIndustryList_vCargoAccepted::GetClassName, "GetClassName", 1, "x");
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    37
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    38
	SQAIIndustryList_vCargoAccepted.PostRegister(engine);
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    39
}
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    40
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    41
namespace SQConvert {
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    42
	/* Allow AIIndustryList_vLocation to be used as Squirrel parameter */
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    43
	template <> AIIndustryList_vLocation *GetParam(ForceType<AIIndustryList_vLocation *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vLocation *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    44
	template <> AIIndustryList_vLocation &GetParam(ForceType<AIIndustryList_vLocation &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vLocation *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    45
	template <> const AIIndustryList_vLocation *GetParam(ForceType<const AIIndustryList_vLocation *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vLocation *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    46
	template <> const AIIndustryList_vLocation &GetParam(ForceType<const AIIndustryList_vLocation &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vLocation *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    47
	template <> int Return<AIIndustryList_vLocation *>(HSQUIRRELVM vm, AIIndustryList_vLocation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_vLocation", res, NULL, DefSQDestructorCallback<AIIndustryList_vLocation>); return 1; }
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    48
}; // namespace SQConvert
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    49
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    50
void SQAIIndustryList_vLocation_Register(Squirrel *engine) {
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    51
	DefSQClass <AIIndustryList_vLocation> SQAIIndustryList_vLocation("AIIndustryList_vLocation");
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    52
	SQAIIndustryList_vLocation.PreRegister(engine);
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    53
	SQAIIndustryList_vLocation.AddConstructor<void (AIIndustryList_vLocation::*)(), 1>(engine, "x");
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    54
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    55
	SQAIIndustryList_vLocation.DefSQStaticMethod(engine, &AIIndustryList_vLocation::GetClassName, "GetClassName", 1, "x");
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    56
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    57
	SQAIIndustryList_vLocation.PostRegister(engine);
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    58
}
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    59
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    60
namespace SQConvert {
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    61
	/* Allow AIIndustryList_vDistanceManhattanToTile to be used as Squirrel parameter */
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    62
	template <> AIIndustryList_vDistanceManhattanToTile *GetParam(ForceType<AIIndustryList_vDistanceManhattanToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vDistanceManhattanToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    63
	template <> AIIndustryList_vDistanceManhattanToTile &GetParam(ForceType<AIIndustryList_vDistanceManhattanToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vDistanceManhattanToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    64
	template <> const AIIndustryList_vDistanceManhattanToTile *GetParam(ForceType<const AIIndustryList_vDistanceManhattanToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vDistanceManhattanToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    65
	template <> const AIIndustryList_vDistanceManhattanToTile &GetParam(ForceType<const AIIndustryList_vDistanceManhattanToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vDistanceManhattanToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    66
	template <> int Return<AIIndustryList_vDistanceManhattanToTile *>(HSQUIRRELVM vm, AIIndustryList_vDistanceManhattanToTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_vDistanceManhattanToTile", res, NULL, DefSQDestructorCallback<AIIndustryList_vDistanceManhattanToTile>); return 1; }
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    67
}; // namespace SQConvert
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    68
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    69
void SQAIIndustryList_vDistanceManhattanToTile_Register(Squirrel *engine) {
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    70
	DefSQClass <AIIndustryList_vDistanceManhattanToTile> SQAIIndustryList_vDistanceManhattanToTile("AIIndustryList_vDistanceManhattanToTile");
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    71
	SQAIIndustryList_vDistanceManhattanToTile.PreRegister(engine);
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    72
	SQAIIndustryList_vDistanceManhattanToTile.AddConstructor<void (AIIndustryList_vDistanceManhattanToTile::*)(TileIndex tile), 2>(engine, "xi");
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    73
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    74
	SQAIIndustryList_vDistanceManhattanToTile.DefSQStaticMethod(engine, &AIIndustryList_vDistanceManhattanToTile::GetClassName, "GetClassName", 1, "x");
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    75
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    76
	SQAIIndustryList_vDistanceManhattanToTile.PostRegister(engine);
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    77
}
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    78
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    79
namespace SQConvert {
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    80
	/* Allow AIIndustryList_vDistanceSquareToTile to be used as Squirrel parameter */
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    81
	template <> AIIndustryList_vDistanceSquareToTile *GetParam(ForceType<AIIndustryList_vDistanceSquareToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vDistanceSquareToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    82
	template <> AIIndustryList_vDistanceSquareToTile &GetParam(ForceType<AIIndustryList_vDistanceSquareToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vDistanceSquareToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    83
	template <> const AIIndustryList_vDistanceSquareToTile *GetParam(ForceType<const AIIndustryList_vDistanceSquareToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIIndustryList_vDistanceSquareToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    84
	template <> const AIIndustryList_vDistanceSquareToTile &GetParam(ForceType<const AIIndustryList_vDistanceSquareToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIIndustryList_vDistanceSquareToTile *)instance; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    85
	template <> int Return<AIIndustryList_vDistanceSquareToTile *>(HSQUIRRELVM vm, AIIndustryList_vDistanceSquareToTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_vDistanceSquareToTile", res, NULL, DefSQDestructorCallback<AIIndustryList_vDistanceSquareToTile>); return 1; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    86
}; // namespace SQConvert
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    87
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    88
void SQAIIndustryList_vDistanceSquareToTile_Register(Squirrel *engine) {
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    89
	DefSQClass <AIIndustryList_vDistanceSquareToTile> SQAIIndustryList_vDistanceSquareToTile("AIIndustryList_vDistanceSquareToTile");
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    90
	SQAIIndustryList_vDistanceSquareToTile.PreRegister(engine);
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    91
	SQAIIndustryList_vDistanceSquareToTile.AddConstructor<void (AIIndustryList_vDistanceSquareToTile::*)(TileIndex tile), 2>(engine, "xi");
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    92
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    93
	SQAIIndustryList_vDistanceSquareToTile.DefSQStaticMethod(engine, &AIIndustryList_vDistanceSquareToTile::GetClassName, "GetClassName", 1, "x");
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    94
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    95
	SQAIIndustryList_vDistanceSquareToTile.PostRegister(engine);
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9741
diff changeset
    96
}