summaryrefslogtreecommitdiff
path: root/src/script/api/script_rail.hpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:57:34 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:57:34 +0000
commit9359c6fc47f6fabddc399d044ea74dc6ebfdfb05 (patch)
tree0e29635b5f349432059dc99b36df10aac24981f8 /src/script/api/script_rail.hpp
parent436cf09923d881f3c11c8a4b6262c0a89ad1ee73 (diff)
downloadopenttd-9359c6fc47f6fabddc399d044ea74dc6ebfdfb05.tar.xz
(svn r23615) -Add: more API functions exposed to NoGo (part 2)
Diffstat (limited to 'src/script/api/script_rail.hpp')
-rw-r--r--src/script/api/script_rail.hpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/script/api/script_rail.hpp b/src/script/api/script_rail.hpp
index c5158fee6..f76d53531 100644
--- a/src/script/api/script_rail.hpp
+++ b/src/script/api/script_rail.hpp
@@ -18,7 +18,7 @@
/**
* Class that handles all rail related functions.
- * @api ai
+ * @api ai game
*/
class ScriptRail : public ScriptObject {
public:
@@ -205,6 +205,7 @@ public:
* @pre IsRailTypeAvailable(convert_to).
* @exception ScriptRail::ERR_UNSUITABLE_TRACK
* @return Whether at least some rail has been converted successfully.
+ * @api -game
*/
static bool ConvertRailType(TileIndex start_tile, TileIndex end_tile, ScriptRail::RailType convert_to);
@@ -235,6 +236,7 @@ public:
* @exception ScriptError::ERR_FLAT_LAND_REQUIRED
* @exception ScriptError::ERR_AREA_NOT_CLEAR
* @return Whether the rail depot has been/can be build or not.
+ * @api -game
*/
static bool BuildRailDepot(TileIndex tile, TileIndex front);
@@ -258,6 +260,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 BuildRailStation(TileIndex tile, RailTrack direction, uint num_platforms, uint platform_length, StationID station_id);
@@ -291,6 +294,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 BuildNewGRFRailStation(TileIndex tile, RailTrack direction, uint num_platforms, uint platform_length, StationID station_id, CargoID cargo_id, IndustryType source_industry, IndustryType goal_industry, int distance, bool source_station);
@@ -303,6 +307,7 @@ public:
* @pre IsRailTypeAvailable(GetCurrentRailType()).
* @exception ScriptError::ERR_FLAT_LAND_REQUIRED
* @return Whether the rail waypoint has been/can be build or not.
+ * @api -game
*/
static bool BuildRailWaypoint(TileIndex tile);
@@ -314,6 +319,7 @@ public:
* @pre IsValidTile(tile).
* @pre IsValidTile(tile2).
* @return Whether at least one tile has been/can be cleared or not.
+ * @api -game
*/
static bool RemoveRailWaypointTileRectangle(TileIndex tile, TileIndex tile2, bool keep_rail);
@@ -325,6 +331,7 @@ public:
* @pre IsValidTile(tile).
* @pre IsValidTile(tile2).
* @return Whether at least one tile has been/can be cleared or not.
+ * @api -game
*/
static bool RemoveRailStationTileRectangle(TileIndex tile, TileIndex tile2, bool keep_rail);
@@ -351,6 +358,7 @@ public:
* @return Whether the rail has been/can be build or not.
* @note You can only build a single track with this function so do not
* use the values from RailTrack as bitmask.
+ * @api -game
*/
static bool BuildRailTrack(TileIndex tile, RailTrack rail_track);
@@ -363,6 +371,7 @@ public:
* @return Whether the rail has been/can be removed or not.
* @note You can only remove a single track with this function so do not
* use the values from RailTrack as bitmask.
+ * @api -game
*/
static bool RemoveRailTrack(TileIndex tile, RailTrack rail_track);
@@ -398,6 +407,7 @@ public:
* @exception ScriptError::ERR_ALREADY_BUILT
* @note Construction will fail if an obstacle is found between the start and end tiles.
* @return Whether the rail has been/can be build or not.
+ * @api -game
*/
static bool BuildRail(TileIndex from, TileIndex tile, TileIndex to);
@@ -414,6 +424,7 @@ public:
* (ScriptMap::GetTileX(from) == ScriptMap::GetTileX(tile) && ScriptMap::GetTileX(tile) == ScriptMap::GetTileX(to)) ||
* (ScriptMap::GetTileY(from) == ScriptMap::GetTileY(tile) && ScriptMap::GetTileY(tile) == ScriptMap::GetTileY(to)).
* @return Whether the rail has been/can be removed or not.
+ * @api -game
*/
static bool RemoveRail(TileIndex from, TileIndex tile, TileIndex to);
@@ -435,6 +446,7 @@ public:
* @pre IsRailTile(tile) && !IsRailStationTile(tile) && !IsRailWaypointTile(tile).
* @exception ScriptRail::ERR_UNSUITABLE_TRACK
* @return Whether the signal has been/can be build or not.
+ * @api -game
*/
static bool BuildSignal(TileIndex tile, TileIndex front, SignalType signal);
@@ -445,6 +457,7 @@ public:
* @pre ScriptMap::DistanceManhattan(tile, front) == 1.
* @pre GetSignalType(tile, front) != SIGNALTYPE_NONE.
* @return Whether the signal has been/can be removed or not.
+ * @api -game
*/
static bool RemoveSignal(TileIndex tile, TileIndex front);