(svn r13212) [NoAI] -Add: introducing the ability to build trams. Use AIRoad.SetCurrentRoadType to switch to Trams, than all AIRoad functions will produce tram-objects. noai
authortruebrain
Thu, 22 May 2008 15:49:08 +0000
branchnoai
changeset 10668 495789401303
parent 10667 1bacf27342bd
child 10669 70a2d1f6f24b
(svn r13212) [NoAI] -Add: introducing the ability to build trams. Use AIRoad.SetCurrentRoadType to switch to Trams, than all AIRoad functions will produce tram-objects.
-Note: please note that you need a tram-grf file for this to work. In all other cases AIRoad.IsRoadTypeAvailable(AIRoad.ROADTYPE_TRAM) will return false. Don't make your AI depend on trams, not everyone has a tram-grf!
bin/ai/regression/regression.nut
bin/ai/regression/regression.txt
src/ai/api/ai_engine.cpp
src/ai/api/ai_engine.hpp
src/ai/api/ai_engine.hpp.sq
src/ai/api/ai_object.cpp
src/ai/api/ai_object.hpp
src/ai/api/ai_road.cpp
src/ai/api/ai_road.hpp
src/ai/api/ai_road.hpp.sq
src/ai/api/ai_station.cpp
src/ai/api/ai_station.hpp
src/ai/api/ai_station.hpp.sq
src/ai/api/ai_vehicle.cpp
src/ai/api/ai_vehicle.hpp
src/ai/api/ai_vehicle.hpp.sq
--- a/bin/ai/regression/regression.nut	Thu May 22 10:23:34 2008 +0000
+++ b/bin/ai/regression/regression.nut	Thu May 22 15:49:08 2008 +0000
@@ -283,6 +283,7 @@
 		print("    GetMaxAge():        " + AIEngine.GetMaxAge(i));
 		print("    GetRunningCost():   " + AIEngine.GetRunningCost(i));
 		print("    GetVehicleType():   " + AIEngine.GetVehicleType(i));
+		print("    GetRoadType():      " + AIEngine.GetRoadType(i));
 	}
 	print("  Valid Engines:        " + j);
 }
@@ -702,10 +703,16 @@
 	print("    BuildRoad():                   " + AIRoad.BuildRoad(33411, 33414));
 	print("    AreRoadTilesConnected():       " + AIRoad.AreRoadTilesConnected(33412, 33413));
 	print("    IsRoadTile():                  " + AIRoad.IsRoadTile(33411));
+	print("    HasRoadType(Road):             " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_ROAD));
+	print("    HasRoadType(Tram):             " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_TRAM));
 	print("    GetNeighbourRoadCount():       " + AIRoad.GetNeighbourRoadCount(33412));
 	print("    RemoveRoad():                  " + AIRoad.RemoveRoad(33411, 33411));
 	print("    RemoveRoad():                  " + AIRoad.RemoveRoad(33411, 33412));
 	print("    RemoveRoad():                  " + AIRoad.RemoveRoad(19590, 19590));
+	print("    IsRoadTypeAvailable(Road):     " + AIRoad.IsRoadTypeAvailable(AIRoad.ROADTYPE_ROAD));
+	print("    IsRoadTypeAvailable(Tram):     " + AIRoad.IsRoadTypeAvailable(AIRoad.ROADTYPE_TRAM));
+	print("    SetCurrentRoadType(Tram):      " + AIRoad.SetCurrentRoadType(AIRoad.ROADTYPE_TRAM));
+	print("    GetCurrentRoadType():          " + AIRoad.GetCurrentRoadType());
 
 	print("  Depot");
 	print("    IsRoadTile():                  " + AIRoad.IsRoadTile(33411));
@@ -713,6 +720,8 @@
 	print("    BuildRoadDepot():              " + AIRoad.BuildRoadDepot(33411, 33411));
 	print("    BuildRoadDepot():              " + AIRoad.BuildRoadDepot(33411, 33414));
 	print("    BuildRoadDepot():              " + AIRoad.BuildRoadDepot(33411, 33412));
+	print("    HasRoadType(Road):             " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_ROAD));
+	print("    HasRoadType(Tram):             " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_TRAM));
 	print("    GetLastError():                " + AIError.GetLastError());
 	print("    GetLastErrorString():          " + AIError.GetLastErrorString());
 	print("    GetErrorCategory():            " + AIError.GetErrorCategory());
@@ -729,6 +738,8 @@
 	print("    BuildRoadStation():            " + AIRoad.BuildRoadStation(33411, 33411, false, false));
 	print("    BuildRoadStation():            " + AIRoad.BuildRoadStation(33411, 33414, false, false));
 	print("    BuildRoadStation():            " + AIRoad.BuildRoadStation(33411, 33412, false, false));
+	print("    HasRoadType(Road):             " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_ROAD));
+	print("    HasRoadType(Tram):             " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_TRAM));
 	print("    IsRoadTile():                  " + AIRoad.IsRoadTile(33411));
 	print("    GetDriveThroughBackTile():     " + AIRoad.GetDriveThroughBackTile(33411));
 	print("    GetRoadStationFrontTile():     " + AIRoad.GetRoadStationFrontTile(33411));
@@ -798,6 +809,12 @@
 	print("  GetCargoWaiting(1000, 0): " + AIStation.GetCargoWaiting(1000, 0));
 	print("  GetCargoWaiting(0, 1000): " + AIStation.GetCargoWaiting(0, 1000));
 
