From fcef6a66d131e8a6a09d1f6fc660df2162b2cc0a Mon Sep 17 00:00:00 2001 From: FullGas1 Date: Mon, 21 Apr 2025 01:44:55 +0200 Subject: [PATCH] debug #137 --- CTLD.lua | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/CTLD.lua b/CTLD.lua index 8bab379..fb57c10 100644 --- a/CTLD.lua +++ b/CTLD.lua @@ -5873,9 +5873,9 @@ function ctld.addTransportF10MenuOptions(_unitName) ctld.vehicleCommandsPath[_unitName] = mist.utils.deepCopy(_vehicleCommandsPath) end - if ctld.enableRepackingVehicles then - --ctld.updateRepackMenu(_unitName) - end + -- if ctld.enableRepackingVehicles then + -- ctld.updateRepackMenu(_unitName) + -- end if ctld.enabledFOBBuilding and ctld.staticBugWorkaround == false then missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Load / Unload FOB Crate"), _vehicleCommandsPath, @@ -5954,13 +5954,10 @@ function ctld.addTransportF10MenuOptions(_unitName) if ctld.vehicleCommandsPath[_unitName] == nil then ctld.vehicleCommandsPath[_unitName] = mist.utils.deepCopy(_rootPath) end - if ctld.enableRepackingVehicles then - ctld.updateRepackMenu(_unitName) - end - + -- if ctld.enableRepackingVehicles then + -- ctld.updateRepackMenu(_unitName) + -- end end - - end end @@ -6049,7 +6046,8 @@ function ctld.buildPaginatedMenu(_menuEntries) menu.menuArgsTable.subMenuPath = mist.utils.deepCopy(menu.subMenuPath) -- copy the table to avoid overwriting the same table in the next loop menu.menuArgsTable.subMenuLineIndex = itemNbSubmenu missionCommands.addCommandForGroup(menu.groupId, menu.text, menu.subMenuPath, menu.menuFunction, mist.utils.deepCopy(menu.menuArgsTable)) - ctld.logTrace("FG_ boucle[%s].menu.menuArgsTable = %s", i, ctld.p(menu.menuArgsTable)) + --ctld.logTrace("FG_ boucle[%s].menu.menuArgsTable = %s", i, ctld.p(menu.menuArgsTable)) + ctld.logTrace("FG_ boucle[%s].menu = %s", i, ctld.p(menu)) end end @@ -6083,12 +6081,6 @@ function ctld.updateRepackMenu(_playerUnitName) for i, _vehicle in ipairs(repackableVehicles) do if ctld.isUnitInMenuEntriesTable(menuEntries, _vehicle.desc) == false then _vehicle.playerUnitName = _playerUnitName - -- table.insert(menuEntries, { text = ctld.i18n_translate("repack ") .. _vehicle.unit, - -- groupId = _groupId, - -- subMenuPath = RepackmenuPath, - -- menuFunction = ctld.repackVehicleRequest, - -- menuArgsTable = mist.utils.deepCopy(_vehicle) - -- }) menuEntries[i] = { text = ctld.i18n_translate("repack ") .. _vehicle.unit, groupId = _groupId, subMenuPath = RepackmenuPath,