diff options
author | orwell96 <orwell@bleipb.de> | 2020-07-23 19:19:04 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-02-10 16:37:21 +0100 |
commit | 838cf61eac4dd7a8409c4b56874b2a6b3fc5c045 (patch) | |
tree | 3bfde6a3860ba05d60612d4b426d967645cb570f /advtrains/trainhud.lua | |
parent | 114b915518190e112c7aa8f94a86f3e19660bd6e (diff) | |
download | advtrains-838cf61eac4dd7a8409c4b56874b2a6b3fc5c045.tar.gz advtrains-838cf61eac4dd7a8409c4b56874b2a6b3fc5c045.tar.bz2 advtrains-838cf61eac4dd7a8409c4b56874b2a6b3fc5c045.zip |
Make cab signalling work with renamed lzb fields
Diffstat (limited to 'advtrains/trainhud.lua')
-rw-r--r-- | advtrains/trainhud.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua index db32824..1969f0e 100644 --- a/advtrains/trainhud.lua +++ b/advtrains/trainhud.lua @@ -274,10 +274,10 @@ function advtrains.hud_train_format(train, flip) ht[#ht+1] = sformat("%d,85=(advtrains_hud_arrow.png^[multiply\\:cyan^[transformFY^[makealpha\\:#000000)", 1+train.tarvelocity*11) end local lzb = train.lzb - if lzb and lzb.oncoming then - local oc = lzb.oncoming + if lzb and lzb.checkpoints then + local oc = lzb.checkpoints for i = 1, #oc do - local spd = oc[i].spd + local spd = oc[i].speed local c = not spd and "lime" or (type(spd) == "number" and (spd == 0) and "red" or "orange") or nil if c then ht[#ht+1] = sformat("130,10=(advtrains_hud_bg.png^[resize\\:30x5^[colorize\\:%s)",c) @@ -326,4 +326,4 @@ minetest.register_craft { {"default:paper", "advtrains:trackworker", "default:paper"}, {"default:paper", "default:paper", "default:paper"}, } -}
\ No newline at end of file +} |