(svn r15490) -Change [API CHANGE]: Remove AIBridge::GetYearAvailable. AIBridge::IsValidBridge now only returns true for available bridges.

This commit is contained in:
yexo
2009-02-14 21:17:35 +00:00
parent e7eb6d05a0
commit d8de2d1413
6 changed files with 29 additions and 77 deletions

View File

@@ -9,16 +9,16 @@
AIBridgeList::AIBridgeList()
{
/* Add all bridges, no matter if they are available or not */
for (byte j = 0; j < MAX_BRIDGES; j++)
if (::GetBridgeSpec(j)->avail_year <= _cur_year)
this->AddItem(j);
for (byte j = 0; j < MAX_BRIDGES; j++) {
if (AIBridge::IsValidBridge(j)) this->AddItem(j);
}
}
AIBridgeList_Length::AIBridgeList_Length(uint length)
{
for (byte j = 0; j < MAX_BRIDGES; j++)
if (::GetBridgeSpec(j)->avail_year <= _cur_year)
if (length >= (uint)AIBridge::GetMinLength(j) && length <= (uint)AIBridge::GetMaxLength(j))
this->AddItem(j);
for (byte j = 0; j < MAX_BRIDGES; j++) {
if (AIBridge::IsValidBridge(j)) {
if (length >= (uint)AIBridge::GetMinLength(j) && length <= (uint)AIBridge::GetMaxLength(j)) this->AddItem(j);
}
}
}