diff options
Diffstat (limited to 'bin/ai/regression/regression.nut')
-rw-r--r-- | bin/ai/regression/regression.nut | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut index 87a0e0e58..d873d3708 100644 --- a/bin/ai/regression/regression.nut +++ b/bin/ai/regression/regression.nut @@ -538,9 +538,10 @@ function Regression::Industry() print(""); print("--Industry--"); - print(" GetMaxIndustryID(): " + AIIndustry.GetMaxIndustryID()); print(" GetIndustryCount(): " + AIIndustry.GetIndustryCount()); - for (local i = -1; i < AIIndustry.GetMaxIndustryID() + 1; i++) { + local list = AIIndustryList(); + list.Sort(AIAbstractList.SORT_BY_ITEM, true); + for (local i = list.Begin(); list.HasNext(); i = list.Next()) { if (AIIndustry.IsValidIndustry(i)) j++; print(" Industry " + i); print(" IsValidIndustry(): " + AIIndustry.IsValidIndustry(i)); |