aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-26 23:28:24 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-26 23:30:07 +0200
commit45413ee5c031d9d44342a09f4ac8b412a75568be (patch)
tree3502fafaed7d8e4fca704b09cab3381f694a1453 /advtrains_luaautomation
parentc54e0b341a88349e1a4fc7d902fdd9d9e1a6040d (diff)
downloadadvtrains-45413ee5c031d9d44342a09f4ac8b412a75568be.tar.gz
advtrains-45413ee5c031d9d44342a09f4ac8b412a75568be.tar.bz2
advtrains-45413ee5c031d9d44342a09f4ac8b412a75568be.zip
Add function to step through freight codes
Diffstat (limited to 'advtrains_luaautomation')
-rw-r--r--advtrains_luaautomation/atc_rail.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 69c519a..04e2f85 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -75,6 +75,10 @@ function r.fire_event(pos, evtdata)
end
return fc
end,
+ step_fc = function()
+ if not train_id then return false end
+ advtrains.train_step_fc(train)
+ end,
set_shunt = function()
if not train_id then return false end
train.autocouple = true