Files @ r10999:950d41f6cb97
Branch filter:

Location: cpp/openttd-patchpack/source/src/ai/api/ai_bridgelist.cpp

translators
(svn r15339) -Update: WebTranslator2 update to 2009-02-04 18:39:16
arabic_egypt - 1 fixed by khaloofah (1)
german - 1 changed by planetmaker (1)
hebrew - 668 fixed, 19 changed by 19izhar73 (687)
korean - 10 changed by leejaeuk5 (10)
serbian - 6 fixed, 4 changed by salejemaster (10)
/* $Id$ */

/** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */

#include "ai_bridgelist.hpp"
#include "ai_bridge.hpp"
#include "../../bridge.h"
#include "../../date_func.h"

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);
}

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);
}