aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorywang <yw05@forksworld.de>2019-12-18 15:04:30 +0100
committerywang <yw05@forksworld.de>2020-04-12 16:07:16 +0200
commit314ed9aa0b4367ed1fc0df5f4b334745b2469df5 (patch)
tree339dbb0b34e046f511dab504055b60df7ae06212
parente043a78c9da9200912d08e5b8de94546b48001fa (diff)
downloadadvtrains-314ed9aa0b4367ed1fc0df5f4b334745b2469df5.tar.gz
advtrains-314ed9aa0b4367ed1fc0df5f4b334745b2469df5.tar.bz2
advtrains-314ed9aa0b4367ed1fc0df5f4b334745b2469df5.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