+	print("  GetStationID(33411):      " + AIStation.GetStationID(33411));
+	print("  HasRoadType(3, TRAM):     " + AIStation.HasRoadType(3, AIRoad.ROADTYPE_TRAM));
+	print("  HasRoadType(3, ROAD):     " + AIStation.HasRoadType(3, AIRoad.ROADTYPE_ROAD));
+	print("  HasRoadType(33411, TRAM): " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_TRAM));
+	print("  HasRoadType(33411, ROAD): " + AIRoad.HasRoadType(33411, AIRoad.ROADTYPE_ROAD));
+
 	print("  GetCoverageRadius(bus):   " + AIStation.GetCoverageRadius(AIStation.STATION_BUS_STOP));
 	print("  GetCoverageRadius(truck): " + AIStation.GetCoverageRadius(AIStation.STATION_TRUCK_STOP));
 	print("  GetCoverageRadius(train): " + AIStation.GetCoverageRadius(AIStation.STATION_TRAIN));
@@ -1101,6 +1118,7 @@
 	print("    GetProfitThisYear(): " + AIVehicle.GetProfitThisYear(11));
 	print("    GetProfitLastYear(): " + AIVehicle.GetProfitLastYear(11));
 	print("    GetVehicleType():    " + AIVehicle.GetVehicleType(11));
+	print("    GetRoadType():       " + AIVehicle.GetRoadType(11));
 	print("    GetCapacity():       " + AIVehicle.GetCapacity(11, 10));
 	print("    GetCargoLoad():      " + AIVehicle.GetCargoLoad(11, 10));
 	print("    IsInDepot():         " + AIVehicle.IsInDepot(11));
@@ -1188,6 +1206,11 @@
 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
 		print("    " + i + " => " + list.GetValue(i));
 	}
+	list.Valuate(AIVehicle.GetRoadType);
+	print("  RoadType ListDump:");
+	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+		print("    " + i + " => " + list.GetValue(i));
+	}
 	list.Valuate(AIVehicle.GetCapacity, 10);
 	print("  VehicleType ListDump:");
 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
--- a/bin/ai/regression/regression.txt	Thu May 22 10:23:34 2008 +0000
+++ b/bin/ai/regression/regression.txt	Thu May 22 15:49:08 2008 +0000
@@ -870,6 +870,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 0
     IsValidEngine():    true
     GetName():          Kirby Paul Tank (Steam)
@@ -882,6 +883,7 @@
     GetMaxAge():        5490
     GetRunningCost():   820
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 1
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -894,6 +896,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 2
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -906,6 +909,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 3
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -918,6 +922,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 4
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -930,6 +935,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 5
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -942,6 +948,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 6
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -954,6 +961,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 7
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -966,6 +974,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 8
     IsValidEngine():    true
     GetName():          Chaney 'Jubilee' (Steam)
@@ -978,6 +987,7 @@
     GetMaxAge():        7686
     GetRunningCost():   1968
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 9
     IsValidEngine():    true
     GetName():          Ginzu 'A4' (Steam)
@@ -990,6 +1000,7 @@
     GetMaxAge():        7320
     GetRunningCost():   2296
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 10
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1002,6 +1013,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 11
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1014,6 +1026,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 12
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1026,6 +1039,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 13
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1038,6 +1052,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 14
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1050,6 +1065,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 15
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1062,6 +1078,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 16
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1074,6 +1091,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 17
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1086,6 +1104,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 18
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1098,6 +1117,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 19
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1110,6 +1130,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 20
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1122,6 +1143,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 21
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1134,6 +1156,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 22
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1146,6 +1169,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 23
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1158,6 +1182,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 24
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1170,6 +1195,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 25
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1182,6 +1208,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 26
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1194,6 +1221,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 27
     IsValidEngine():    true
     GetName():          Passenger Carriage
@@ -1206,6 +1234,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 28
     IsValidEngine():    true
     GetName():          Mail Van
@@ -1218,6 +1247,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 29
     IsValidEngine():    true
     GetName():          Coal Truck
@@ -1230,6 +1260,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 30
     IsValidEngine():    true
     GetName():          Oil Tanker
@@ -1242,6 +1273,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 31
     IsValidEngine():    true
     GetName():          Livestock Van
@@ -1254,6 +1286,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 32
     IsValidEngine():    true
     GetName():          Goods Van
@@ -1266,6 +1299,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 33
     IsValidEngine():    true
     GetName():          Grain Hopper
@@ -1278,6 +1312,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 34
     IsValidEngine():    true
     GetName():          Wood Truck
@@ -1290,6 +1325,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 35
     IsValidEngine():    true
     GetName():          Iron Ore Hopper
@@ -1302,6 +1338,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 36
     IsValidEngine():    true
     GetName():          Steel Truck
@@ -1314,6 +1351,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 37
     IsValidEngine():    true
     GetName():          Armoured Van
@@ -1326,6 +1364,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 38
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1338,6 +1377,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 39
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1350,6 +1390,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 40
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1362,6 +1403,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 41
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1374,6 +1416,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 42
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1386,6 +1429,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 43
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1398,6 +1442,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 44
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1410,6 +1455,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 45
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1422,6 +1468,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 46
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1434,6 +1481,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 47
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1446,6 +1494,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 48
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1458,6 +1507,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 49
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1470,6 +1520,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 50
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1482,6 +1533,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 51
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1494,6 +1546,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 52
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1506,6 +1559,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 53
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1518,6 +1572,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 54
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1530,6 +1585,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 55
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1542,6 +1598,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 56
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1554,6 +1611,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 57
     IsValidEngine():    true
     GetName():          Passenger Carriage
@@ -1566,6 +1624,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 58
     IsValidEngine():    true
     GetName():          Mail Van
@@ -1578,6 +1637,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 59
     IsValidEngine():    true
     GetName():          Coal Truck
@@ -1590,6 +1650,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 60
     IsValidEngine():    true
     GetName():          Oil Tanker
@@ -1602,6 +1663,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 61
     IsValidEngine():    true
     GetName():          Livestock Van
@@ -1614,6 +1676,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 62
     IsValidEngine():    true
     GetName():          Goods Van
