From 3ba301b1670d22e884b8bfe6b53e137ae914a062 Mon Sep 17 00:00:00 2001 From: rubin Date: Mon, 9 Jan 2023 19:21:40 +0300 Subject: [PATCH] add check pair afk - freeze auto load/unload --- TruckHUD.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TruckHUD.lua b/TruckHUD.lua index a96aecf..77331eb 100644 --- a/TruckHUD.lua +++ b/TruckHUD.lua @@ -1162,6 +1162,7 @@ function doRenderStats() if os.difftime(msk_timestamp, timer) > 180 and autoh and + (not isPairModeActive() or (isPairModeActive() and (msk_timestamp - pair_timestamp) < 5)) and (not isPairModeActive() or (isPairModeActive() and (pair_ready and player_ready))) and not (isPairModeActive() and inifiles.Settings.auto_load_unload_kd_pair_use and base[pair_mode_name].gruz == current_load and os.difftime(msk_timestamp, base[pair_mode_name].timer) <= 180) then @@ -1292,7 +1293,7 @@ function doRenderStats() local color = ( not player_ready and "" or ( pair_ready and "{07a817}" or "{d90b0b}" )) - string_render, Y = string.format(" {%s}%s%s[%s]%s", c2, color, pair_mode_name, pair_mode_id, (afk > 9 and ' [AFK: '..math.ceil(afk)..']' or '')), Y + height + down + string_render, Y = string.format(" {%s}%s%s[%s]%s", c2, color, pair_mode_name, pair_mode_id, (afk > 5 and ' [AFK: '..math.ceil(afk)..']' or '')), Y + height + down drawClickableText(string_render, X, Y) local para_pos = FindSklad(pair_table["pos"]["x"], pair_table["pos"]["y"], pair_table["pos"]["z"]) string_render, Y = string.format("{%s} [{%s}%s{%s}] %s (%s m)", c2, (timer_d < 11 and (timer_d > 0 and 'b50000' or c2) or c2), (timer_d > 0 and string.format('%d:%02d', math.floor(timer_d / 60), timer_d % 60) or '0:00'), c2, para_pos.text, math.ceil(para_pos.dist)), Y + height