diff options
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r-- | advtrains/wagons.lua | 14 |
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
|