From 538e35d8f0cd67e3ce2bf9e5eb98c1a8cafef9cd Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 2 Jan 2025 13:20:18 +0100 Subject: [PATCH 1/3] xx --- Moose Development/Moose/Core/Point.lua | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index ae3763298..964f8e1ee 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -968,8 +968,10 @@ do -- COORDINATE -- @return DCS#Distance Distance The distance in meters. function COORDINATE:Get2DDistance(TargetCoordinate) if not TargetCoordinate then return 1000000 end - local a={x=TargetCoordinate.x-self.x, y=0, z=TargetCoordinate.z-self.z} - local norm=UTILS.VecNorm(a) + --local a={x=TargetCoordinate.x-self.x, y=0, z=TargetCoordinate.z-self.z} + local a = self:GetVec2() + local b = TargetCoordinate:GetVec2() + local norm=UTILS.VecDist2D(a,b) return norm end @@ -1329,13 +1331,16 @@ do -- COORDINATE -- @param Core.Settings#SETTINGS Settings -- @param #string Language (Optional) Language "en" or "ru" -- @param #boolean MagVar If true, also state angle in magnetic + -- @param #number Precision Rounding precision, defaults to 0 -- @return #string The BR Text - function COORDINATE:GetBRText( AngleRadians, Distance, Settings, Language, MagVar ) + function COORDINATE:GetBRText( AngleRadians, Distance, Settings, Language, MagVar, Precision ) local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS - + + Precision = Precision or 0 + local BearingText = self:GetBearingText( AngleRadians, 0, Settings, MagVar ) - local DistanceText = self:GetDistanceText( Distance, Settings, Language, 0 ) + local DistanceText = self:GetDistanceText( Distance, Settings, Language, Precision ) local BRText = BearingText .. DistanceText @@ -2909,12 +2914,13 @@ do -- COORDINATE -- @param #COORDINATE FromCoordinate The coordinate to measure the distance and the bearing from. -- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object. -- @param #boolean MagVar If true, also get angle in MagVar for BR/BRA + -- @param #number Precision Rounding precision, currently full km as default (=0) -- @return #string The BR text. - function COORDINATE:ToStringBR( FromCoordinate, Settings, MagVar ) + function COORDINATE:ToStringBR( FromCoordinate, Settings, MagVar, Precision ) local DirectionVec3 = FromCoordinate:GetDirectionVec3( self ) local AngleRadians = self:GetAngleRadians( DirectionVec3 ) local Distance = self:Get2DDistance( FromCoordinate ) - return "BR, " .. self:GetBRText( AngleRadians, Distance, Settings, nil, MagVar ) + return "BR, " .. self:GetBRText( AngleRadians, Distance, Settings, nil, MagVar, Precision ) end --- Return a BRA string from a COORDINATE to the COORDINATE. From f9030be843ea073e351a8ea47c27ec300fdc742b Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 2 Jan 2025 17:06:53 +0100 Subject: [PATCH 2/3] xx --- Moose Development/Moose/Wrapper/Storage.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Storage.lua b/Moose Development/Moose/Wrapper/Storage.lua index 37e209d82..558368e98 100644 --- a/Moose Development/Moose/Wrapper/Storage.lua +++ b/Moose Development/Moose/Wrapper/Storage.lua @@ -773,7 +773,7 @@ function STORAGE:LoadFromFile(Path,Filename) end --Weapons - if self:IsLimitedWeapons()() then + if self:IsLimitedWeapons() then local Ok,Weapons = UTILS.LoadFromFile(Path,Filename.."_Weapons.csv") if Ok then if self.verbose and self.verbose > 0 then From 474f767e56873bc572c31c7b7574fa6ff5dd8982 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 4 Jan 2025 13:24:51 +0100 Subject: [PATCH 3/3] #CTLD - Clarify doc for Hook loadable stuff --- Moose Development/Moose/Ops/CTLD.lua | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index bde535a5d..73d870cc3 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -24,7 +24,7 @@ -- @module Ops.CTLD -- @image OPS_CTLD.jpg --- Last Update Dec 2024 +-- Last Update Jan 2025 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -805,7 +805,7 @@ do -- my_ctld.CrateDistance = 35 -- List and Load crates in this radius only. -- my_ctld.PackDistance = 35 -- Pack crates in this radius only -- my_ctld.dropcratesanywhere = false -- Option to allow crates to be dropped anywhere. --- my_ctld.dropAsCargoCrate = false -- Parachuted herc cargo is not unpacked automatically but placed as crate to be unpacked. Needs a cargo with the same name defined like the cargo that was dropped. +-- my_ctld.dropAsCargoCrate = false -- Hercules only: Parachuted herc cargo is not unpacked automatically but placed as crate to be unpacked. Needs a cargo with the same name defined like the cargo that was dropped. -- my_ctld.maximumHoverHeight = 15 -- Hover max this high to load. -- my_ctld.minimumHoverHeight = 4 -- Hover min this low to load. -- my_ctld.forcehoverload = true -- Crates (not: troops) can **only** be loaded while hovering. @@ -833,7 +833,7 @@ do -- my_ctld.nobuildmenu = false -- if set to true effectively enforces to have engineers build/repair stuff for you. -- my_ctld.RadioSound = "beacon.ogg" -- -- this sound will be hearable if you tune in the beacon frequency. Add the sound file to your miz. -- my_ctld.RadioSoundFC3 = "beacon.ogg" -- this sound will be hearable by FC3 users (actually all UHF radios); change to something like "beaconsilent.ogg" and add the sound file to your miz if you don't want to annoy FC3 pilots. --- my_ctld.enableChinookGCLoading = true -- this will effectively suppress the crate load and drop for CTLD_CARGO.Enum.STATIc types for CTLD for the Chinook +-- my_ctld.enableChinookGCLoading = true -- this will effectively suppress the crate load and drop for CTLD_CARGO.Enum.STATIC types for CTLD for the Chinook -- my_ctld.TroopUnloadDistGround = 5 -- If hovering, spawn dropped troops this far away in meters from the helo -- my_ctld.TroopUnloadDistHover = 1.5 -- If grounded, spawn dropped troops this far away in meters from the helo -- my_ctld.TroopUnloadDistGroundHerc = 25 -- On the ground, unload troops this far behind the Hercules @@ -848,10 +848,11 @@ do -- -- ## 2.1.1 Moose CTLD created crate cargo -- --- Given the correct shape, Moose created cargo can be either loaded with the ground crew or via the F10 CTLD menu. **It is strongly recommend to either use the ground crew or CTLD to load/unload Moose created cargo**. Mix and match will not work here. --- Static shapes loadable *into* the Chinook are at the time of writing: +-- Given the correct shape, Moose created cargo can theoretically be either loaded with the ground crew or via the F10 CTLD menu. **It is strongly stated to avoid using shapes with +-- CTLD which can be Ground Crew loaded.** +-- Static shapes loadable *into* the Chinook and thus to **be avoided for CTLD** are at the time of writing: -- --- * Ammo crate (type "ammo_cargo") +-- * Ammo box (type "ammo_crate") -- * M117 bomb crate (type name "m117_cargo") -- * Dual shell fuel barrels (type name "barrels") -- * UH-1H net (type name "uh1h_cargo") @@ -860,12 +861,12 @@ do -- -- ## 2.1.2 Recommended settings -- --- my_ctld.basetype = "ammo_cargo" +-- my_ctld.basetype = "container_cargo" -- **DO NOT** change this to a base type which could also be loaded by F8/GC to avoid logic problems! -- my_ctld.forcehoverload = false -- no hover autoload, leads to cargo complications with ground crew created cargo items --- my_ctld.pilotmustopendoors = true -- crew must open back loading door 50% (horizontal) or more --- my_ctld.enableslingload = true -- will set cargo items as sling-loadable --- my_ctld.enableChinookGCLoading = true -- will effectively suppress the crate load and drop menus for CTLD for the Chinook --- my_ctld.movecratesbeforebuild = false -- cannot detect movement of crates at the moment +-- my_ctld.pilotmustopendoors = true -- crew must open back loading door 50% (horizontal) or more - watch out for NOT adding a back door gunner! +-- my_ctld.enableslingload = true -- will set cargo items as sling-loadable. +-- my_ctld.enableChinookGCLoading = true -- this will effectively suppress the crate load and drop for CTLD_CARGO.Enum.STATIC types for CTLD for the Chinook. +-- my_ctld.movecratesbeforebuild = true -- leave as is at the pain of building crate still **inside** of the Hook. -- my_ctld.nobuildinloadzones = true -- don't build where you load. -- my_ctld.ChinookTroopCircleRadius = 5 -- Radius for troops dropping in a nice circle. Adjust to your planned squad size for the Chinook. --