mirror of
https://github.com/ciribob/DCS-CTLD.git
synced 2026-08-21 11:53:23 +00:00
debug
This commit is contained in:
@@ -1030,8 +1030,8 @@ ctld.spawnableCrates = {
|
|||||||
|
|
||||||
--- BLUE
|
--- BLUE
|
||||||
{ weight = 1000.01, desc = ctld.i18n_translate("Humvee - MG"), unit = "M1043 HMMWV Armament", side = 2 }, --careful with the names as the script matches the desc to JTAC types
|
{ weight = 1000.01, desc = ctld.i18n_translate("Humvee - MG"), unit = "M1043 HMMWV Armament", side = 2 }, --careful with the names as the script matches the desc to JTAC types
|
||||||
{ weight = 1000.02, desc = ctld.i18n_translate("Humvee - TOW"), unit = "M1045 HMMWV TOW", side = 2, cratesRequired = 1 },
|
{ weight = 1000.02, desc = ctld.i18n_translate("Humvee - TOW"), unit = "M1045 HMMWV TOW", side = 2, cratesRequired = 2 },
|
||||||
{ multiple = { 1000.02}, desc = ctld.i18n_translate("Humvee - TOW - All crates"), side = 2 },
|
{ multiple = { 1000.02,1000.02 }, desc = ctld.i18n_translate("Humvee - TOW - All crates"), side = 2 },
|
||||||
{ weight = 1000.03, desc = ctld.i18n_translate("Light Tank - MRAP"), unit = "MaxxPro_MRAP", side = 2, cratesRequired = 2 },
|
{ weight = 1000.03, desc = ctld.i18n_translate("Light Tank - MRAP"), unit = "MaxxPro_MRAP", side = 2, cratesRequired = 2 },
|
||||||
{ multiple = { 1000.03, 1000.03 }, desc = ctld.i18n_translate("Light Tank - MRAP - All crates"), side = 2 },
|
{ multiple = { 1000.03, 1000.03 }, desc = ctld.i18n_translate("Light Tank - MRAP - All crates"), side = 2 },
|
||||||
{ weight = 1000.04, desc = ctld.i18n_translate("Med Tank - LAV-25"), unit = "LAV-25", side = 2, cratesRequired = 3 },
|
{ weight = 1000.04, desc = ctld.i18n_translate("Med Tank - LAV-25"), unit = "LAV-25", side = 2, cratesRequired = 3 },
|
||||||
@@ -3895,6 +3895,7 @@ function ctld.unpackCrates(_arguments)
|
|||||||
if _heli ~= nil and ctld.inAir(_heli) == false then
|
if _heli ~= nil and ctld.inAir(_heli) == false then
|
||||||
local _crates = ctld.getCratesAndDistance(_heli)
|
local _crates = ctld.getCratesAndDistance(_heli)
|
||||||
local _crate = ctld.getClosestCrate(_heli, _crates)
|
local _crate = ctld.getClosestCrate(_heli, _crates)
|
||||||
|
ctld.logTrace("FG_ ctld.unpackCrates._crate = %s", ctld.p(_crate))
|
||||||
|
|
||||||
if ctld.inLogisticsZone(_heli) == true or ctld.farEnoughFromLogisticZone(_heli) == false then
|
if ctld.inLogisticsZone(_heli) == true or ctld.farEnoughFromLogisticZone(_heli) == false then
|
||||||
ctld.displayMessageToGroup(_heli,
|
ctld.displayMessageToGroup(_heli,
|
||||||
@@ -3902,8 +3903,6 @@ function ctld.unpackCrates(_arguments)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if _crate ~= nil and _crate.dist < 750
|
if _crate ~= nil and _crate.dist < 750
|
||||||
and (_crate.details.unit == "FOB" or _crate.details.unit == "FOB-SMALL") then
|
and (_crate.details.unit == "FOB" or _crate.details.unit == "FOB-SMALL") then
|
||||||
ctld.unpackFOBCrates(_crates, _heli)
|
ctld.unpackFOBCrates(_crates, _heli)
|
||||||
@@ -5512,7 +5511,7 @@ end
|
|||||||
|
|
||||||
-- are we near friendly logistics zone
|
-- are we near friendly logistics zone
|
||||||
function ctld.inLogisticsZone(_heli)
|
function ctld.inLogisticsZone(_heli)
|
||||||
ctld.logDebug("ctld.inLogisticsZone(), _heli = %s", ctld.p(_heli))
|
--ctld.logDebug("ctld.inLogisticsZone(), _heli = %s", ctld.p(_heli))
|
||||||
|
|
||||||
if ctld.inAir(_heli) then
|
if ctld.inAir(_heli) then
|
||||||
return false
|
return false
|
||||||
@@ -6028,7 +6027,7 @@ 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.subMenuPath = mist.utils.deepCopy(menu.subMenuPath) -- copy the table to avoid overwriting the same table in the next loop
|
||||||
menu.menuArgsTable.subMenuLineIndex = itemNbSubmenu
|
menu.menuArgsTable.subMenuLineIndex = itemNbSubmenu
|
||||||
--ctld.logTrace("FG_ boucle[%s] ctld.buildPaginatedMenu.menuArgsTable = %s", i, ctld.p(menu.menuArgsTable))
|
--ctld.logTrace("FG_ boucle[%s] ctld.buildPaginatedMenu.menuArgsTable = %s", i, ctld.p(menu.menuArgsTable))
|
||||||
missionCommands.addCommandForGroup(menu.groupId, menu.text, menu.subMenuPath, menu.menuFunction, menu.menuArgsTable)
|
missionCommands.addCommandForGroup(menu.groupId, menu.text, menu.subMenuPath, menu.menuFunction, mist.utils.deepCopy(menu.menuArgsTable))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user