From f8e6cd10ef8161fbaa95a847a794e475d6aeb60e Mon Sep 17 00:00:00 2001 From: glx Date: Fri, 8 Mar 2019 19:52:22 +0100 Subject: Add: script API functions for build with refit feature --- bin/ai/regression/tst_regression/main.nut | 13 +++++++++++++ bin/ai/regression/tst_regression/result.txt | 14 +++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'bin/ai') diff --git a/bin/ai/regression/tst_regression/main.nut b/bin/ai/regression/tst_regression/main.nut index 7315f33f8..baece09d0 100644 --- a/bin/ai/regression/tst_regression/main.nut +++ b/bin/ai/regression/tst_regression/main.nut @@ -1704,6 +1704,19 @@ function Regression::Vehicle() print(" GetWagonEngineType(): " + AIVehicle.GetWagonEngineType(17 3)); print(" GetWagonAge(): " + AIVehicle.GetWagonAge(17, 3)); + print(" --Refit--"); + print(" GetBuildWithRefitCapacity(): " + AIVehicle.GetBuildWithRefitCapacity(28479, 211, 255)); + print(" GetBuildWithRefitCapacity(): " + AIVehicle.GetBuildWithRefitCapacity(28479, 211, 0)); + print(" GetBuildWithRefitCapacity(): " + AIVehicle.GetBuildWithRefitCapacity(28479, 211, 9)); + print(" BuildVehicleWithRefit(): " + AIVehicle.BuildVehicleWithRefit(28479, 211, 9)); + print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 9)); + print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 5)); + print(" GetRefitCapacity(): " + AIVehicle.GetRefitCapacity(20, 5)); + print(" RefitVehicle(): " + AIVehicle.RefitVehicle(20, 5)); + print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 9)); + print(" GetCapacity(): " + AIVehicle.GetCapacity(20, 5)); + print(" SellVehicle(): " + AIVehicle.SellVehicle(20)); + print(" --Errors--"); print(" RefitVehicle(): " + AIVehicle.RefitVehicle(12, 0)); print(" GetLastErrorString(): " + AIError.GetLastErrorString()); diff --git a/bin/ai/regression/tst_regression/result.txt b/bin/ai/regression/tst_regression/result.txt index e93b2e234..cda888d29 100644 --- a/bin/ai/regression/tst_regression/result.txt +++ b/bin/ai/regression/tst_regression/result.txt @@ -9128,6 +9128,18 @@ ERROR: IsEnd() is invalid as Begin() is never called GetWagonAge(): 0 GetWagonEngineType(): 65535 GetWagonAge(): -1 + --Refit-- + GetBuildWithRefitCapacity(): -1 + GetBuildWithRefitCapacity(): 0 + GetBuildWithRefitCapacity(): 160 + BuildVehicleWithRefit(): 20 + GetCapacity(): 160 + GetCapacity(): 0 + GetRefitCapacity(): 160 + RefitVehicle(): true + GetCapacity(): 0 + GetCapacity(): 160 + SellVehicle(): true --Errors-- RefitVehicle(): false GetLastErrorString(): ERR_VEHICLE_NOT_IN_DEPOT @@ -9175,7 +9187,7 @@ ERROR: IsEnd() is invalid as Begin() is never called 13 => 5489 12 => 5489 CurrentSpeed ListDump: - 12 => 21 + 12 => 27 17 => 0 16 => 0 14 => 0 -- cgit v1.2.3-70-g09d2