@@ -1626,6 +1689,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 63
     IsValidEngine():    true
     GetName():          Grain Hopper
@@ -1638,6 +1702,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 64
     IsValidEngine():    true
     GetName():          Wood Truck
@@ -1650,6 +1715,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 65
     IsValidEngine():    true
     GetName():          Iron Ore Hopper
@@ -1662,6 +1728,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 66
     IsValidEngine():    true
     GetName():          Steel Truck
@@ -1674,6 +1741,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 67
     IsValidEngine():    true
     GetName():          Armoured Van
@@ -1686,6 +1754,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 68
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1698,6 +1767,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 69
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1710,6 +1780,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 70
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1722,6 +1793,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 71
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1734,6 +1806,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 72
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1746,6 +1819,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 73
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1758,6 +1832,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 74
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1770,6 +1845,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 75
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1782,6 +1858,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 76
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1794,6 +1871,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 77
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1806,6 +1884,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 78
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1818,6 +1897,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 79
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1830,6 +1910,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 80
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1842,6 +1923,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 81
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1854,6 +1936,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 82
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1866,6 +1949,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 83
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1878,6 +1962,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 84
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1890,6 +1975,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 85
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1902,6 +1988,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 86
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1914,6 +2001,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 87
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1926,6 +2014,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 88
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -1938,6 +2027,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 89
     IsValidEngine():    true
     GetName():          Passenger Carriage
@@ -1950,6 +2040,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 90
     IsValidEngine():    true
     GetName():          Mail Van
@@ -1962,6 +2053,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 91
     IsValidEngine():    true
     GetName():          Coal Truck
@@ -1974,6 +2066,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 92
     IsValidEngine():    true
     GetName():          Oil Tanker
@@ -1986,6 +2079,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 93
     IsValidEngine():    true
     GetName():          Livestock Van
@@ -1998,6 +2092,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 94
     IsValidEngine():    true
     GetName():          Goods Van
@@ -2010,6 +2105,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 95
     IsValidEngine():    true
     GetName():          Grain Hopper
@@ -2022,6 +2118,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 96
     IsValidEngine():    true
     GetName():          Wood Truck
@@ -2034,6 +2131,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 97
     IsValidEngine():    true
     GetName():          Iron Ore Hopper
@@ -2046,6 +2144,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 98
     IsValidEngine():    true
     GetName():          Steel Truck
@@ -2058,6 +2157,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 99
     IsValidEngine():    true
     GetName():          Armoured Van
@@ -2070,6 +2170,7 @@
     GetMaxAge():        7320
     GetRunningCost():   0
     GetVehicleType():   0
+    GetRoadType():      -1
   Engine 100
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2082,6 +2183,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 101
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2094,6 +2196,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 102
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2106,6 +2209,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 103
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2118,6 +2222,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 104
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2130,6 +2235,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 105
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2142,6 +2248,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 106
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2154,6 +2261,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 107
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2166,6 +2274,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 108
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2178,6 +2287,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 109
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2190,6 +2300,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 110
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2202,6 +2313,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 111
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2214,6 +2326,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 112
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2226,6 +2339,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 113
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2238,6 +2352,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 114
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2250,6 +2365,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 115
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2262,6 +2378,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 116
     IsValidEngine():    true
     GetName():          MPS Regal Bus
@@ -2274,6 +2391,7 @@
     GetMaxAge():        4392
     GetRunningCost():   426
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 117
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2286,6 +2404,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 118
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2298,6 +2417,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 119
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2310,6 +2430,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 120
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2322,6 +2443,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 121
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2334,6 +2456,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 122
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2346,6 +2469,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 123
     IsValidEngine():    true
     GetName():          Balogh Coal Truck
@@ -2358,6 +2482,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 124
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2370,6 +2495,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 125
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2382,6 +2508,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 126
     IsValidEngine():    true
     GetName():          MPS Mail Truck
@@ -2394,6 +2521,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 127
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2406,6 +2534,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 128
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2418,6 +2547,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 129
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2430,6 +2560,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 130
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2442,6 +2573,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 131
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2454,6 +2586,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 132
     IsValidEngine():    true
     GetName():          Witcombe Oil Tanker
@@ -2466,6 +2599,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 133
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2478,6 +2612,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 134
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2490,6 +2625,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 135
     IsValidEngine():    true
     GetName():          Talbott Livestock Van
@@ -2502,6 +2638,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 136
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2514,6 +2651,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 137
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2526,6 +2664,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 138
     IsValidEngine():    true
     GetName():          Balogh Goods Truck
@@ -2538,6 +2677,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 139
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2550,6 +2690,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 140
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2562,6 +2703,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 141
     IsValidEngine():    true
     GetName():          Hereford Grain Truck
@@ -2574,6 +2716,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 142
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2586,6 +2729,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 143
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2598,6 +2742,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 144
     IsValidEngine():    true
     GetName():          Witcombe Wood Truck
@@ -2610,6 +2755,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 145
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2622,6 +2768,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 146
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2634,6 +2781,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 147
     IsValidEngine():    true
     GetName():          MPS Iron Ore Truck
@@ -2646,6 +2794,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 148
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2658,6 +2807,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 149
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2670,6 +2820,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 150
     IsValidEngine():    true
     GetName():          Balogh Steel Truck
@@ -2682,6 +2833,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 151
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2694,6 +2846,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 152
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2706,6 +2859,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 153
     IsValidEngine():    true
     GetName():          Balogh Armoured Truck
@@ -2718,6 +2872,7 @@
     GetMaxAge():        5490
     GetRunningCost():   421
     GetVehicleType():   1
