summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-02-14 21:57:25 +0000
committeryexo <yexo@openttd.org>2009-02-14 21:57:25 +0000
commitab288d3bdba65e61ceeae9de52ad417e34bad706 (patch)
tree7806234b459aa4804c4d0cdef1120398bdeaab9b
parent2b221f5afc28c025fa0eee7148d72460827c63fb (diff)
downloadopenttd-ab288d3bdba65e61ceeae9de52ad417e34bad706.tar.xz
(svn r15493) -Fix (r15486): Forgot to update regression.
-rw-r--r--bin/ai/regression/regression.nut5
-rw-r--r--bin/ai/regression/regression.txt36
2 files changed, 3 insertions, 38 deletions
diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut
index 6e69f2f88..b379c9af4 100644
--- a/bin/ai/regression/regression.nut
+++ b/bin/ai/regression/regression.nut
@@ -1306,9 +1306,10 @@ function Regression::Town()
print("");
print("--Town--");
- print(" GetMaxTownID(): " + AITown.GetMaxTownID());
print(" GetTownCount(): " + AITown.GetTownCount());
- for (local i = -1; i < AITown.GetMaxTownID() + 1; i++) {
+ local list = AITownList();
+ list.Sort(AIAbstractList.SORT_BY_ITEM, true);
+ for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
if (AITown.IsValidTown(i)) j++;
print(" Town " + i);
print(" IsValidTown(): " + AITown.IsValidTown(i));
diff --git a/bin/ai/regression/regression.txt b/bin/ai/regression/regression.txt
index 52365a10e..33b99129e 100644
--- a/bin/ai/regression/regression.txt
+++ b/bin/ai/regression/regression.txt
@@ -7011,15 +7011,7 @@
33411 => 0
--Town--
- GetMaxTownID(): 31
GetTownCount(): 28
- Town -1
- IsValidTown(): false
- GetName(): (null : 0x00000000)
- GetPopulation(): -1
- GetLocation(): -1
- GetHouseCount(): -1
- GetRating(): -1
Town 0
IsValidTown(): true
GetName(): Planfield
@@ -7216,34 +7208,6 @@
GetLocation(): 45525
GetHouseCount(): 19
GetRating(): 0
- Town 28
- IsValidTown(): false
- GetName(): (null : 0x00000000)
- GetPopulation(): -1
- GetLocation(): -1
- GetHouseCount(): -1
- GetRating(): -1
- Town 29
- IsValidTown(): false
- GetName(): (null : 0x00000000)
- GetPopulation(): -1
- GetLocation(): -1
- GetHouseCount(): -1
- GetRating(): -1
- Town 30
- IsValidTown(): false
- GetName(): (null : 0x00000000)
- GetPopulation(): -1
- GetLocation(): -1
- GetHouseCount(): -1
- GetRating(): -1
- Town 31
- IsValidTown(): false
- GetName(): (null : 0x00000000)
- GetPopulation(): -1
- GetLocation(): -1
- GetHouseCount(): -1
- GetRating(): -1
Valid Towns: 28
GetTownCount(): 28