From 36d9460cdfc9423a3855aaeba9d860ab8b986f49 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 1 Nov 2023 06:19:53 +0100 Subject: [PATCH 1/9] Update Storage.lua --- 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 4ffc505da..931bd7f6b 100644 --- a/Moose Development/Moose/Wrapper/Storage.lua +++ b/Moose Development/Moose/Wrapper/Storage.lua @@ -283,7 +283,7 @@ function STORAGE:SetLiquid(Type, Amount) self:T(self.lid..string.format("Setting liquid %s to N=%d", self:GetLiquidName(Type), Amount)) - self.warehouse:setLiquid(Type, Amount) + self.warehouse:setLiquidAmount(Type, Amount) return self end From 5996426119d9ec5f5cd1efeaa585e032cb4891f3 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 1 Nov 2023 06:20:36 +0100 Subject: [PATCH 2/9] Update Storage.lua (#2035) From dc26134845e2ef0824a3ef97de3339ce1a636014 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 1 Nov 2023 06:21:56 +0100 Subject: [PATCH 3/9] Merge from master (#2036) * Update Storage.lua * Update Storage.lua (#2035) --- 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 4ffc505da..931bd7f6b 100644 --- a/Moose Development/Moose/Wrapper/Storage.lua +++ b/Moose Development/Moose/Wrapper/Storage.lua @@ -283,7 +283,7 @@ function STORAGE:SetLiquid(Type, Amount) self:T(self.lid..string.format("Setting liquid %s to N=%d", self:GetLiquidName(Type), Amount)) - self.warehouse:setLiquid(Type, Amount) + self.warehouse:setLiquidAmount(Type, Amount) return self end From 430b4a274ca894253aaa06e8c4c28f4bc53266d5 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 2 Nov 2023 01:39:40 +0100 Subject: [PATCH 4/9] Update Warehouse.lua #2033 --- Moose Development/Moose/Functional/Warehouse.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/Warehouse.lua b/Moose Development/Moose/Functional/Warehouse.lua index 8ce1752d0..beb60200f 100644 --- a/Moose Development/Moose/Functional/Warehouse.lua +++ b/Moose Development/Moose/Functional/Warehouse.lua @@ -7870,7 +7870,7 @@ function WAREHOUSE:_GetTerminal(_attribute, _category) -- Default terminal is "large". local _terminal=AIRBASE.TerminalType.OpenBig - if _attribute==WAREHOUSE.Attribute.AIR_FIGHTER then + if _attribute==WAREHOUSE.Attribute.AIR_FIGHTER or _attribute==WAREHOUSE.Attribute.AIR_UAV then -- Fighter ==> small. _terminal=AIRBASE.TerminalType.FighterAircraft elseif _attribute==WAREHOUSE.Attribute.AIR_BOMBER or _attribute==WAREHOUSE.Attribute.AIR_TRANSPORTPLANE or _attribute==WAREHOUSE.Attribute.AIR_TANKER or _attribute==WAREHOUSE.Attribute.AIR_AWACS then From 6c36910ac779320dada159a1f40aa0a73bca827e Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 2 Nov 2023 01:41:39 +0100 Subject: [PATCH 5/9] Update FlightGroup.lua #2033 --- Moose Development/Moose/Ops/FlightGroup.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/FlightGroup.lua b/Moose Development/Moose/Ops/FlightGroup.lua index 1bbd1c8bb..e203bbff3 100644 --- a/Moose Development/Moose/Ops/FlightGroup.lua +++ b/Moose Development/Moose/Ops/FlightGroup.lua @@ -4789,7 +4789,7 @@ function FLIGHTGROUP:_GetTerminal(_attribute, _category) -- Default terminal is "large". local _terminal=AIRBASE.TerminalType.OpenBig - if _attribute==FLIGHTGROUP.Attribute.AIR_FIGHTER then + if _attribute==FLIGHTGROUP.Attribute.AIR_FIGHTER or _attribute==FLIGHTGROUP.Attribute.AIR_UAV then -- Fighter ==> small. _terminal=AIRBASE.TerminalType.FighterAircraft elseif _attribute==FLIGHTGROUP.Attribute.AIR_BOMBER or _attribute==FLIGHTGROUP.Attribute.AIR_TRANSPORTPLANE or _attribute==FLIGHTGROUP.Attribute.AIR_TANKER or _attribute==FLIGHTGROUP.Attribute.AIR_AWACS then From feb99e94059433279ac19bedccf2fb3f1a863686 Mon Sep 17 00:00:00 2001 From: kaltokri Date: Thu, 2 Nov 2023 15:14:57 +0100 Subject: [PATCH 6/9] Fix for SetEngageRange documentation in AI_A2A and A2G classes --- Moose Development/Moose/AI/AI_A2A_Cap.lua | 2 +- Moose Development/Moose/AI/AI_A2A_Gci.lua | 7 ------- Moose Development/Moose/AI/AI_A2G_SEAD.lua | 1 + Moose Development/Moose/AI/AI_Air_Engage.lua | 9 +-------- Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua | 2 +- 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/Moose Development/Moose/AI/AI_A2A_Cap.lua b/Moose Development/Moose/AI/AI_A2A_Cap.lua index 0c8aff8fa..93db27a38 100644 --- a/Moose Development/Moose/AI/AI_A2A_Cap.lua +++ b/Moose Development/Moose/AI/AI_A2A_Cap.lua @@ -82,7 +82,7 @@ -- that will define when the AI will engage with the detected airborne enemy targets. -- The range can be beyond or smaller than the range of the Patrol Zone. -- The range is applied at the position of the AI. --- Use the method @{#AI_A2A_CAP.SetEngageRange}() to define that range. +-- Use the method @{AI_Air_Patrol#AI_AIR_PATROL.SetEngageRange}() to define that range. -- -- ## 4. Set the Zone of Engagement -- diff --git a/Moose Development/Moose/AI/AI_A2A_Gci.lua b/Moose Development/Moose/AI/AI_A2A_Gci.lua index e40e8513b..626e36d60 100644 --- a/Moose Development/Moose/AI/AI_A2A_Gci.lua +++ b/Moose Development/Moose/AI/AI_A2A_Gci.lua @@ -59,13 +59,6 @@ -- * **@{#AI_A2A_GCI.Destroyed}**: The AI has destroyed all bogeys @{Wrapper.Unit}s assigned in the CAS task. -- * **Status** ( Group ): The AI is checking status (fuel and damage). When the thresholds have been reached, the AI will RTB. -- --- ## 3. Set the Range of Engagement --- --- An optional range can be set in meters, --- that will define when the AI will engage with the detected airborne enemy targets. --- The range can be beyond or smaller than the range of the Patrol Zone. --- The range is applied at the position of the AI. --- -- # Developer Note -- -- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE diff --git a/Moose Development/Moose/AI/AI_A2G_SEAD.lua b/Moose Development/Moose/AI/AI_A2G_SEAD.lua index b6f9d9426..14806c2e0 100644 --- a/Moose Development/Moose/AI/AI_A2G_SEAD.lua +++ b/Moose Development/Moose/AI/AI_A2G_SEAD.lua @@ -44,6 +44,7 @@ -- that will define when the AI will engage with the detected airborne enemy targets. -- The range can be beyond or smaller than the range of the Patrol Zone. -- The range is applied at the position of the AI. +-- Use the method @{AI_Air_Patrol#AI_AIR_PATROL.SetEngageRange}() to define that range. -- -- # Developer Note -- diff --git a/Moose Development/Moose/AI/AI_Air_Engage.lua b/Moose Development/Moose/AI/AI_Air_Engage.lua index 90c20b79e..db6a0a314 100644 --- a/Moose Development/Moose/AI/AI_Air_Engage.lua +++ b/Moose Development/Moose/AI/AI_Air_Engage.lua @@ -37,14 +37,7 @@ -- -- * @{#AI_AIR_ENGAGE.New}(): Creates a new AI_AIR_ENGAGE object. -- --- ## 3. Set the Range of Engagement --- --- An optional range can be set in meters, --- that will define when the AI will engage with the detected airborne enemy targets. --- The range can be beyond or smaller than the range of the Patrol Zone. --- The range is applied at the position of the AI. --- --- ## 4. Set the Zone of Engagement +-- ## 2. Set the Zone of Engagement -- -- An optional @{Core.Zone} can be set, -- that will define when the AI will engage with the detected airborne enemy targets. diff --git a/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua b/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua index 3a9cc0522..a28d9e25b 100644 --- a/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua +++ b/Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua @@ -137,7 +137,7 @@ do -- TASK_CARGO_CSAR -- -- The cargoset "CargoSet" will embed all defined cargo of type "Pilots" (prefix) into its set. -- local CargoGroup = CARGO_GROUP:New( PilotGroup, "Pilots", "Downed Pilot", 500 ) -- - -- What is also needed, is to have a set of @{#Wrapper.Group}s defined that contains the clients of the players. + -- What is also needed, is to have a set of @{Wrapper.Group#GROUP}s defined that contains the clients of the players. -- -- -- Allocate the Transport, which are the helicopter to retrieve the pilot, that can be manned by players. -- local GroupSet = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() From bcbe872c7d1852b548c37f9f9b35c24135a77fe7 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 2 Nov 2023 18:18:49 +0100 Subject: [PATCH 7/9] #ATIS * Added coordinate for SRS * Added SRS calling out take off AND landing runway (if set) --- Moose Development/Moose/Ops/ATIS.lua | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Ops/ATIS.lua b/Moose Development/Moose/Ops/ATIS.lua index 94bd002fc..e906c5219 100644 --- a/Moose Development/Moose/Ops/ATIS.lua +++ b/Moose Development/Moose/Ops/ATIS.lua @@ -353,6 +353,7 @@ -- DEWPOINT = "Taupunkt", -- ALTIMETER = "Hoehenmesser", -- ACTIVERUN = "Aktive Startbahn", +-- ACTIVELANDING = "Aktive Landebahn", -- LEFT = "Links", -- RIGHT = "Rechts", -- RWYLENGTH = "Startbahn", @@ -721,7 +722,8 @@ ATIS.Messages = { TEMPERATURE = "Temperature", DEWPOINT = "Dew point", ALTIMETER = "Altimeter", - ACTIVERUN = "Active runway", + ACTIVERUN = "Active runway take off", + ACTIVELANDING = "Active runway landing", LEFT = "Left", RIGHT = "Right", RWYLENGTH = "Runway length", @@ -781,6 +783,7 @@ ATIS.Messages = { DEWPOINT = "Taupunkt", ALTIMETER = "Hoehenmesser", ACTIVERUN = "Aktive Startbahn", + ACTIVELANDING = "Aktive Landebahn", LEFT = "Links", RIGHT = "Rechts", RWYLENGTH = "Startbahn", @@ -841,6 +844,7 @@ ATIS.Messages = { DEWPOINT = "Punto de rocio", ALTIMETER = "Altímetro", ACTIVERUN = "Pista activa", + ACTIVELANDING = "Pista de aterrizaje activa", LEFT = "Izquierda", RIGHT = "Derecha", RWYLENGTH = "Longitud de pista", @@ -880,7 +884,7 @@ _ATIS = {} --- ATIS class version. -- @field #string version -ATIS.version = "0.10.2" +ATIS.version = "0.10.3" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO list @@ -902,6 +906,7 @@ ATIS.version = "0.10.2" -- DONE: Set magnetic variation. -- DONE: New DCS 2.7 weather presets. -- DONE: Added TextAndSound localization +-- DONE: Added SRS spelling out both take off and landing runway ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Constructor @@ -1534,6 +1539,7 @@ function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey) self.msrs:SetCoalition(self:GetCoalition()) self.msrs:SetLabel("ATIS") self.msrs:SetGoogle(GoogleKey) + self.msrs:SetCoordinate(self.airbase:GetCoordinate()) self.msrsQ = MSRSQUEUE:New("ATIS") self.msrsQ:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers) if self.dTQueueCheck<=10 then @@ -2508,6 +2514,19 @@ function ATIS:onafterBroadcast( From, Event, To ) -- Active runway. local subtitle if runwayLanding then + local actrun = self.gettext:GetEntry("ACTIVELANDING",self.locale) + --subtitle=string.format("Active runway landing %s", runwayLanding) + subtitle=string.format("%s %s", actrun, runwayTakeoff) + if rwyTakeoffLeft==true then + --subtitle=subtitle.." Left" + subtitle=subtitle.." "..self.gettext:GetEntry("LEFT",self.locale) + elseif rwyTakeoffLeft==false then + --subtitle=subtitle.." Right" + subtitle=subtitle.." "..self.gettext:GetEntry("RIGHT",self.locale) + end + alltext = alltext .. ";\n" .. subtitle + end + if runwayTakeoff then local actrun = self.gettext:GetEntry("ACTIVERUN",self.locale) --subtitle=string.format("Active runway %s", runwayLanding) subtitle=string.format("%s %s", actrun, runwayLanding) From 1093e55ea8d69015898a155043cd4dcdb1fda180 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 2 Nov 2023 18:19:55 +0100 Subject: [PATCH 8/9] #OPSGROUP #FLIGHTCONTROL * Added setting coordinate for SRS --- Moose Development/Moose/Ops/FlightControl.lua | 6 +++++- Moose Development/Moose/Ops/OpsGroup.lua | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/FlightControl.lua b/Moose Development/Moose/Ops/FlightControl.lua index 905b3d3fa..6d26c78f6 100644 --- a/Moose Development/Moose/Ops/FlightControl.lua +++ b/Moose Development/Moose/Ops/FlightControl.lua @@ -424,12 +424,14 @@ function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port, self.msrsTower=MSRS:New(PathToSRS, Frequency, Modulation) self.msrsTower:SetPort(self.Port) self.msrsTower:SetGoogle(GoogleKey) + self.msrsTower:SetCoordinate(self:GetCoordinate()) self:SetSRSTower() -- SRS for Pilot. self.msrsPilot=MSRS:New(PathToSRS, Frequency, Modulation) self.msrsPilot:SetPort(self.Port) self.msrsPilot:SetGoogle(GoogleKey) + self.msrsTower:SetCoordinate(self:GetCoordinate()) self:SetSRSPilot() -- Wait at least 10 seconds after last radio message before calling the next status update. @@ -4341,7 +4343,7 @@ function FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay) local text=self:_GetTextForSpeech(Text) -- MSRS instance to use. - local msrs=self.msrsPilot + local msrs=self.msrsPilot -- Sound.SRS#MSRS if Flight.useSRS and Flight.msrs then @@ -4361,6 +4363,8 @@ function FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay) end -- Add transmission to msrsqueue. + local coordinate = Flight:GetCoordinate(true) + msrs:SetCoordinate() self.msrsqueue:NewTransmission(text, nil, msrs, nil, 1, subgroups, Text, nil, self.frequency, self.modulation) end diff --git a/Moose Development/Moose/Ops/OpsGroup.lua b/Moose Development/Moose/Ops/OpsGroup.lua index 3ae97c282..b5eb4079c 100644 --- a/Moose Development/Moose/Ops/OpsGroup.lua +++ b/Moose Development/Moose/Ops/OpsGroup.lua @@ -2345,6 +2345,10 @@ function OPSGROUP:RadioTransmission(Text, Delay, SayCallsign, Frequency) local freq, modu, radioon=self:GetRadio() + local coord = self:GetCoordinate() + + self.msrs:SetCoordinate(coord) + if Frequency then self.msrs:SetFrequencies(Frequency) else From 7393cb2cbeea24d07a384339f14da264d6498502 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 2 Nov 2023 19:25:28 +0100 Subject: [PATCH 9/9] #ATIS * Some fixes --- Moose Development/Moose/Ops/ATIS.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Moose Development/Moose/Ops/ATIS.lua b/Moose Development/Moose/Ops/ATIS.lua index e906c5219..6eca5b64a 100644 --- a/Moose Development/Moose/Ops/ATIS.lua +++ b/Moose Development/Moose/Ops/ATIS.lua @@ -722,8 +722,8 @@ ATIS.Messages = { TEMPERATURE = "Temperature", DEWPOINT = "Dew point", ALTIMETER = "Altimeter", - ACTIVERUN = "Active runway take off", - ACTIVELANDING = "Active runway landing", + ACTIVERUN = "Active runway departure", + ACTIVELANDING = "Active runway arrival", LEFT = "Left", RIGHT = "Right", RWYLENGTH = "Runway length", @@ -2516,11 +2516,11 @@ function ATIS:onafterBroadcast( From, Event, To ) if runwayLanding then local actrun = self.gettext:GetEntry("ACTIVELANDING",self.locale) --subtitle=string.format("Active runway landing %s", runwayLanding) - subtitle=string.format("%s %s", actrun, runwayTakeoff) - if rwyTakeoffLeft==true then + subtitle=string.format("%s %s", actrun, runwayLanding) + if rwyLandingLeft==true then --subtitle=subtitle.." Left" subtitle=subtitle.." "..self.gettext:GetEntry("LEFT",self.locale) - elseif rwyTakeoffLeft==false then + elseif rwyLandingLeft==false then --subtitle=subtitle.." Right" subtitle=subtitle.." "..self.gettext:GetEntry("RIGHT",self.locale) end @@ -2529,11 +2529,11 @@ function ATIS:onafterBroadcast( From, Event, To ) if runwayTakeoff then local actrun = self.gettext:GetEntry("ACTIVERUN",self.locale) --subtitle=string.format("Active runway %s", runwayLanding) - subtitle=string.format("%s %s", actrun, runwayLanding) - if rwyLandingLeft==true then + subtitle=string.format("%s %s", actrun, runwayTakeoff) + if rwyTakeoffLeft==true then --subtitle=subtitle.." Left" subtitle=subtitle.." "..self.gettext:GetEntry("LEFT",self.locale) - elseif rwyLandingLeft==false then + elseif rwyTakeoffLeft==false then --subtitle=subtitle.." Right" subtitle=subtitle.." "..self.gettext:GetEntry("RIGHT",self.locale) end