From c80213b4cfb0dc60ebed975adeb92e60d8d1cf97 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 16 Jun 2023 18:18:18 +0200 Subject: [PATCH 1/9] #AIRBOSS * Initial SRS addition --- Moose Development/Moose/Ops/Airboss.lua | 346 +++++++++++++++++------- Moose Development/Moose/Sound/SRS.lua | 19 +- Moose Development/Moose/Wrapper/Net.lua | 22 +- 3 files changed, 283 insertions(+), 104 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 99bb0ebae..d006f824c 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -152,6 +152,7 @@ -- @field #boolean ICLSon Automatic ICLS is activated. -- @field #number ICLSchannel ICLS channel. -- @field #string ICLSmorse ICLS morse code, e.g. "STN". +-- @field #AIRBOSS.Radio PilotRadio Radio for Pilot calls. -- @field #AIRBOSS.Radio LSORadio Radio for LSO calls. -- @field #number LSOFreq LSO radio frequency in MHz. -- @field #string LSOModu LSO radio modulation "AM" or "FM". @@ -1731,6 +1732,10 @@ AIRBOSS.Difficulty = { -- @field #table trapsheet Groove data table recorded every 0.5 seconds. -- @field #boolean trapon If true, save trap sheets. -- @field #string debriefschedulerID Debrief scheduler ID. +-- +-- @field Sound.SRS#MSRS SRS +-- @field Sound.SRS#MSRSQUEUE SRSQ +-- -- @extends #AIRBOSS.FlightGroup --- Main group level radio menu: F10 Other/Airboss. @@ -1743,7 +1748,7 @@ AIRBOSS.MenuF10Root = nil --- Airboss class version. -- @field #string version -AIRBOSS.version = "1.3.0" +AIRBOSS.version = "1.3.1" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO list ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -3043,12 +3048,56 @@ function AIRBOSS:SetBeaconRefresh( TimeInterval ) return self end +--- Set up SRS for usage without sound files +-- @param #AIRBOSS self +-- @param #string PathToSRS Path to SRS folder, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone". +-- @param #number Port Port of the SRS server, defaults to 5002. +-- @param #string Culture (Optional) Culture, defaults to "en-US". +-- @param #string Gender (Optional) Gender, e.g. "male" or "female". Defaults to "male". +-- @param #string Voice (Optional) Set to use a specific voice. Will **override gender and culture** settings. +-- @param #string GoogleCreds (Optional) Path to Google credentials, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone\\yourgooglekey.json". +-- @param #number Volume (Optional) E.g. 0.75. Defaults to 1.0 (loudest). +-- @param #table AltBackend (Optional) See MSRS for details. +-- @return #AIRBOSS self +function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volume,AltBackend) + -- SRS + local Frequency = self.MarshalRadio.frequency + local Modulation = self.MarshalRadio.modulation + self.SRS = MSRS:New(PathToSRS,Frequency,Modulation,Volume,AltBackend) + self.SRS:SetCoalition(self:GetCoalition()) + self.SRS:SetCoordinate(self:GetCoordinate()) + self.SRS:SetCulture(Culture or "en-US") + --self.SRS:SetFrequencies(Frequencies) + self.SRS:SetGender(Gender or "male") + self.SRS:SetPath(PathToSRS) + self.SRS:SetPort(Port or 5002) + self.SRS:SetLabel(self.MarshalRadio.alias or "AIRBOSS") + --self.SRS:SetModulations(Modulations) + if GoogleCreds then + self.SRS:SetGoogle(GoogleCreds) + end + if Voice then + self.SRS:SetVoice(Voice) + end + self.SRS:SetVolume(Volume or 1.0) + -- SRSQUEUE + self.SRSQ = MSRSQUEUE:New("AIRBOSS") + self.SRSQ:SetTransmitOnlyWithPlayers(true) + if not self.PilotRadio then + self:SetSRSPilotVoice() + end + return self +end + --- Set LSO radio frequency and modulation. Default frequency is 264 MHz AM. -- @param #AIRBOSS self -- @param #number Frequency (Optional) Frequency in MHz. Default 264 MHz. -- @param #string Modulation (Optional) Modulation, "AM" or "FM". Default "AM". +-- @param #string Voice (Optional) SRS specific voice +-- @param #string Gender (Optional) SRS specific gender +-- @param #string Culture (Optional) SRS specific culture -- @return #AIRBOSS self -function AIRBOSS:SetLSORadio( Frequency, Modulation ) +function AIRBOSS:SetLSORadio( Frequency, Modulation, Voice, Gender, Culture ) self.LSOFreq = (Frequency or 264) Modulation = Modulation or "AM" @@ -3063,6 +3112,9 @@ function AIRBOSS:SetLSORadio( Frequency, Modulation ) self.LSORadio.frequency = self.LSOFreq self.LSORadio.modulation = self.LSOModu self.LSORadio.alias = "LSO" + self.LSORadio.voice = Voice + self.LSORadio.gender = Gender or "male" + self.LSORadio.culture = Culture or "en-US" return self end @@ -3071,8 +3123,11 @@ end -- @param #AIRBOSS self -- @param #number Frequency (Optional) Frequency in MHz. Default 305 MHz. -- @param #string Modulation (Optional) Modulation, "AM" or "FM". Default "AM". +-- @param #string Voice (Optional) SRS specific voice +-- @param #string Gender (Optional) SRS specific gender +-- @param #string Culture (Optional) SRS specific culture -- @return #AIRBOSS self -function AIRBOSS:SetMarshalRadio( Frequency, Modulation ) +function AIRBOSS:SetMarshalRadio( Frequency, Modulation, Voice, Gender, Culture ) self.MarshalFreq = Frequency or 305 Modulation = Modulation or "AM" @@ -3087,6 +3142,9 @@ function AIRBOSS:SetMarshalRadio( Frequency, Modulation ) self.MarshalRadio.frequency = self.MarshalFreq self.MarshalRadio.modulation = self.MarshalModu self.MarshalRadio.alias = "MARSHAL" + self.MarshalRadio.voice = Voice + self.MarshalRadio.gender = Gender or "male" + self.MarshalRadio.culture = Culture or "en-US" return self end @@ -14588,59 +14646,129 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p if radio == nil or call == nil then return end - - -- Create a new radio transmission item. - local transmission = {} -- #AIRBOSS.Radioitem - - transmission.radio = radio - transmission.call = call - transmission.Tplay = timer.getAbsTime() + (delay or 0) - transmission.interval = interval - transmission.isplaying = false - transmission.Tstarted = nil - transmission.loud = loud and call.loud - - -- Player onboard number if sender has one. - if self:_IsOnboard( call.modexsender ) then - self:_Number2Radio( radio, call.modexsender, delay, 0.3, pilotcall ) - end - - -- Play onboard number if receiver has one. - if self:_IsOnboard( call.modexreceiver ) then - self:_Number2Radio( radio, call.modexreceiver, delay, 0.3, pilotcall ) - end - - -- Add transmission to the right queue. - local caller = "" - if radio.alias == "LSO" then - - table.insert( self.RQLSO, transmission ) - - caller = "LSOCall" - - -- Schedule radio queue checks. - if not self.RQLid then - self:T( self.lid .. string.format( "Starting LSO radio queue." ) ) - self.RQLid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQLSO, "LSO" }, 0.02, 0.05 ) + + if not self.SRS then + + -- Create a new radio transmission item. + local transmission = {} -- #AIRBOSS.Radioitem + + transmission.radio = radio + transmission.call = call + transmission.Tplay = timer.getAbsTime() + (delay or 0) + transmission.interval = interval + transmission.isplaying = false + transmission.Tstarted = nil + transmission.loud = loud and call.loud + + -- Player onboard number if sender has one. + if self:_IsOnboard( call.modexsender ) then + self:_Number2Radio( radio, call.modexsender, delay, 0.3, pilotcall ) end - - elseif radio.alias == "MARSHAL" then - - table.insert( self.RQMarshal, transmission ) - - caller = "MarshalCall" - - if not self.RQMid then - self:T( self.lid .. string.format( "Starting Marhal radio queue." ) ) - self.RQMid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQMarshal, "MARSHAL" }, 0.02, 0.05 ) + + -- Play onboard number if receiver has one. + if self:_IsOnboard( call.modexreceiver ) then + self:_Number2Radio( radio, call.modexreceiver, delay, 0.3, pilotcall ) end - + + -- Add transmission to the right queue. + local caller = "" + if radio.alias == "LSO" then + + table.insert( self.RQLSO, transmission ) + + caller = "LSOCall" + + -- Schedule radio queue checks. + if not self.RQLid then + self:T( self.lid .. string.format( "Starting LSO radio queue." ) ) + self.RQLid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQLSO, "LSO" }, 0.02, 0.05 ) + end + + elseif radio.alias == "MARSHAL" then + + table.insert( self.RQMarshal, transmission ) + + caller = "MarshalCall" + + if not self.RQMid then + self:T( self.lid .. string.format( "Starting Marhal radio queue." ) ) + self.RQMid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQMarshal, "MARSHAL" }, 0.02, 0.05 ) + end + + end + + -- Append radio click sound at the end of the transmission. + if click then + self:RadioTransmission( radio, self[caller].CLICK, false, delay ) + end + + else + -- SRS transmission + + local frequency = self.MarshalRadio.frequency + local modulation = self.MarshalRadio.modulation + local voice = nil + local gender = nil + local culture = nil + + if radio.alias == "MARSHAL" or radio.alias == "AIRBOSS" then + voice = self.MarshalRadio.voice + gender = self.MarshalRadio.gender + culture = self.MarshalRadio.culture + end + if radio.alias == "LSO" then + frequency = self.LSORadio.frequency + modulation = self.LSORadio.modulation + voice = self.LSORadio.voice + gender = self.LSORadio.gender + culture = self.LSORadio.culture + end + if pilotcall then + voice = self.PilotRadio.voice + gender = self.PilotRadio.gender + culture = self.PilotRadio.culture + radio.alias = "PILOT" + end + if not radio.alias then + -- TODO - what freq to use here? + frequency = 243 + modulation = radio.modulation.AM + radio.alias = "AIRBOSS" + end + + local volume = nil + + if loud then + volume = 1.0 + end + + --local text = tostring(call.modexreceiver).."; "..radio.alias.."; "..call.subtitle + local text = call.subtitle + self:I(text) + local srstext = string.gsub(text,"\n","; ") + self.SRSQ:NewTransmission(srstext, call.duration, self.SRS, tstart, 0.1, subgroups, call.subtitle, call.subduration, frequency, modulation, gender, culture, voice, volume, radio.alias) end +end - -- Append radio click sound at the end of the transmission. - if click then - self:RadioTransmission( radio, self[caller].CLICK, false, delay ) +--- Set SRS voice for the pilot calls. +-- @param #AIRBOSS self +-- @param #string Voice (Optional) SRS specific voice +-- @param #string Gender (Optional) SRS specific gender +-- @param #string Culture (Optional) SRS specific culture +-- @return #AIRBOSS self +function AIRBOSS:SetSRSPilotVoice( Voice, Gender, Culture ) + + self.PilotRadio = {} -- #AIRBOSS.Radio + self.PilotRadio.alias = "PILOT" + self.PilotRadio.voice = Voice or MSRS.Voices.Microsoft.David + self.PilotRadio.gender = Gender or "male" + self.PilotRadio.culture = Culture or "en-US" + + if (not Voice) and self.SRS and self.SRS.google then + self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J end + + return self end --- Check if a call needs a subtitle because the complete voice overs are not available. @@ -14920,49 +15048,81 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio -- SCHEDULER:New(nil, self.MessageToPlayer, {self, playerData, message, sender, receiver, duration, clear}, delay) self:ScheduleOnce( delay, self.MessageToPlayer, self, playerData, message, sender, receiver, duration, clear ) else - - -- Wait until previous sound finished. - local wait = 0 - - -- Onboard number to get the attention. - if receiver == playerData.onboard then - - -- Which voice over number to use. - if sender and (sender == "LSO" or sender == "MARSHAL" or sender == "AIRBOSS") then - - -- User sound of board number. - wait = wait + self:_Number2Sound( playerData, sender, receiver ) - + + if not self.SRS then + -- Wait until previous sound finished. + local wait = 0 + + -- Onboard number to get the attention. + if receiver == playerData.onboard then + + -- Which voice over number to use. + if sender and (sender == "LSO" or sender == "MARSHAL" or sender == "AIRBOSS") then + + -- User sound of board number. + wait = wait + self:_Number2Sound( playerData, sender, receiver ) + + end end + + -- Negative. + if string.find( text:lower(), "negative" ) then + local filename = self:_RadioFilename( self.MarshalCall.NEGATIVE, false, "MARSHAL" ) + USERSOUND:New( filename ):ToGroup( playerData.group, wait ) + wait = wait + self.MarshalCall.NEGATIVE.duration + end + + -- Affirm. + if string.find( text:lower(), "affirm" ) then + local filename = self:_RadioFilename( self.MarshalCall.AFFIRMATIVE, false, "MARSHAL" ) + USERSOUND:New( filename ):ToGroup( playerData.group, wait ) + wait = wait + self.MarshalCall.AFFIRMATIVE.duration + end + + -- Roger. + if string.find( text:lower(), "roger" ) then + local filename = self:_RadioFilename( self.MarshalCall.ROGER, false, "MARSHAL" ) + USERSOUND:New( filename ):ToGroup( playerData.group, wait ) + wait = wait + self.MarshalCall.ROGER.duration + end + + -- Play click sound to end message. + if wait > 0 then + local filename = self:_RadioFilename( self.MarshalCall.CLICK ) + USERSOUND:New( filename ):ToGroup( playerData.group, wait ) + end + else + -- SRS transmission + local frequency = self.MarshalRadio.frequency + local modulation = self.MarshalRadio.modulation + local voice = nil + local gender = nil + local culture = nil + + if sender == "MARSHAL" or sender == "AIRBOSS" then + voice = self.MarshalRadio.voice + gender = self.MarshalRadio.gender + culture = self.MarshalRadio.culture + end + if sender == "LSO" then + frequency = self.LSORadio.frequency + modulation = self.LSORadio.modulation + voice = self.LSORadio.voice + gender = self.LSORadio.gender + culture = self.LSORadio.culture + elseif not sender then + -- TODO - what freq to use here? + frequency = 243 + modulation = radio.modulation.AM + sender = "AIRBOSS" + end + + -- local text = tostring(receiver or "").."; "..sender.."; "..text + --local text = sender.."; "..text + self:I(text) + local srstext = string.gsub(text,"\n","; ") + self.SRSQ:NewTransmission(srstext,duration,self.SRS,tstart,0.1,subgroups,subtitle,subduration,frequency,modulation,gender,culture,voice,volume,sender) end - - -- Negative. - if string.find( text:lower(), "negative" ) then - local filename = self:_RadioFilename( self.MarshalCall.NEGATIVE, false, "MARSHAL" ) - USERSOUND:New( filename ):ToGroup( playerData.group, wait ) - wait = wait + self.MarshalCall.NEGATIVE.duration - end - - -- Affirm. - if string.find( text:lower(), "affirm" ) then - local filename = self:_RadioFilename( self.MarshalCall.AFFIRMATIVE, false, "MARSHAL" ) - USERSOUND:New( filename ):ToGroup( playerData.group, wait ) - wait = wait + self.MarshalCall.AFFIRMATIVE.duration - end - - -- Roger. - if string.find( text:lower(), "roger" ) then - local filename = self:_RadioFilename( self.MarshalCall.ROGER, false, "MARSHAL" ) - USERSOUND:New( filename ):ToGroup( playerData.group, wait ) - wait = wait + self.MarshalCall.ROGER.duration - end - - -- Play click sound to end message. - if wait > 0 then - local filename = self:_RadioFilename( self.MarshalCall.CLICK ) - USERSOUND:New( filename ):ToGroup( playerData.group, wait ) - end - -- Text message to player client. if playerData.client then MESSAGE:New( text, duration, sender, clear ):ToClient( playerData.client ) @@ -16301,7 +16461,7 @@ function AIRBOSS:_RequestSpinning( _unitName ) -- Some advice. if playerData.difficulty == AIRBOSS.Difficulty.EASY then local text = "Climb to 1200 feet and proceed to the initial again." - self:MessageToPlayer( playerData, text, "INSTRUCTOR", "" ) + self:MessageToPlayer( playerData, text, "AIRBOSS", "" ) end return diff --git a/Moose Development/Moose/Sound/SRS.lua b/Moose Development/Moose/Sound/SRS.lua index 66e942b90..62f2f1c2f 100644 --- a/Moose Development/Moose/Sound/SRS.lua +++ b/Moose Development/Moose/Sound/SRS.lua @@ -1347,6 +1347,11 @@ MSRSQUEUE = { -- @field #number interval Interval in seconds before next transmission. -- @field #boolean TransmitOnlyWithPlayers If true, only transmit if there are alive Players. -- @field Core.Set#SET_CLIENT PlayerSet PlayerSet created when TransmitOnlyWithPlayers == true +-- @field #string gender Voice gender +-- @field #string culture Voice culture +-- @field #string voice Voice if any +-- @field #number volume Volume +-- @field #string label Label to be used --- Create a new MSRSQUEUE object for a given radio frequency/modulation. -- @param #MSRSQUEUE self @@ -1426,8 +1431,13 @@ end -- @param #number subduration Duration [sec] of the subtitle being displayed. Default 5 sec. -- @param #number frequency Radio frequency if other than MSRS default. -- @param #number modulation Radio modulation if other then MSRS default. +-- @param #string gender Gender of the voice +-- @param #string culture Culture of the voice +-- @param #string voice Specific voice +-- @param #number volume Volume setting +-- @param #string label Label to be used -- @return #MSRSQUEUE.Transmission Radio transmission table. -function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgroups, subtitle, subduration, frequency, modulation) +function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgroups, subtitle, subduration, frequency, modulation, gender, culture, voice, volume, label) if self.TransmitOnlyWithPlayers then if self.PlayerSet and self.PlayerSet:CountAlive() == 0 then @@ -1462,6 +1472,11 @@ function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgr else transmission.subduration=0 --nil end + transmission.gender = gender + transmission.culture = culture + transmission.voice = voice + transmission.gender = volume + transmission.label = label -- Add transmission to queue. self:AddTransmission(transmission) @@ -1475,7 +1490,7 @@ end function MSRSQUEUE:Broadcast(transmission) if transmission.frequency then - transmission.msrs:PlayTextExt(transmission.text, nil, transmission.frequency, transmission.modulation, Gender, Culture, Voice, Volume, Label) + transmission.msrs:PlayTextExt(transmission.text, nil, transmission.frequency, transmission.modulation, transmission.gender, transmission.culture, transmission.voice, transmission.volume, transmission.label) else transmission.msrs:PlayText(transmission.text) end diff --git a/Moose Development/Moose/Wrapper/Net.lua b/Moose Development/Moose/Wrapper/Net.lua index f42c1c1ee..289d13155 100644 --- a/Moose Development/Moose/Wrapper/Net.lua +++ b/Moose Development/Moose/Wrapper/Net.lua @@ -35,6 +35,7 @@ do -- @field #number id -- @field #number side -- @field #number slot +-- @field #numner timestamp --- Encapsules multiplayer environment scripting functions from [net](https://wiki.hoggitworld.com/view/DCS_singleton_net) -- with some added FSM functions and options to block/unblock players in MP environments. @@ -205,7 +206,7 @@ function NET:_EventHandler(EventData) -- Joining if data.id == EVENTS.PlayerEnterUnit or data.id == EVENTS.PlayerEnterAircraft then - self:T(self.lid.."Pilot Joining: "..name.." | UCID: "..ucid) + self:T(self.lid.."Pilot Joining: "..name.." | UCID: "..ucid.." | Event ID: "..data.id) -- Check for blockages local blocked = self:IsAnyBlocked(ucid,name,PlayerID,PlayerSide,PlayerSlot) @@ -213,15 +214,18 @@ function NET:_EventHandler(EventData) -- block pilot local outcome = net.force_player_slot(tonumber(PlayerID), 0, '' ) else - self.KnownPilots[name] = { - name = name, - ucid = ucid, - id = PlayerID, - side = PlayerSide, - slot = PlayerSlot, - } local client = CLIENT:FindByPlayerName(name) or data.IniUnit - self:__PlayerJoined(1,client,name) + if not self.KnownPilots[name] or (self.KnownPilots[name] and TNow-self.KnownPilots[name].timestamp > 3) then + self:__PlayerJoined(1,client,name) + self.KnownPilots[name] = { + name = name, + ucid = ucid, + id = PlayerID, + side = PlayerSide, + slot = PlayerSlot, + timestamp = TNow, + } + end return self end end From a3876c296e4c3e80b2da92a461caf7a6ba1ccb31 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 17 Jun 2023 15:01:33 +0200 Subject: [PATCH 2/9] #AIRBOSS * Added option to set Airboss voice for SRS etc * Nicer read out of weather info and carrier info --- Moose Development/Moose/Ops/Airboss.lua | 154 +++++++++++++++++++----- 1 file changed, 125 insertions(+), 29 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index d006f824c..6a54177b9 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -159,6 +159,9 @@ -- @field #AIRBOSS.Radio MarshalRadio Radio for carrier calls. -- @field #number MarshalFreq Marshal radio frequency in MHz. -- @field #string MarshalModu Marshal radio modulation "AM" or "FM". +-- @field #AIRBOSS.Radio AirbossRadio Radio for carrier calls. +-- @field #number AirbossFreq Airboss radio frequency in MHz. +-- @field #string AirbossModu Airboss radio modulation "AM" or "FM". -- @field #number TowerFreq Tower radio frequency in MHz. -- @field Core.Scheduler#SCHEDULER radiotimer Radio queue scheduler. -- @field Core.Zone#ZONE_UNIT zoneCCA Carrier controlled area (CCA), i.e. a zone of 50 NM radius around the carrier. @@ -1881,6 +1884,7 @@ function AIRBOSS:New( carriername, alias ) -- Set up Airboss radio. self:SetMarshalRadio() + self:SetAirbossRadio() -- Set up LSO radio. self:SetLSORadio() @@ -3052,17 +3056,17 @@ end -- @param #AIRBOSS self -- @param #string PathToSRS Path to SRS folder, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone". -- @param #number Port Port of the SRS server, defaults to 5002. --- @param #string Culture (Optional) Culture, defaults to "en-US". --- @param #string Gender (Optional) Gender, e.g. "male" or "female". Defaults to "male". --- @param #string Voice (Optional) Set to use a specific voice. Will **override gender and culture** settings. +-- @param #string Culture (Optional, Airboss Culture) Culture, defaults to "en-US". +-- @param #string Gender (Optional, Airboss Gender) Gender, e.g. "male" or "female". Defaults to "male". +-- @param #string Voice (Optional, Airboss Voice) Set to use a specific voice. Will **override gender and culture** settings. -- @param #string GoogleCreds (Optional) Path to Google credentials, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone\\yourgooglekey.json". -- @param #number Volume (Optional) E.g. 0.75. Defaults to 1.0 (loudest). -- @param #table AltBackend (Optional) See MSRS for details. -- @return #AIRBOSS self function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volume,AltBackend) -- SRS - local Frequency = self.MarshalRadio.frequency - local Modulation = self.MarshalRadio.modulation + local Frequency = self.AirbossRadio.frequency + local Modulation = self.AirbossRadio.modulation self.SRS = MSRS:New(PathToSRS,Frequency,Modulation,Volume,AltBackend) self.SRS:SetCoalition(self:GetCoalition()) self.SRS:SetCoordinate(self:GetCoordinate()) @@ -3071,7 +3075,7 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum self.SRS:SetGender(Gender or "male") self.SRS:SetPath(PathToSRS) self.SRS:SetPort(Port or 5002) - self.SRS:SetLabel(self.MarshalRadio.alias or "AIRBOSS") + self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS") --self.SRS:SetModulations(Modulations) if GoogleCreds then self.SRS:SetGoogle(GoogleCreds) @@ -3119,7 +3123,47 @@ function AIRBOSS:SetLSORadio( Frequency, Modulation, Voice, Gender, Culture ) return self end ---- Set carrier radio frequency and modulation. Default frequency is 305 MHz AM. +--- Set Airboss radio frequency and modulation. Default frequency is Tower frequency. +-- @param #AIRBOSS self +-- @param #number Frequency (Optional) Frequency in MHz. Default frequency is Tower frequency. +-- @param #string Modulation (Optional) Modulation, "AM" or "FM". Default "AM". +-- @param #string Voice (Optional) SRS specific voice +-- @param #string Gender (Optional) SRS specific gender +-- @param #string Culture (Optional) SRS specific culture +-- @return #AIRBOSS self +-- @usage +-- -- Set single frequency +-- myairboss:SetAirbossRadio(127.5,"AM",MSRS.Voices.Google.Standard.en_GB_Standard_F) +-- +-- -- Set multiple frequencies, note you **need** to pass one modulation per frequency given! +-- myairboss:SetAirbossRadio({127.5,243},{radio.modulation.AM,radio.modulation.AM},MSRS.Voices.Google.Standard.en_GB_Standard_F) +function AIRBOSS:SetAirbossRadio( Frequency, Modulation, Voice, Gender, Culture ) + + self.AirbossFreq = Frequency or self:_GetTowerFrequency() or 127.5 + Modulation = Modulation or "AM" + + if type(Modulation) == "table" then + self.AirbossModu = Modulation + else + if Modulation == "FM" then + self.AirbossModu = radio.modulation.FM + else + self.AirbossModu = radio.modulation.AM + end + end + + self.AirbossRadio = {} -- #AIRBOSS.Radio + self.AirbossRadio.frequency = self.AirbossFreq + self.AirbossRadio.modulation = self.AirbossModu + self.AirbossRadio.alias = "AIRBOSS" + self.AirbossRadio.voice = Voice + self.AirbossRadio.gender = Gender or "male" + self.AirbossRadio.culture = Culture or "en-US" + + return self +end + +--- Set Marshal radio frequency and modulation. Default frequency is 305 MHz AM. -- @param #AIRBOSS self -- @param #number Frequency (Optional) Frequency in MHz. Default 305 MHz. -- @param #string Modulation (Optional) Modulation, "AM" or "FM". Default "AM". @@ -14711,11 +14755,20 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p local gender = nil local culture = nil - if radio.alias == "MARSHAL" or radio.alias == "AIRBOSS" then + if radio.alias == "AIRBOSS" then + frequency = self.AirbossRadio.frequency + modulation = self.AirbossRadio.modulation + voice = self.AirbossRadio.voice + gender = self.AirbossRadio.gender + culture = self.AirbossRadio.culture + end + + if radio.alias == "MARSHAL" then voice = self.MarshalRadio.voice gender = self.MarshalRadio.gender culture = self.MarshalRadio.culture end + if radio.alias == "LSO" then frequency = self.LSORadio.frequency modulation = self.LSORadio.modulation @@ -14723,16 +14776,18 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p gender = self.LSORadio.gender culture = self.LSORadio.culture end + if pilotcall then voice = self.PilotRadio.voice gender = self.PilotRadio.gender culture = self.PilotRadio.culture radio.alias = "PILOT" end + if not radio.alias then -- TODO - what freq to use here? - frequency = 243 - modulation = radio.modulation.AM + frequency = self.AirbossRadio.frequency + modulation = self.AirbossRadio.modulation radio.alias = "AIRBOSS" end @@ -14744,8 +14799,8 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p --local text = tostring(call.modexreceiver).."; "..radio.alias.."; "..call.subtitle local text = call.subtitle - self:I(text) - local srstext = string.gsub(text,"\n","; ") + self:I(self.lid..text) + local srstext = self:_GetNiceSRSText(text) self.SRSQ:NewTransmission(srstext, call.duration, self.SRS, tstart, 0.1, subgroups, call.subtitle, call.subduration, frequency, modulation, gender, culture, voice, volume, radio.alias) end end @@ -15014,6 +15069,37 @@ function AIRBOSS:_RadioFilename( call, loud, channel ) return filename end +--- Format text into SRS friendly string +-- @param #AIRBOSS self +-- @param #string text +-- @return #string text +function AIRBOSS:_GetNiceSRSText(text) + text = string.gsub(text,"================================\n","") + text = string.gsub(text,"||","parallel") + text = string.gsub(text,"==","perpendicular") + text = string.gsub(text,"BRC","Base recovery") + text = string.gsub(text,"#","Number") + text = string.gsub(text,"°C","° Celsius") + text = string.gsub(text,"°"," degrees") + text = string.gsub(text," FB "," Final bearing ") + text = string.gsub(text," ops"," operations ") + text = string.gsub(text," kts"," knots") + text = string.gsub(text,"TACAN","Tackan") + text = string.gsub(text,"ICLS","I.C.L.S.") + text = string.gsub(text,"LSO","L.S.O.") + text = string.gsub(text,"inHg","inches of Mercury") + text = string.gsub(text,"QFE","Q.F.E.") + text = string.gsub(text,"hPa","hecto pascal") + text = string.gsub(text," NM"," nautical miles") + text = string.gsub(text," ft"," feet") + text = string.gsub(text,"A/C","aircraft") + text = string.gsub(text,"%.000"," dot zero") + text = string.gsub(text,"00"," double zero") + text = string.gsub(text," 0 "," zero " ) + text = string.gsub(text,"\n","; ") + return text +end + --- Send text message to player client. -- Message format will be "SENDER: RECCEIVER, MESSAGE". -- @param #AIRBOSS self @@ -15025,7 +15111,7 @@ end -- @param #boolean clear If true, clear screen from previous messages. -- @param #number delay Delay in seconds, before the message is displayed. function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duration, clear, delay ) - + self:I({sender,receiver,message}) if playerData and message and message ~= "" then -- Default duration. @@ -15095,32 +15181,42 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio -- SRS transmission local frequency = self.MarshalRadio.frequency local modulation = self.MarshalRadio.modulation - local voice = nil - local gender = nil - local culture = nil + local voice = self.MarshalRadio.voice + local gender = self.MarshalRadio.gender + local culture = self.MarshalRadio.culture - if sender == "MARSHAL" or sender == "AIRBOSS" then - voice = self.MarshalRadio.voice - gender = self.MarshalRadio.gender - culture = self.MarshalRadio.culture + if not sender then sender = "AIRBOSS" end + + if string.find(sender,"AIRBOSS" ) then + frequency = self.AirbossRadio.frequency + modulation = self.AirbossRadio.modulation + voice = self.AirbossRadio.voice + gender = self.AirbossRadio.gender + culture = self.AirbossRadio.culture end + + --if sender == "MARSHAL" then + --voice = self.MarshalRadio.voice + --gender = self.MarshalRadio.gender + --culture = self.MarshalRadio.culture + --end + if sender == "LSO" then frequency = self.LSORadio.frequency modulation = self.LSORadio.modulation voice = self.LSORadio.voice gender = self.LSORadio.gender culture = self.LSORadio.culture - elseif not sender then + --elseif not sender then -- TODO - what freq to use here? - frequency = 243 - modulation = radio.modulation.AM - sender = "AIRBOSS" + --frequency = self.AirbossRadio.frequency + --modulation = self.AirbossRadio.modulation + --sender = "AIRBOSS" end - - -- local text = tostring(receiver or "").."; "..sender.."; "..text - --local text = sender.."; "..text - self:I(text) - local srstext = string.gsub(text,"\n","; ") + + self:I(self.lid..text) + self:I({sender,frequency,modulation,voice}) + local srstext = self:_GetNiceSRSText(text) self.SRSQ:NewTransmission(srstext,duration,self.SRS,tstart,0.1,subgroups,subtitle,subduration,frequency,modulation,gender,culture,voice,volume,sender) end -- Text message to player client. From 4e36e2011f307e268b9c8ecf6eed95fef4245895 Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sat, 20 May 2023 12:32:39 -0400 Subject: [PATCH 3/9] Add categories/attributes/properties filters for AUFTRAG transports --- Moose Development/Moose/Ops/Auftrag.lua | 11 ++++++++++- Moose Development/Moose/Ops/Commander.lua | 2 +- Moose Development/Moose/Ops/Legion.lua | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 3c967a15e..3d52dbe89 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -114,6 +114,9 @@ -- @field #number NcarriersMax Max number of required carrier assets. -- @field Core.Zone#ZONE transportDeployZone Deploy zone of an OPSTRANSPORT. -- @field Core.Zone#ZONE transportDisembarkZone Disembark zone of an OPSTRANSPORT. +-- @param #table Categories Transport group categories. +-- @field #table transportAttributes Generalized attribute(s) of transport assets. +-- @field #table transportProperties DCS attribute(s) of transport assets. -- -- @field #number artyRadius Radius in meters. -- @field #number artyShots Number of shots fired. @@ -3056,12 +3059,18 @@ end -- @param #number NcarriersMin Number of carriers *at least* required. Default 1. -- @param #number NcarriersMax Number of carriers *at most* used for transportation. Default is same as `NcarriersMin`. -- @param Core.Zone#ZONE DisembarkZone Zone where assets are disembarked to. +-- @param #table Categories Group categories. +-- @param #table Attributes Generalizes group attributes. +-- @param #table Properties DCS attributes. -- @return #AUFTRAG self -function AUFTRAG:SetRequiredTransport(DeployZone, NcarriersMin, NcarriersMax, DisembarkZone) +function AUFTRAG:SetRequiredTransport(DeployZone, NcarriersMin, NcarriersMax, DisembarkZone, Categories, Attributes, Properties) -- OPS transport from pickup to deploy zone. self.transportDeployZone=DeployZone self.transportDisembarkZone=DisembarkZone + self.transportCategories = UTILS.EnsureTable(Categories, true) + self.transportAttributes = UTILS.EnsureTable(Attributes, true) + self.transportProperties = UTILS.EnsureTable(Properties, true) -- Set required carriers. self:SetRequiredCarriers(NcarriersMin, NcarriersMax) diff --git a/Moose Development/Moose/Ops/Commander.lua b/Moose Development/Moose/Ops/Commander.lua index 16b9d43e1..13f069380 100644 --- a/Moose Development/Moose/Ops/Commander.lua +++ b/Moose Development/Moose/Ops/Commander.lua @@ -1508,7 +1508,7 @@ function COMMANDER:CheckMissionQueue() local Transport=nil local Legions=mission.transportLegions or self.legions - TransportAvail, Transport=LEGION.AssignAssetsForTransport(self, Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone) + TransportAvail, Transport=LEGION.AssignAssetsForTransport(self, Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.transportCategories, mission.transportAttributes, mission.transportProperties) -- Add opstransport to mission. if TransportAvail and Transport then diff --git a/Moose Development/Moose/Ops/Legion.lua b/Moose Development/Moose/Ops/Legion.lua index d05f456f2..ddd13d54f 100644 --- a/Moose Development/Moose/Ops/Legion.lua +++ b/Moose Development/Moose/Ops/Legion.lua @@ -714,7 +714,7 @@ function LEGION:CheckMissionQueue() local Legions=mission.transportLegions or {self} -- Assign carrier assets for transport. - TransportAvail, Transport=self:AssignAssetsForTransport(Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone) + TransportAvail, Transport=self:AssignAssetsForTransport(Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.transportCategories, mission.transportAttributes, mission.transportProperties) end -- Add opstransport to mission. From b3d46618c2180d94a4529b191caa20893ffbb1b9 Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sat, 17 Jun 2023 16:56:46 -0400 Subject: [PATCH 4/9] Missed 2 spots in Legion/Commander for transport filters. --- Moose Development/Moose/Ops/Commander.lua | 3 +-- Moose Development/Moose/Ops/Legion.lua | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Ops/Commander.lua b/Moose Development/Moose/Ops/Commander.lua index 13f069380..ff13e6bf3 100644 --- a/Moose Development/Moose/Ops/Commander.lua +++ b/Moose Development/Moose/Ops/Commander.lua @@ -1702,8 +1702,7 @@ function COMMANDER:RecruitAssetsForMission(Mission) local cohort=_cohort --Ops.Cohort#COHORT -- Check if cohort can perform transport to target. - --TODO: Option to filter transport carrier asset categories, attributes and/or properties. - local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Categories, Attributes, Properties, nil, TargetVec2) + local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.transportCategories, Mission.transportAttributes, Mission.transportProperties, nil, TargetVec2) -- MaxWeight of cargo assets is limited by the largets available cargo bay. We don't want to select, e.g., tanks that cannot be transported by APCs or helos. if can and (MaxWeight==nil or cohort.cargobayLimit>MaxWeight) then diff --git a/Moose Development/Moose/Ops/Legion.lua b/Moose Development/Moose/Ops/Legion.lua index ddd13d54f..73ea7f28e 100644 --- a/Moose Development/Moose/Ops/Legion.lua +++ b/Moose Development/Moose/Ops/Legion.lua @@ -2252,8 +2252,7 @@ function LEGION:RecruitAssetsForMission(Mission) local cohort=_cohort --Ops.Cohort#COHORT -- Check if cohort can perform transport to target. - --TODO: Option to filter transport carrier asset categories, attributes and/or properties. - local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Categories, Attributes, Properties, nil, TargetVec2) + local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.transportCategories, Mission.transportAttributes, Mission.transportProperties, nil, TargetVec2) -- MaxWeight of cargo assets is limited by the largets available cargo bay. We don't want to select, e.g., tanks that cannot be transported by APCs or helos. if can and (MaxWeight==nil or cohort.cargobayLimit>MaxWeight) then From e28477349209cd8822667ed358ff9daf89dc0497 Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sat, 17 Jun 2023 17:06:16 -0400 Subject: [PATCH 5/9] Move transport categories/etc to SetRequiredCarriers, to allow for specifying them without always needing to specify zones --- Moose Development/Moose/Ops/Auftrag.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 3d52dbe89..fa819ba0a 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -3068,12 +3068,9 @@ function AUFTRAG:SetRequiredTransport(DeployZone, NcarriersMin, NcarriersMax, Di -- OPS transport from pickup to deploy zone. self.transportDeployZone=DeployZone self.transportDisembarkZone=DisembarkZone - self.transportCategories = UTILS.EnsureTable(Categories, true) - self.transportAttributes = UTILS.EnsureTable(Attributes, true) - self.transportProperties = UTILS.EnsureTable(Properties, true) -- Set required carriers. - self:SetRequiredCarriers(NcarriersMin, NcarriersMax) + self:SetRequiredCarriers(NcarriersMin, NcarriersMax, Categories, Attributes, Properties) return self end @@ -3124,8 +3121,11 @@ end -- @param #AUFTRAG self -- @param #number NcarriersMin Number of carriers *at least* required. Default 1. -- @param #number NcarriersMax Number of carriers *at most* used for transportation. Default is same as `NcarriersMin`. +-- @param #table Categories Group categories. +-- @param #table Attributes Generalizes group attributes. +-- @param #table Properties DCS attributes. -- @return #AUFTRAG self -function AUFTRAG:SetRequiredCarriers(NcarriersMin, NcarriersMax) +function AUFTRAG:SetRequiredCarriers(NcarriersMin, NcarriersMax, Categories, Attributes, Properties) self.NcarriersMin=NcarriersMin or 1 @@ -3136,6 +3136,10 @@ function AUFTRAG:SetRequiredCarriers(NcarriersMin, NcarriersMax) self.NcarriersMax=self.NcarriersMin end + self.transportCategories = UTILS.EnsureTable(Categories, true) + self.transportAttributes = UTILS.EnsureTable(Attributes, true) + self.transportProperties = UTILS.EnsureTable(Properties, true) + return self end From 2a11c4c98aad99f2762d949149628943c2ad7f35 Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sat, 17 Jun 2023 17:07:56 -0400 Subject: [PATCH 6/9] Rename AUFTRAG.transportCategories/etc to carrierCategories/etc --- Moose Development/Moose/Ops/Auftrag.lua | 6 +++--- Moose Development/Moose/Ops/Commander.lua | 4 ++-- Moose Development/Moose/Ops/Legion.lua | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index fa819ba0a..039056886 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -3136,9 +3136,9 @@ function AUFTRAG:SetRequiredCarriers(NcarriersMin, NcarriersMax, Categories, Att self.NcarriersMax=self.NcarriersMin end - self.transportCategories = UTILS.EnsureTable(Categories, true) - self.transportAttributes = UTILS.EnsureTable(Attributes, true) - self.transportProperties = UTILS.EnsureTable(Properties, true) + self.carrierCategories = UTILS.EnsureTable(Categories, true) + self.carrierAttributes = UTILS.EnsureTable(Attributes, true) + self.carrierProperties = UTILS.EnsureTable(Properties, true) return self end diff --git a/Moose Development/Moose/Ops/Commander.lua b/Moose Development/Moose/Ops/Commander.lua index ff13e6bf3..0af40ed2d 100644 --- a/Moose Development/Moose/Ops/Commander.lua +++ b/Moose Development/Moose/Ops/Commander.lua @@ -1508,7 +1508,7 @@ function COMMANDER:CheckMissionQueue() local Transport=nil local Legions=mission.transportLegions or self.legions - TransportAvail, Transport=LEGION.AssignAssetsForTransport(self, Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.transportCategories, mission.transportAttributes, mission.transportProperties) + TransportAvail, Transport=LEGION.AssignAssetsForTransport(self, Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.carrierCategories, mission.carrierAttributes, mission.carrierProperties) -- Add opstransport to mission. if TransportAvail and Transport then @@ -1702,7 +1702,7 @@ function COMMANDER:RecruitAssetsForMission(Mission) local cohort=_cohort --Ops.Cohort#COHORT -- Check if cohort can perform transport to target. - local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.transportCategories, Mission.transportAttributes, Mission.transportProperties, nil, TargetVec2) + local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.carrierCategories, Mission.carrierAttributes, Mission.carrierProperties, nil, TargetVec2) -- MaxWeight of cargo assets is limited by the largets available cargo bay. We don't want to select, e.g., tanks that cannot be transported by APCs or helos. if can and (MaxWeight==nil or cohort.cargobayLimit>MaxWeight) then diff --git a/Moose Development/Moose/Ops/Legion.lua b/Moose Development/Moose/Ops/Legion.lua index 73ea7f28e..15cad88be 100644 --- a/Moose Development/Moose/Ops/Legion.lua +++ b/Moose Development/Moose/Ops/Legion.lua @@ -714,7 +714,7 @@ function LEGION:CheckMissionQueue() local Legions=mission.transportLegions or {self} -- Assign carrier assets for transport. - TransportAvail, Transport=self:AssignAssetsForTransport(Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.transportCategories, mission.transportAttributes, mission.transportProperties) + TransportAvail, Transport=self:AssignAssetsForTransport(Legions, assets, mission.NcarriersMin, mission.NcarriersMax, mission.transportDeployZone, mission.transportDisembarkZone, mission.carrierCategories, mission.carrierAttributes, mission.carrierProperties) end -- Add opstransport to mission. @@ -2252,7 +2252,7 @@ function LEGION:RecruitAssetsForMission(Mission) local cohort=_cohort --Ops.Cohort#COHORT -- Check if cohort can perform transport to target. - local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.transportCategories, Mission.transportAttributes, Mission.transportProperties, nil, TargetVec2) + local can=LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.carrierCategories, Mission.carrierAttributes, Mission.carrierProperties, nil, TargetVec2) -- MaxWeight of cargo assets is limited by the largets available cargo bay. We don't want to select, e.g., tanks that cannot be transported by APCs or helos. if can and (MaxWeight==nil or cohort.cargobayLimit>MaxWeight) then From 92f81614ba34002b45f1e89496910b1e393174c9 Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sat, 17 Jun 2023 17:09:50 -0400 Subject: [PATCH 7/9] Update/fix lua docs for new AUFTRAG transport fields --- Moose Development/Moose/Ops/Auftrag.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 039056886..17c33d13f 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -114,9 +114,9 @@ -- @field #number NcarriersMax Max number of required carrier assets. -- @field Core.Zone#ZONE transportDeployZone Deploy zone of an OPSTRANSPORT. -- @field Core.Zone#ZONE transportDisembarkZone Disembark zone of an OPSTRANSPORT. --- @param #table Categories Transport group categories. --- @field #table transportAttributes Generalized attribute(s) of transport assets. --- @field #table transportProperties DCS attribute(s) of transport assets. +-- @param #table carrierCategories Transport group categories. +-- @field #table carrierAttributes Generalized attribute(s) of transport assets. +-- @field #table carrierProperties DCS attribute(s) of transport assets. -- -- @field #number artyRadius Radius in meters. -- @field #number artyShots Number of shots fired. From 9c1acc731a241f95a452960f4b6c2e8e79047f89 Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sat, 17 Jun 2023 17:32:49 -0400 Subject: [PATCH 8/9] Make Attributes parameter documentation conform to other similar descriptions --- Moose Development/Moose/Ops/Auftrag.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 17c33d13f..00fb6ddbd 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -3122,7 +3122,7 @@ end -- @param #number NcarriersMin Number of carriers *at least* required. Default 1. -- @param #number NcarriersMax Number of carriers *at most* used for transportation. Default is same as `NcarriersMin`. -- @param #table Categories Group categories. --- @param #table Attributes Generalizes group attributes. +-- @param #table Attributes Group attributes. See `GROUP.Attribute.` -- @param #table Properties DCS attributes. -- @return #AUFTRAG self function AUFTRAG:SetRequiredCarriers(NcarriersMin, NcarriersMax, Categories, Attributes, Properties) From 0577e5171bbfcc6a18de5d1b9741ba3a9df42907 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 18 Jun 2023 12:19:28 +0200 Subject: [PATCH 9/9] #AIRBOSS * SRS: Remove lines starting with # from being spelled out --- Moose Development/Moose/Ops/Airboss.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 6a54177b9..3ede4bd16 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -15078,7 +15078,8 @@ function AIRBOSS:_GetNiceSRSText(text) text = string.gsub(text,"||","parallel") text = string.gsub(text,"==","perpendicular") text = string.gsub(text,"BRC","Base recovery") - text = string.gsub(text,"#","Number") + --text = string.gsub(text,"#","Number") + text = string.gsub(text,"%((%a+)%)","Morse %1") text = string.gsub(text,"°C","° Celsius") text = string.gsub(text,"°"," degrees") text = string.gsub(text," FB "," Final bearing ") @@ -15093,6 +15094,7 @@ function AIRBOSS:_GetNiceSRSText(text) text = string.gsub(text," NM"," nautical miles") text = string.gsub(text," ft"," feet") text = string.gsub(text,"A/C","aircraft") + text = string.gsub(text,"(#[%a%d%p%s]+)\n","") text = string.gsub(text,"%.000"," dot zero") text = string.gsub(text,"00"," double zero") text = string.gsub(text," 0 "," zero " )