aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2019-08-09 19:11:26 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2019-08-09 19:11:26 +0200
commitd074d3223ac87f617b28454ef0880c04ce89d53b (patch)
tree0d3f0e3612a8847dfc2171a977e9d9434263a127
parent95fb122eca46c93c8a2545fe1baf4e1bea9d6e6b (diff)
downloadadvtrains-d074d3223ac87f617b28454ef0880c04ce89d53b.tar.gz
advtrains-d074d3223ac87f617b28454ef0880c04ce89d53b.tar.bz2
advtrains-d074d3223ac87f617b28454ef0880c04ce89d53b.zip
Change API to return the id of a newly created train when discoupling
-rw-r--r--advtrains/trainlogic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index 46b6b1d..91a67d5 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -930,7 +930,7 @@ function advtrains.split_train_at_wagon(wagon_id)
local newtrain=advtrains.trains[newtrain_id]
newtrain.velocity=train.velocity
-
+ return newtrain_id -- return new train ID, so new train can be manipulated
end
-- coupling