+    GetRoadType():      0
   Engine 154
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2730,6 +2885,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 155
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2742,6 +2898,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 156
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2754,6 +2911,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 157
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2766,6 +2924,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 158
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2778,6 +2937,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 159
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2790,6 +2950,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 160
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2802,6 +2963,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 161
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2814,6 +2976,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 162
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2826,6 +2989,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 163
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2838,6 +3002,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 164
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2850,6 +3015,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 165
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2862,6 +3028,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 166
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2874,6 +3041,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 167
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2886,6 +3054,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 168
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2898,6 +3067,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 169
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2910,6 +3080,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 170
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2922,6 +3093,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 171
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2934,6 +3106,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 172
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2946,6 +3119,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 173
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2958,6 +3132,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 174
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2970,6 +3145,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 175
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2982,6 +3158,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 176
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -2994,6 +3171,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 177
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3006,6 +3184,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 178
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3018,6 +3197,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 179
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3030,6 +3210,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 180
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3042,6 +3223,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 181
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3054,6 +3236,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 182
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3066,6 +3249,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 183
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3078,6 +3262,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 184
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3090,6 +3275,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 185
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3102,6 +3288,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 186
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3114,6 +3301,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 187
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3126,6 +3314,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 188
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3138,6 +3327,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 189
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3150,6 +3340,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 190
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3162,6 +3353,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 191
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3174,6 +3366,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 192
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3186,6 +3379,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 193
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3198,6 +3392,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 194
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3210,6 +3405,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 195
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3222,6 +3418,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 196
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3234,6 +3431,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 197
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3246,6 +3444,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 198
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3258,6 +3457,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 199
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3270,6 +3470,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 200
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3282,6 +3483,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 201
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3294,6 +3496,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 202
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3306,6 +3509,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 203
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3318,6 +3522,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 204
     IsValidEngine():    true
     GetName():          MPS Oil Tanker
@@ -3330,6 +3535,7 @@
     GetMaxAge():        10980
     GetRunningCost():   2296
     GetVehicleType():   2
+    GetRoadType():      -1
   Engine 205
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3342,6 +3548,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 206
     IsValidEngine():    true
     GetName():          MPS Passenger Ferry
@@ -3354,6 +3561,7 @@
     GetMaxAge():        10980
     GetRunningCost():   1476
     GetVehicleType():   2
+    GetRoadType():      -1
   Engine 207
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3366,6 +3574,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 208
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3378,6 +3587,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 209
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3390,6 +3600,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 210
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3402,6 +3613,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 211
     IsValidEngine():    true
     GetName():          Yate Cargo ship
@@ -3414,6 +3626,7 @@
     GetMaxAge():        10980
     GetRunningCost():   2460
     GetVehicleType():   2
+    GetRoadType():      -1
   Engine 212
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3426,6 +3639,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 213
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3438,6 +3652,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 214
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3450,6 +3665,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 215
     IsValidEngine():    true
     GetName():          Sampson U52
@@ -3462,6 +3678,7 @@
     GetMaxAge():        7320
     GetRunningCost():   2390
     GetVehicleType():   3
+    GetRoadType():      -1
   Engine 216
     IsValidEngine():    true
     GetName():          Coleman Count
@@ -3474,6 +3691,7 @@
     GetMaxAge():        8784
     GetRunningCost():   2812
     GetVehicleType():   3
+    GetRoadType():      -1
   Engine 217
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3486,6 +3704,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 218
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3498,6 +3717,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 219
     IsValidEngine():    true
     GetName():          Bakewell Cotswald LB-3
@@ -3510,6 +3730,7 @@
     GetMaxAge():        10980
     GetRunningCost():   2756
     GetVehicleType():   3
+    GetRoadType():      -1
   Engine 220
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3522,6 +3743,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 221
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3534,6 +3756,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 222
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3546,6 +3769,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 223
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3558,6 +3782,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 224
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3570,6 +3795,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 225
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3582,6 +3808,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 226
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3594,6 +3821,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 227
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3606,6 +3834,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 228
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3618,6 +3847,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 229
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3630,6 +3860,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 230
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3642,6 +3873,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 231
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3654,6 +3886,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 232
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3666,6 +3899,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 233
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3678,6 +3912,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 234
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3690,6 +3925,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 235
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3702,6 +3938,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 236
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3714,6 +3951,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 237
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3726,6 +3964,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 238
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3738,6 +3977,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 239
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3750,6 +3990,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 240
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3762,6 +4003,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 241
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3774,6 +4016,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 242
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3786,6 +4029,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 243
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3798,6 +4042,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 244
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3810,6 +4055,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 245
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3822,6 +4068,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 246
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3834,6 +4081,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 247
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3846,6 +4094,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 248
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3858,6 +4107,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 249
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3870,6 +4120,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 250
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3882,6 +4133,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 251
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3894,6 +4146,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 252
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3906,6 +4159,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 253
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3918,6 +4172,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 254
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3930,6 +4185,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 255
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3942,6 +4198,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Engine 256
     IsValidEngine():    false
     GetName():          (null : 0x00000000)
@@ -3954,6 +4211,7 @@
     GetMaxAge():        -1
     GetRunningCost():   -1
     GetVehicleType():   255
+    GetRoadType():      -1
   Valid Engines:        53
 
 --EngineList--
@@ -5419,16 +5677,24 @@
     BuildRoad():                   true
     AreRoadTilesConnected():       true
     IsRoadTile():                  true
+    HasRoadType(Road):             true
+    HasRoadType(Tram):             false
     GetNeighbourRoadCount():       2
     RemoveRoad():                  true
     RemoveRoad():                  true
     RemoveRoad():                  true
+    IsRoadTypeAvailable(Road):     true
+    IsRoadTypeAvailable(Tram):     false
+    SetCurrentRoadType(Tram):      (null : 0x00000000)
+    GetCurrentRoadType():          0
   Depot
     IsRoadTile():                  false
     BuildRoadDepot():              false
     BuildRoadDepot():              false
     BuildRoadDepot():              true
     BuildRoadDepot():              false
