diff options
author | rubidium <rubidium@openttd.org> | 2009-02-12 22:25:53 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-02-12 22:25:53 +0000 |
commit | dea3490b2fb3ed9bf67eafd45b0a524a7ea15750 (patch) | |
tree | 3e221a4c240d5e3816d46d5d1e22664047944955 /src/ai/api/ai_road.hpp.sq | |
parent | 3314ef39d21f8a2c0ffbe2c39d0d12ca73b041a2 (diff) | |
download | openttd-dea3490b2fb3ed9bf67eafd45b0a524a7ea15750.tar.xz |
(svn r15460) -Fix [NoAI]: don't require an instance to exist in the scope for static functions and limit exposure of the internal function GetClassName.
Diffstat (limited to 'src/ai/api/ai_road.hpp.sq')
-rw-r--r-- | src/ai/api/ai_road.hpp.sq | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/src/ai/api/ai_road.hpp.sq b/src/ai/api/ai_road.hpp.sq index 6439ae193..8cba4cfc7 100644 --- a/src/ai/api/ai_road.hpp.sq +++ b/src/ai/api/ai_road.hpp.sq @@ -42,32 +42,31 @@ void SQAIRoad_Register(Squirrel *engine) { AIError::RegisterErrorMapString(AIRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD"); AIError::RegisterErrorMapString(AIRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetClassName, "GetClassName", 1, "x"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadTile, "IsRoadTile", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadStationTile, "IsRoadStationTile", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsDriveThroughRoadStationTile, "IsDriveThroughRoadStationTile", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadTypeAvailable, "IsRoadTypeAvailable", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetCurrentRoadType, "GetCurrentRoadType", 1, "x"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::SetCurrentRoadType, "SetCurrentRoadType", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::HasRoadType, "HasRoadType", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::AreRoadTilesConnected, "AreRoadTilesConnected", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::CanBuildConnectedRoadParts, "CanBuildConnectedRoadParts", 5, "xiaii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::CanBuildConnectedRoadPartsHere, "CanBuildConnectedRoadPartsHere", 4, "xiii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetNeighbourRoadCount, "GetNeighbourRoadCount", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoad, "BuildRoad", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildOneWayRoad, "BuildOneWayRoad", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoadFull, "BuildRoadFull", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildOneWayRoadFull, "BuildOneWayRoadFull", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoadDepot, "BuildRoadDepot", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoadStation, "BuildRoadStation", 6, "xiibbb"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoad, "RemoveRoad", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoadFull, "RemoveRoadFull", 3, "xii"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoadDepot, "RemoveRoadDepot", 2, "xi"); - SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoadStation, "RemoveRoadStation", 2, "xi"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadTile, "IsRoadTile", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadStationTile, "IsRoadStationTile", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsDriveThroughRoadStationTile, "IsDriveThroughRoadStationTile", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadTypeAvailable, "IsRoadTypeAvailable", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetCurrentRoadType, "GetCurrentRoadType", 1, "?"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::SetCurrentRoadType, "SetCurrentRoadType", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::HasRoadType, "HasRoadType", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::AreRoadTilesConnected, "AreRoadTilesConnected", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::CanBuildConnectedRoadParts, "CanBuildConnectedRoadParts", 5, "?iaii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::CanBuildConnectedRoadPartsHere, "CanBuildConnectedRoadPartsHere", 4, "?iii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetNeighbourRoadCount, "GetNeighbourRoadCount", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoad, "BuildRoad", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildOneWayRoad, "BuildOneWayRoad", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoadFull, "BuildRoadFull", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildOneWayRoadFull, "BuildOneWayRoadFull", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoadDepot, "BuildRoadDepot", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::BuildRoadStation, "BuildRoadStation", 6, "?iibbb"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoad, "RemoveRoad", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoadFull, "RemoveRoadFull", 3, "?ii"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoadDepot, "RemoveRoadDepot", 2, "?i"); + SQAIRoad.DefSQStaticMethod(engine, &AIRoad::RemoveRoadStation, "RemoveRoadStation", 2, "?i"); SQAIRoad.PostRegister(engine); } |