mirror of
https://github.com/ciribob/DCS-CTLD.git
synced 2026-08-23 17:56:05 +00:00
commit
This commit is contained in:
@@ -2073,7 +2073,7 @@ function ctld.repackVehicle(_params, t) -- scan rrs table 'repackRequestsStack'
|
|||||||
end
|
end
|
||||||
ctld.repackRequestsStack[ii] = nil
|
ctld.repackRequestsStack[ii] = nil
|
||||||
end
|
end
|
||||||
--ctld.updateRepackMenu(playerUnitName) -- update the repack menu to process destroyed units
|
ctld.updateRepackMenu(playerUnitName) -- update the repack menu to process destroyed units
|
||||||
end
|
end
|
||||||
if ctld.enableRepackingVehicles == true then
|
if ctld.enableRepackingVehicles == true then
|
||||||
return t + 3 -- reschedule the function in 3 seconds
|
return t + 3 -- reschedule the function in 3 seconds
|
||||||
@@ -5863,15 +5863,14 @@ function ctld.addTransportF10MenuOptions(_unitName)
|
|||||||
|
|
||||||
-- add the submenu item
|
-- add the submenu item
|
||||||
itemNbMain = itemNbMain + 1
|
itemNbMain = itemNbMain + 1
|
||||||
if itemNbMain == 10 and _i < #crateCategories then -- page limit reached
|
if itemNbMain == 10 and _i < #crateCategories then -- page limit reached
|
||||||
_cratesMenuPath = missionCommands.addSubMenuForGroup(_groupId,
|
_cratesMenuPath = missionCommands.addSubMenuForGroup(_groupId,
|
||||||
ctld.i18n_translate("Next page"), _cratesMenuPath)
|
ctld.i18n_translate("Next page"), _cratesMenuPath)
|
||||||
itemNbMain = 1
|
itemNbMain = 1
|
||||||
end
|
end
|
||||||
local itemNbSubmenu = 0
|
local itemNbSubmenu = 0
|
||||||
local menuEntries = {}
|
local menuEntries = {}
|
||||||
local _subMenuPath = missionCommands.addSubMenuForGroup(_groupId, _subMenuName,
|
local _subMenuPath = missionCommands.addSubMenuForGroup(_groupId, _subMenuName, _cratesMenuPath)
|
||||||
_cratesMenuPath)
|
|
||||||
for _, _crate in pairs(_crates) do
|
for _, _crate in pairs(_crates) do
|
||||||
ctld.logTrace("_crate = [%s]", ctld.p(_crate))
|
ctld.logTrace("_crate = [%s]", ctld.p(_crate))
|
||||||
if not (_crate.multiple) or ctld.enableAllCrates then
|
if not (_crate.multiple) or ctld.enableAllCrates then
|
||||||
@@ -5899,7 +5898,7 @@ function ctld.addTransportF10MenuOptions(_unitName)
|
|||||||
ctld.logTrace("_menu = [%s]", ctld.p(_menu))
|
ctld.logTrace("_menu = [%s]", ctld.p(_menu))
|
||||||
-- add the submenu item
|
-- add the submenu item
|
||||||
itemNbSubmenu = itemNbSubmenu + 1
|
itemNbSubmenu = itemNbSubmenu + 1
|
||||||
if itemNbSubmenu == 10 and _i < #menuEntries then -- page limit reached
|
if itemNbSubmenu == 10 and _i < #menuEntries then -- page limit reached
|
||||||
_subMenuPath = missionCommands.addSubMenuForGroup(_groupId,
|
_subMenuPath = missionCommands.addSubMenuForGroup(_groupId,
|
||||||
ctld.i18n_translate("Next page"), _subMenuPath)
|
ctld.i18n_translate("Next page"), _subMenuPath)
|
||||||
itemNbSubmenu = 1
|
itemNbSubmenu = 1
|
||||||
@@ -6015,11 +6014,11 @@ function ctld.updateRepackMenu(_playerUnitName)
|
|||||||
if ctld.enableRepackingVehicles then
|
if ctld.enableRepackingVehicles then
|
||||||
local repackableVehicles = ctld.getUnitsInRepackRadius(_playerUnitName, ctld.maximumDistanceRepackableUnitsSearch)
|
local repackableVehicles = ctld.getUnitsInRepackRadius(_playerUnitName, ctld.maximumDistanceRepackableUnitsSearch)
|
||||||
if repackableVehicles then
|
if repackableVehicles then
|
||||||
ctld.logTrace("FG__ctld.vehicleCommandsPath[_playerUnitName] = %s", ctld.p(ctld.vehicleCommandsPath[_playerUnitName]))
|
ctld.logTrace("FG_ ctld.vehicleCommandsPath[_playerUnitName] = %s", ctld.p(ctld.vehicleCommandsPath[_playerUnitName]))
|
||||||
local RepackCommandsPath = mist.utils.deepCopy(ctld.vehicleCommandsPath[_playerUnitName])
|
local RepackCommandsPath = mist.utils.deepCopy(ctld.vehicleCommandsPath[_playerUnitName])
|
||||||
RepackCommandsPath[#RepackCommandsPath + 1] = ctld.i18n_translate("Repack Vehicles")
|
RepackCommandsPath[#RepackCommandsPath + 1] = ctld.i18n_translate("Repack Vehicles")
|
||||||
--ctld.logTrace("FG_ RepackCommandsPath = %s", ctld.p(RepackCommandsPath))
|
--ctld.logTrace("FG_ RepackCommandsPath = %s", ctld.p(RepackCommandsPath))
|
||||||
missionCommands.removeItemForGroup(_groupId, RepackCommandsPath) -- remove the old repack menu
|
missionCommands.removeItemForGroup(_groupId, RepackCommandsPath) -- remove existing "Repack Vehicles" menu
|
||||||
local RepackmenuPath = missionCommands.addSubMenuForGroup(_groupId,ctld.i18n_translate("Repack Vehicles"), ctld.vehicleCommandsPath[_playerUnitName])
|
local RepackmenuPath = missionCommands.addSubMenuForGroup(_groupId,ctld.i18n_translate("Repack Vehicles"), ctld.vehicleCommandsPath[_playerUnitName])
|
||||||
local menuEntries = {}
|
local menuEntries = {}
|
||||||
--ctld.logTrace("FG_ RepackmenuPath = %s", ctld.p(RepackmenuPath))
|
--ctld.logTrace("FG_ RepackmenuPath = %s", ctld.p(RepackmenuPath))
|
||||||
|
|||||||
Reference in New Issue
Block a user