+    HasRoadType(Road):             true
+    HasRoadType(Tram):             false
     GetLastError():                260
     GetLastErrorString():          ERR_AREA_NOT_CLEAR
     GetErrorCategory():            1
@@ -5444,6 +5710,8 @@
     BuildRoadStation():            false
     BuildRoadStation():            true
     BuildRoadStation():            false
+    HasRoadType(Road):             true
+    HasRoadType(Tram):             false
     IsRoadTile():                  false
     GetDriveThroughBackTile():     -1
     GetRoadStationFrontTile():     33412
@@ -5513,6 +5781,11 @@
   GetCargoWaiting(0, 0):    0
   GetCargoWaiting(1000, 0): -1
   GetCargoWaiting(0, 1000): -1
+  GetStationID(33411):      3
+  HasRoadType(3, TRAM):     false
+  HasRoadType(3, ROAD):     true
+  HasRoadType(33411, TRAM): false
+  HasRoadType(33411, ROAD): true
   GetCoverageRadius(bus):   3
   GetCoverageRadius(truck): 3
   GetCoverageRadius(train): 4
@@ -6395,6 +6668,7 @@
     GetProfitThisYear(): 0
     GetProfitLastYear(): 0
     GetVehicleType():    1
+    GetRoadType():       0
     GetCapacity():       12
     GetCargoLoad():      0
     IsInDepot():         false
@@ -6476,6 +6750,11 @@
     15 => 2
     12 => 1
     11 => 1
+  RoadType ListDump:
+    12 => 0
+    11 => 0
+    15 => -1
+    13 => -1
   VehicleType ListDump:
     12 => 12
     11 => 12
--- a/src/ai/api/ai_engine.cpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_engine.cpp	Thu May 22 15:49:08 2008 +0000
@@ -223,3 +223,11 @@
 		default: NOT_REACHED();
 	}
 }
+
+/* static */ AIRoad::RoadType AIEngine::GetRoadType(EngineID engine_id)
+{
+	if (!IsValidEngine(engine_id)) return AIRoad::ROADTYPE_INVALID;
+	if (GetVehicleType(engine_id) != AIVehicle::VEHICLE_ROAD) return AIRoad::ROADTYPE_INVALID;
+
+	return HasBit(::EngInfo(engine_id)->misc_flags, EF_ROAD_TRAM) ? AIRoad::ROADTYPE_TRAM : AIRoad::ROADTYPE_ROAD;
+}
--- a/src/ai/api/ai_engine.hpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_engine.hpp	Thu May 22 15:49:08 2008 +0000
@@ -7,6 +7,7 @@
 
 #include "ai_object.hpp"
 #include "ai_vehicle.hpp"
+#include "ai_road.hpp"
 
 /**
  * Class that handles all engine related functions.
@@ -112,6 +113,15 @@
 	 * @return The type the engine has.
 	 */
 	static AIVehicle::VehicleType GetVehicleType(EngineID engine_id);
+
+	/**
+	 * Get the RoadType of the engine.
+	 * @param engine_id The engine to get the RoadType of.
+	 * @pre IsValidEngine(engine_id).
+	 * @pre GetVehicleType(engine_id) == AIVehicle.VEHICLE_ROAD.
+	 * @return The RoadType the engine has.
+	 */
+	static AIRoad::RoadType GetRoadType(EngineID engine_id);
 };
 
 #endif /* AI_ENGINE_HPP */
--- a/src/ai/api/ai_engine.hpp.sq	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_engine.hpp.sq	Thu May 22 15:49:08 2008 +0000
@@ -29,6 +29,7 @@
 	SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetMaxAge,      "GetMaxAge",      2, "xi");
 	SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetRunningCost, "GetRunningCost", 2, "xi");
 	SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetVehicleType, "GetVehicleType", 2, "xi");
+	SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetRoadType,    "GetRoadType",    2, "xi");
 
 	SQAIEngine.PostRegister(engine);
 }
--- a/src/ai/api/ai_object.cpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_object.cpp	Thu May 22 15:49:08 2008 +0000
@@ -24,6 +24,7 @@
 	bool last_command_res;
 	VehicleID new_vehicle_id;
 	SignID new_sign_id;
+	RoadType road_type;
 	void *event_data;
 	void *log_data;
 };
@@ -80,6 +81,16 @@
 	return GetDoCommandStruct(_current_player)->last_error;
 }
 
