This commit is contained in:
FullGas1 2025-04-21 22:48:32 +02:00
parent 5c48a9d756
commit 42e8549649
2 changed files with 13 additions and 8 deletions

View File

@ -1927,7 +1927,7 @@ end
-- ***************************************************************
function ctld.getSecureDistanceFromUnit(_unitName) -- return a distance between the center of unitName, to be sure not touch the unitName
local rotorDiameter = 19 -- meters -- õk for UH & CH47
local rotorDiameter = 0 --19 -- meters -- õk for UH & CH47
if Unit.getByName(_unitName) then
local unitUserBox = Unit.getByName(_unitName):getDesc().box
local SecureDistanceFromUnit = 0
@ -2619,7 +2619,7 @@ function ctld.getPointInFrontSector(_unit, _offset)
local playerHeading = mist.getHeading(_unit)
local randomHeading = ctld.RandomReal(playerHeading - math.pi/4, playerHeading + math.pi/4)
if _offset == nil then
_offset = 30
_offset = 20
end
return ctld.getPointAtDirection(_unit, _offset, randomHeading)
end
@ -6072,12 +6072,12 @@ function ctld.updateRepackMenu(_playerUnitName)
for i, _vehicle in ipairs(repackableVehicles) do
if ctld.isUnitInMenuEntriesTable(menuEntries, _vehicle.desc) == false then
_vehicle.playerUnitName = _playerUnitName
menuEntries[i] = { text = ctld.i18n_translate("repack ") .. _vehicle.unit,
groupId = _groupId,
subMenuPath = RepackmenuPath,
menuFunction = ctld.repackVehicleRequest,
menuArgsTable = mist.utils.deepCopy(_vehicle)
}
table.insert(menuEntries, { text = ctld.i18n_translate("repack ") .. _vehicle.unit,
groupId = _groupId,
subMenuPath = RepackmenuPath,
menuFunction = ctld.repackVehicleRequest,
menuArgsTable = mist.utils.deepCopy(_vehicle)
})
end
end
--ctld.logTrace("FG_ menuEntries = %s", ctld.p(menuEntries))

View File

@ -1018,6 +1018,11 @@ You can also repair a partially destroyed HAWK / BUK or KUB system by dropping a
## Crate Repacking
The F10 menu allows you to repack units having associated crate types in the "ctld.spawnableCrates" table.
Simply land near the unit you wish to repack and select it from the list presented by the "CTLD//Vehicle/FOB transport...//Repack Vehicles" menu.
The defined radius of vehicles detection is specified by the parameter
ctld.maximumDistanceRepackableUnitsSearch = 200 -- max distance from transportUnit to search force repackable units in meters
WARNING: Due to technical reasons related to the refresh time of the F10 menus, there may be inconsistencies between the type of vehicles requested and those provided. It is recommended to wait 5 to 10 seconds without moving after landing and opening the F10 menu for a packaging order.
## Forward Operating Base (FOB) Construction
FOBs can be built by loading special FOB crates from a **Logistics** unit into a C-130 or other large aircraft configured in the script. To load the crate use the F10 - Troop Commands Menu. The idea behind FOBs is to make player vs player missions even more dynamic as these can be deployed in most locations. Once destroyed the FOB can no longer be used.