(svn r15875) -Add: AIBridge::GetBridgeID() so AIs can get the type of bridge that are already build.
This commit is contained in:
@@ -23,6 +23,12 @@
|
||||
return ::IsBridgeTile(tile);
|
||||
}
|
||||
|
||||
/* static */ BridgeID AIBridge::GetBridgeID(TileIndex tile)
|
||||
{
|
||||
if (!IsBridgeTile(tile)) return -1;
|
||||
return (BridgeID)::GetBridgeType(tile);
|
||||
}
|
||||
|
||||
static void _DoCommandReturnBuildBridge2(class AIInstance *instance)
|
||||
{
|
||||
if (!AIBridge::_BuildBridgeRoad2()) {
|
||||
|
Reference in New Issue
Block a user