(svn r23614) -Add: more API functions exposed to NoGo (part 1)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user