(svn r12880) [NoAI] -Add: introduces ai_types.hpp, which has all NNNId like VehicleID. This simplifies the include-mess, and avoids including tons of _type.h for just a single typedef.
-Note: this is perfectly safe; when a type changes, any sane compiler starts complaining about redefining the typedef to an other type
/* $Id$ */
/** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */
#include "ai_bridgelist.hpp"
#include "../../openttd.h"
#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 >= ::GetBridgeSpec(j)->min_length && length <= ::GetBridgeSpec(j)->max_length)
this->AddItem(j);
}