diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut index 6e69f2f882..b379c9af45 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 52365a10e5..33b99129e4 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