diff options
author | orwell96 <orwell@bleipb.de> | 2019-01-09 16:10:56 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2019-01-09 16:10:56 +0100 |
commit | c3c96274be0c4beeef62a21f226e830d1d72675a (patch) | |
tree | 34ff33f99f55399cc2776855161ce513a5204408 /advtrains/wagons.lua | |
parent | b332a31d4886d5699575c933627c91f659ab45b8 (diff) | |
download | advtrains-c3c96274be0c4beeef62a21f226e830d1d72675a.tar.gz advtrains-c3c96274be0c4beeef62a21f226e830d1d72675a.tar.bz2 advtrains-c3c96274be0c4beeef62a21f226e830d1d72675a.zip |
Add "routingcode" property
Used for ARS and stop points
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r-- | advtrains/wagons.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index 2f9ab65..d5f7949 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -771,7 +771,8 @@ function wagon:show_bordcom(pname) local form = "size[11,9]label[0.5,0;AdvTrains Boardcom v0.1]"
form=form.."textarea[0.5,1.5;7,1;text_outside;"..attrans("Text displayed outside on train")..";"..(train.text_outside or "").."]"
form=form.."textarea[0.5,3;7,1;text_inside;"..attrans("Text displayed inside train")..";"..(train.text_inside or "").."]"
- form=form.."field[7.5,3.2;2,1;line;"..attrans("Line")..";"..(train.line or "").."]"
+ form=form.."field[7.5,1.75;3,1;line;"..attrans("Line")..";"..(train.line or "").."]"
+ form=form.."field[7.5,3.25;3,1;routingcode;"..attrans("Routingcode")..";"..(train.routingcode or "").."]"
--row 5 : train overview and autocoupling
if train.velocity==0 then
form=form.."label[0.5,4.5;Train overview /coupling control:]"
@@ -864,6 +865,13 @@ function wagon:handle_bordcom_fields(pname, formname, fields) train.line=nil
end
end
+ if fields.routingcode then
+ if fields.routingcode~="" then
+ train.routingcode=fields.routingcode
+ else
+ train.routingcode=nil
+ end
+ end
for i, tpid in ipairs(train.trainparts) do
if fields["dcpl_"..i] then
advtrains.safe_decouple_wagon(tpid, pname)
|