src/ai/api/ai_stationlist.cpp
author truelight
Thu, 12 Jul 2007 15:51:19 +0000
branchnoai
changeset 9638 f6d169a5a45a
parent 9636 1005ffccf641
child 9645 25126afa0c25
permissions -rw-r--r--
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
9638
f6d169a5a45a (svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents: 9636
diff changeset
     1
/* $Id$ */
f6d169a5a45a (svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents: 9636
diff changeset
     2
9636
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
     3
#include "ai_stationlist.hpp"
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
     4
#include "../../player.h"
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
     5
#include "../../station.h"
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
     6
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
     7
AIStationList::AIStationList(AIStationList::StationType type)
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
     8
{
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
     9
	Station *st;
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
    10
	FOR_ALL_STATIONS(st) {
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
    11
		if (st->owner == _current_player && (type == AIStationList::STATION_ANY || (st->facilities & type) != 0)) this->AddItem(st->index);
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
    12
	}
1005ffccf641 (svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff changeset
    13
}