+void AIObject::SetRoadType(RoadType road_type)
+{
+	GetDoCommandStruct(_current_player)->road_type = road_type;
+}
+
+RoadType AIObject::GetRoadType()
+{
+	return GetDoCommandStruct(_current_player)->road_type;
+}
+
 void AIObject::SetLastCommandRes(bool res)
 {
 	GetDoCommandStruct(_current_player)->last_command_res = res;
--- a/src/ai/api/ai_object.hpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_object.hpp	Thu May 22 15:49:08 2008 +0000
@@ -7,6 +7,7 @@
 
 #include "../../stdafx.h"
 #include "../../misc/countedptr.hpp"
+#include "../../road_type.h"
 
 #include "ai_types.hpp"
 
@@ -62,6 +63,16 @@
 	static AIErrorType GetLastError();
 
 	/**
+	 * Set the road type.
+	 */
+	static void SetRoadType(RoadType road_type);
+
+	/**
+	 * Get the road type.
+	 */
+	static RoadType GetRoadType();
+
+	/**
 	 * Set the current mode of your AI to this proc.
 	 */
 	static void SetDoCommandMode(AIModeProc *proc, AIObject *instance);
--- a/src/ai/api/ai_road.cpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_road.cpp	Thu May 22 15:49:08 2008 +0000
@@ -3,10 +3,12 @@
 /** @file ai_road.cpp Implementation of AIRoad. */
 
 #include "ai_road.hpp"
+#include "ai_map.hpp"
 #include "../../openttd.h"
 #include "../../road_map.h"
 #include "../../station_map.h"
 #include "../../command_type.h"
+#include "../../player_func.h"
 
 /* static */ bool AIRoad::IsRoadTile(TileIndex tile)
 {
@@ -37,6 +39,30 @@
 	return ::IsDriveThroughStopTile(tile);
 }
 
+/* static */ bool AIRoad::IsRoadTypeAvailable(RoadType road_type)
+{
+	return ::HasRoadTypesAvail(_current_player, ::RoadTypeToRoadTypes((::RoadType)road_type));
+}
+
+/* static */ AIRoad::RoadType AIRoad::GetCurrentRoadType()
+{
+	return (RoadType)AIObject::GetRoadType();
+}
+
+/* static */ void AIRoad::SetCurrentRoadType(RoadType road_type)
+{
+	if (!IsRoadTypeAvailable(road_type)) return;
+
+	AIObject::SetRoadType((::RoadType)road_type);
+}
+
+/* static */ bool AIRoad::HasRoadType(TileIndex tile, RoadType road_type)
+{
+	if (!AIMap::IsValidTile(tile)) return false;
+	if (!IsRoadTypeAvailable(road_type)) return false;
+	return ::GetAnyRoadBits(tile, (::RoadType)road_type, false) != ROAD_NONE;
+}
+
 /* static */ bool AIRoad::AreRoadTilesConnected(TileIndex t1, TileIndex t2)
 {
 	if (!::IsValidTile(t1)) return false;
@@ -45,8 +71,8 @@
 	/* Tiles not neighbouring */
 	if ((abs((int)::TileX(t1) - (int)::TileX(t2)) + abs((int)::TileY(t1) - (int)::TileY(t2))) != 1) return false;
 
-	RoadBits r1 = ::GetAnyRoadBits(t1, ROADTYPE_ROAD);
-	RoadBits r2 = ::GetAnyRoadBits(t2, ROADTYPE_ROAD);
+	RoadBits r1 = ::GetAnyRoadBits(t1, AIObject::GetRoadType());
+	RoadBits r2 = ::GetAnyRoadBits(t2, AIObject::GetRoadType());
 
 	DiagDirection dir_1 = (DiagDirection)((::TileX(t1) == ::TileX(t2)) ? (::TileY(t1) < ::TileY(t2) ? 2 : 0) : (::TileX(t1) < ::TileX(t2) ? 1 : 3));
 	DiagDirection dir_2 = ::ReverseDiagDir(dir_1);
@@ -96,7 +122,7 @@
 	EnforcePrecondition(false, ::IsValidTile(end));
 	EnforcePrecondition(false, TileX(start) == TileX(end) || TileY(start) == TileY(end));
 
-	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 1 : 2) | (ROADTYPE_ROAD << 3), CMD_BUILD_LONG_ROAD);
+	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 1 : 2) | (AIObject::GetRoadType() << 3), CMD_BUILD_LONG_ROAD);
 }
 
 /* static */ bool AIRoad::BuildRoadFull(TileIndex start, TileIndex end)
@@ -106,7 +132,7 @@
 	EnforcePrecondition(false, ::IsValidTile(end));
 	EnforcePrecondition(false, TileX(start) == TileX(end) || TileY(start) == TileY(end));
 
-	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 2 : 1), CMD_BUILD_LONG_ROAD);
+	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 2 : 1) | (AIObject::GetRoadType() << 3), CMD_BUILD_LONG_ROAD);
 }
 
 /* static */ bool AIRoad::BuildRoadDepot(TileIndex tile, TileIndex front)
@@ -117,7 +143,7 @@
 
 	uint entrance_dir = (TileX(tile) == TileX(front)) ? (TileY(tile) < TileY(front) ? 1 : 3) : (TileX(tile) < TileX(front) ? 2 : 0);
 
-	return AIObject::DoCommand(tile, entrance_dir, ROADTYPE_ROAD << 2, CMD_BUILD_ROAD_DEPOT);
+	return AIObject::DoCommand(tile, entrance_dir, AIObject::GetRoadType() << 2, CMD_BUILD_ROAD_DEPOT);
 }
 
 /* static */ bool AIRoad::BuildRoadStation(TileIndex tile, TileIndex front, bool truck, bool drive_through)
@@ -133,7 +159,7 @@
 		entrance_dir = (TileX(tile) == TileX(front)) ? (TileY(tile) < TileY(front) ? 1 : 3) : (TileX(tile) < TileX(front) ? 2 : 0);
 	}
 
-	return AIObject::DoCommand(tile, entrance_dir, (drive_through ? 2 : 0) | (truck ? 1 : 0) | (ROADTYPES_ROAD << 2), CMD_BUILD_ROAD_STOP);
+	return AIObject::DoCommand(tile, entrance_dir, (drive_through ? 2 : 0) | (truck ? 1 : 0) | (::RoadTypeToRoadTypes(AIObject::GetRoadType()) << 2), CMD_BUILD_ROAD_STOP);
 }
 
 /* static */ bool AIRoad::RemoveRoad(TileIndex start, TileIndex end)
@@ -142,7 +168,7 @@
 	EnforcePrecondition(false, ::IsValidTile(end));
 	EnforcePrecondition(false, TileX(start) == TileX(end) || TileY(start) == TileY(end));
 
-	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 1 : 2) | (ROADTYPE_ROAD << 3), CMD_REMOVE_LONG_ROAD);
+	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 1 : 2) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
 }
 
 /* static */ bool AIRoad::RemoveRoadFull(TileIndex start, TileIndex end)
@@ -151,7 +177,7 @@
 	EnforcePrecondition(false, ::IsValidTile(end));
 	EnforcePrecondition(false, TileX(start) == TileX(end) || TileY(start) == TileY(end));
 
