From 8c05194c0241d88226ba6c727a0c45b00d8495ed Mon Sep 17 00:00:00 2001 From: yexo Date: Fri, 31 Jul 2009 22:30:54 +0000 Subject: (svn r17011) -Change [NoAI]: Add AIBaseStation as a parentclass for AIStation and AIWaypoint, and move GetName, SetName and GetLocation to AIBaseStation Remove (nearly) all references to WaypointID and replace them with StationID --- src/ai/api/ai_station.hpp.sq | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/ai/api/ai_station.hpp.sq') diff --git a/src/ai/api/ai_station.hpp.sq b/src/ai/api/ai_station.hpp.sq index 4873fba2a..e2296eecc 100644 --- a/src/ai/api/ai_station.hpp.sq +++ b/src/ai/api/ai_station.hpp.sq @@ -9,8 +9,6 @@ namespace SQConvert { template <> int Return(HSQUIRRELVM vm, AIStation::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } template <> AIStation::StationType GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIStation::StationType)tmp; } template <> int Return(HSQUIRRELVM vm, AIStation::StationType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> AIStation::SpecialStationIDs GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIStation::SpecialStationIDs)tmp; } - template <> int Return(HSQUIRRELVM vm, AIStation::SpecialStationIDs res) { sq_pushinteger(vm, (int32)res); return 1; } /* Allow AIStation to be used as Squirrel parameter */ template <> AIStation *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStation *)instance; } @@ -22,7 +20,7 @@ namespace SQConvert { void SQAIStation_Register(Squirrel *engine) { DefSQClass SQAIStation("AIStation"); - SQAIStation.PreRegister(engine); + SQAIStation.PreRegister(engine, "AIBaseStation"); SQAIStation.AddConstructor(engine, "x"); SQAIStation.DefSQConst(engine, AIStation::ERR_STATION_BASE, "ERR_STATION_BASE"); @@ -36,9 +34,6 @@ void SQAIStation_Register(Squirrel *engine) { SQAIStation.DefSQConst(engine, AIStation::STATION_AIRPORT, "STATION_AIRPORT"); SQAIStation.DefSQConst(engine, AIStation::STATION_DOCK, "STATION_DOCK"); SQAIStation.DefSQConst(engine, AIStation::STATION_ANY, "STATION_ANY"); - SQAIStation.DefSQConst(engine, AIStation::STATION_NEW, "STATION_NEW"); - SQAIStation.DefSQConst(engine, AIStation::STATION_JOIN_ADJACENT, "STATION_JOIN_ADJACENT"); - SQAIStation.DefSQConst(engine, AIStation::STATION_INVALID, "STATION_INVALID"); AIError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, AIStation::ERR_STATION_TOO_LARGE); AIError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, AIStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); @@ -55,9 +50,6 @@ void SQAIStation_Register(Squirrel *engine) { SQAIStation.DefSQStaticMethod(engine, &AIStation::IsValidStation, "IsValidStation", 2, ".i"); SQAIStation.DefSQStaticMethod(engine, &AIStation::GetStationID, "GetStationID", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &AIStation::GetName, "GetName", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &AIStation::SetName, "SetName", 3, ".is"); - SQAIStation.DefSQStaticMethod(engine, &AIStation::GetLocation, "GetLocation", 2, ".i"); SQAIStation.DefSQStaticMethod(engine, &AIStation::GetCargoWaiting, "GetCargoWaiting", 3, ".ii"); SQAIStation.DefSQStaticMethod(engine, &AIStation::GetCargoRating, "GetCargoRating", 3, ".ii"); SQAIStation.DefSQStaticMethod(engine, &AIStation::GetCoverageRadius, "GetCoverageRadius", 2, ".i"); -- cgit v1.2.3-70-g09d2