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 1/4] 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 6c36910ac779320dada159a1f40aa0a73bca827e Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 2 Nov 2023 01:41:39 +0100 Subject: [PATCH 2/4] 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 1093e55ea8d69015898a155043cd4dcdb1fda180 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 2 Nov 2023 18:19:55 +0100 Subject: [PATCH 3/4] #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 5a583671a70b9df45015ba459dc5bf64c2d666d7 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 3 Nov 2023 13:38:37 +0100 Subject: [PATCH 4/4] #SRS - Improvements, set also a coordinate --- Moose Development/Moose/Ops/Airboss.lua | 81 ++++++++++----------- Moose Development/Moose/Ops/Awacs.lua | 13 +++- Moose Development/Moose/Ops/PlayerRecce.lua | 49 ++++++++++++- Moose Development/Moose/Ops/PlayerTask.lua | 10 ++- 4 files changed, 104 insertions(+), 49 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index d7250de3e..efdbfbbb7 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -1730,10 +1730,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. @@ -1746,7 +1746,7 @@ AIRBOSS.MenuF10Root = nil --- Airboss class version. -- @field #string version -AIRBOSS.version = "1.3.2" +AIRBOSS.version = "1.3.3" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO list ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -3053,7 +3053,7 @@ end -- @param #number Port Port of the SRS server, defaults to 5002. -- @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 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. @@ -3071,6 +3071,7 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum self.SRS:SetPath(PathToSRS) self.SRS:SetPort(Port or 5002) self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS") + self.SRS:SetCoordinate(self.carrier:GetCoordinate()) --self.SRS:SetModulations(Modulations) if GoogleCreds then self.SRS:SetGoogle(GoogleCreds) @@ -3082,10 +3083,10 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum -- SRSQUEUE self.SRSQ = MSRSQUEUE:New("AIRBOSS") self.SRSQ:SetTransmitOnlyWithPlayers(true) - if not self.PilotRadio then + if not self.PilotRadio then self:SetSRSPilotVoice() end - return self + return self end --- Set LSO radio frequency and modulation. Default frequency is 264 MHz AM. @@ -10266,7 +10267,7 @@ function AIRBOSS:_GetSternCoord() elseif case==2 or case==1 then -- V/Stol: Translate 8 meters port. self.sterncoord:Translate(self.carrierparam.sterndist, hdg, true, true):Translate(8, FB-90, true, true) - end + end elseif self.carriertype==AIRBOSS.CarrierType.STENNIS then -- Stennis: translate 7 meters starboard wrt Final bearing. self.sterncoord:Translate( self.carrierparam.sterndist, hdg, true, true ):Translate( 7, FB + 90, true, true ) @@ -11553,7 +11554,7 @@ function AIRBOSS:GetHeadingIntoWind_old( magnetic, coord ) local function adjustDegreesForWindSpeed(windSpeed) local degreesAdjustment = 0 -- the windspeeds are in m/s - + -- +0 degrees at 15m/s = 37kts -- +0 degrees at 14m/s = 35kts -- +0 degrees at 13m/s = 33kts @@ -11568,7 +11569,7 @@ function AIRBOSS:GetHeadingIntoWind_old( magnetic, coord ) -- +20 degrees at 4m/s = 26kts -- +20 degrees at 3m/s = 26kts -- +30 degrees at 2m/s = 26kts 1s - + if windSpeed > 0 and windSpeed < 3 then degreesAdjustment = 30 elseif windSpeed >= 3 and windSpeed < 5 then @@ -11580,7 +11581,7 @@ function AIRBOSS:GetHeadingIntoWind_old( magnetic, coord ) elseif windSpeed >= 13 then degreesAdjustment = 0 end - + return degreesAdjustment end @@ -14824,12 +14825,12 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p if radio == nil or call == nil then return end - + 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) @@ -14837,12 +14838,12 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p 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 ) @@ -14885,16 +14886,12 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p -- SRS transmission if call.subtitle ~= nil and string.len(call.subtitle) > 1 then - - 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 == "AIRBOSS" then frequency = self.AirbossRadio.frequency modulation = self.AirbossRadio.modulation @@ -14902,13 +14899,13 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p 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 @@ -14916,7 +14913,7 @@ 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 @@ -14930,18 +14927,18 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p modulation = self.AirbossRadio.modulation 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(self.lid..text) + self:T(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) + self.SRSQ:NewTransmission(srstext, call.duration, self.SRS, nil, 0.1, nil, call.subtitle, call.subduration, frequency, modulation, gender, culture, voice, volume, radio.alias) end end end @@ -15254,7 +15251,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}) + self:T({sender,receiver,message}) if playerData and message and message ~= "" then -- Default duration. @@ -15277,44 +15274,44 @@ 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 - + 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 ) @@ -15327,7 +15324,7 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio local voice = self.MarshalRadio.voice local gender = self.MarshalRadio.gender local culture = self.MarshalRadio.culture - + if not sender then sender = "AIRBOSS" end if string.find(sender,"AIRBOSS" ) then @@ -15357,10 +15354,10 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio --sender = "AIRBOSS" end - self:I(self.lid..text) - self:I({sender,frequency,modulation,voice}) + self:T(self.lid..text) + self:T({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) + self.SRSQ:NewTransmission(srstext,duration,self.SRS,nil,0.1,nil,nil,nil,frequency,modulation,gender,culture,voice,nil,sender) end -- Text message to player client. if playerData.client then diff --git a/Moose Development/Moose/Ops/Awacs.lua b/Moose Development/Moose/Ops/Awacs.lua index 5bff6cc86..88569b7e1 100644 --- a/Moose Development/Moose/Ops/Awacs.lua +++ b/Moose Development/Moose/Ops/Awacs.lua @@ -507,7 +507,7 @@ do -- @field #AWACS AWACS = { ClassName = "AWACS", -- #string - version = "0.2.57", -- #string + version = "0.2.58", -- #string lid = "", -- #string coalition = coalition.side.BLUE, -- #number coalitiontxt = "blue", -- #string @@ -971,6 +971,7 @@ AWACS.TaskStatus = { -- DONE - (WIP) Reporting -- DONE - Do not report non-airborne groups -- DONE - Added option for helos +-- DONE - Added setting a coordinate for SRS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Constructor @@ -6191,6 +6192,16 @@ function AWACS:onafterStatus(From, Event, To) -- Check on AUFTRAG status for CAP AI if self:Is("Running") and (awacsalive or self.AwacsInZone) then + + -- update coord for SRS + + if self.AwacsSRS then + self.AwacsSRS:SetCoordinate(self.AwacsFG:GetCoordinate()) + if self.TacticalSRS then + self.TacticalSRS:SetCoordinate(self.AwacsFG:GetCoordinate()) + end + end + self:_CheckAICAPOnStation() self:_CleanUpContacts() diff --git a/Moose Development/Moose/Ops/PlayerRecce.lua b/Moose Development/Moose/Ops/PlayerRecce.lua index 120afb451..e225c96fe 100644 --- a/Moose Development/Moose/Ops/PlayerRecce.lua +++ b/Moose Development/Moose/Ops/PlayerRecce.lua @@ -104,7 +104,7 @@ PLAYERRECCE = { ClassName = "PLAYERRECCE", verbose = true, lid = nil, - version = "0.0.18", + version = "0.0.19", ViewZone = {}, ViewZoneVisual = {}, ViewZoneLaser = {}, @@ -1524,8 +1524,12 @@ function PLAYERRECCE:onafterRecceOnStation(From, Event, To, Client, Playername) end if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(text1,nil,self.SRS,nil,2) - self.SRSQueue:NewTransmission(text2tts,nil,self.SRS,nil,2) + self.SRSQueue:NewTransmission(text2tts,nil,self.SRS,nil,3) MESSAGE:New(text2,10,self.Name or "FACA"):ToCoalition(self.Coalition) else MESSAGE:New(text1,10,self.Name or "FACA"):ToClient(Client) @@ -1560,8 +1564,12 @@ function PLAYERRECCE:onafterRecceOffStation(From, Event, To, Client, Playername) local text1 = "Going home!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(text1,nil,self.SRS,nil,2) - self.SRSQueue:NewTransmission(texttts,nil,self.SRS,nil,2) + self.SRSQueue:NewTransmission(texttts,nil,self.SRS,nil,3) MESSAGE:New(text,10,self.Name or "FACA"):ToCoalition(self.Coalition) else MESSAGE:New(text,10,self.Name or "FACA"):ToCoalition(self.Coalition) @@ -1617,6 +1625,9 @@ function PLAYERRECCE:onafterTargetDetected(From, Event, To, Targetsbyclock, Clie local ttstext = string.format("Target! %s! %s oh clock, %d %s!", ThreatTxt, i, targetdistance, dunits) if self.UseSRS then local grp = Client:GetGroup() + if clientcoord then + self.SRS:SetCoordinate(clientcoord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1653,6 +1664,10 @@ function PLAYERRECCE:onafterTargetDetected(From, Event, To, Targetsbyclock, Clie local ttstext = string.format("%d targets! %s oh clock, %d %s!", targetno, i, targetdistance, dunits) if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1694,6 +1709,10 @@ function PLAYERRECCE:onafterIllumination(From, Event, To, Client, Playername, Ta local ttstext = "Sunshine!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1733,6 +1752,10 @@ function PLAYERRECCE:onafterTargetsSmoked(From, Event, To, Client, Playername, T local ttstext = "Smoke and Mirrors!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1772,6 +1795,10 @@ function PLAYERRECCE:onafterTargetsFlared(From, Event, To, Client, Playername, T local ttstext = "Fire works!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1817,6 +1844,10 @@ function PLAYERRECCE:onafterTargetLasing(From, Event, To, Client, Target, Laserc local ttstext = "Laser on!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1861,6 +1892,10 @@ function PLAYERRECCE:onafterShack(From, Event, To, Client, Target, Targettype) local ttstext = "Shack!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1904,6 +1939,10 @@ function PLAYERRECCE:onafterTargetLOSLost(From, Event, To, Client, Target) local ttstext = "Lost L O S!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) @@ -1952,6 +1991,10 @@ function PLAYERRECCE:onafterTargetReportSent(From, Event, To, Client, TargetSet) local text = "Upload completed!" if self.UseSRS then local grp = Client:GetGroup() + local coord = grp:GetCoordinate() + if coord then + self.SRS:SetCoordinate(coord) + end self.SRSQueue:NewTransmission(text,nil,self.SRS,nil,1,{grp},text,10) else MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) diff --git a/Moose Development/Moose/Ops/PlayerTask.lua b/Moose Development/Moose/Ops/PlayerTask.lua index 71a680cb4..c840f5538 100644 --- a/Moose Development/Moose/Ops/PlayerTask.lua +++ b/Moose Development/Moose/Ops/PlayerTask.lua @@ -98,7 +98,7 @@ PLAYERTASK = { --- PLAYERTASK class version. -- @field #string version -PLAYERTASK.version="0.1.21" +PLAYERTASK.version="0.1.22" --- Generic task condition. -- @type PLAYERTASK.Condition @@ -935,7 +935,7 @@ end do ------------------------------------------------------------------------------------------------------------------- -- PLAYERTASKCONTROLLER --- TODO: PLAYERTASKCONTROLLER + -- TODO: PLAYERTASKCONTROLLER -- DONE Playername customized -- DONE Coalition-level screen info to SET based -- DONE Flash directions @@ -4003,8 +4003,9 @@ end -- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS. -- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest) -- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS +-- @param Core.Point#COORDINATE Coordinate Coordinate from which the controller radio is sending -- @return #PLAYERTASKCONTROLLER self -function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey) +function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,Coordinate) self:T(self.lid.."SetSRS") self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone" -- self.Gender = Gender or "male" -- @@ -4029,6 +4030,9 @@ function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Cultu if self.PathToGoogleKey then self.SRS:SetGoogle(self.PathToGoogleKey) end + if Coordinate then + self.SRS:SetCoordinate(Coordinate) + end self.SRSQueue = MSRSQUEUE:New(self.MenuName or self.Name) self.SRSQueue:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers) return self