Make cab signalling work with renamed lzb fields
This commit is contained in:
parent
114b915518
commit
838cf61eac
|
@ -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)
|
ht[#ht+1] = sformat("%d,85=(advtrains_hud_arrow.png^[multiply\\:cyan^[transformFY^[makealpha\\:#000000)", 1+train.tarvelocity*11)
|
||||||
end
|
end
|
||||||
local lzb = train.lzb
|
local lzb = train.lzb
|
||||||
if lzb and lzb.oncoming then
|
if lzb and lzb.checkpoints then
|
||||||
local oc = lzb.oncoming
|
local oc = lzb.checkpoints
|
||||||
for i = 1, #oc do
|
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
|
local c = not spd and "lime" or (type(spd) == "number" and (spd == 0) and "red" or "orange") or nil
|
||||||
if c then
|
if c then
|
||||||
ht[#ht+1] = sformat("130,10=(advtrains_hud_bg.png^[resize\\:30x5^[colorize\\:%s)",c)
|
ht[#ht+1] = sformat("130,10=(advtrains_hud_bg.png^[resize\\:30x5^[colorize\\:%s)",c)
|
||||||
|
|
Loading…
Reference in New Issue