mirror of
https://github.com/ciribob/DCS-CTLD.git
synced 2026-08-22 06:45:13 +00:00
commit
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
--[[toto
|
--[[
|
||||||
Combat Troop and Logistics Drop
|
Combat Troop and Logistics Drop
|
||||||
|
|
||||||
Allows Huey, Mi-8 and C130 to transport troops internally and Helicopters to transport Logistic / Vehicle units to the field via sling-loads
|
Allows Huey, Mi-8 and C130 to transport troops internally and Helicopters to transport Logistic / Vehicle units to the field via sling-loads
|
||||||
@@ -5823,9 +5823,10 @@ function ctld.addTransportF10MenuOptions(_unitName)
|
|||||||
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Load / Extract Vehicles"),
|
missionCommands.addCommandForGroup(_groupId, ctld.i18n_translate("Load / Extract Vehicles"),
|
||||||
_vehicleCommandsPath, ctld.loadTroopsFromZone, { _unitName, false, "", true })
|
_vehicleCommandsPath, ctld.loadTroopsFromZone, { _unitName, false, "", true })
|
||||||
|
|
||||||
if ctld.vehicleCommandsPath == nil then
|
if ctld.vehicleCommandsPath[_unitName] == nil then
|
||||||
ctld.vehicleCommandsPath = mist.utils.deepCopy(_vehicleCommandsPath)
|
ctld.vehicleCommandsPath[_unitName] = {}
|
||||||
end
|
ctld.vehicleCommandsPath[_unitName] = mist.utils.deepCopy(_vehicleCommandsPath)
|
||||||
|
end
|
||||||
|
|
||||||
if ctld.enableRepackingVehicles then
|
if ctld.enableRepackingVehicles then
|
||||||
ctld.updateRepackMenu(_unitName)
|
ctld.updateRepackMenu(_unitName)
|
||||||
@@ -6010,12 +6011,11 @@ function ctld.updateRepackMenu(_playerUnitName)
|
|||||||
local repackableVehicles = ctld.getUnitsInRepackRadius(_playerUnitName,
|
local repackableVehicles = ctld.getUnitsInRepackRadius(_playerUnitName,
|
||||||
ctld.maximumDistanceRepackableUnitsSearch)
|
ctld.maximumDistanceRepackableUnitsSearch)
|
||||||
if repackableVehicles then
|
if repackableVehicles then
|
||||||
--ctld.logTrace("FG_ ctld.updateRepackMenu.ctld.vehicleCommandsPath = %s", ctld.p(ctld.vehicleCommandsPath))
|
local RepackCommandsPath = mist.utils.deepCopy(ctld.vehicleCommandsPath[_playerUnitName])
|
||||||
local RepackCommandsPath = mist.utils.deepCopy(ctld.vehicleCommandsPath)
|
|
||||||
RepackCommandsPath[#RepackCommandsPath + 1] = ctld.i18n_translate("Repack Vehicles")
|
RepackCommandsPath[#RepackCommandsPath + 1] = ctld.i18n_translate("Repack Vehicles")
|
||||||
--ctld.logTrace("FG_ ctld.updateRepackMenu.RepackCommandsPath = %s", ctld.p(RepackCommandsPath))
|
--ctld.logTrace("FG_ ctld.updateRepackMenu.RepackCommandsPath = %s", ctld.p(RepackCommandsPath))
|
||||||
missionCommands.removeItemForGroup(1, RepackCommandsPath) -- remove the old repack menu
|
missionCommands.removeItemForGroup(1, RepackCommandsPath) -- remove the old repack menu
|
||||||
local RepackmenuPath = missionCommands.addSubMenuForGroup(_groupId,ctld.i18n_translate("Repack Vehicles"), ctld.vehicleCommandsPath)
|
local RepackmenuPath = missionCommands.addSubMenuForGroup(_groupId,ctld.i18n_translate("Repack Vehicles"), ctld.vehicleCommandsPath[_playerUnitName])
|
||||||
local menuEntries = {}
|
local menuEntries = {}
|
||||||
for _, _vehicle in pairs(repackableVehicles) do
|
for _, _vehicle in pairs(repackableVehicles) do
|
||||||
table.insert(menuEntries, {
|
table.insert(menuEntries, {
|
||||||
@@ -7894,7 +7894,7 @@ function ctld.initialize()
|
|||||||
ctld.hoverStatus = {} -- tracks status of a helis hover above a crate
|
ctld.hoverStatus = {} -- tracks status of a helis hover above a crate
|
||||||
|
|
||||||
ctld.callbacks = {} -- function callback
|
ctld.callbacks = {} -- function callback
|
||||||
|
ctld.vehicleCommandsPath = {} -- Vehicles commands path for each playerTransportUnit
|
||||||
|
|
||||||
-- Remove intransit troops when heli / cargo plane dies
|
-- Remove intransit troops when heli / cargo plane dies
|
||||||
--ctld.eventHandler = {}
|
--ctld.eventHandler = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user