(svn r15483) -Change [API CHANGE]: Remove AIIndustry::GetProduction, use AIIndustry::GetLastMonthProduction instead.

This commit is contained in:
yexo
2009-02-14 21:05:57 +00:00
parent d0895a65ce
commit 8bb601f8ae
5 changed files with 205 additions and 125 deletions

View File

@@ -550,12 +550,11 @@ function Regression::Industry()
print(" IsValidIndustry(): " + AIIndustry.IsValidIndustry(i));
print(" GetName(): " + AIIndustry.GetName(i));
print(" GetLocation(): " + AIIndustry.GetLocation(i));
print(" GetProduction(): " + AIIndustry.GetProduction(i, 1));
print(" IsCargoAccepted(): " + AIIndustry.IsCargoAccepted(i, 1));
local cargo_list = AICargoList();
for (local j = cargo_list.Begin(); cargo_list.HasNext(); j = cargo_list.Next()) {
if (AIIndustry.GetProduction(i, j) > 0) {
if (AIIndustry.IsCargoAccepted(i, j) || AIIndustry.GetLastMonthProduction(i,j) >= 0) {
print(" GetLastMonthProduction(): " + AIIndustry.GetLastMonthProduction(i, j));
print(" GetLastMonthTransported(): " + AIIndustry.GetLastMonthTransported(i, j));
print(" GetStockpiledCargo(): " + AIIndustry.GetStockpiledCargo(i, j));
@@ -598,14 +597,6 @@ function Regression::IndustryList()
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
print(" " + i + " => " + list.GetValue(i));
}
list.Valuate(AIIndustry.GetProduction, 1);
list.KeepAboveValue(50);
print(" KeepAboveValue(50): done");
print(" Count(): " + list.Count());
print(" Production ListDump:");
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
print(" " + i + " => " + list.GetValue(i));
}
list = AIIndustryList_CargoAccepting(1);
print("--IndustryList_CargoAccepting--");