diff options
Diffstat (limited to 'src/ai/api/ai_railtypelist.cpp')
-rw-r--r-- | src/ai/api/ai_railtypelist.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ai/api/ai_railtypelist.cpp b/src/ai/api/ai_railtypelist.cpp new file mode 100644 index 000000000..494cb5222 --- /dev/null +++ b/src/ai/api/ai_railtypelist.cpp @@ -0,0 +1,14 @@ +/* $Id$ */ + +/** @file ai_railtypelist.cpp Implementation of AIRailTypeList and friends. */ + +#include "ai_railtypelist.hpp" +#include "../../rail.h" +#include "../../company_func.h" + +AIRailTypeList::AIRailTypeList() +{ + for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) { + if (::HasRailtypeAvail(_current_company, rt)) this->AddItem(rt); + } +} |