(svn r12243) [NoAI] -Fix r12242: move the regression-test for AITileList_Industry* to TileList(), and show that they really work by using the Valuators to proof that
--- a/bin/ai/regression/regression.nut Sun Feb 24 23:34:42 2008 +0000
+++ b/bin/ai/regression/regression.nut Sun Feb 24 23:41:06 2008 +0000
@@ -255,24 +255,6 @@
}
print(" Valid Industries: " + j);
print(" GetIndustryCount(): " + AIIndustry.GetIndustryCount());
-
- local list = AITileList_IndustryAccepting(0, 3);
- print("");
- print("--TileList_IndustryAccepting--");
- print(" Count(): " + list.Count());
- print(" Location ListDump:");
- for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
- print(" " + i + " => " + list.GetValue(i));
- }
-
- local list = AITileList_IndustryProducing(1, 3);
- print("");
- print("--TileList_IndustryProducing--");
- print(" Count(): " + list.Count());
- print(" Location ListDump:");
- for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
- print(" " + i + " => " + list.GetValue(i));
- }
}
function Regression::IndustryList()
@@ -759,6 +741,26 @@
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
print(" " + i + " => " + list.GetValue(i));
}
+
+ local list = AITileList_IndustryAccepting(0, 3);
+ print("");
+ print("--TileList_IndustryAccepting--");
+ print(" Count(): " + list.Count());
+ list.Valuate(AITileList_vCargoAcceptance(3, 1, 1, 3));
+ print(" Location ListDump:");
+ for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+ print(" " + i + " => " + list.GetValue(i));
+ }
+
+ local list = AITileList_IndustryProducing(1, 3);
+ print("");
+ print("--TileList_IndustryProducing--");
+ print(" Count(): " + list.Count());
+ list.Valuate(AITileList_vBuildable());
+ print(" Location ListDump:");
+ for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+ print(" " + i + " => " + list.GetValue(i));
+ }
}
function Regression::Town()