1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

(svn r15875) -Add: AIBridge::GetBridgeID() so AIs can get the type of bridge that are already build.

This commit is contained in:
yexo
2009-03-28 12:04:38 +00:00
parent e02d31cd3a
commit 400208ee0a
5 changed files with 21 additions and 0 deletions

View File

@@ -256,12 +256,15 @@ function Regression::Bridge()
print(" Valid Bridges: " + j);
print(" IsBridgeTile(): " + AIBridge.IsBridgeTile(33160));
print(" GetBridgeID(): " + AIBridge.GetBridgeID(33160));
print(" RemoveBridge(): " + AIBridge.RemoveBridge(33155));
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
print(" GetOtherBridgeEnd(): " + AIBridge.GetOtherBridgeEnd(33160));
print(" BuildBridge(): " + AIBridge.BuildBridge(AIVehicle.VT_ROAD, 5, 33160, 33155));
print(" IsBridgeTile(): " + AIBridge.IsBridgeTile(33160));
print(" GetBridgeID(): " + AIBridge.GetBridgeID(33160));
print(" IsBridgeTile(): " + AIBridge.IsBridgeTile(33155));
print(" GetBridgeID(): " + AIBridge.GetBridgeID(33155));
print(" GetOtherBridgeEnd(): " + AIBridge.GetOtherBridgeEnd(33160));
print(" BuildBridge(): " + AIBridge.BuildBridge(AIVehicle.VT_ROAD, 5, 33160, 33155));
print(" GetLastErrorString(): " + AIError.GetLastErrorString());

View File

@@ -743,12 +743,15 @@
GetMinLength(): -1
Valid Bridges: 10
IsBridgeTile(): false
GetBridgeID(): -1
RemoveBridge(): false
GetLastErrorString(): ERR_PRECONDITION_FAILED
GetOtherBridgeEnd(): -1
BuildBridge(): true
IsBridgeTile(): true
GetBridgeID(): 5
IsBridgeTile(): true
GetBridgeID(): 5
GetOtherBridgeEnd(): 33155
BuildBridge(): false
GetLastErrorString(): ERR_ALREADY_BUILT