1 class StationList extends AIController
{
6 function StationList
::StationList()
8 local list
= AIStationList(AIStation
.STATION_BUS_STOP
+ AIStation
.STATION_TRUCK_STOP
);
11 print("--StationList--");
12 print(" Count(): " + list
.Count());
13 list
.Valuate(AIStation
.GetLocation
);
14 print(" Location ListDump:");
15 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
16 print(" " + i
+ " => " + list
.GetValue(i
));
18 list
.Valuate(AIStation
.GetCargoWaiting
, 0);
19 print(" CargoWaiting(0) ListDump:");
20 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
21 print(" " + i
+ " => " + list
.GetValue(i
));
23 list
.Valuate(AIStation
.GetCargoWaiting
, 1);
24 print(" CargoWaiting(1) ListDump:");
25 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
26 print(" " + i
+ " => " + list
.GetValue(i
));
30 function StationList
::StationList_Cargo()
33 print("--StationList_Cargo--");
35 for (local mode
= AIStationList_Cargo
.CM_WAITING
; mode
<= AIStationList_Cargo
.CM_PLANNED
; ++mode
) {
37 for (local selector
= AIStationList_Cargo
.CS_BY_FROM
; selector
<= AIStationList_Cargo
.CS_FROM_BY_VIA
; ++selector
) {
38 print(" " + selector
);
39 local list
= AIStationList_Cargo(mode
, selector
, 6, 0, 7);
40 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
41 print(" " + i
+ " => " + list
.GetValue(i
));
47 function StationList
::StationList_CargoPlanned()
50 print("--StationList_CargoPlanned--");
52 for (local selector
= AIStationList_Cargo
.CS_BY_FROM
; selector
<= AIStationList_Cargo
.CS_FROM_BY_VIA
; ++selector
) {
53 print(" " + selector
);
54 local list
= AIStationList_CargoPlanned(selector
, 6, 0, 7);
55 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
56 print(" " + i
+ " => " + list
.GetValue(i
));
61 function StationList
::StationList_CargoPlannedByFrom()
64 print("--StationList_CargoPlannedByFrom--");
65 local list
= AIStationList_CargoPlannedByFrom(2, 0);
66 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
67 print(" " + i
+ " => " + list
.GetValue(i
));
71 function StationList
::StationList_CargoPlannedByVia()
74 print("--StationList_CargoPlannedByVia--");
75 local list
= AIStationList_CargoPlannedByVia(2, 0);
76 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
77 print(" " + i
+ " => " + list
.GetValue(i
));
81 function StationList
::StationList_CargoPlannedViaByFrom()
84 print("--StationList_CargoPlannedViaByFrom--");
85 local list
= AIStationList_CargoPlannedViaByFrom(6, 0, 7);
86 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
87 print(" " + i
+ " => " + list
.GetValue(i
));
91 function StationList
::StationList_CargoPlannedFromByVia()
94 print("--StationList_CargoPlannedFromByVia--");
95 local list
= AIStationList_CargoPlannedFromByVia(6, 0, 7);
96 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
97 print(" " + i
+ " => " + list
.GetValue(i
));
101 function StationList
::StationList_CargoWaiting()
104 print("--StationList_CargoWaiting--");
106 for (local selector
= AIStationList_Cargo
.CS_BY_FROM
; selector
<= AIStationList_Cargo
.CS_FROM_BY_VIA
; ++selector
) {
107 print(" " + selector
);
108 local list
= AIStationList_CargoWaiting(selector
, 6, 0, 7);
109 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
110 print(" " + i
+ " => " + list
.GetValue(i
));
115 function StationList
::StationList_CargoWaitingByFrom()
118 print("--StationList_CargoWaitingByFrom--");
119 local list
= AIStationList_CargoWaitingByFrom(2, 0);
120 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
121 print(" " + i
+ " => " + list
.GetValue(i
));
125 function StationList
::StationList_CargoWaitingByVia()
128 print("--StationList_CargoWaitingByVia--");
129 local list
= AIStationList_CargoWaitingByVia(2, 0);
130 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
131 print(" " + i
+ " => " + list
.GetValue(i
));
135 function StationList
::StationList_CargoWaitingViaByFrom()
138 print("--StationList_CargoWaitingViaByFrom--");
139 local list
= AIStationList_CargoWaitingViaByFrom(6, 0, 7);
140 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
141 print(" " + i
+ " => " + list
.GetValue(i
));
145 function StationList
::StationList_CargoWaitingFromByVia()
148 print("--StationList_CargoWaitingFromByVia--");
149 local list
= AIStationList_CargoWaitingFromByVia(2, 0, 2);
150 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
151 print(" " + i
+ " => " + list
.GetValue(i
));
155 function StationList
::StationList_Vehicle()
157 local list
= AIStationList_Vehicle(12);
160 print("--StationList_Vehicle--");
161 print(" Count(): " + list
.Count());
162 list
.Valuate(AIStation
.GetLocation
);
163 print(" Location ListDump:");
164 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
165 print(" " + i
+ " => " + list
.GetValue(i
));
167 list
.Valuate(AIStation
.GetCargoWaiting
, 0);
168 print(" CargoWaiting(0) ListDump:");
169 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
170 print(" " + i
+ " => " + list
.GetValue(i
));
172 list
.Valuate(AIStation
.GetCargoWaiting
, 1);
173 print(" CargoWaiting(1) ListDump:");
174 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
175 print(" " + i
+ " => " + list
.GetValue(i
));
177 list
.Valuate(AIStation
.GetCargoRating
, 1);
178 print(" CargoRating(1) ListDump:");
179 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
180 print(" " + i
+ " => " + list
.GetValue(i
));
182 list
.Valuate(AIStation
.GetDistanceManhattanToTile
, 30000);
183 print(" DistanceManhattanToTile(30000) ListDump:");
184 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
185 print(" " + i
+ " => " + list
.GetValue(i
));
187 list
.Valuate(AIStation
.GetDistanceSquareToTile
, 30000);
188 print(" DistanceSquareToTile(30000) ListDump:");
189 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
190 print(" " + i
+ " => " + list
.GetValue(i
));
192 list
.Valuate(AIStation
.IsWithinTownInfluence
, 0);
193 print(" IsWithinTownInfluence(0) ListDump:");
194 for (local i
= list
.Begin(); !list
.IsEnd(); i
= list
.Next()) {
195 print(" " + i
+ " => " + list
.GetValue(i
));
199 function StationList
::Start()
203 StationList_CargoPlanned();
204 StationList_CargoPlannedByFrom();
205 StationList_CargoPlannedByVia();
206 StationList_CargoPlannedViaByFrom();
207 StationList_CargoPlannedFromByVia();
208 StationList_CargoWaiting();
209 StationList_CargoWaitingByFrom();
210 StationList_CargoWaitingByVia();
211 StationList_CargoWaitingViaByFrom();
212 StationList_CargoWaitingFromByVia();
213 StationList_Vehicle();