aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-02-05 11:23:17 +0100
committerorwell96 <orwell@bleipb.de>2019-02-05 11:23:17 +0100
commite7dcee11276477294fbc9d995c4db479e7e3cfd9 (patch)
tree7c25b14fcd5645706a3809ed00f6f5edcd1ad305 /advtrains/wagons.lua
parent8b8c5a2c1f196e72795d3bdb6ea717cb29b485c2 (diff)
downloadadvtrains-e7dcee11276477294fbc9d995c4db479e7e3cfd9.tar.gz
advtrains-e7dcee11276477294fbc9d995c4db479e7e3cfd9.tar.bz2
advtrains-e7dcee11276477294fbc9d995c4db479e7e3cfd9.zip
Force LZB Halt setting
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 1b1aa96..655efb4 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -861,14 +861,24 @@ function wagon:handle_bordcom_fields(pname, formname, fields)
end
if fields.line then
if fields.line~="" then
- train.line=fields.line
+ if fields.line ~= train.line then
+ train.line=fields.line
+ if advtrains.interlocking then
+ advtrains.interlocking.lzb_invalidate(train)
+ end
+ end
else
train.line=nil
end
end
if fields.routingcode then
if fields.routingcode~="" then
- train.routingcode=fields.routingcode
+ if fields.routingcode ~= train.routingcode then
+ train.routingcode=fields.routingcode
+ if advtrains.interlocking then
+ advtrains.interlocking.lzb_invalidate(train)
+ end
+ end
else
train.routingcode=nil
end