diff options
author | orwell96 <orwell@bleipb.de> | 2018-04-26 23:35:19 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-06-14 17:39:42 +0200 |
commit | caf2bda7bc02f0bbe6dbbeb415e7881158d143b9 (patch) | |
tree | 6cf81bb311517b3ae1108c6533fa8f28c803ed9e /advtrains/occupation.lua | |
parent | 139a26fccce1e622d58f1673284e2addfb0d1ed2 (diff) | |
download | advtrains-caf2bda7bc02f0bbe6dbbeb415e7881158d143b9.tar.gz advtrains-caf2bda7bc02f0bbe6dbbeb415e7881158d143b9.tar.bz2 advtrains-caf2bda7bc02f0bbe6dbbeb415e7881158d143b9.zip |
Fix path_dir to actually be an angle, path item deletion and orientation of wagons
The occupation system as it is now will change. For each position, I will save the index in the train's path,
and implement a callback system. I need this because the occupation window system will not be enough to cover all use cases
(e.g. to make a train stop with it's center or back at a certain position, I need 3 different brake distances, which doesn't fit into the scheme)
Diffstat (limited to 'advtrains/occupation.lua')
-rw-r--r-- | advtrains/occupation.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/occupation.lua b/advtrains/occupation.lua index 7af4a3d..e72d668 100644 --- a/advtrains/occupation.lua +++ b/advtrains/occupation.lua @@ -227,14 +227,14 @@ function handle_chg(t, pos, train_id, old, new) if #blocking > 0 then -- the aware trains should brake for _, ix in ipairs(aware) do - atc.train_set_command(t[ix], "B2") + advtrains.atc.train_set_command(t[ix], "B2") end if #blocking > 1 then -- not good, 2 trains interfered with their blocking zones -- make them brake too local txt = {} for _, ix in ipairs(blocking) do - atc.train_set_command(t[ix], "B2") + advtrains.atc.train_set_command(t[ix], "B2") txt[#txt+1] = t[ix] end atwarn("Trains",table.concat(txt, ","), "interfered with their blocking zones, braking...") |