summaryrefslogtreecommitdiff
path: root/src
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 /src
parent4552b17691fa7c4f1fdb4ca7652ca48278a68fec (diff)
downloadopenttd-5c19668fdb3c1b77439bde1968a4075ac02a2b79.tar.xz
Doc: [Script] Add a note about how wagon connectivity works for scripts
Diffstat (limited to 'src')
-rw-r--r--src/script/api/script_vehicle.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/api/script_vehicle.hpp b/src/script/api/script_vehicle.hpp
index 4b8a4687a..3c242d56f 100644
--- a/src/script/api/script_vehicle.hpp
+++ b/src/script/api/script_vehicle.hpp
@@ -312,6 +312,10 @@ public:
* @return The VehicleID of the new vehicle, or an invalid VehicleID when
* it failed. Check the return value using IsValidVehicle. In test-mode
* 0 is returned if it was successful; any other value indicates failure.
+ * @note Unlike the GUI, wagons are not automatically attached to trains,
+ * only to existing free wagons. This means that BuildVehicle can sometimes
+ * return an ID indicating success, but IsValidVehicle check will
+ * fail. You should use MoveWagon to attach free wagons to trains.
* @note In Test Mode it means you can't assign orders yet to this vehicle,
* as the vehicle isn't really built yet. Build it for real first before
* assigning orders.