Merge branch 'FF/Ops' into FF/OpsDev

This commit is contained in:
Frank 2023-11-02 20:33:53 +01:00
commit 23947b7c30
10 changed files with 41 additions and 23 deletions

View File

@ -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
--

View File

@ -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

View File

@ -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
--

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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