summaryrefslogtreecommitdiff
path: root/src/script/api/script_road.hpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:57:23 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:57:23 +0000
commit436cf09923d881f3c11c8a4b6262c0a89ad1ee73 (patch)
tree8c96fbae532958e5cecfd0370387f26fcb837037 /src/script/api/script_road.hpp
parent1616961ea2c1fa84c41d7df9af535fbb190d2c41 (diff)
downloadopenttd-436cf09923d881f3c11c8a4b6262c0a89ad1ee73.tar.xz
(svn r23614) -Add: more API functions exposed to NoGo (part 1)
Diffstat (limited to 'src/script/api/script_road.hpp')
-rw-r--r--src/script/api/script_road.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/script/api/script_road.hpp b/src/script/api/script_road.hpp
index b0a64b4b5..c655ca51e 100644
--- a/src/script/api/script_road.hpp
+++ b/src/script/api/script_road.hpp
@@ -16,7 +16,7 @@
/**
* Class that handles all road related functions.
- * @api ai
+ * @api ai game
*/
class ScriptRoad : public ScriptObject {
public:
@@ -118,6 +118,7 @@ public:
* Check if a given RoadType is available.
* @param road_type The RoadType to check for.
* @return True if this RoadType can be used.
+ * @api -game
*/
static bool IsRoadTypeAvailable(RoadType road_type);
@@ -185,6 +186,7 @@ public:
* @return 0 when the build parts do not connect, 1 when they do connect once
* they are build or 2 when building the first part automatically
* builds the second part. -1 means the preconditions are not met.
+ * @api -game
*/
static int32 CanBuildConnectedRoadParts(ScriptTile::Slope slope, struct Array *existing, TileIndex start, TileIndex end);
@@ -206,6 +208,7 @@ public:
* @return 0 when the build parts do not connect, 1 when they do connect once
* they are build or 2 when building the first part automatically
* builds the second part. -1 means the preconditions are not met.
+ * @api -game
*/
static int32 CanBuildConnectedRoadPartsHere(TileIndex tile, TileIndex start, TileIndex end);
@@ -263,6 +266,7 @@ public:
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @note Construction will fail if an obstacle is found between the start and end tiles.
* @return Whether the road has been/can be build or not.
+ * @api -game
*/
static bool BuildRoad(TileIndex start, TileIndex end);
@@ -290,6 +294,7 @@ public:
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @note Construction will fail if an obstacle is found between the start and end tiles.
* @return Whether the road has been/can be build or not.
+ * @api -game
*/
static bool BuildOneWayRoad(TileIndex start, TileIndex end);
@@ -313,6 +318,7 @@ public:
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @note Construction will fail if an obstacle is found between the start and end tiles.
* @return Whether the road has been/can be build or not.
+ * @api -game
*/
static bool BuildRoadFull(TileIndex start, TileIndex end);
@@ -341,6 +347,7 @@ public:
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @note Construction will fail if an obstacle is found between the start and end tiles.
* @return Whether the road has been/can be build or not.
+ * @api -game
*/
static bool BuildOneWayRoadFull(TileIndex start, TileIndex end);
@@ -355,6 +362,7 @@ public:
* @exception ScriptError::ERR_FLAT_LAND_REQUIRED
* @exception ScriptError::ERR_AREA_NOT_CLEAR
* @return Whether the road depot has been/can be build or not.
+ * @api -game
*/
static bool BuildRoadDepot(TileIndex tile, TileIndex front);
@@ -379,6 +387,7 @@ public:
* @exception ScriptStation::ERR_STATION_TOO_MANY_STATIONS
* @exception ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN
* @return Whether the station has been/can be build or not.
+ * @api -game
*/
static bool BuildRoadStation(TileIndex tile, TileIndex front, RoadVehicleType road_veh_type, StationID station_id);
@@ -403,6 +412,7 @@ public:
* @exception ScriptStation::ERR_STATION_TOO_MANY_STATIONS
* @exception ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN
* @return Whether the station has been/can be build or not.
+ * @api -game
*/
static bool BuildDriveThroughRoadStation(TileIndex tile, TileIndex front, RoadVehicleType road_veh_type, StationID station_id);
@@ -420,6 +430,7 @@ public:
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @exception ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS
* @return Whether the road has been/can be removed or not.
+ * @api -game
*/
static bool RemoveRoad(TileIndex start, TileIndex end);
@@ -438,6 +449,7 @@ public:
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @exception ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS
* @return Whether the road has been/can be removed or not.
+ * @api -game
*/
static bool RemoveRoadFull(TileIndex start, TileIndex end);
@@ -449,6 +461,7 @@ public:
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @return Whether the road depot has been/can be removed or not.
+ * @api -game
*/
static bool RemoveRoadDepot(TileIndex tile);
@@ -460,6 +473,7 @@ public:
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
* @exception ScriptError::ERR_VEHICLE_IN_THE_WAY
* @return Whether the station has been/can be removed or not.
+ * @api -game
*/
static bool RemoveRoadStation(TileIndex tile);