From 111fd73b94ba7a12ae710d428e460144026f0a1c Mon Sep 17 00:00:00 2001 From: FullGas1 Date: Sun, 23 Mar 2025 17:03:37 +0100 Subject: [PATCH] fixes --- CTLD.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CTLD.lua b/CTLD.lua index 4953a42..695c1ab 100644 --- a/CTLD.lua +++ b/CTLD.lua @@ -2048,7 +2048,7 @@ function ctld.repackVehicleRequest(_params) -- update rrs table 'repackReque ctld.logTrace("FG_ ctld.repackVehicleRequest = %s", ctld.p(mist.utils.tableShow(ctld.repackRequestsStack))) end -- *************************************************************** -function ctld.repackVehicle(_params,t) -- scan rrs table 'repackRequestsStack' to process each request +function ctld.repackVehicle(_params, t) -- scan rrs table 'repackRequestsStack' to process each request trigger.action.outText("Repacking vehicle...", 10) if t == nil then t = timer.getTime() @@ -2083,7 +2083,11 @@ function ctld.repackVehicle(_params,t) -- scan rrs table 'repackRequestsStack' ctld.repackRequestsStack[ii] = nil end end - return 3 -- reschedule the function in 3 seconds + if ctld.enableRepackingVehicles == true then + return t + 3 -- reschedule the function in 3 seconds + else + return nil --stop scheduling + end end --[[ *************************************************************** function ctld.repackVehicle_old(_params)