From d984a1b1429dbaad99745c1be8296b3450e126a0 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 24 Jan 2024 14:47:00 +0100 Subject: [PATCH 01/12] Update Airboss.lua - VTOL grading #2099 --- Moose Development/Moose/Ops/Airboss.lua | 92 +++++++++++++++++-------- 1 file changed, 62 insertions(+), 30 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 1b9355b11..95efbcf27 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -12122,16 +12122,18 @@ function AIRBOSS:_LSOgrade( playerData ) local GIC, nIC = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IC ) local GAR, nAR = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.AR ) + -- VTOL approach, which is graded differently (currently only Harrier). + local vtol=playerData.actype==AIRBOSS.AircraftCarrier.AV8B + -- Put everything together. local G = GXX .. " " .. GIM .. " " .. " " .. GIC .. " " .. GAR - -- Count number of minor, normal and major deviations. + -- Count number of minor/small nS, normal nN and major/large deviations nL. local N=nXX+nIM+nIC+nAR - local Nv=nXX+nIM local nL=count(G, '_')/2 local nS=count(G, '%(') local nN=N-nS-nL - local nNv=Nv-nS-nL + -- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn. local Tgroove=playerData.Tgroove @@ -12147,34 +12149,64 @@ function AIRBOSS:_LSOgrade( playerData ) G = "Unicorn" else - -- Add AV-8B Harrier devation allowances due to lower groundspeed and 3x conventional groove time, this allows to maintain LSO tolerances while respecting the deviations are not unsafe.--Pene testing - -- Large devaitions still result in a No Grade, A Unicorn still requires a clean pass with no deviation. - if nL > 1 and playerData.actype==AIRBOSS.AircraftCarrier.AV8B then - -- Larger deviations ==> "No grade" 2.0 points. - grade="--" - points=2.0 - elseif nNv >= 1 and playerData.actype==AIRBOSS.AircraftCarrier.AV8B then - -- Only average deviations ==> "Fair Pass" Pass with average deviations and corrections. - grade="(OK)" - points=3.0 - elseif nNv < 1 and playerData.actype==AIRBOSS.AircraftCarrier.AV8B then - -- Only minor average deviations ==> "OK" Pass with minor deviations and corrections. (test nNv<=1 and) - grade="OK" - points=4.0 - elseif nL > 0 then - -- Larger deviations ==> "No grade" 2.0 points. - grade="--" - points=2.0 - elseif nN> 0 then - -- No larger but average deviations ==> "Fair Pass" Pass with average deviations and corrections. - grade="(OK)" - points=3.0 - else - -- Only minor corrections - grade="OK" - points=4.0 - end + if vtol then + -- Add AV-8B Harrier devation allowances due to lower groundspeed and 3x conventional groove time, this allows to maintain LSO tolerances while respecting the deviations are not unsafe.--Pene testing + -- Large devaitions still result in a No Grade, A Unicorn still requires a clean pass with no deviation. + + -- Normal laning part at the beginning + local Gb = GXX .. " " .. GIM + + -- Number of deviations that occurred at the the beginning of the landing (XX or IM). These are graded like in non-VTOL landings, i.e. on deviations is + local N=nXX+nIM + local nL=count(Gb, '_')/2 + local nS=count(Gb, '%(') + local nN=N-nS-nL + + + -- VTOL part of the landing + local Gv = GIC .. " " .. GAR + + -- Number of deviations that occurred at the the end (VTOL part) of the landing (IC or AR). + local Nv=nIC+nAR + local nLv=count(Gv, '_')/2 + local nSv=count(Gv, '%(') + local nNv=Nv-nSv-nLv + + if nL>0 or nLv>1 then + -- Larger deviations at XX or IM or at least one larger deviation IC or AR==> "No grade" 2.0 points. + -- In other words, we allow one larger deviation at IC+AR + grade="--" + points=2.0 + elseif nN>0 or nNv>1 or nLv==1 then + -- Average deviations at XX+IM or more than one normal deviation IC or AR ==> "Fair Pass" Pass with average deviations and corrections. + grade="(OK)" + points=3.0 + else + -- Only minor corrections + grade="OK" + points=4.0 + end + + else + + -- This is a normal (non-VTOL) landing. + + if nL > 0 then + -- Larger deviations ==> "No grade" 2.0 points. + grade="--" + points=2.0 + elseif nN> 0 then + -- No larger but average/normal deviations ==> "Fair Pass" Pass with average deviations and corrections. + grade="(OK)" + points=3.0 + else + -- Only minor corrections ==> "Okay pass" 4.0 points. + grade="OK" + points=4.0 + end + + end end -- Replace" )"( and "__" From 0ddf8762c2a4504b32a33979c73aba4cced6997c Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 27 Jan 2024 15:28:07 +0100 Subject: [PATCH 02/12] UTILS - small helper for M2K Data Cartridges --- Moose Development/Moose/Utilities/Utils.lua | 58 +++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index 98425d7c8..259f6d223 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -825,6 +825,64 @@ UTILS.tostringLL = function( lat, lon, acc, DMS) end end +--[[acc: +in DM: decimal point of minutes. +In DMS: decimal point of seconds. +position after the decimal of the least significant digit: +So: +42.32 - acc of 2. +]] +UTILS.tostringLLM2KData = function( lat, lon, acc) + + local latHemi, lonHemi + if lat > 0 then + latHemi = 'N' + else + latHemi = 'S' + end + + if lon > 0 then + lonHemi = 'E' + else + lonHemi = 'W' + end + + lat = math.abs(lat) + lon = math.abs(lon) + + local latDeg = math.floor(lat) + local latMin = (lat - latDeg)*60 + + local lonDeg = math.floor(lon) + local lonMin = (lon - lonDeg)*60 + + -- degrees, decimal minutes. + latMin = UTILS.Round(latMin, acc) + lonMin = UTILS.Round(lonMin, acc) + + if latMin == 60 then + latMin = 0 + latDeg = latDeg + 1 + end + + if lonMin == 60 then + lonMin = 0 + lonDeg = lonDeg + 1 + end + + local minFrmtStr -- create the formatting string for the minutes place + if acc <= 0 then -- no decimal place. + minFrmtStr = '%02d' + else + local width = 3 + acc -- 01.310 - that's a width of 6, for example. + minFrmtStr = '%0' .. width .. '.' .. acc .. 'f' + end + + -- 024 23'N or 024 23.123'N + return latHemi..string.format('%02d:', latDeg) .. string.format(minFrmtStr, latMin), lonHemi..string.format('%02d:', lonDeg) .. string.format(minFrmtStr, lonMin) + +end + -- acc- the accuracy of each easting/northing. 0, 1, 2, 3, 4, or 5. UTILS.tostringMGRS = function(MGRS, acc) --R2.1 From 7464406a17eabf4e1df4f13bd717cf0dc99b4125 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Wed, 31 Jan 2024 17:49:37 +0100 Subject: [PATCH 03/12] #SPAWN - Small fix for OnSpawnGroup() timing issues --- Moose Development/Moose/Core/Spawn.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/Spawn.lua b/Moose Development/Moose/Core/Spawn.lua index 8124e11a6..c7095dc8f 100644 --- a/Moose Development/Moose/Core/Spawn.lua +++ b/Moose Development/Moose/Core/Spawn.lua @@ -1689,8 +1689,8 @@ function SPAWN:SpawnWithIndex( SpawnIndex, NoBirth ) -- If there is a SpawnFunction hook defined, call it. if self.SpawnFunctionHook then - -- delay calling this for .1 seconds so that it hopefully comes after the BIRTH event of the group. - self.SpawnHookScheduler:Schedule( nil, self.SpawnFunctionHook, { self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) }, 0.1 ) + -- delay calling this for .3 seconds so that it hopefully comes after the BIRTH event of the group. + self.SpawnHookScheduler:Schedule( nil, self.SpawnFunctionHook, { self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) }, 0.3 ) end -- TODO: Need to fix this by putting an "R" in the name of the group when the group repeats. -- if self.Repeat then From 531132e8a733dfb2b93c622605f18565cf6241a2 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Wed, 31 Jan 2024 17:49:59 +0100 Subject: [PATCH 04/12] #GROUP small fix for GetAverageCoordinate() --- Moose Development/Moose/Wrapper/Group.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index 080467e84..52741e2c2 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -1132,8 +1132,9 @@ function GROUP:GetAverageVec3() -- Average. local Vec3={x=x/n, y=y/n, z=z/n} --DCS#Vec3 return Vec3 - end - return nil + else + return self:GetVec3() + end end --- Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission. @@ -1167,8 +1168,13 @@ function GROUP:GetAverageCoordinate() coord.Heading = Heading return coord else - BASE:E( { "Cannot GetAverageCoordinate", Group = self, Alive = self:IsAlive() } ) - return nil + local coord = self:GetCoordinate() + if coord then + return coord + else + BASE:E( { "Cannot GetAverageCoordinate", Group = self, Alive = self:IsAlive() } ) + return nil + end end end From 1847a2372c5661056a934df1ddcdbbcfd8631eea Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 1 Feb 2024 09:03:39 +0100 Subject: [PATCH 05/12] Docu --- Moose Development/Moose/Ops/Awacs.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Moose Development/Moose/Ops/Awacs.lua b/Moose Development/Moose/Ops/Awacs.lua index 28c710ccb..752943700 100644 --- a/Moose Development/Moose/Ops/Awacs.lua +++ b/Moose Development/Moose/Ops/Awacs.lua @@ -36,7 +36,7 @@ do -- @field #number Frequency -- @field #number Modulation -- @field Wrapper.Airbase#AIRBASE Airbase --- @field Ops.AirWing#AIRWING AirWing +-- @field Ops.Airwing#AIRWING AirWing -- @field #number AwacsAngels -- @field Core.Zone#ZONE OrbitZone -- @field #number CallSign @@ -159,10 +159,10 @@ do -- -- ## 3 Airwing(s) -- --- The AWACS plane, the optional escort planes, and the AI CAP planes work based on the @{Ops.AirWing} class. Read and understand the manual for this class in +-- The AWACS plane, the optional escort planes, and the AI CAP planes work based on the @{Ops.Airwing} class. Read and understand the manual for this class in -- order to set everything up correctly. You will at least need one Squadron containing the AWACS plane itself. -- --- Set up the AirWing +-- Set up the Airwing -- -- local AwacsAW = AIRWING:New("AirForce WH-1","AirForce One") -- AwacsAW:SetMarker(false) @@ -226,7 +226,7 @@ do -- -- ## 5 Set up AWACS -- --- -- Set up AWACS called "AWACS North". It will use the AwacsAW AirWing set up above and be of the "blue" coalition. Homebase is Kutaisi. +-- -- Set up AWACS called "AWACS North". It will use the AwacsAW Airwing set up above and be of the "blue" coalition. Homebase is Kutaisi. -- -- The AWACS Orbit Zone is a round zone set in the mission editor named "Awacs Orbit", the FEZ is a Polygon-Zone called "Rock" we have also -- -- set up in the mission editor with a late activated helo named "Rock#ZONE_POLYGON". Note this also sets the BullsEye to be referenced as "Rock". -- -- The CAP station zone is called "Fremont". We will be on 255 AM. @@ -248,7 +248,7 @@ do -- -- ### 5.1 Alternative - Set up as GCI (no AWACS plane needed) Theater Air Control System (TACS) -- --- -- Set up as TACS called "GCI Senaki". It will use the AwacsAW AirWing set up above and be of the "blue" coalition. Homebase is Senaki. +-- -- Set up as TACS called "GCI Senaki". It will use the AwacsAW Airwing set up above and be of the "blue" coalition. Homebase is Senaki. -- -- No need to set the AWACS Orbit Zone; the FEZ is still a Polygon-Zone called "Rock" we have also -- -- set up in the mission editor with a late activated helo named "Rock#ZONE_POLYGON". Note this also sets the BullsEye to be referenced as "Rock". -- -- The CAP station zone is called "Fremont". We will be on 255 AM. Note the Orbit Zone is given as *nil* in the `New()`-Statement @@ -956,7 +956,7 @@ AWACS.TaskStatus = { -- DONE - Shift Change, Change on asset RTB or dead or mission done (done for AWACS and Escorts) -- DONE - TripWire - WIP - Threat (35nm), Meld (45nm, on mission), Merged (<3nm) -- --- DONE - Escorts via AirWing not staying on +-- DONE - Escorts via Airwing not staying on -- DONE - Borders for INTEL. Optional, i.e. land based defense within borders -- DONE - Use AO as Anchor of Bulls, AO as default -- DONE - SRS TTS output @@ -984,7 +984,7 @@ AWACS.TaskStatus = { --- Set up a new AI AWACS. -- @param #AWACS self -- @param #string Name Name of this AWACS for the radio menu. --- @param #string AirWing The core Ops.AirWing#AIRWING managing the AWACS, Escort and (optionally) AI CAP planes for us. +-- @param #string AirWing The core Ops.Airwing#AIRWING managing the AWACS, Escort and (optionally) AI CAP planes for us. -- @param #number Coalition Coalition, e.g. coalition.side.BLUE. Can also be passed as "blue", "red" or "neutral". -- @param #string AirbaseName Name of the home airbase. -- @param #string AwacsOrbit Name of the round, mission editor created zone where this AWACS orbits. @@ -1024,7 +1024,7 @@ function AWACS:New(Name,AirWing,Coalition,AirbaseName,AwacsOrbit,OpsZone,Station -- base setup self.Name = Name -- #string - self.AirWing = AirWing -- Ops.AirWing#AIRWING object + self.AirWing = AirWing -- Ops.Airwing#AIRWING object AirWing:SetUsingOpsAwacs(self) @@ -1032,7 +1032,7 @@ function AWACS:New(Name,AirWing,Coalition,AirbaseName,AwacsOrbit,OpsZone,Station self.CAPAirwings:Push(AirWing,1) self.AwacsFG = nil - --self.AwacsPayload = PayLoad -- Ops.AirWing#AIRWING.Payload + --self.AwacsPayload = PayLoad -- Ops.Airwing#AIRWING.Payload --self.ModernEra = true -- use of EPLRS self.RadarBlur = 15 -- +/-15% detection precision i.e. 85-115 reported group size if type(OpsZone) == "string" then @@ -4978,7 +4978,7 @@ end --- [User] Add another AirWing for AI CAP Flights under management -- @param #AWACS self --- @param Ops.AirWing#AIRWING AirWing The AirWing to (also) obtain CAP flights from +-- @param Ops.Airwing#AIRWING AirWing The AirWing to (also) obtain CAP flights from -- @param Core.Zone#ZONE_RADIUS Zone (optional) This AirWing has it's own station zone, AI CAP will be send there -- @return #AWACS self function AWACS:AddCAPAirWing(AirWing,Zone) @@ -5832,7 +5832,7 @@ function AWACS:onafterStart(From, Event, To) if not self.GCI then -- set up the AWACS and let it orbit - local AwacsAW = self.AirWing -- Ops.AirWing#AIRWING + local AwacsAW = self.AirWing -- Ops.Airwing#AIRWING local mission = AUFTRAG:NewORBIT_RACETRACK(self.OrbitZone:GetCoordinate(),self.AwacsAngels*1000,self.Speed,self.Heading,self.Leg) local timeonstation = (self.AwacsTimeOnStation + self.ShiftChangeTime) * 3600 mission:SetTime(nil,timeonstation) @@ -6761,7 +6761,7 @@ function AWACS:onafterAwacsShiftChange(From,Event,To) self.AwacsTimeStamp = timer.getTime() -- set up the AWACS and let it orbit - local AwacsAW = self.AirWing -- Ops.AirWing#AIRWING + local AwacsAW = self.AirWing -- Ops.Airwing#AIRWING local mission = AUFTRAG:NewORBIT_RACETRACK(self.OrbitZone:GetCoordinate(),self.AwacsAngels*1000,self.Speed,self.Heading,self.Leg) self.CatchAllMissions[#self.CatchAllMissions+1] = mission local timeonstation = (self.AwacsTimeOnStation + self.ShiftChangeTime) * 3600 From c38917fa2f60e3946483110470172e78dfa782c6 Mon Sep 17 00:00:00 2001 From: kaltokri Date: Fri, 2 Feb 2024 12:15:40 +0100 Subject: [PATCH 06/12] Fix for dead links (case sensitivity) --- Moose Development/Moose/Ops/Auftrag.lua | 6 +++--- Moose Development/Moose/Ops/EasyGCICAP.lua | 2 +- Moose Development/Moose/Ops/FlightGroup.lua | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 24d07803e..1ae498766 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -145,7 +145,7 @@ -- @field #table NassetsLegMax Number of required warehouse assets for each assigned legion. -- @field #table requestID The ID of the queued warehouse request. Necessary to cancel the request if the mission was cancelled before the request is processed. -- @field #table payloads User specified airwing payloads for this mission. Only these will be considered for the job! --- @field Ops.AirWing#AIRWING.PatrolData patroldata Patrol data. +-- @field Ops.Airwing#AIRWING.PatrolData patroldata Patrol data. -- -- @field #table specialLegions User specified legions assigned for this mission. Only these will be considered for the job! -- @field #table specialCohorts User specified cohorts assigned for this mission. Only these will be considered for the job! @@ -338,7 +338,7 @@ -- -- ## Legion Level -- --- Adding an AUFTRAG to an airwing is done via the @{Ops.AirWing#AIRWING.AddMission} function. See AIRWING docs for further details. +-- Adding an AUFTRAG to an airwing is done via the @{Ops.Airwing#AIRWING.AddMission} function. See AIRWING docs for further details. -- Similarly, an AUFTRAG can be added to a brigade via the @{Ops.Brigade#BRIGADE.AddMission} function. -- -- ## Commander Level @@ -3734,7 +3734,7 @@ end --- Add a required payload for this mission. Only these payloads will be used for this mission. If they are not available, the mission cannot start. Only available for use with an AIRWING. -- @param #AUFTRAG self --- @param Ops.AirWing#AIRWING.Payload Payload Required payload. +-- @param Ops.Airwing#AIRWING.Payload Payload Required payload. -- @return #AUFTRAG self function AUFTRAG:AddRequiredPayload(Payload) diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 1cb3385ee..4b923a267 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -1126,7 +1126,7 @@ end --- Add a zone to the rejected zones set. -- @param #EASYGCICAP self --- @param Ops.Intelligence#INTEL.Cluster Cluster +-- @param Ops.Intel#INTEL.Cluster Cluster -- @return #EASYGCICAP self function EASYGCICAP:_AssignIntercept(Cluster) -- Here, we'll decide if we need to launch an intercepting flight, and from where diff --git a/Moose Development/Moose/Ops/FlightGroup.lua b/Moose Development/Moose/Ops/FlightGroup.lua index 05145caac..6353239bd 100644 --- a/Moose Development/Moose/Ops/FlightGroup.lua +++ b/Moose Development/Moose/Ops/FlightGroup.lua @@ -44,7 +44,7 @@ -- @field #boolean fuelcritical Fuel critical switch. -- @field #number fuelcriticalthresh Critical fuel threshold in percent. -- @field #boolean fuelcriticalrtb RTB on critical fuel switch. --- @field Ops.FlightControl#FLIGHTCONTROL flightcontrol The flightcontrol handling this group. +-- @field OPS.FlightControl#FLIGHTCONTROL flightcontrol The flightcontrol handling this group. -- @field Ops.Airboss#AIRBOSS airboss The airboss handling this group. -- @field Core.UserFlag#USERFLAG flaghold Flag for holding. -- @field #number Tholding Abs. mission time stamp when the group reached the holding point. @@ -54,7 +54,7 @@ -- @field #boolean despawnAfterLanding If `true`, group is despawned after landed at an airbase. -- @field #boolean despawnAfterHolding If `true`, group is despawned after reaching the holding point. -- @field #number RTBRecallCount Number that counts RTB calls. --- @field Ops.FlightControl#FLIGHTCONTROL.HoldingStack stack Holding stack. +-- @field OPS.FlightControl#FLIGHTCONTROL.HoldingStack stack Holding stack. -- @field #boolean isReadyTO Flight is ready for takeoff. This is for FLIGHTCONTROL. -- @field #boolean prohibitAB Disallow (true) or allow (false) AI to use the afterburner. -- @field #boolean jettisonEmptyTanks Allow (true) or disallow (false) AI to jettison empty fuel tanks. @@ -793,7 +793,7 @@ end --- Set the FLIGHTCONTROL controlling this flight group. -- @param #FLIGHTGROUP self --- @param Ops.FlightControl#FLIGHTCONTROL flightcontrol The FLIGHTCONTROL object. +-- @param OPS.FlightControl#FLIGHTCONTROL flightcontrol The FLIGHTCONTROL object. -- @return #FLIGHTGROUP self function FLIGHTGROUP:SetFlightControl(flightcontrol) @@ -822,7 +822,7 @@ end --- Get the FLIGHTCONTROL controlling this flight group. -- @param #FLIGHTGROUP self --- @return Ops.FlightControl#FLIGHTCONTROL The FLIGHTCONTROL object. +-- @return OPS.FlightControl#FLIGHTCONTROL The FLIGHTCONTROL object. function FLIGHTGROUP:GetFlightControl() return self.flightcontrol end @@ -4871,7 +4871,7 @@ function FLIGHTGROUP:_UpdateMenu(delay) -- Get all FLIGHTCONTROLS local fc={} for airbasename,_flightcontrol in pairs(_DATABASE.FLIGHTCONTROLS) do - local flightcontrol=_flightcontrol --Ops.FlightControl#FLIGHTCONTROL + local flightcontrol=_flightcontrol --OPS.FlightControl#FLIGHTCONTROL -- Get coord of airbase. local coord=flightcontrol:GetCoordinate() From 11c74ddc179548d286f7fbfc9ca11220e17eb603 Mon Sep 17 00:00:00 2001 From: kaltokri Date: Fri, 2 Feb 2024 12:24:31 +0100 Subject: [PATCH 07/12] Another fix for dead links (case sensitivity) linkinator hides multiple problems sometimes --- Moose Development/Moose/Functional/Warehouse.lua | 2 +- Moose Development/Moose/Ops/Target.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Functional/Warehouse.lua b/Moose Development/Moose/Functional/Warehouse.lua index 686bede21..4a2910d59 100644 --- a/Moose Development/Moose/Functional/Warehouse.lua +++ b/Moose Development/Moose/Functional/Warehouse.lua @@ -1629,7 +1629,7 @@ WAREHOUSE = { -- @field #boolean arrived If true, asset arrived at its destination. -- -- @field #number damage Damage of asset group in percent. --- @field Ops.AirWing#AIRWING.Payload payload The payload of the asset. +-- @field Ops.Airwing#AIRWING.Payload payload The payload of the asset. -- @field Ops.OpsGroup#OPSGROUP flightgroup The flightgroup object. -- @field Ops.Cohort#COHORT cohort The cohort this asset belongs to. -- @field Ops.Legion#LEGION legion The legion this asset belonts to. diff --git a/Moose Development/Moose/Ops/Target.lua b/Moose Development/Moose/Ops/Target.lua index abba2f886..5f72742d6 100644 --- a/Moose Development/Moose/Ops/Target.lua +++ b/Moose Development/Moose/Ops/Target.lua @@ -36,7 +36,7 @@ -- @field #number prio Priority. -- @field #number importance Importance. -- @field Ops.Auftrag#AUFTRAG mission Mission attached to this target. --- @field Ops.Intelligence#INTEL.Contact contact Contact attached to this target. +-- @field Ops.Intel#INTEL.Contact contact Contact attached to this target. -- @field #boolean isDestroyed If true, target objects were destroyed. -- @field #table resources Resource list. -- @field #table conditionStart Start condition functions. From 2ca847e845884d7418960b05a41cd540baee0971 Mon Sep 17 00:00:00 2001 From: kaltokri Date: Fri, 2 Feb 2024 13:30:22 +0100 Subject: [PATCH 08/12] Fixed dead links for Ops.Intel and Ops.Airwing --- .../Moose/Functional/Autolase.lua | 4 +- Moose Development/Moose/Functional/Mantis.lua | 6 +-- Moose Development/Moose/Ops/Awacs.lua | 38 +++++++++---------- Moose Development/Moose/Ops/EasyGCICAP.lua | 24 ++++++------ Moose Development/Moose/Ops/FlightGroup.lua | 2 +- Moose Development/Moose/Ops/Intelligence.lua | 10 ++--- Moose Development/Moose/Ops/PlayerTask.lua | 10 ++--- Moose Development/Moose/Ops/Squadron.lua | 4 +- 8 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Moose Development/Moose/Functional/Autolase.lua b/Moose Development/Moose/Functional/Autolase.lua index ab9579430..0f6a8e52d 100644 --- a/Moose Development/Moose/Functional/Autolase.lua +++ b/Moose Development/Moose/Functional/Autolase.lua @@ -914,12 +914,12 @@ function AUTOLASE:onafterMonitor(From, Event, To) self:SetPilotMenu() - local detecteditems = self.Contacts or {} -- #table of Ops.Intelligence#INTEL.Contact + local detecteditems = self.Contacts or {} -- #table of Ops.Intel#INTEL.Contact local groupsbythreat = {} local report = REPORT:New("Detections") local lines = 0 for _,_contact in pairs(detecteditems) do - local contact = _contact -- Ops.Intelligence#INTEL.Contact + local contact = _contact -- Ops.Intel#INTEL.Contact local grp = contact.group local coord = contact.position local reccename = contact.recce or "none" diff --git a/Moose Development/Moose/Functional/Mantis.lua b/Moose Development/Moose/Functional/Mantis.lua index 6ed0d8458..8d75eaab1 100644 --- a/Moose Development/Moose/Functional/Mantis.lua +++ b/Moose Development/Moose/Functional/Mantis.lua @@ -1222,10 +1222,10 @@ do function MANTIS:_PreFilterHeight(height) self:T(self.lid.."_PreFilterHeight") local set = {} - local dlink = self.Detection -- Ops.Intelligence#INTEL_DLINK + local dlink = self.Detection -- Ops.Intel#INTEL_DLINK local detectedgroups = dlink:GetContactTable() for _,_contact in pairs(detectedgroups) do - local contact = _contact -- Ops.Intelligence#INTEL.Contact + local contact = _contact -- Ops.Intel#INTEL.Contact local grp = contact.group -- Wrapper.Group#GROUP if grp:IsAlive() then if grp:GetHeight(true) < height then @@ -1777,7 +1777,7 @@ do -- @return #MANTIS self function MANTIS:_CheckDLinkState() self:T(self.lid .. "_CheckDLinkState") - local dlink = self.Detection -- Ops.Intelligence#INTEL_DLINK + local dlink = self.Detection -- Ops.Intel#INTEL_DLINK local TS = timer.getAbsTime() if not dlink:Is("Running") and (TS - self.DLTimeStamp > 29) then self.DLink = false diff --git a/Moose Development/Moose/Ops/Awacs.lua b/Moose Development/Moose/Ops/Awacs.lua index 752943700..5df0f7f42 100644 --- a/Moose Development/Moose/Ops/Awacs.lua +++ b/Moose Development/Moose/Ops/Awacs.lua @@ -852,8 +852,8 @@ AWACS.Messages = { --- Contact Data -- @type AWACS.ManagedContact -- @field #number CID --- @field Ops.Intelligence#INTEL.Contact Contact --- @field Ops.Intelligence#INTEL.Cluster Cluster +-- @field Ops.Intel#INTEL.Contact Contact +-- @field Ops.Intel#INTEL.Cluster Cluster -- @field #string IFF -- ID'ed or not (yet) -- @field Ops.Target#TARGET Target -- @field #number LinkedTask --> TID @@ -902,8 +902,8 @@ AWACS.TaskStatus = { -- @field #AWACS.TaskStatus Status -- @field #AWACS.TaskDescription ToDo -- @field #string ScreenText Long descrition --- @field Ops.Intelligence#INTEL.Contact Contact --- @field Ops.Intelligence#INTEL.Cluster Cluster +-- @field Ops.Intel#INTEL.Contact Contact +-- @field Ops.Intel#INTEL.Cluster Cluster -- @field #number CurrentAuftrag -- @field #number RequestedTimestamp @@ -2463,7 +2463,7 @@ function AWACS:_UpdateContactFromCluster(CID) local function GetFirstAliveContact(table) for _,_contact in pairs (table) do - local contact = _contact -- Ops.Intelligence#INTEL.Contact + local contact = _contact -- Ops.Intel#INTEL.Contact if contact and contact.group and contact.group:IsAlive() then return contact end @@ -4260,7 +4260,7 @@ function AWACS:_StartIntel(awacs) intel:__Start(5) - self.intel = intel -- Ops.Intelligence#INTEL + self.intel = intel -- Ops.Intel#INTEL return self end @@ -4420,8 +4420,8 @@ end -- @param #table Object Object for Ops.Target#TARGET assignment -- @param #AWACS.TaskStatus TaskStatus Status of this task -- @param Ops.Auftrag#AUFTRAG Auftrag The Auftrag for this task if any --- @param Ops.Intelligence#INTEL.Cluster Cluster Intel Cluster for this task --- @param Ops.Intelligence#INTEL.Contact Contact Intel Contact for this task +-- @param Ops.Intel#INTEL.Cluster Cluster Intel Cluster for this task +-- @param Ops.Intel#INTEL.Contact Contact Intel Contact for this task -- @return #number TID Task ID created function AWACS:_CreateTaskForGroup(GroupID,Description,ScreenText,Object,TaskStatus,Auftrag,Cluster,Contact) self:T(self.lid.."_CreateTaskForGroup "..GroupID .." Description: "..Description) @@ -5063,7 +5063,7 @@ function AWACS:_AnnounceContact(Contact,IsNew,Group,IsBogeyDope,Tag,IsPopup,Repo end local cluster = Contact.Cluster - local intel = self.intel -- Ops.Intelligence#INTEL + local intel = self.intel -- Ops.Intel#INTEL local size = self.intel:ClusterCountUnits(cluster) local threatsize, threatsizetext = self:_GetBlurredSize(size) @@ -5465,7 +5465,7 @@ function AWACS:_TACRangeCall(GID,Contact) if not Contact then return self end local pilotcallsign = self:_GetCallSign(nil,GID) local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup - local contact = Contact.Contact -- Ops.Intelligence#INTEL.Contact + local contact = Contact.Contact -- Ops.Intel#INTEL.Contact local contacttag = Contact.TargetGroupNaming if contact and not Contact.TACCallDone then local position = contact.position -- Core.Point#COORDINATE @@ -5494,7 +5494,7 @@ function AWACS:_MeldRangeCall(GID,Contact) local pilotcallsign = self:_GetCallSign(nil,GID) local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup local flightpos = managedgroup.Group:GetCoordinate() - local contact = Contact.Contact -- Ops.Intelligence#INTEL.Contact + local contact = Contact.Contact -- Ops.Intel#INTEL.Contact local contacttag = Contact.TargetGroupNaming if contact and not Contact.MeldCallDone then local position = contact.position -- Core.Point#COORDINATE @@ -5524,7 +5524,7 @@ function AWACS:_ThreatRangeCall(GID,Contact) local pilotcallsign = self:_GetCallSign(nil,GID) local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup local flightpos = managedgroup.Group:GetCoordinate() or managedgroup.LastKnownPosition - local contact = Contact.Contact -- Ops.Intelligence#INTEL.Contact + local contact = Contact.Contact -- Ops.Intel#INTEL.Contact local contacttag = Contact.TargetGroupNaming if contact then local position = contact.position or contact.group:GetCoordinate() -- Core.Point#COORDINATE @@ -6426,7 +6426,7 @@ end -- @param #string From -- @param #string Event -- @param #string To --- @param Ops.Intelligence#INTEL.Cluster Cluster +-- @param Ops.Intel#INTEL.Cluster Cluster -- @return #AWACS self function AWACS:onafterNewCluster(From,Event,To,Cluster) self:T({From, Event, To, Cluster.index}) @@ -6438,7 +6438,7 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster) local function GetFirstAliveContact(table) for _,_contact in pairs (table) do - local contact = _contact -- Ops.Intelligence#INTEL.Contact + local contact = _contact -- Ops.Intel#INTEL.Contact if contact and contact.group and contact.group:IsAlive() then return contact, contact.group end @@ -6446,7 +6446,7 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster) return nil end - local Contact, Group = GetFirstAliveContact(ContactTable) -- Ops.Intelligence#INTEL.Contact + local Contact, Group = GetFirstAliveContact(ContactTable) -- Ops.Intel#INTEL.Contact if not Contact then return self end @@ -6457,7 +6457,7 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster) local targetset = SET_GROUP:New() -- SET for TARGET for _,_grp in pairs(ContactTable) do - local grp = _grp -- Ops.Intelligence#INTEL.Contact + local grp = _grp -- Ops.Intel#INTEL.Contact targetset:AddGroup(grp.group, true) end local managedcontact = {} -- #AWACS.ManagedContact @@ -6519,7 +6519,7 @@ end -- @param #string From -- @param #string Event -- @param #string To --- @param Ops.Intelligence#INTEL.Contact Contact +-- @param Ops.Intel#INTEL.Contact Contact -- @return #AWACS self function AWACS:onafterNewContact(From,Event,To,Contact) self:T({From, Event, To, Contact}) @@ -6548,7 +6548,7 @@ end -- @param #string From -- @param #string Event -- @param #string To --- @param Ops.Intelligence#INTEL.Contact Contact +-- @param Ops.Intel#INTEL.Contact Contact -- @return #AWACS self function AWACS:onafterLostContact(From,Event,To,Contact) self:T({From, Event, To, Contact}) @@ -6560,7 +6560,7 @@ end -- @param #string From -- @param #string Event -- @param #string To --- @param Ops.Intelligence#INTEL.Cluster Cluster +-- @param Ops.Intel#INTEL.Cluster Cluster -- @param Ops.Auftrag#AUFTRAG Mission -- @return #AWACS self function AWACS:onafterLostCluster(From,Event,To,Cluster,Mission) diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 4b923a267..e9db4aea1 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -702,7 +702,7 @@ function EASYGCICAP:_SetTankerPatrolPoints() self:T(self.lid.."_SetTankerPatrolPoints") for _,_data in pairs(self.ManagedTK) do local data = _data --#EASYGCICAP.CapPoint - local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING + local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Coordinate = data.Coordinate local Altitude = data.Altitude local Speed = data.Speed @@ -721,7 +721,7 @@ function EASYGCICAP:_SetAwacsPatrolPoints() self:T(self.lid.."_SetAwacsPatrolPoints") for _,_data in pairs(self.ManagedEWR) do local data = _data --#EASYGCICAP.CapPoint - local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING + local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Coordinate = data.Coordinate local Altitude = data.Altitude local Speed = data.Speed @@ -740,7 +740,7 @@ function EASYGCICAP:_SetCAPPatrolPoints() self:T(self.lid.."_SetCAPPatrolPoints") for _,_data in pairs(self.ManagedCP) do local data = _data --#EASYGCICAP.CapPoint - local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING + local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Coordinate = data.Coordinate local Altitude = data.Altitude local Speed = data.Speed @@ -759,7 +759,7 @@ function EASYGCICAP:_SetReconPatrolPoints() self:T(self.lid.."_SetReconPatrolPoints") for _,_data in pairs(self.ManagedREC) do local data = _data --#EASYGCICAP.CapPoint - local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING + local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Coordinate = data.Coordinate local Altitude = data.Altitude local Speed = data.Speed @@ -947,7 +947,7 @@ function EASYGCICAP:_AddSquadron(TemplateName, SquadName, AirbaseName, AirFrames Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE) Squadron_One:SetMissionRange(self.missionrange) - local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING + local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING wing:AddSquadron(Squadron_One) wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.PATROLRACETRACK, AUFTRAG.Type.ALERT5},75) @@ -978,7 +978,7 @@ function EASYGCICAP:_AddReconSquadron(TemplateName, SquadName, AirbaseName, AirF Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE) Squadron_One:SetMissionRange(self.missionrange) - local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING + local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING wing:AddSquadron(Squadron_One) wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.RECON},75) @@ -1014,7 +1014,7 @@ function EASYGCICAP:_AddTankerSquadron(TemplateName, SquadName, AirbaseName, Air Squadron_One:SetRadio(Frequency,Modulation) Squadron_One:AddTacanChannel(TACAN,TACAN) - local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING + local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING wing:AddSquadron(Squadron_One) wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.TANKER},75) @@ -1047,7 +1047,7 @@ function EASYGCICAP:_AddAWACSSquadron(TemplateName, SquadName, AirbaseName, AirF Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE) Squadron_One:SetMissionRange(self.missionrange) Squadron_One:SetRadio(Frequency,Modulation) - local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING + local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING wing:AddSquadron(Squadron_One) wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.AWACS},75) @@ -1151,7 +1151,7 @@ function EASYGCICAP:_AssignIntercept(Cluster) local position = self.Intel:CalcClusterFuturePosition(Cluster,300) -- calculate closest zone local bestdistance = 2000*1000 -- 2000km - local targetairwing = nil -- Ops.AirWing#AIRWING + local targetairwing = nil -- Ops.Airwing#AIRWING local targetawname = "" -- #string local clustersize = self.Intel:ClusterCountUnits(Cluster) or 1 local wingsize = math.abs(overhead * (clustersize+1)) @@ -1164,7 +1164,7 @@ function EASYGCICAP:_AssignIntercept(Cluster) if (retrymission) and (wingsize >= 1) then MESSAGE:New(string.format("**** %s Interceptors need wingsize %d", UTILS.GetCoalitionName(self.coalition), wingsize),15,"CAPGCI"):ToAllIf(self.debug):ToLog() for _,_data in pairs (wings) do - local airwing = _data[1] -- Ops.AirWing#AIRWING + local airwing = _data[1] -- Ops.Airwing#AIRWING local zone = _data[2] -- Core.Zone#ZONE local zonecoord = zone:GetCoordinate() local name = _data[3] -- #string @@ -1177,7 +1177,7 @@ function EASYGCICAP:_AssignIntercept(Cluster) end end for _,_data in pairs (ctlpts) do - --local airwing = _data[1] -- Ops.AirWing#AIRWING + --local airwing = _data[1] -- Ops.Airwing#AIRWING --local zone = _data[2] -- Core.Zone#ZONE --local zonecoord = zone:GetCoordinate() --local name = _data[3] -- #string @@ -1191,7 +1191,7 @@ function EASYGCICAP:_AssignIntercept(Cluster) local airframes = airwing:CountAssets(true) if distance < bestdistance and airframes >= wingsize then bestdistance = distance - targetairwing = airwing -- Ops.AirWing#AIRWING + targetairwing = airwing -- Ops.Airwing#AIRWING targetawname = name end end diff --git a/Moose Development/Moose/Ops/FlightGroup.lua b/Moose Development/Moose/Ops/FlightGroup.lua index 6353239bd..1d40e3383 100644 --- a/Moose Development/Moose/Ops/FlightGroup.lua +++ b/Moose Development/Moose/Ops/FlightGroup.lua @@ -695,7 +695,7 @@ end --- Get airwing the flight group belongs to. -- @param #FLIGHTGROUP self --- @return Ops.AirWing#AIRWING The AIRWING object (if any). +-- @return Ops.Airwing#AIRWING The AIRWING object (if any). function FLIGHTGROUP:GetAirwing() return self.legion end diff --git a/Moose Development/Moose/Ops/Intelligence.lua b/Moose Development/Moose/Ops/Intelligence.lua index 7751a140b..f9996cf91 100644 --- a/Moose Development/Moose/Ops/Intelligence.lua +++ b/Moose Development/Moose/Ops/Intelligence.lua @@ -2272,7 +2272,7 @@ function INTEL:GetHighestThreatContact(Cluster) for _,_contact in pairs(Cluster.Contacts) do - local contact=_contact --Ops.Intelligence#INTEL.Contact + local contact=_contact --Ops.Intel#INTEL.Contact if contact.threatlevel>threatlevel then threatlevel=contact.threatlevel @@ -2312,8 +2312,8 @@ end -- @field #string alias Alias name for logging. -- @field #number cachetime Number of seconds to keep an object. -- @field #number interval Number of seconds between collection runs. --- @field #table contacts Table of Ops.Intelligence#INTEL.Contact contacts. --- @field #table clusters Table of Ops.Intelligence#INTEL.Cluster clusters. +-- @field #table contacts Table of Ops.Intel#INTEL.Contact contacts. +-- @field #table clusters Table of Ops.Intel#INTEL.Cluster clusters. -- @field #table contactcoords Table of contacts' Core.Point#COORDINATE objects. -- @extends Core.Fsm#FSM @@ -2337,7 +2337,7 @@ INTEL_DLINK.version = "0.0.1" --- Function to instantiate a new object -- @param #INTEL_DLINK self --- @param #table Intels Table of Ops.Intelligence#INTEL objects. +-- @param #table Intels Table of Ops.Intel#INTEL objects. -- @param #string Alias (optional) Name of this instance. Default "SPECTRE" -- @param #number Interval (optional) When to query #INTEL objects for detected items (default 20 seconds). -- @param #number Cachetime (optional) How long to cache detected items (default 300 seconds). @@ -2449,7 +2449,7 @@ end --- Function to add an #INTEL object to the aggregator -- @param #INTEL_DLINK self --- @param Ops.Intelligence#INTEL Intel the #INTEL object to add +-- @param Ops.Intel#INTEL Intel the #INTEL object to add -- @return #INTEL_DLINK self function INTEL_DLINK:AddIntel(Intel) self:T(self.lid .. "AddIntel") diff --git a/Moose Development/Moose/Ops/PlayerTask.lua b/Moose Development/Moose/Ops/PlayerTask.lua index 1e1fd5c9a..643355ed8 100644 --- a/Moose Development/Moose/Ops/PlayerTask.lua +++ b/Moose Development/Moose/Ops/PlayerTask.lua @@ -3946,7 +3946,7 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName) local function NewCluster(Cluster) if not self.usecluster then return self end - local cluster = Cluster -- Ops.Intelligence#INTEL.Cluster + local cluster = Cluster -- Ops.Intel#INTEL.Cluster local type = cluster.ctype self:T({type,self.Type}) if (type == INTEL.Ctype.AIRCRAFT and self.Type == PLAYERTASKCONTROLLER.Type.A2A) or (type == INTEL.Ctype.NAVAL and (self.Type == PLAYERTASKCONTROLLER.Type.A2S or self.Type == PLAYERTASKCONTROLLER.Type.A2GS)) then @@ -3954,7 +3954,7 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName) local contacts = cluster.Contacts -- #table of GROUP local targetset = SET_GROUP:New() for _,_object in pairs(contacts) do - local contact = _object -- Ops.Intelligence#INTEL.Contact + local contact = _object -- Ops.Intel#INTEL.Contact self:T("Adding group: "..contact.groupname) targetset:AddGroup(contact.group,true) end @@ -3966,14 +3966,14 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName) if type == INTEL.Ctype.GROUND then targetset = SET_GROUP:New() for _,_object in pairs(contacts) do - local contact = _object -- Ops.Intelligence#INTEL.Contact + local contact = _object -- Ops.Intel#INTEL.Contact self:T("Adding group: "..contact.groupname) targetset:AddGroup(contact.group,true) end elseif type == INTEL.Ctype.STRUCTURE then targetset = SET_STATIC:New() for _,_object in pairs(contacts) do - local contact = _object -- Ops.Intelligence#INTEL.Contact + local contact = _object -- Ops.Intel#INTEL.Contact self:T("Adding static: "..contact.groupname) targetset:AddStatic(contact.group) end @@ -3986,7 +3986,7 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName) local function NewContact(Contact) if self.usecluster then return self end - local contact = Contact -- Ops.Intelligence#INTEL.Contact + local contact = Contact -- Ops.Intel#INTEL.Contact local type = contact.ctype self:T({type,self.Type}) if (type == INTEL.Ctype.AIRCRAFT and self.Type == PLAYERTASKCONTROLLER.Type.A2A) or (type == INTEL.Ctype.NAVAL and (self.Type == PLAYERTASKCONTROLLER.Type.A2S or self.Type == PLAYERTASKCONTROLLER.Type.A2GS)) then diff --git a/Moose Development/Moose/Ops/Squadron.lua b/Moose Development/Moose/Ops/Squadron.lua index dc2188a3e..15d5768ef 100644 --- a/Moose Development/Moose/Ops/Squadron.lua +++ b/Moose Development/Moose/Ops/Squadron.lua @@ -243,7 +243,7 @@ end --- Set airwing. -- @param #SQUADRON self --- @param Ops.AirWing#AIRWING Airwing The airwing. +-- @param Ops.Airwing#AIRWING Airwing The airwing. -- @return #SQUADRON self function SQUADRON:SetAirwing(Airwing) self.legion=Airwing @@ -252,7 +252,7 @@ end --- Get airwing. -- @param #SQUADRON self --- @return Ops.AirWing#AIRWING The airwing. +-- @return Ops.Airwing#AIRWING The airwing. function SQUADRON:GetAirwing(Airwing) return self.legion end From 48dba742ad0522aad0a8e4f15d8c739e48f5b7a1 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 3 Feb 2024 09:10:41 +0100 Subject: [PATCH 09/12] MANTIS SAM Data adjustments --- Moose Development/Moose/Functional/Mantis.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Functional/Mantis.lua b/Moose Development/Moose/Functional/Mantis.lua index 6ed0d8458..021971eb8 100644 --- a/Moose Development/Moose/Functional/Mantis.lua +++ b/Moose Development/Moose/Functional/Mantis.lua @@ -347,9 +347,9 @@ MANTIS.SamType = { -- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) -- @field #string Radar Radar typename on unit level (used as key) MANTIS.SamData = { - ["Hawk"] = { Range=44, Blindspot=0, Height=9, Type="Medium", Radar="Hawk" }, -- measures in km - ["NASAMS"] = { Range=14, Blindspot=0, Height=3, Type="Short", Radar="NSAMS" }, - ["Patriot"] = { Range=99, Blindspot=0, Height=9, Type="Long", Radar="Patriot" }, + ["Hawk"] = { Range=44, Blindspot=0, Height=12, Type="Medium", Radar="Hawk" }, -- measures in km + ["NASAMS"] = { Range=14, Blindspot=0, Height=8, Type="Short", Radar="NSAMS" }, + ["Patriot"] = { Range=99, Blindspot=0, Height=25, Type="Long", Radar="Patriot" }, ["Rapier"] = { Range=6, Blindspot=0, Height=3, Type="Short", Radar="rapier" }, ["SA-2"] = { Range=40, Blindspot=7, Height=25, Type="Medium", Radar="S_75M_Volhov" }, ["SA-3"] = { Range=18, Blindspot=6, Height=18, Type="Short", Radar="5p73 s-125 ln" }, @@ -357,7 +357,7 @@ MANTIS.SamData = { ["SA-6"] = { Range=25, Blindspot=0, Height=8, Type="Medium", Radar="1S91" }, ["SA-10"] = { Range=119, Blindspot=0, Height=18, Type="Long" , Radar="S-300PS 4"}, ["SA-11"] = { Range=35, Blindspot=0, Height=20, Type="Medium", Radar="SA-11" }, - ["Roland"] = { Range=8, Blindspot=0, Height=3, Type="Short", Radar="Roland" }, + ["Roland"] = { Range=8, Blindspot=0, Height=5, Type="Short", Radar="Roland" }, ["HQ-7"] = { Range=12, Blindspot=0, Height=3, Type="Short", Radar="HQ-7" }, ["SA-9"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Strela" }, ["SA-8"] = { Range=10, Blindspot=0, Height=5, Type="Short", Radar="Osa 9A33" }, From 2e167358bbf3bb4bd8e880941c80cfde4bde1324 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 3 Feb 2024 12:22:33 +0100 Subject: [PATCH 10/12] MANTIS - corrected blue SAM data --- Moose Development/Moose/Functional/Mantis.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Functional/Mantis.lua b/Moose Development/Moose/Functional/Mantis.lua index 021971eb8..f28143d97 100644 --- a/Moose Development/Moose/Functional/Mantis.lua +++ b/Moose Development/Moose/Functional/Mantis.lua @@ -347,17 +347,17 @@ MANTIS.SamType = { -- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) -- @field #string Radar Radar typename on unit level (used as key) MANTIS.SamData = { - ["Hawk"] = { Range=44, Blindspot=0, Height=12, Type="Medium", Radar="Hawk" }, -- measures in km - ["NASAMS"] = { Range=14, Blindspot=0, Height=8, Type="Short", Radar="NSAMS" }, + ["Hawk"] = { Range=35, Blindspot=0, Height=12, Type="Medium", Radar="Hawk" }, -- measures in km + ["NASAMS"] = { Range=14, Blindspot=0, Height=7, Type="Short", Radar="NSAMS" }, -- AIM 120B ["Patriot"] = { Range=99, Blindspot=0, Height=25, Type="Long", Radar="Patriot" }, - ["Rapier"] = { Range=6, Blindspot=0, Height=3, Type="Short", Radar="rapier" }, + ["Rapier"] = { Range=10, Blindspot=0, Height=3, Type="Short", Radar="rapier" }, ["SA-2"] = { Range=40, Blindspot=7, Height=25, Type="Medium", Radar="S_75M_Volhov" }, ["SA-3"] = { Range=18, Blindspot=6, Height=18, Type="Short", Radar="5p73 s-125 ln" }, ["SA-5"] = { Range=250, Blindspot=7, Height=40, Type="Long", Radar="5N62V" }, ["SA-6"] = { Range=25, Blindspot=0, Height=8, Type="Medium", Radar="1S91" }, ["SA-10"] = { Range=119, Blindspot=0, Height=18, Type="Long" , Radar="S-300PS 4"}, ["SA-11"] = { Range=35, Blindspot=0, Height=20, Type="Medium", Radar="SA-11" }, - ["Roland"] = { Range=8, Blindspot=0, Height=5, Type="Short", Radar="Roland" }, + ["Roland"] = { Range=5, Blindspot=0, Height=5, Type="Short", Radar="Roland" }, ["HQ-7"] = { Range=12, Blindspot=0, Height=3, Type="Short", Radar="HQ-7" }, ["SA-9"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Strela" }, ["SA-8"] = { Range=10, Blindspot=0, Height=5, Type="Short", Radar="Osa 9A33" }, @@ -376,7 +376,7 @@ MANTIS.SamData = { ["HQ-2"] = { Range=50, Blindspot=6, Height=35, Type="Medium", Radar="HQ_2_Guideline_LN" }, ["SHORAD"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="Igla" }, ["TAMIR IDFA"] = { Range=20, Blindspot=0.6, Height=12.3, Type="Short", Radar="IRON_DOME_LN" }, - ["STUNNER IDFA"] = { Range=250, Blindspot=1, Height=45, Type="Long", Radar="DAVID_SLING_LN" }, + ["STUNNER IDFA"] = { Range=250, Blindspot=1, Height=45, Type="Long", Radar="DAVID_SLING_LN" }, } --- SAM data HDS From 86e13df3039b95b46af4786cb3196cb931175778 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 3 Feb 2024 12:48:41 +0100 Subject: [PATCH 11/12] MANTIS --- Moose Development/Moose/Functional/Mantis.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/Mantis.lua b/Moose Development/Moose/Functional/Mantis.lua index f28143d97..997d355cd 100644 --- a/Moose Development/Moose/Functional/Mantis.lua +++ b/Moose Development/Moose/Functional/Mantis.lua @@ -22,7 +22,7 @@ -- @module Functional.Mantis -- @image Functional.Mantis.jpg -- --- Last Update: Dec 2023 +-- Last Update: Feb 2024 ------------------------------------------------------------------------- --- **MANTIS** class, extends Core.Base#BASE From 4307ddcad379150951e4aa7a4d15aeba6146fa9b Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 4 Feb 2024 13:13:06 +0100 Subject: [PATCH 12/12] CLIENTMENUMANAGER - dicu --- Moose Development/Moose/Core/ClientMenu.lua | 24 +++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Core/ClientMenu.lua b/Moose Development/Moose/Core/ClientMenu.lua index 525b3533d..a87583be9 100644 --- a/Moose Development/Moose/Core/ClientMenu.lua +++ b/Moose Development/Moose/Core/ClientMenu.lua @@ -78,7 +78,7 @@ CLIENTMENU_ID = 0 --- Create an new CLIENTMENU object. -- @param #CLIENTMENU self --- @param Wrapper.Client#CLIENT Client The client for whom this entry is. +-- @param Wrapper.Client#CLIENT Client The client for whom this entry is. Leave as nil for a generic entry. -- @param #string Text Text of the F10 menu entry. -- @param #CLIENTMENU Parent The parent menu entry. -- @param #string Function (optional) Function to call when the entry is used. @@ -324,6 +324,22 @@ end -- -- Many functions can either change the tree for one client or for all clients. -- +-- ## Conceptual remarks +-- +-- There's a couple of things to fully understand: +-- +-- 1) **CLIENTMENUMANAGER** manages a set of entries from **CLIENTMENU**, it's main purpose is to administer the *shadow menu tree*, ie. a menu structure which is not +-- (yet) visible to any client +-- 2) The entries are **CLIENTMENU** objects, which are linked in a tree form. There's two ways to create them: +-- A) in the manager with ":NewEntry()" which initially +-- adds it to the shadow menu **only** +-- B) stand-alone directly as `CLIENTMENU:NewEntry()` - here it depends on whether or not you gave a CLIENT object if the entry is created as generic entry or pushed +-- a **specific** client. **Be aware** though that the entries are not managed by the CLIENTMANAGER before the next step! +-- A generic entry can be added to the manager (and the shadow tree) with `:AddEntry()` - this will also push it to all clients(!) if no client is given, or a specific client only. +-- 3) Pushing only works for alive clients. +-- 4) Live and shadow tree entries are managed via the CLIENTMENUMANAGER object. +-- 5) `Propagate()`refreshes the menu tree for all, or a single client. +-- -- ## Create a base reference tree and send to all clients -- -- local clientset = SET_CLIENT:New():FilterStart() @@ -492,7 +508,7 @@ function CLIENTMENUMANAGER:_EventHandler(EventData) return self end ---- Set this Client Manager to auto-propagate menus to newly joined players. Useful if you have **one** menu structure only. +--- Set this Client Manager to auto-propagate menus **once** to newly joined players. Useful if you have **one** menu structure only. Does not automatically push follow-up changes to the client(s). -- @param #CLIENTMENUMANAGER self -- @return #CLIENTMENUMANAGER self function CLIENTMENUMANAGER:InitAutoPropagation() @@ -507,7 +523,7 @@ function CLIENTMENUMANAGER:InitAutoPropagation() return self end ---- Create a new entry in the generic structure. +--- Create a new entry in the **generic** structure. -- @param #CLIENTMENUMANAGER self -- @param #string Text Text of the F10 menu entry. -- @param #CLIENTMENU Parent The parent menu entry. @@ -695,7 +711,7 @@ function CLIENTMENUMANAGER:Propagate(Client) return self end ---- Push a single previously created entry into the menu structure of all clients. +--- Push a single previously created entry into the F10 menu structure of all clients. -- @param #CLIENTMENUMANAGER self -- @param #CLIENTMENU Entry The entry to add. -- @param Wrapper.Client#CLIENT Client (optional) If given, make this change only for this client.