summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_enginelist.cpp
blob: bd57025f6efa107399c7754f236c8da6f12afe41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* $Id$ */

/** @file ai_enginelist.cpp Implementation of AIEngineList and friends. */

#include "ai_enginelist.hpp"
#include "../../company_func.h"
#include "../../engine_base.h"
#include "../../core/bitmath_func.hpp"

AIEngineList::AIEngineList(AIVehicle::VehicleType vehicle_type)
{
	Engine *e;
	FOR_ALL_ENGINES_OF_TYPE(e, (::VehicleType)vehicle_type) {
		if (HasBit(e->company_avail, _current_company)) this->AddItem(e->index);
	}
}