-	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 2 : 1), CMD_REMOVE_LONG_ROAD);
+	return AIObject::DoCommand(end, start, (TileY(start) != TileY(end) ? 4 : 0) | (start < end ? 2 : 1) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
 }
 
 /* static */ bool AIRoad::RemoveRoadDepot(TileIndex tile)
--- a/src/ai/api/ai_road.hpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_road.hpp	Thu May 22 15:49:08 2008 +0000
@@ -37,6 +37,16 @@
 	};
 
 	/**
+	 * Types of road known to the game.
+	 */
+	enum RoadType {
+		ROADTYPE_ROAD = 0, //!< Build road objects.
+		ROADTYPE_TRAM = 1, //!< Build tram objects.
+
+		ROADTYPE_INVALID = -1, //!< Invalid RoadType.
+	};
+
+	/**
 	 * Checks whether the given tile is actually a tile with road that can be
 	 *  used to traverse a tile. This excludes road depots and 'normal' road
 	 *  stations, but includes drive through stations.
@@ -72,6 +82,35 @@
 	static bool IsDriveThroughRoadStationTile(TileIndex tile);
 
 	/**
+	 * Check if a given RoadType is available.
+	 * @param road_type The RoadType to check for.
+	 * @return True if this RoadType can be used.
+	 */
+	static bool IsRoadTypeAvailable(RoadType road_type);
+
+	/**
+	 * Get the current RoadType set for all AIRoad functions.
+	 * @return The RoadType currently set.
+	 */
+	static RoadType GetCurrentRoadType();
+
+	/**
+	 * Set the RoadType for all further AIRoad functions.
+	 * @param road_type The RoadType to set.
+	 */
+	static void SetCurrentRoadType(RoadType road_type);
+
+	/**
+	 * Check if a given tile has RoadType.
+	 * @param tile The tile to check.
+	 * @param road_type The RoadType to check for.
+	 * @pre AIMap::IsValidTile(tile).
+	 * @pre IsRoadTypeAvailable(road_type).
+	 * @return True if the tile contains a RoadType object.
+	 */
+	static bool HasRoadType(TileIndex tile, RoadType road_type);
+
+	/**
 	 * Checks whether the given tiles are directly connected, i.e. whether
 	 *  a road vehicle can travel from the center of the first tile to the
 	  * center of the second tile.
--- a/src/ai/api/ai_road.hpp.sq	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_road.hpp.sq	Thu May 22 15:49:08 2008 +0000
@@ -7,6 +7,8 @@
 	/* Allow enums to be used as Squirrel parameters */
 	template <> AIRoad::ErrorMessages GetParam(ForceType<AIRoad::ErrorMessages>, HSQUIRRELVM vm, int index) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIRoad::ErrorMessages)tmp; }
 	template <> int Return<AIRoad::ErrorMessages>(HSQUIRRELVM vm, AIRoad::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; }
+	template <> AIRoad::RoadType GetParam(ForceType<AIRoad::RoadType>, HSQUIRRELVM vm, int index) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIRoad::RoadType)tmp; }
+	template <> int Return<AIRoad::RoadType>(HSQUIRRELVM vm, AIRoad::RoadType res) { sq_pushinteger(vm, (int32)res); return 1; }
 
 	/* Allow AIRoad to be used as Squirrel parameter */
 	template <> AIRoad *GetParam(ForceType<AIRoad *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIRoad *)instance; }
@@ -26,6 +28,9 @@
 	SQAIRoad.DefSQConst(engine, AIRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION,       "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION");
 	SQAIRoad.DefSQConst(engine, AIRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD,           "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
 	SQAIRoad.DefSQConst(engine, AIRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
+	SQAIRoad.DefSQConst(engine, AIRoad::ROADTYPE_ROAD,                                "ROADTYPE_ROAD");
+	SQAIRoad.DefSQConst(engine, AIRoad::ROADTYPE_TRAM,                                "ROADTYPE_TRAM");
+	SQAIRoad.DefSQConst(engine, AIRoad::ROADTYPE_INVALID,                             "ROADTYPE_INVALID");
 
 	AIError::RegisterErrorMap(STR_ROAD_WORKS_IN_PROGRESS,               AIRoad::ERR_ROAD_WORKS_IN_PROGRESS);
 	AIError::RegisterErrorMap(STR_DRIVE_THROUGH_ERROR_DIRECTION,        AIRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION);
@@ -42,6 +47,10 @@
 	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::GetNeighbourRoadCount,         "GetNeighbourRoadCount",         2, "xi");
 	SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetRoadDepotFrontTile,         "GetRoadDepotFrontTile",         2, "xi");
--- a/src/ai/api/ai_station.cpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_station.cpp	Thu May 22 15:49:08 2008 +0000
@@ -92,15 +92,38 @@
 
 /* static */ int32 AIStation::GetDistanceManhattanToTile(StationID station_id, TileIndex tile)
 {
+	if (!IsValidStation(station_id)) return -1;
+
 	return AIMap::DistanceManhattan(tile, GetLocation(station_id));
 }
 
 /* static */ int32 AIStation::GetDistanceSquareToTile(StationID station_id, TileIndex tile)
 {
+	if (!IsValidStation(station_id)) return -1;
+
 	return AIMap::DistanceSquare(tile, GetLocation(station_id));
 }
 
 /* static */ bool AIStation::IsWithinTownInfluence(StationID station_id, TownID town_id)
 {
+	if (!IsValidStation(station_id)) return false;
+
 	return AITown::IsWithinTownInfluence(town_id, GetLocation(station_id));
 }
