aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorywang <yw05@forksworld.de>2019-12-18 15:04:30 +0100
committerywang <yw05@forksworld.de>2019-12-18 15:04:30 +0100
commitdae5a07eec6588e44d84c2126f9e483460c25571 (patch)
treeb073f4fdd7e8c904043eb6b978801fbe280648d6
parent6bc8fa44df56d55baa0fa4e244f1f5660559cad7 (diff)
downloadadvtrains-dae5a07eec6588e44d84c2126f9e483460c25571.tar.gz
advtrains-dae5a07eec6588e44d84c2126f9e483460c25571.tar.bz2
advtrains-dae5a07eec6588e44d84c2126f9e483460c25571.zip
HUD improvments
-rw-r--r--advtrains/trainhud.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua
index d8b25ee..65a4982 100644
--- a/advtrains/trainhud.lua
+++ b/advtrains/trainhud.lua
@@ -9,7 +9,7 @@ advtrains.hhud[player:get_player_name()] = nil
end)
local mletter={[1]="F", [-1]="R", [0]="N"}
-local doorstr={[-1]="|<>| >|<", [0]=">|< >|<", [1]=">|< |<>|"}
+local doorstr={[-1]="<|> >|<", [0]=">|< >|<", [1]=">|< <|>"}
function advtrains.on_control_change(pc, train, flip)
local maxspeed = train.max_speed or 10
@@ -168,27 +168,27 @@ function advtrains.hud_train_format(train, flip)
local vel = advtrains.abs_ceil(train.velocity)
local vel_kmh=advtrains.abs_ceil(advtrains.ms_to_kmh(train.velocity))
- local levers = "B - o +"
+ local levers = " BB B - o + "
local tlev=train.lever
if train.velocity==0 and not train.active_control then tlev=1 end
- if tlev == 0 then levers = ">BB< - o +" end
- if tlev == 1 then levers = ">B< - o +" end
- if tlev == 2 then levers = "B >-< o +" end
- if tlev == 3 then levers = "B - >o< +" end
- if tlev == 4 then levers = "B - o >+<" end
+ if tlev == 0 then levers = ">BB< B - o + " end
+ if tlev == 1 then levers = " BB >B< - o + " end
+ if tlev == 2 then levers = " BB B >-< o + " end
+ if tlev == 3 then levers = " BB B - >o< + " end
+ if tlev == 4 then levers = " BB B - o >+<" end
local topLine, firstLine
local secondLine
if train.tarvelocity or train.atc_command then
- local b=" "
+ local b=" "
local tvels=""
if train.tarvelocity then
local tvel = advtrains.abs_ceil(train.tarvelocity)
tvels = "|"..string.rep("+", tvel)..string.rep("_", max-tvel)
end
if train.atc_brake_target then
- b="-B-"
+ b="-B"
end
local ad = ""
if train.atc_delay then