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/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 diff --git a/Moose Development/Moose/Ops/ATIS.lua b/Moose Development/Moose/Ops/ATIS.lua index 94bd002fc..6eca5b64a 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 departure", + ACTIVELANDING = "Active runway arrival", 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,8 +2514,8 @@ function ATIS:onafterBroadcast( From, Event, To ) -- Active runway. local subtitle if runwayLanding then - local actrun = self.gettext:GetEntry("ACTIVERUN",self.locale) - --subtitle=string.format("Active runway %s", runwayLanding) + local actrun = self.gettext:GetEntry("ACTIVELANDING",self.locale) + --subtitle=string.format("Active runway landing %s", runwayLanding) subtitle=string.format("%s %s", actrun, runwayLanding) if rwyLandingLeft==true then --subtitle=subtitle.." Left" @@ -2518,6 +2524,19 @@ function ATIS:onafterBroadcast( From, Event, To ) --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, 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 end _RUNACT = subtitle if not self.useSRS then diff --git a/Moose Development/Moose/Ops/FlightControl.lua b/Moose Development/Moose/Ops/FlightControl.lua index 4b8c4fc94..663490088 100644 --- a/Moose Development/Moose/Ops/FlightControl.lua +++ b/Moose Development/Moose/Ops/FlightControl.lua @@ -455,6 +455,8 @@ function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port, -- SRS for Tower. self.msrsTower=MSRS:New(PathToSRS, Frequency, Modulation) self.msrsTower:SetPort(self.Port) + self.msrsTower:SetGoogle(GoogleKey) + self.msrsTower:SetCoordinate(self:GetCoordinate()) if GoogleKey then self.msrsTower:SetGoogle(GoogleKey) end @@ -463,6 +465,8 @@ function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port, -- SRS for Pilot. self.msrsPilot=MSRS:New(PathToSRS, Frequency, Modulation) self.msrsPilot:SetPort(self.Port) + self.msrsPilot:SetGoogle(GoogleKey) + self.msrsTower:SetCoordinate(self:GetCoordinate()) if GoogleKey then self.msrsPilot:SetGoogle(GoogleKey) end @@ -4812,6 +4816,8 @@ function FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay) local text=self:_GetTextForSpeech(Text) -- MSRS instance to use. + local msrs=self.msrsPilot -- Sound.SRS#MSRS + local msrs=self.msrsPilot if Flight.useSRS and Flight.msrs then @@ -4832,6 +4838,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/FlightGroup.lua b/Moose Development/Moose/Ops/FlightGroup.lua index e59a56a52..727acb6e2 100644 --- a/Moose Development/Moose/Ops/FlightGroup.lua +++ b/Moose Development/Moose/Ops/FlightGroup.lua @@ -4871,7 +4871,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 diff --git a/Moose Development/Moose/Ops/OpsGroup.lua b/Moose Development/Moose/Ops/OpsGroup.lua index da8b452da..e4785afee 100644 --- a/Moose Development/Moose/Ops/OpsGroup.lua +++ b/Moose Development/Moose/Ops/OpsGroup.lua @@ -2353,6 +2353,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 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