+
+/* static */ bool AIStation::HasRoadType(StationID station_id, AIRoad::RoadType road_type)
+{
+	if (!IsValidStation(station_id)) return false;
+	if (!AIRoad::IsRoadTypeAvailable(road_type)) return false;
+
+	::RoadTypes r = RoadTypeToRoadTypes((::RoadType)road_type);
+
+	for (const RoadStop *rs = ::GetStation(station_id)->GetPrimaryRoadStop(ROADSTOP_BUS); rs != NULL; rs = rs->next) {
+		if ((::GetRoadTypes(rs->xy) & r) != 0) return true;
+	}
+	for (const RoadStop *rs = ::GetStation(station_id)->GetPrimaryRoadStop(ROADSTOP_TRUCK); rs != NULL; rs = rs->next) {
+		if ((::GetRoadTypes(rs->xy) & r) != 0) return true;
+	}
+
+	return false;
+}
--- a/src/ai/api/ai_station.hpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_station.hpp	Thu May 22 15:49:08 2008 +0000
@@ -7,6 +7,7 @@
 
 #include "ai_object.hpp"
 #include "ai_error.hpp"
+#include "ai_road.hpp"
 
 /**
  * Class that handles all station related functions.
@@ -121,6 +122,7 @@
 	 *  of the station.
 	 * @param station_id The station to get the distance to.
 	 * @param tile The tile to get the distance to.
+	 * @pre IsValidStation(station_id).
 	 * @return The distance between station and tile.
 	 */
 	static int32 GetDistanceManhattanToTile(StationID station_id, TileIndex tile);
@@ -130,6 +132,7 @@
 	 *  of the station.
 	 * @param station_id The station to get the distance to.
 	 * @param tile The tile to get the distance to.
+	 * @pre IsValidStation(station_id).
 	 * @return The distance between station and tile.
 	 */
 	static int32 GetDistanceSquareToTile(StationID station_id, TileIndex tile);
@@ -142,6 +145,14 @@
 	 * @return True if the tile is within the rating influence of the town.
 	 */
 	static bool IsWithinTownInfluence(StationID station_id, TownID town_id);
+
+	/**
+	 * Check if any part of the station contains a station of the type
+	 *  RoadType.
+	 * @param road_type The RoadType to look for.
+	 * @return True if the station has a station part of the type RoadType.
+	 */
+	static bool HasRoadType(StationID station_id, AIRoad::RoadType road_type);
 };
 
 DECLARE_ENUM_AS_BIT_SET(AIStation::StationType);
--- a/src/ai/api/ai_station.hpp.sq	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_station.hpp.sq	Thu May 22 15:49:08 2008 +0000
@@ -61,6 +61,7 @@
 	SQAIStation.DefSQStaticMethod(engine, &AIStation::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, "xii");
 	SQAIStation.DefSQStaticMethod(engine, &AIStation::GetDistanceSquareToTile,    "GetDistanceSquareToTile",    3, "xii");
 	SQAIStation.DefSQStaticMethod(engine, &AIStation::IsWithinTownInfluence,      "IsWithinTownInfluence",      3, "xii");
+	SQAIStation.DefSQStaticMethod(engine, &AIStation::HasRoadType,                "HasRoadType",                3, "xii");
 
 	SQAIStation.PostRegister(engine);
 }
--- a/src/ai/api/ai_vehicle.cpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_vehicle.cpp	Thu May 22 15:49:08 2008 +0000
@@ -226,6 +226,14 @@
 	}
 }
 
+/* static */ AIRoad::RoadType AIVehicle::GetRoadType(VehicleID vehicle_id)
+{
+	if (!IsValidVehicle(vehicle_id)) return AIRoad::ROADTYPE_INVALID;
+	if (GetVehicleType(vehicle_id) != VEHICLE_ROAD) return AIRoad::ROADTYPE_INVALID;
+
+	return (AIRoad::RoadType)GetVehicle(vehicle_id)->u.road.roadtype;
+}
+
 /* static */ int32 AIVehicle::GetCapacity(VehicleID vehicle_id, CargoID cargo)
 {
 	if (!IsValidVehicle(vehicle_id)) return -1;
--- a/src/ai/api/ai_vehicle.hpp	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_vehicle.hpp	Thu May 22 15:49:08 2008 +0000
@@ -7,6 +7,7 @@
 
 #include "ai_object.hpp"
 #include "ai_error.hpp"
+#include "ai_road.hpp"
 
 /**
  * Class that handles all vehicle related functions.
@@ -194,6 +195,15 @@
 	static AIVehicle::VehicleType GetVehicleType(VehicleID vehicle_id);
 
 	/**
+	 * Get the RoadType of the vehicle.
+	 * @param vehicle_id The vhiecle to get the RoadType of.
+	 * @pre IsValidVehicle(vehicle_id).
+	 * @pre GetVehicleType(vehicle_id) == VEHICLE_ROAD.
+	 * @return The RoadType the vehicle has.
+	 */
+	static AIRoad::RoadType GetRoadType(VehicleID vehicle_id);
+
+	/**
 	 * Check if a vehicle is in a depot.
 	 * @param vehicle_id The vehicle to check.
 	 * @pre IsValidVehicle(vehicle_id).
--- a/src/ai/api/ai_vehicle.hpp.sq	Thu May 22 10:23:34 2008 +0000
+++ b/src/ai/api/ai_vehicle.hpp.sq	Thu May 22 15:49:08 2008 +0000
@@ -103,6 +103,7 @@
 	SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetProfitThisYear,  "GetProfitThisYear",  2, "xi");
 	SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetProfitLastYear,  "GetProfitLastYear",  2, "xi");
 	SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetVehicleType,     "GetVehicleType",     2, "xi");
+	SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetRoadType,        "GetRoadType",        2, "xi");
 	SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsInDepot,          "IsInDepot",          2, "xi");
 	SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsStoppedInDepot,   "IsStoppedInDepot",   2, "xi");
 	SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::BuildVehicle,       "BuildVehicle",       3, "xii");