summaryrefslogtreecommitdiff
path: root/bin/ai/regression/regression.nut
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-06-13 15:23:20 +0000
committeryexo <yexo@openttd.org>2011-06-13 15:23:20 +0000
commit0dc20c7d5fdc97e7aa5527ce2573806232ee09c6 (patch)
tree0eb2e1387146b0660ebb57c93cce02af65fed8ca /bin/ai/regression/regression.nut
parentf851a515cc30b715caad56b34fe9db7be636e951 (diff)
downloadopenttd-0dc20c7d5fdc97e7aa5527ce2573806232ee09c6.tar.xz
(svn r22584) -Add: [NoAI] several functions to AICompany to find out performance information (Morloth)
Diffstat (limited to 'bin/ai/regression/regression.nut')
-rw-r--r--bin/ai/regression/regression.nut95
1 files changed, 51 insertions, 44 deletions
diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut
index 5494c1b7a..05243346a 100644
--- a/bin/ai/regression/regression.nut
+++ b/bin/ai/regression/regression.nut
@@ -394,50 +394,57 @@ function Regression::Company()
}
}
- print(" GetName(): " + AICompany.GetName(AICompany.COMPANY_SELF));
- print(" GetPresidentName(): " + AICompany.GetPresidentName(AICompany.COMPANY_SELF));
- print(" SetPresidentName(): " + AICompany.SetPresidentName("Regression AI"));
- print(" GetPresidentName(): " + AICompany.GetPresidentName(AICompany.COMPANY_SELF));
- print(" GetCompanyValue(): " + AICompany.GetCompanyValue(AICompany.COMPANY_SELF));
- print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
- print(" GetName(): " + AICompany.GetName(240));
- print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
- print(" GetMaxLoanAmount(): " + AICompany.GetMaxLoanAmount());
- print(" GetLoanInterval(): " + AICompany.GetLoanInterval());
- print(" SetLoanAmount(1): " + AICompany.SetLoanAmount(1));
- print(" SetLoanAmount(100): " + AICompany.SetLoanAmount(100));
- print(" SetLoanAmount(10000): " + AICompany.SetLoanAmount(10000));
- print(" GetLastErrorString(): " + AIError.GetLastErrorString());
- print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
- print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
- print(" SetMinimumLoanAmount(31337): " + AICompany.SetMinimumLoanAmount(31337));
- print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
- print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
- print(" SetLoanAmount(10000): " + AICompany.SetLoanAmount(AICompany.GetMaxLoanAmount()));
- print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
- print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
- print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
- print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(127, 129)));
- print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
- print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(129, 129)));
- print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
- print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(129, 128)));
- print(" GetLastErrorString(): " + AIError.GetLastErrorString());
- print(" GetAutoRenewStatus(); " + AICompany.GetAutoRenewStatus(AICompany.COMPANY_SELF));
- print(" SetAutoRenewStatus(true); " + AICompany.SetAutoRenewStatus(true));
- print(" GetAutoRenewStatus(); " + AICompany.GetAutoRenewStatus(AICompany.COMPANY_SELF));
- print(" SetAutoRenewStatus(true); " + AICompany.SetAutoRenewStatus(true));
- print(" SetAutoRenewStatus(false); " + AICompany.SetAutoRenewStatus(false));
- print(" GetAutoRenewMonths(); " + AICompany.GetAutoRenewMonths(AICompany.COMPANY_SELF));
- print(" SetAutoRenewMonths(-12); " + AICompany.SetAutoRenewMonths(-12));
- print(" GetAutoRenewMonths(); " + AICompany.GetAutoRenewMonths(AICompany.COMPANY_SELF));
- print(" SetAutoRenewMonths(-12); " + AICompany.SetAutoRenewMonths(-12));
- print(" SetAutoRenewMonths(6); " + AICompany.SetAutoRenewMonths(6));
- print(" GetAutoRenewMoney(); " + AICompany.GetAutoRenewMoney(AICompany.COMPANY_SELF));
- print(" SetAutoRenewMoney(200000); " + AICompany.SetAutoRenewMoney(200000));
- print(" GetAutoRenewMoney(); " + AICompany.GetAutoRenewMoney(AICompany.COMPANY_SELF));
- print(" SetAutoRenewMoney(200000); " + AICompany.SetAutoRenewMoney(200000));
- print(" SetAutoRenewMoney(100000); " + AICompany.SetAutoRenewMoney(100000));
+ print(" GetName(): " + AICompany.GetName(AICompany.COMPANY_SELF));
+ print(" GetPresidentName(): " + AICompany.GetPresidentName(AICompany.COMPANY_SELF));
+ print(" SetPresidentName(): " + AICompany.SetPresidentName("Regression AI"));
+ print(" GetPresidentName(): " + AICompany.GetPresidentName(AICompany.COMPANY_SELF));
+ print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
+ print(" GetName(): " + AICompany.GetName(240));
+ print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
+ print(" GetMaxLoanAmount(): " + AICompany.GetMaxLoanAmount());
+ print(" GetLoanInterval(): " + AICompany.GetLoanInterval());
+ print(" SetLoanAmount(1): " + AICompany.SetLoanAmount(1));
+ print(" SetLoanAmount(100): " + AICompany.SetLoanAmount(100));
+ print(" SetLoanAmount(10000): " + AICompany.SetLoanAmount(10000));
+ print(" GetLastErrorString(): " + AIError.GetLastErrorString());
+ print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
+ print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
+ print(" SetMinimumLoanAmount(31337): " + AICompany.SetMinimumLoanAmount(31337));
+ print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
+ print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
+ print(" SetLoanAmount(10000): " + AICompany.SetLoanAmount(AICompany.GetMaxLoanAmount()));
+ print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
+ print(" GetLoanAmount(): " + AICompany.GetLoanAmount());
+ print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
+ print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(127, 129)));
+ print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
+ print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(129, 129)));
+ print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
+ print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(129, 128)));
+ print(" GetLastErrorString(): " + AIError.GetLastErrorString());
+ print(" GetAutoRenewStatus(); " + AICompany.GetAutoRenewStatus(AICompany.COMPANY_SELF));
+ print(" SetAutoRenewStatus(true); " + AICompany.SetAutoRenewStatus(true));
+ print(" GetAutoRenewStatus(); " + AICompany.GetAutoRenewStatus(AICompany.COMPANY_SELF));
+ print(" SetAutoRenewStatus(true); " + AICompany.SetAutoRenewStatus(true));
+ print(" SetAutoRenewStatus(false); " + AICompany.SetAutoRenewStatus(false));
+ print(" GetAutoRenewMonths(); " + AICompany.GetAutoRenewMonths(AICompany.COMPANY_SELF));
+ print(" SetAutoRenewMonths(-12); " + AICompany.SetAutoRenewMonths(-12));
+ print(" GetAutoRenewMonths(); " + AICompany.GetAutoRenewMonths(AICompany.COMPANY_SELF));
+ print(" SetAutoRenewMonths(-12); " + AICompany.SetAutoRenewMonths(-12));
+ print(" SetAutoRenewMonths(6); " + AICompany.SetAutoRenewMonths(6));
+ print(" GetAutoRenewMoney(); " + AICompany.GetAutoRenewMoney(AICompany.COMPANY_SELF));
+ print(" SetAutoRenewMoney(200000); " + AICompany.SetAutoRenewMoney(200000));
+ print(" GetAutoRenewMoney(); " + AICompany.GetAutoRenewMoney(AICompany.COMPANY_SELF));
+ print(" SetAutoRenewMoney(200000); " + AICompany.SetAutoRenewMoney(200000));
+ print(" SetAutoRenewMoney(100000); " + AICompany.SetAutoRenewMoney(100000));
+ for (local i = -1; i <= AICompany.EARLIEST_QUARTER; i++) {
+ print(" Quarter: " + i);
+ print(" GetQuarterlyIncome(); " + AICompany.GetQuarterlyIncome(AICompany.COMPANY_SELF, i));
+ print(" GetQuarterlyExpenses(); " + AICompany.GetQuarterlyExpenses(AICompany.COMPANY_SELF, i));
+ print(" GetQuarterlyCargoDelivered(); " + AICompany.GetQuarterlyCargoDelivered(AICompany.COMPANY_SELF, i));
+ print(" GetQuarterlyPerformanceRating(); " + AICompany.GetQuarterlyPerformanceRating(AICompany.COMPANY_SELF, i));
+ print(" GetQuarterlyCompanyValue(); " + AICompany.GetQuarterlyCompanyValue(AICompany.COMPANY_SELF, i));
+ }
}
function Regression::Engine()