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 | |
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')
-rw-r--r-- | advtrains/init.lua | 2 | ||||
-rw-r--r-- | advtrains/wagons.lua | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index 218c180..cc54c02 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -292,7 +292,7 @@ advtrains.avt_save = function(remove_players_from_wagons) "last_pos", "last_connid", "last_frac", "velocity", "tarvelocity", "trainparts", "recently_collided_with_env", "atc_brake_target", "atc_wait_finish", "atc_command", "atc_delay", "door_open", - "text_outside", "text_inside", "line", + "text_outside", "text_inside", "line", "routingcode", "il_sections", "speed_restriction", "is_shunt", }) --then save it 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)
|