summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2020-02-15 11:53:31 +0000
committerNiels Martin Hansen <nielsm@indvikleren.dk>2020-02-19 11:26:58 +0100
commit5c19668fdb3c1b77439bde1968a4075ac02a2b79 (patch)
treef75675ae782e4e5a9ea4a6ab399b421928945a62 /bin
parent4552b17691fa7c4f1fdb4ca7652ca48278a68fec (diff)
downloadopenttd-5c19668fdb3c1b77439bde1968a4075ac02a2b79.tar.xz
Doc: [Script] Add a note about how wagon connectivity works for scripts
Diffstat (limited to 'bin')
-rw-r--r--bin/ai/regression/tst_regression/main.nut3
-rw-r--r--bin/ai/regression/tst_regression/result.txt3
2 files changed, 6 insertions, 0 deletions
diff --git a/bin/ai/regression/tst_regression/main.nut b/bin/ai/regression/tst_regression/main.nut
index 5ace44eec..65742d71b 100644
--- a/bin/ai/regression/tst_regression/main.nut
+++ b/bin/ai/regression/tst_regression/main.nut
@@ -1690,6 +1690,9 @@ function Regression::Vehicle()
print(" BuildVehicle(): " + AIVehicle.BuildVehicle(10008, 9));
print(" BuildVehicle(): " + AIVehicle.BuildVehicle(10008, 27));
print(" BuildVehicle(): " + AIVehicle.BuildVehicle(10008, 27));
+ print(" IsValidVehicle(17): " + AIVehicle.IsValidVehicle(17));
+ print(" IsValidVehicle(18): " + AIVehicle.IsValidVehicle(18));
+ print(" IsValidVehicle(19): " + AIVehicle.IsValidVehicle(19)); // 19 is immediately joined to 18
print(" MoveWagonChain(): " + AIVehicle.MoveWagonChain(18, 0, 17, 0));
print(" GetNumWagons(): " + AIVehicle.GetNumWagons(17));
print(" GetLength(): " + AIVehicle.GetLength(17));
diff --git a/bin/ai/regression/tst_regression/result.txt b/bin/ai/regression/tst_regression/result.txt
index 18ae14cb7..4cb74aaa5 100644
--- a/bin/ai/regression/tst_regression/result.txt
+++ b/bin/ai/regression/tst_regression/result.txt
@@ -9115,6 +9115,9 @@ ERROR: IsEnd() is invalid as Begin() is never called
BuildVehicle(): 17
BuildVehicle(): 18
BuildVehicle(): 19
+ IsValidVehicle(17): true
+ IsValidVehicle(18): true
+ IsValidVehicle(19): false
MoveWagonChain(): true
GetNumWagons(): 3
GetLength(): 24