mirror of
https://github.com/ciribob/DCS-CTLD.git
synced 2026-08-21 11:53:23 +00:00
fixes
This commit is contained in:
@@ -6009,32 +6009,35 @@ function ctld.addTransportF10MenuOptions(_unitName)
|
|||||||
end
|
end
|
||||||
if ctld.unitCanCarryVehicles(_unit) then
|
if ctld.unitCanCarryVehicles(_unit) then
|
||||||
local _vehicleCommandsPath = missionCommands.addSubMenuForGroup(_groupId, ctld.i18n_translate("Vehicle / FOB Transport"), _rootPath)
|
local _vehicleCommandsPath = missionCommands.addSubMenuForGroup(_groupId, ctld.i18n_translate("Vehicle / FOB Transport"), _rootPath)
|
||||||
|
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Unload Vehicles"), _vehicleCommandsPath, ctld.unloadTroops, { _unitName, false })
|
||||||
|
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Load / Extract Vehicles"), _vehicleCommandsPath, ctld.loadTroopsFromZone, { _unitName, false,"",true })
|
||||||
|
|
||||||
if ctld.vehicleCommandsPath == nil then
|
if ctld.vehicleCommandsPath == nil then
|
||||||
ctld.vehicleCommandsPath = _vehicleCommandsPath
|
ctld.vehicleCommandsPath = mist.utils.deepCopy(_vehicleCommandsPath)
|
||||||
end
|
end
|
||||||
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Unload Vehicles"), ctld.vehicleCommandsPath, ctld.unloadTroops, { _unitName, false })
|
|
||||||
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Load / Extract Vehicles"), ctld.vehicleCommandsPath, ctld.loadTroopsFromZone, { _unitName, false,"",true })
|
|
||||||
if ctld.enableRepackingVehicles then
|
if ctld.enableRepackingVehicles then
|
||||||
local repackableVehicles = ctld.getUnitsInRepackRadius(_unitName, ctld.maximumDistanceRepackableUnitsSearch)
|
-- local repackableVehicles = ctld.getUnitsInRepackRadius(_unitName, ctld.maximumDistanceRepackableUnitsSearch)
|
||||||
if repackableVehicles then
|
-- if repackableVehicles then
|
||||||
local menuEntries = {}
|
-- local menuEntries = {}
|
||||||
local RepackCommandsPath = mist.utils.deepCopy(ctld.vehicleCommandsPath)
|
-- local RepackCommandsPath = mist.utils.deepCopy(_vehicleCommandsPath)
|
||||||
RepackCommandsPath[#RepackCommandsPath+1] = ctld.i18n_translate("Repack Vehicles")
|
-- RepackCommandsPath[#RepackCommandsPath+1] = ctld.i18n_translate("Repack Vehicles")
|
||||||
for _, _vehicle in pairs(repackableVehicles) do
|
|
||||||
table.insert(menuEntries, { text = ctld.i18n_translate("repack ").._vehicle.unit,
|
-- for _, _vehicle in pairs(repackableVehicles) do
|
||||||
groupId = _groupId,
|
-- table.insert(menuEntries, { text = ctld.i18n_translate("repack ").._vehicle.unit,
|
||||||
subMenuPath = RepackCommandsPath,
|
-- groupId = _groupId,
|
||||||
menuFunction = ctld.repackVehicleRequest,
|
-- subMenuPath = RepackCommandsPath,
|
||||||
menuArgsTable = {_vehicle, _unitName} })
|
-- menuFunction = ctld.repackVehicleRequest,
|
||||||
end
|
-- menuArgsTable = {_vehicle, _unitName} })
|
||||||
local RepackmenuPath = missionCommands.addSubMenuForGroup(_groupId, ctld.i18n_translate("Repack Vehicles"), ctld.vehicleCommandsPath)
|
-- end
|
||||||
ctld.buildPaginatedMenu(menuEntries)
|
-- local RepackmenuPath = missionCommands.addSubMenuForGroup(_groupId, ctld.i18n_translate("Repack Vehicles"), _vehicleCommandsPath)
|
||||||
end
|
-- ctld.buildPaginatedMenu(menuEntries)
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
if ctld.enabledFOBBuilding and ctld.staticBugWorkaround == false then
|
if ctld.enabledFOBBuilding and ctld.staticBugWorkaround == false then
|
||||||
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Load / Unload FOB Crate"), ctld.vehicleCommandsPath, ctld.loadUnloadFOBCrate, { _unitName, false })
|
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Load / Unload FOB Crate"), _vehicleCommandsPath, ctld.loadUnloadFOBCrate, { _unitName, false })
|
||||||
end
|
end
|
||||||
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Check Cargo"), ctld.vehicleCommandsPath, ctld.checkTroopStatus, { _unitName })
|
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Check Cargo"), _vehicleCommandsPath, ctld.checkTroopStatus, { _unitName })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -6173,6 +6176,35 @@ function ctld.buildPaginatedMenu(_menuEntries)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
--******************************************************************************************************
|
--******************************************************************************************************
|
||||||
|
function ctld.updateRepackMenu(_playerUnitName)
|
||||||
|
local playerUnit = ctld.getTransportUnit(_playerUnitName)
|
||||||
|
if playerUnit then
|
||||||
|
local _unitTypename = playerUnit:getTypeName()
|
||||||
|
local _groupId = ctld.getGroupId(playerUnit)
|
||||||
|
if ctld.enableRepackingVehicles then
|
||||||
|
local repackableVehicles = ctld.getUnitsInRepackRadius(_playerUnitName, ctld.maximumDistanceRepackableUnitsSearch)
|
||||||
|
if repackableVehicles then
|
||||||
|
|
||||||
|
missionCommands.removeItemForGroup(1, ctld.vehicleCommandsPath)
|
||||||
|
local RepackmenuPath = missionCommands.addSubMenuForGroup(_groupId, ctld.i18n_translate("Repack Vehicles"), ctld.vehicleCommandsPath)
|
||||||
|
|
||||||
|
local menuEntries = {}
|
||||||
|
local RepackCommandsPath = mist.utils.deepCopy(ctld.vehicleCommandsPath)
|
||||||
|
RepackCommandsPath[#RepackCommandsPath+1] = ctld.i18n_translate("Repack Vehicles")
|
||||||
|
for _, _vehicle in pairs(repackableVehicles) do
|
||||||
|
table.insert(menuEntries, { text = ctld.i18n_translate("repack ").._vehicle.unit,
|
||||||
|
groupId = _groupId,
|
||||||
|
subMenuPath = RepackCommandsPath,
|
||||||
|
menuFunction = ctld.repackVehicleRequest,
|
||||||
|
menuArgsTable = {_vehicle, _playerUnitName} })
|
||||||
|
end
|
||||||
|
ctld.buildPaginatedMenu(menuEntries)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--******************************************************************************************************
|
||||||
function ctld.addOtherF10MenuOptions()
|
function ctld.addOtherF10MenuOptions()
|
||||||
ctld.logDebug("ctld.addOtherF10MenuOptions")
|
ctld.logDebug("ctld.addOtherF10MenuOptions")
|
||||||
-- reschedule every 10 seconds
|
-- reschedule every 10 seconds
|
||||||
|
|||||||
Reference in New Issue
Block a user