bin/ai/regression/regression.nut
branchnoai
changeset 9638 f6d169a5a45a
parent 9636 1005ffccf641
child 9645 25126afa0c25
equal deleted inserted replaced
9637:9f78a12a4f53 9638:f6d169a5a45a
   276 	print("    GetRoadStationFrontTile():     " + road.GetRoadStationFrontTile(33412 + 256));
   276 	print("    GetRoadStationFrontTile():     " + road.GetRoadStationFrontTile(33412 + 256));
   277 	print("    IsDriveThroughRoadStationTile: " + road.IsDriveThroughRoadStationTile(33415));
   277 	print("    IsDriveThroughRoadStationTile: " + road.IsDriveThroughRoadStationTile(33415));
   278 	print("    GetDriveThroughBackTile():     " + road.GetDriveThroughBackTile(33415));
   278 	print("    GetDriveThroughBackTile():     " + road.GetDriveThroughBackTile(33415));
   279 	print("    GetRoadStationFrontTile():     " + road.GetRoadStationFrontTile(33415));
   279 	print("    GetRoadStationFrontTile():     " + road.GetRoadStationFrontTile(33415));
   280 	print("    IsRoadTile():                  " + road.IsRoadTile(33415));
   280 	print("    IsRoadTile():                  " + road.IsRoadTile(33415));
   281 
       
   282 	local list = AIStationList(AIStationList.STATION_BUS_STOP + AIStationList.STATION_TRUCK_STOP);
       
   283 
       
   284 	print("");
       
   285 	print("--StationList--");
       
   286 	print("  Count():             " + list.Count());
       
   287 	list.Valuate(AIStationListLocation());
       
   288 	print("  Location ListDump:");
       
   289 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   290 		print("    " + i + " => " + list.GetValue(i));
       
   291 	}
       
   292 	list.Valuate(AIStationListCargoWaiting(0));
       
   293 	print("  CargoWaiting(0) ListDump:");
       
   294 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   295 		print("    " + i + " => " + list.GetValue(i));
       
   296 	}
       
   297 	list.Valuate(AIStationListCargoWaiting(1));
       
   298 	print("  CargoWaiting(1) ListDump:");
       
   299 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   300 		print("    " + i + " => " + list.GetValue(i));
       
   301 	}
       
   302 }
   281 }
   303 
   282 
   304 function Regression::Sign()
   283 function Regression::Sign()
   305 {
   284 {
   306 	local sign = AISign();
   285 	local sign = AISign();
   322 		print("    GetText():       " + sign.GetText(i));
   301 		print("    GetText():       " + sign.GetText(i));
   323 		print("    GetLocation():   " + sign.GetLocation(i));
   302 		print("    GetLocation():   " + sign.GetLocation(i));
   324 	}
   303 	}
   325 	print("  Valid Signs:       " + j);
   304 	print("  Valid Signs:       " + j);
   326 	print("  GetSignCount():    " + sign.GetSignCount());
   305 	print("  GetSignCount():    " + sign.GetSignCount());
       
   306 }
       
   307 
       
   308 function Regression::Station()
       
   309 {
       
   310 	local station = AIStation();
       
   311 
       
   312 	print("");
       
   313 	print("--Station--");
       
   314 	print("  IsValidStation(0):        " + station.IsValidStation(0));
       
   315 	print("  IsValidStation(1000):     " + station.IsValidStation(1000));
       
   316 	print("  GetLocation(0):           " + station.GetLocation(0));
       
   317 	print("  GetLocation(1000):        " + station.GetLocation(1000));
       
   318 	print("  GetCargoWaiting(0, 0):    " + station.GetCargoWaiting(0, 0));
       
   319 	print("  GetCargoWaiting(1000, 0): " + station.GetCargoWaiting(1000, 0));
       
   320 	print("  GetCargoWaiting(0, 1000): " + station.GetCargoWaiting(0, 1000));
       
   321 
       
   322 	local list = AIStationList(AIStationList.STATION_BUS_STOP + AIStationList.STATION_TRUCK_STOP);
       
   323 
       
   324 	print("");
       
   325 	print("--StationList--");
       
   326 	print("  Count():             " + list.Count());
       
   327 	list.Valuate(AIStationListLocation());
       
   328 	print("  Location ListDump:");
       
   329 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   330 		print("    " + i + " => " + list.GetValue(i));
       
   331 	}
       
   332 	list.Valuate(AIStationListCargoWaiting(0));
       
   333 	print("  CargoWaiting(0) ListDump:");
       
   334 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   335 		print("    " + i + " => " + list.GetValue(i));
       
   336 	}
       
   337 	list.Valuate(AIStationListCargoWaiting(1));
       
   338 	print("  CargoWaiting(1) ListDump:");
       
   339 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   340 		print("    " + i + " => " + list.GetValue(i));
       
   341 	}
   327 }
   342 }
   328 
   343 
   329 function Regression::TileList()
   344 function Regression::TileList()
   330 {
   345 {
   331 	local list = AITileList();
   346 	local list = AITileList();
   552 	this.Industry();
   567 	this.Industry();
   553 	this.Map();
   568 	this.Map();
   554 	this.List();
   569 	this.List();
   555 	this.Road();
   570 	this.Road();
   556 	this.Sign();
   571 	this.Sign();
       
   572 	this.Station();
   557 	this.TileList();
   573 	this.TileList();
   558 	this.Town();
   574 	this.Town();
   559 	this.TownList();
   575 	this.TownList();
   560 	this.Vehicle();
   576 	this.Vehicle();
   561 	/* Order has to be after Vehicle */
   577 	/* Order has to be after Vehicle */