Merge branch 'develop' into FF/Ops

This commit is contained in:
Frank 2023-11-07 00:05:16 +01:00
commit 7306cc1102
13 changed files with 213 additions and 111 deletions

View File

@ -82,7 +82,7 @@
-- that will define when the AI will engage with the detected airborne enemy targets. -- 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 can be beyond or smaller than the range of the Patrol Zone.
-- The range is applied at the position of the AI. -- The range is applied at the position of the AI.
-- Use the method @{AI_Air_Patrol#AI_AIR_PATROL.SetEngageRange}() to define that range. -- Use the method @{#AI_A2A_CAP.SetEngageRange}() to define that range.
-- --
-- ## 4. Set the Zone of Engagement -- ## 4. Set the Zone of Engagement
-- --

View File

@ -44,7 +44,7 @@
-- that will define when the AI will engage with the detected airborne enemy targets. -- 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 can be beyond or smaller than the range of the Patrol Zone.
-- The range is applied at the position of the AI. -- The range is applied at the position of the AI.
-- Use the method @{AI_Air_Patrol#AI_AIR_PATROL.SetEngageRange}() to define that range. -- Use the method @{#AI_AIR_PATROL.SetEngageRange}() to define that range.
-- --
-- # Developer Note -- # Developer Note
-- --

View File

@ -79,7 +79,7 @@
-- that will define when the AI will engage with the detected airborne enemy targets. -- 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 can be beyond or smaller than the range of the Patrol Zone.
-- The range is applied at the position of the AI. -- The range is applied at the position of the AI.
-- Use the method @{AI.AI_CAP#AI_AIR_PATROL.SetEngageRange}() to define that range. -- Use the method @{#AI_AIR_PATROL.SetEngageRange}() to define that range.
-- --
-- # Developer Note -- # Developer Note
-- --

View File

@ -1080,9 +1080,9 @@ function EVENT:onEvent( Event )
if Event.initiator then if Event.initiator then
Event.IniObjectCategory = Event.initiator:getCategory() Event.IniObjectCategory = Object.getCategory(Event.initiator) --Event.initiator:getCategory()
if Event.IniObjectCategory == Object.Category.STATIC then if Event.IniObjectCategory == Object.Category.STATIC then
--- ---
-- Static -- Static
--- ---
@ -1119,9 +1119,8 @@ function EVENT:onEvent( Event )
if Unit then if Unit then
Event.IniObjectCategory = Object.Category.UNIT Event.IniObjectCategory = Object.Category.UNIT
end end
end
if Event.IniObjectCategory == Object.Category.UNIT then elseif Event.IniObjectCategory == Object.Category.UNIT then
--- ---
-- Unit -- Unit
--- ---
@ -1147,9 +1146,8 @@ function EVENT:onEvent( Event )
Event.IniCoalition = Event.IniDCSUnit:getCoalition() Event.IniCoalition = Event.IniDCSUnit:getCoalition()
Event.IniTypeName = Event.IniDCSUnit:getTypeName() Event.IniTypeName = Event.IniDCSUnit:getTypeName()
Event.IniCategory = Event.IniDCSUnit:getDesc().category Event.IniCategory = Event.IniDCSUnit:getDesc().category
end
if Event.IniObjectCategory == Object.Category.CARGO then elseif Event.IniObjectCategory == Object.Category.CARGO then
--- ---
-- Cargo -- Cargo
--- ---
@ -1160,9 +1158,8 @@ function EVENT:onEvent( Event )
Event.IniCoalition = Event.IniDCSUnit:getCoalition() Event.IniCoalition = Event.IniDCSUnit:getCoalition()
Event.IniCategory = Event.IniDCSUnit:getDesc().category Event.IniCategory = Event.IniDCSUnit:getDesc().category
Event.IniTypeName = Event.IniDCSUnit:getTypeName() Event.IniTypeName = Event.IniDCSUnit:getTypeName()
end
if Event.IniObjectCategory == Object.Category.SCENERY then elseif Event.IniObjectCategory == Object.Category.SCENERY then
--- ---
-- Scenery -- Scenery
--- ---
@ -1172,9 +1169,8 @@ function EVENT:onEvent( Event )
Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator ) Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator )
Event.IniCategory = Event.IniDCSUnit:getDesc().category Event.IniCategory = Event.IniDCSUnit:getDesc().category
Event.IniTypeName = Event.initiator:isExist() and Event.IniDCSUnit:getTypeName() or "SCENERY" Event.IniTypeName = Event.initiator:isExist() and Event.IniDCSUnit:getTypeName() or "SCENERY"
end
if Event.IniObjectCategory == Object.Category.BASE then elseif Event.IniObjectCategory == Object.Category.BASE then
--- ---
-- Base Object -- Base Object
--- ---
@ -1201,9 +1197,12 @@ function EVENT:onEvent( Event )
--- ---
-- Target category. -- Target category.
Event.TgtObjectCategory = Event.target:getCategory() Event.TgtObjectCategory = Object.getCategory(Event.target) --Event.target:getCategory()
if Event.TgtObjectCategory == Object.Category.UNIT then if Event.TgtObjectCategory == Object.Category.UNIT then
---
-- UNIT
---
Event.TgtDCSUnit = Event.target Event.TgtDCSUnit = Event.target
Event.TgtDCSGroup = Event.TgtDCSUnit:getGroup() Event.TgtDCSGroup = Event.TgtDCSUnit:getGroup()
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName() Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
@ -1219,10 +1218,11 @@ function EVENT:onEvent( Event )
Event.TgtCoalition = Event.TgtDCSUnit:getCoalition() Event.TgtCoalition = Event.TgtDCSUnit:getCoalition()
Event.TgtCategory = Event.TgtDCSUnit:getDesc().category Event.TgtCategory = Event.TgtDCSUnit:getDesc().category
Event.TgtTypeName = Event.TgtDCSUnit:getTypeName() Event.TgtTypeName = Event.TgtDCSUnit:getTypeName()
end
if Event.TgtObjectCategory == Object.Category.STATIC then elseif Event.TgtObjectCategory == Object.Category.STATIC then
-- get base data ---
-- STATIC
---
Event.TgtDCSUnit = Event.target Event.TgtDCSUnit = Event.target
if Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object if Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName() Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
@ -1249,9 +1249,11 @@ function EVENT:onEvent( Event )
Event.TgtTypeName = "Static" Event.TgtTypeName = "Static"
end end
end end
end
if Event.TgtObjectCategory == Object.Category.SCENERY then elseif Event.TgtObjectCategory == Object.Category.SCENERY then
---
-- SCENERY
---
Event.TgtDCSUnit = Event.target Event.TgtDCSUnit = Event.target
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName() Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
Event.TgtUnitName = Event.TgtDCSUnitName Event.TgtUnitName = Event.TgtDCSUnitName

View File

@ -521,7 +521,11 @@ end
function MESSAGE:ToSRS(frequency,modulation,gender,culture,voice,coalition,volume,coordinate) function MESSAGE:ToSRS(frequency,modulation,gender,culture,voice,coalition,volume,coordinate)
if _MESSAGESRS.SRSQ then if _MESSAGESRS.SRSQ then
_MESSAGESRS.MSRS:SetVoice(voice or _MESSAGESRS.Voice) _MESSAGESRS.MSRS:SetVoice(voice or _MESSAGESRS.Voice)
_MESSAGESRS.SRSQ:NewTransmission(self.MessageText,nil,_MESSAGESRS.MSRS,nil,nil,nil,nil,nil,frequency,modulation,gender or _MESSAGESRS.Gender,culture or _MESSAGESRS.Culture,voice or _MESSAGESRS.Voice,volume,self.MessageCategory) if coordinate then
_MESSAGESRS.MSRS:SetCoordinate(coordinate)
end
local category = string.gsub(self.MessageCategory,":","")
_MESSAGESRS.SRSQ:NewTransmission(self.MessageText,nil,_MESSAGESRS.MSRS,nil,nil,nil,nil,nil,frequency,modulation,gender or _MESSAGESRS.Gender,culture or _MESSAGESRS.Culture,voice or _MESSAGESRS.Voice,volume,category,coordinate)
end end
return self return self
end end

View File

@ -1746,7 +1746,7 @@ AIRBOSS.MenuF10Root = nil
--- Airboss class version. --- Airboss class version.
-- @field #string version -- @field #string version
AIRBOSS.version = "1.3.2" AIRBOSS.version = "1.3.3"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -3071,6 +3071,7 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
self.SRS:SetPath(PathToSRS) self.SRS:SetPath(PathToSRS)
self.SRS:SetPort(Port or 5002) self.SRS:SetPort(Port or 5002)
self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS") self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS")
self.SRS:SetCoordinate(self.carrier:GetCoordinate())
--self.SRS:SetModulations(Modulations) --self.SRS:SetModulations(Modulations)
if GoogleCreds then if GoogleCreds then
self.SRS:SetGoogle(GoogleCreds) self.SRS:SetGoogle(GoogleCreds)
@ -10266,7 +10267,7 @@ function AIRBOSS:_GetSternCoord()
elseif case==2 or case==1 then elseif case==2 or case==1 then
-- V/Stol: Translate 8 meters port. -- V/Stol: Translate 8 meters port.
self.sterncoord:Translate(self.carrierparam.sterndist, hdg, true, true):Translate(8, FB-90, true, true) self.sterncoord:Translate(self.carrierparam.sterndist, hdg, true, true):Translate(8, FB-90, true, true)
end end
elseif self.carriertype==AIRBOSS.CarrierType.STENNIS then elseif self.carriertype==AIRBOSS.CarrierType.STENNIS then
-- Stennis: translate 7 meters starboard wrt Final bearing. -- Stennis: translate 7 meters starboard wrt Final bearing.
self.sterncoord:Translate( self.carrierparam.sterndist, hdg, true, true ):Translate( 7, FB + 90, true, true ) self.sterncoord:Translate( self.carrierparam.sterndist, hdg, true, true ):Translate( 7, FB + 90, true, true )
@ -14885,10 +14886,6 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
-- SRS transmission -- SRS transmission
if call.subtitle ~= nil and string.len(call.subtitle) > 1 then if call.subtitle ~= nil and string.len(call.subtitle) > 1 then
else
-- SRS transmission
local frequency = self.MarshalRadio.frequency local frequency = self.MarshalRadio.frequency
local modulation = self.MarshalRadio.modulation local modulation = self.MarshalRadio.modulation
local voice = nil local voice = nil
@ -14939,9 +14936,9 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
--local text = tostring(call.modexreceiver).."; "..radio.alias.."; "..call.subtitle --local text = tostring(call.modexreceiver).."; "..radio.alias.."; "..call.subtitle
local text = call.subtitle local text = call.subtitle
self:I(self.lid..text) self:T(self.lid..text)
local srstext = self:_GetNiceSRSText(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 end
end end
@ -15254,7 +15251,7 @@ end
-- @param #boolean clear If true, clear screen from previous messages. -- @param #boolean clear If true, clear screen from previous messages.
-- @param #number delay Delay in seconds, before the message is displayed. -- @param #number delay Delay in seconds, before the message is displayed.
function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duration, clear, delay ) 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 if playerData and message and message ~= "" then
-- Default duration. -- Default duration.
@ -15357,10 +15354,10 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio
--sender = "AIRBOSS" --sender = "AIRBOSS"
end end
self:I(self.lid..text) self:T(self.lid..text)
self:I({sender,frequency,modulation,voice}) self:T({sender,frequency,modulation,voice})
local srstext = self:_GetNiceSRSText(text) 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 end
-- Text message to player client. -- Text message to player client.
if playerData.client then if playerData.client then

View File

@ -507,7 +507,7 @@ do
-- @field #AWACS -- @field #AWACS
AWACS = { AWACS = {
ClassName = "AWACS", -- #string ClassName = "AWACS", -- #string
version = "0.2.57", -- #string version = "0.2.58", -- #string
lid = "", -- #string lid = "", -- #string
coalition = coalition.side.BLUE, -- #number coalition = coalition.side.BLUE, -- #number
coalitiontxt = "blue", -- #string coalitiontxt = "blue", -- #string
@ -971,6 +971,7 @@ AWACS.TaskStatus = {
-- DONE - (WIP) Reporting -- DONE - (WIP) Reporting
-- DONE - Do not report non-airborne groups -- DONE - Do not report non-airborne groups
-- DONE - Added option for helos -- DONE - Added option for helos
-- DONE - Added setting a coordinate for SRS
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor -- Constructor
@ -6191,6 +6192,16 @@ function AWACS:onafterStatus(From, Event, To)
-- Check on AUFTRAG status for CAP AI -- Check on AUFTRAG status for CAP AI
if self:Is("Running") and (awacsalive or self.AwacsInZone) then 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:_CheckAICAPOnStation()
self:_CleanUpContacts() self:_CleanUpContacts()

View File

@ -31,6 +31,7 @@
-- @image OPS_CSAR.jpg -- @image OPS_CSAR.jpg
-- Date: May 2023 -- Date: May 2023
-- Last: Update Oct 2024
------------------------------------------------------------------------- -------------------------------------------------------------------------
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM --- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
@ -116,21 +117,21 @@
-- mycsar.ADFRadioPwr = 1000 -- ADF Beacons sending with 1KW as default -- mycsar.ADFRadioPwr = 1000 -- ADF Beacons sending with 1KW as default
-- mycsar.PilotWeight = 80 -- Loaded pilots weigh 80kgs each -- mycsar.PilotWeight = 80 -- Loaded pilots weigh 80kgs each
-- --
-- ## 2.1 Experimental Features -- ## 2.1 SRS Features and Other Features
-- --
-- WARNING - Here\'ll be dragons!
-- DANGER - For this to work you need to de-sanitize your mission environment (all three entries) in <DCS root>\Scripts\MissionScripting.lua
-- Needs SRS => 1.9.6 to work (works on the **server** side of SRS)
-- mycsar.useSRS = false -- Set true to use FF\'s SRS integration -- mycsar.useSRS = false -- Set true to use FF\'s SRS integration
-- mycsar.SRSPath = "C:\\Progra~1\\DCS-SimpleRadio-Standalone\\" -- adjust your own path in your SRS installation -- server(!) -- mycsar.SRSPath = "C:\\Progra~1\\DCS-SimpleRadio-Standalone\\" -- adjust your own path in your SRS installation -- server(!)
-- mycsar.SRSchannel = 300 -- radio channel -- mycsar.SRSchannel = 300 -- radio channel
-- mycsar.SRSModulation = radio.modulation.AM -- modulation -- mycsar.SRSModulation = radio.modulation.AM -- modulation
-- mycsar.SRSport = 5002 -- and SRS Server port -- mycsar.SRSport = 5002 -- and SRS Server port
-- mycsar.SRSCulture = "en-GB" -- SRS voice culture -- mycsar.SRSCulture = "en-GB" -- SRS voice culture
-- mycsar.SRSVoice = nil -- SRS voice, relevant for Google TTS -- mycsar.SRSVoice = nil -- SRS voice for downed pilot, relevant for Google TTS
-- mycsar.SRSGPathToCredentials = nil -- Path to your Google credentials json file, set this if you want to use Google TTS -- mycsar.SRSGPathToCredentials = nil -- Path to your Google credentials json file, set this if you want to use Google TTS
-- mycsar.SRSVolume = 1 -- Volume, between 0 and 1 -- mycsar.SRSVolume = 1 -- Volume, between 0 and 1
-- mycsar.SRSGender = "male" -- male or female voice -- mycsar.SRSGender = "male" -- male or female voice
-- mycsar.CSARVoice = MSRS.Voices.Google.Standard.en_US_Standard_A -- SRS voice for CSAR Controller, relevant for Google TTS
-- mycsar.CSARVoiceMS = MSRS.Voices.Microsoft.Hedda -- SRS voice for CSAR Controller, relevant for MS Desktop TTS
-- mycsar.coordinate -- Coordinate from which CSAR TTS is sending. Defaults to a random MASH object position
-- -- -- --
-- mycsar.csarUsePara = false -- If set to true, will use the LandingAfterEjection Event instead of Ejection. Requires mycsar.enableForAI to be set to true. --shagrat -- mycsar.csarUsePara = false -- If set to true, will use the LandingAfterEjection Event instead of Ejection. Requires mycsar.enableForAI to be set to true. --shagrat
-- mycsar.wetfeettemplate = "man in floating thingy" -- if you use a mod to have a pilot in a rescue float, put the template name in here for wet feet spawns. Note: in conjunction with csarUsePara this might create dual ejected pilots in edge cases. -- mycsar.wetfeettemplate = "man in floating thingy" -- if you use a mod to have a pilot in a rescue float, put the template name in here for wet feet spawns. Note: in conjunction with csarUsePara this might create dual ejected pilots in edge cases.
@ -230,7 +231,7 @@ CSAR = {
takenOff = {}, takenOff = {},
csarUnits = {}, -- table of unit names csarUnits = {}, -- table of unit names
downedPilots = {}, downedPilots = {},
woundedGroups = {}, -- = {},
landedStatus = {}, landedStatus = {},
addedTo = {}, addedTo = {},
woundedGroups = {}, -- contains the new group of units woundedGroups = {}, -- contains the new group of units
@ -465,6 +466,9 @@ function CSAR:New(Coalition, Template, Alias)
self.SRSGPathToCredentials = nil self.SRSGPathToCredentials = nil
self.SRSVolume = 1.0 -- volume 0.0 to 1.0 self.SRSVolume = 1.0 -- volume 0.0 to 1.0
self.SRSGender = "male" -- male or female self.SRSGender = "male" -- male or female
self.CSARVoice = MSRS.Voices.Google.Standard.en_US_Standard_A
self.CSARVoiceMS = MSRS.Voices.Microsoft.Hedda
self.coordinate = nil -- Core.Point#COORDINATE
local AliaS = string.gsub(self.alias," ","_") local AliaS = string.gsub(self.alias," ","_")
self.filename = string.format("CSAR_%s_Persist.csv",AliaS) self.filename = string.format("CSAR_%s_Persist.csv",AliaS)
@ -1306,7 +1310,7 @@ end
-- @param #string UnitName -- @param #string UnitName
-- @return #string CallSign -- @return #string CallSign
function CSAR:_GetCustomCallSign(UnitName) function CSAR:_GetCustomCallSign(UnitName)
local callsign = Unitname local callsign = UnitName
local unit = UNIT:FindByName(UnitName) local unit = UNIT:FindByName(UnitName)
if unit and unit:IsAlive() then if unit and unit:IsAlive() then
local group = unit:GetGroup() local group = unit:GetGroup()
@ -1737,7 +1741,16 @@ function CSAR:_DisplayMessageToSAR(_unit, _text, _time, _clear, _speak, _overrid
end end
-- integrate SRS -- integrate SRS
if _speak and self.useSRS then if _speak and self.useSRS then
self.SRSQueue:NewTransmission(_text,nil,self.msrs,nil,2) local coord = _unit:GetCoordinate()
if coord then
self.msrs:SetCoordinate(coord)
end
_text = string.gsub(_text,"km"," kilometer")
_text = string.gsub(_text,"nm"," nautical miles")
--self.msrs:SetVoice(self.SRSVoice)
--self.SRSQueue:NewTransmission(_text,nil,self.msrs,nil,1)
self:I("Voice = "..self.SRSVoice)
self.SRSQueue:NewTransmission(_text,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,self.SRSVoice,volume,label,coord)
end end
return self return self
end end
@ -1876,7 +1889,7 @@ function CSAR:_SignalFlare(_unitName)
if _closest ~= nil and _closest.pilot ~= nil and _closest.distance > 0 and _closest.distance < smokedist then if _closest ~= nil and _closest.pilot ~= nil and _closest.distance > 0 and _closest.distance < smokedist then
local _clockDir = self:_GetClockDirection(_heli, _closest.pilot) local _clockDir = self:_GetClockDirection(_heli, _closest.pilot)
local _distance = 0 local _distance = ""
if _SETTINGS:IsImperial() then if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(_closest.distance)) _distance = string.format("%.1fnm",UTILS.MetersToNM(_closest.distance))
else else
@ -1889,12 +1902,13 @@ function CSAR:_SignalFlare(_unitName)
_coord:FlareRed(_clockDir) _coord:FlareRed(_clockDir)
else else
local _distance = smokedist local _distance = smokedist
local dtext = ""
if _SETTINGS:IsImperial() then if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(smokedist)) dtext = string.format("%.1fnm",UTILS.MetersToNM(smokedist))
else else
_distance = string.format("%.1fkm",smokedist/1000) dtext = string.format("%.1fkm",smokedist/1000)
end end
self:_DisplayMessageToSAR(_heli, string.format("No Pilots within %s",_distance), self.messageTime, false, false, true) self:_DisplayMessageToSAR(_heli, string.format("No Pilots within %s",dtext), self.messageTime, false, false, true)
end end
return self return self
end end
@ -1907,6 +1921,14 @@ end
function CSAR:_DisplayToAllSAR(_message, _side, _messagetime) function CSAR:_DisplayToAllSAR(_message, _side, _messagetime)
self:T(self.lid .. " _DisplayToAllSAR") self:T(self.lid .. " _DisplayToAllSAR")
local messagetime = _messagetime or self.messageTime local messagetime = _messagetime or self.messageTime
if self.msrs then
local voice = self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
if self.msrs.google == nil then
voice = self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
end
self:I("Voice = "..voice)
self.SRSQueue:NewTransmission(_message,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,voice,volume,label,self.coordinate)
end
for _, _unitName in pairs(self.csarUnits) do for _, _unitName in pairs(self.csarUnits) do
local _unit = self:_GetSARHeli(_unitName) local _unit = self:_GetSARHeli(_unitName)
if _unit and not self.suppressmessages then if _unit and not self.suppressmessages then
@ -1930,7 +1952,7 @@ function CSAR:_Reqsmoke( _unitName )
local _closest = self:_GetClosestDownedPilot(_heli) local _closest = self:_GetClosestDownedPilot(_heli)
if _closest ~= nil and _closest.pilot ~= nil and _closest.distance > 0 and _closest.distance < smokedist then if _closest ~= nil and _closest.pilot ~= nil and _closest.distance > 0 and _closest.distance < smokedist then
local _clockDir = self:_GetClockDirection(_heli, _closest.pilot) local _clockDir = self:_GetClockDirection(_heli, _closest.pilot)
local _distance = 0 local _distance = string.format("%.1fkm",_closest.distance/1000)
if _SETTINGS:IsImperial() then if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(_closest.distance)) _distance = string.format("%.1fnm",UTILS.MetersToNM(_closest.distance))
else else
@ -1942,7 +1964,7 @@ function CSAR:_Reqsmoke( _unitName )
local color = self.smokecolor local color = self.smokecolor
_coord:Smoke(color) _coord:Smoke(color)
else else
local _distance = 0 local _distance = string.format("%.1fkm",smokedist/1000)
if _SETTINGS:IsImperial() then if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(smokedist)) _distance = string.format("%.1fnm",UTILS.MetersToNM(smokedist))
else else
@ -2267,6 +2289,12 @@ function CSAR:onafterStart(From, Event, To)
self.allheligroupset = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterCategoryHelicopter():FilterStart() self.allheligroupset = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterCategoryHelicopter():FilterStart()
end end
self.mash = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart() -- currently only GROUP objects, maybe support STATICs also? self.mash = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart() -- currently only GROUP objects, maybe support STATICs also?
if not self.coordinate then
local csarhq = self.mash:GetRandom()
if csarhq then
self.coordinate = csarhq:GetCoordinate()
end
end
if self.wetfeettemplate then if self.wetfeettemplate then
self.usewetfeet = true self.usewetfeet = true
end end
@ -2274,7 +2302,7 @@ function CSAR:onafterStart(From, Event, To)
local path = self.SRSPath local path = self.SRSPath
local modulation = self.SRSModulation local modulation = self.SRSModulation
local channel = self.SRSchannel local channel = self.SRSchannel
self.msrs = MSRS:New(path,channel,modulation) self.msrs = MSRS:New(path,channel,modulation) -- Sound.SRS#MSRS
self.msrs:SetPort(self.SRSport) self.msrs:SetPort(self.SRSport)
self.msrs:SetLabel("CSAR") self.msrs:SetLabel("CSAR")
self.msrs:SetCulture(self.SRSCulture) self.msrs:SetCulture(self.SRSCulture)
@ -2286,7 +2314,7 @@ function CSAR:onafterStart(From, Event, To)
end end
self.msrs:SetVolume(self.SRSVolume) self.msrs:SetVolume(self.SRSVolume)
self.msrs:SetLabel("CSAR") self.msrs:SetLabel("CSAR")
self.SRSQueue = MSRSQUEUE:New("CSAR") self.SRSQueue = MSRSQUEUE:New("CSAR") -- Sound.SRS#MSRSQUEUE
end end
self:__Status(-10) self:__Status(-10)

View File

@ -216,7 +216,7 @@ FLIGHTGROUP.Players={}
--- FLIGHTGROUP class version. --- FLIGHTGROUP class version.
-- @field #string version -- @field #string version
FLIGHTGROUP.version="1.0.1" FLIGHTGROUP.version="1.0.2"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
@ -1257,20 +1257,20 @@ function FLIGHTGROUP:Status()
-- Check damage. -- Check damage.
self:_CheckDamage() self:_CheckDamage()
-- Get current mission (if any).
local mission=self:GetMissionCurrent()
-- TODO: Check if group is waiting? -- TODO: Check if group is waiting?
if self:IsWaiting() then if self:IsWaiting() then
if self.Twaiting and self.dTwait then if self.Twaiting and self.dTwait then
if timer.getAbsTime()>self.Twaiting+self.dTwait then if timer.getAbsTime()>self.Twaiting+self.dTwait then
--self.Twaiting=nil --self.Twaiting=nil
--self.dTwait=nil --self.dTwait=nil
--self:Cruise() --self:_CheckGroupDone()
end end
end end
end end
-- Get current mission (if any).
local mission=self:GetMissionCurrent()
-- If mission, check if DCS task needs to be updated. -- If mission, check if DCS task needs to be updated.
if mission and mission.updateDCSTask then if mission and mission.updateDCSTask then
@ -1618,8 +1618,14 @@ function FLIGHTGROUP:Status()
self:_PrintTaskAndMissionStatus() self:_PrintTaskAndMissionStatus()
-- Current mission. -- All done?
-- Get current mission (if any).
local mission=self:GetMissionCurrent() local mission=self:GetMissionCurrent()
if not mission then
self.Twaiting=nil
self.dTwait=nil
self:_CheckGroupDone()
end
end end

View File

@ -104,7 +104,7 @@ PLAYERRECCE = {
ClassName = "PLAYERRECCE", ClassName = "PLAYERRECCE",
verbose = true, verbose = true,
lid = nil, lid = nil,
version = "0.0.18", version = "0.0.19",
ViewZone = {}, ViewZone = {},
ViewZoneVisual = {}, ViewZoneVisual = {},
ViewZoneLaser = {}, ViewZoneLaser = {},
@ -1524,8 +1524,12 @@ function PLAYERRECCE:onafterRecceOnStation(From, Event, To, Client, Playername)
end end
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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(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) MESSAGE:New(text2,10,self.Name or "FACA"):ToCoalition(self.Coalition)
else else
MESSAGE:New(text1,10,self.Name or "FACA"):ToClient(Client) 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!" local text1 = "Going home!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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(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) MESSAGE:New(text,10,self.Name or "FACA"):ToCoalition(self.Coalition)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToCoalition(self.Coalition) 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) local ttstext = string.format("Target! %s! %s oh clock, %d %s!", ThreatTxt, i, targetdistance, dunits)
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() local grp = Client:GetGroup()
if clientcoord then
self.SRS:SetCoordinate(clientcoord)
end
self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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) local ttstext = string.format("%d targets! %s oh clock, %d %s!", targetno, i, targetdistance, dunits)
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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!" local ttstext = "Sunshine!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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!" local ttstext = "Smoke and Mirrors!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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!" local ttstext = "Fire works!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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!" local ttstext = "Laser on!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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!" local ttstext = "Shack!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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!" local ttstext = "Lost L O S!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(ttstext,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) 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!" local text = "Upload completed!"
if self.UseSRS then if self.UseSRS then
local grp = Client:GetGroup() 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) self.SRSQueue:NewTransmission(text,nil,self.SRS,nil,1,{grp},text,10)
else else
MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client) MESSAGE:New(text,10,self.Name or "FACA"):ToClient(Client)

View File

@ -98,7 +98,7 @@ PLAYERTASK = {
--- PLAYERTASK class version. --- PLAYERTASK class version.
-- @field #string version -- @field #string version
PLAYERTASK.version="0.1.21" PLAYERTASK.version="0.1.22"
--- Generic task condition. --- Generic task condition.
-- @type PLAYERTASK.Condition -- @type PLAYERTASK.Condition
@ -935,7 +935,7 @@ end
do do
------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------
-- PLAYERTASKCONTROLLER -- PLAYERTASKCONTROLLER
-- TODO: PLAYERTASKCONTROLLER -- TODO: PLAYERTASKCONTROLLER
-- DONE Playername customized -- DONE Playername customized
-- DONE Coalition-level screen info to SET based -- DONE Coalition-level screen info to SET based
-- DONE Flash directions -- 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. -- 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 #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 #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 -- @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:T(self.lid.."SetSRS")
self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone" -- self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone" --
self.Gender = Gender or "male" -- self.Gender = Gender or "male" --
@ -4029,6 +4030,9 @@ function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Cultu
if self.PathToGoogleKey then if self.PathToGoogleKey then
self.SRS:SetGoogle(self.PathToGoogleKey) self.SRS:SetGoogle(self.PathToGoogleKey)
end end
if Coordinate then
self.SRS:SetCoordinate(Coordinate)
end
self.SRSQueue = MSRSQUEUE:New(self.MenuName or self.Name) self.SRSQueue = MSRSQUEUE:New(self.MenuName or self.Name)
self.SRSQueue:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers) self.SRSQueue:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers)
return self return self

View File

@ -824,15 +824,16 @@ end
-- @param #MSRS self -- @param #MSRS self
-- @param #string Text Text message. -- @param #string Text Text message.
-- @param #number Delay Delay in seconds, before the message is played. -- @param #number Delay Delay in seconds, before the message is played.
-- @param Core.Point#COORDINATE Coordinate Coordinate.
-- @return #MSRS self -- @return #MSRS self
function MSRS:PlayText(Text, Delay) function MSRS:PlayText(Text, Delay, Coordinate)
if Delay and Delay>0 then if Delay and Delay>0 then
self:ScheduleOnce(Delay, MSRS.PlayText, self, Text, 0) self:ScheduleOnce(Delay, MSRS.PlayText, self, Text, nil, Coordinate)
else else
-- Get command line. -- Get command line.
local command=self:_GetCommand() local command=self:_GetCommand(nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,Coordinate)
-- Append text. -- Append text.
command=command..string.format(" --text=\"%s\"", tostring(Text)) command=command..string.format(" --text=\"%s\"", tostring(Text))
@ -856,11 +857,12 @@ end
-- @param #string Voice Voice. -- @param #string Voice Voice.
-- @param #number Volume Volume. -- @param #number Volume Volume.
-- @param #string Label Label. -- @param #string Label Label.
-- @param Core.Point#COORDINATE Coordinate Coordinate.
-- @return #MSRS self -- @return #MSRS self
function MSRS:PlayTextExt(Text, Delay, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label) function MSRS:PlayTextExt(Text, Delay, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate)
if Delay and Delay>0 then if Delay and Delay>0 then
self:ScheduleOnce(Delay, MSRS.PlayTextExt, self, Text, 0, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label) self:ScheduleOnce(Delay, MSRS.PlayTextExt, self, Text, 0, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate)
else else
-- Ensure table. -- Ensure table.
@ -874,7 +876,7 @@ function MSRS:PlayTextExt(Text, Delay, Frequencies, Modulations, Gender, Culture
end end
-- Get command line. -- Get command line.
local command=self:_GetCommand(Frequencies, Modulations, nil, Gender, Voice, Culture, Volume, nil, nil, Label) local command=self:_GetCommand(Frequencies, Modulations, nil, Gender, Voice, Culture, Volume, nil, nil, Label, Coordinate)
-- Append text. -- Append text.
command=command..string.format(" --text=\"%s\"", tostring(Text)) command=command..string.format(" --text=\"%s\"", tostring(Text))
@ -1065,8 +1067,9 @@ end
-- @param #number speed Speed. -- @param #number speed Speed.
-- @param #number port Port. -- @param #number port Port.
-- @param #string label Label, defaults to "ROBOT" (displayed sender name in the radio overlay of SRS) - No spaces allowed! -- @param #string label Label, defaults to "ROBOT" (displayed sender name in the radio overlay of SRS) - No spaces allowed!
-- @param Core.Point#COORDINATE coordinate Coordinate.
-- @return #string Command. -- @return #string Command.
function MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, speed, port,label) function MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, speed, port,label,coordinate)
local path=self:GetPath() or STTS.DIRECTORY local path=self:GetPath() or STTS.DIRECTORY
local exe=STTS.EXECUTABLE or "DCS-SR-ExternalAudio.exe" local exe=STTS.EXECUTABLE or "DCS-SR-ExternalAudio.exe"
@ -1080,6 +1083,7 @@ function MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, sp
speed=speed or self.speed speed=speed or self.speed
port=port or self.port port=port or self.port
label=label or self.Label label=label or self.Label
coordinate=coordinate or self.coordinate
-- Replace modulation -- Replace modulation
modus=modus:gsub("0", "AM") modus=modus:gsub("0", "AM")
@ -1104,8 +1108,8 @@ function MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, sp
end end
-- Set coordinate. -- Set coordinate.
if self.coordinate then if coordinate then
local lat,lon,alt=self:_GetLatLongAlt(self.coordinate) local lat,lon,alt=self:_GetLatLongAlt(coordinate)
command=command..string.format(" -L %.4f -O %.4f -A %d", lat, lon, alt) command=command..string.format(" -L %.4f -O %.4f -A %d", lat, lon, alt)
end end
@ -1649,6 +1653,7 @@ MSRSQUEUE = {
-- @field #string voice Voice if any -- @field #string voice Voice if any
-- @field #number volume Volume -- @field #number volume Volume
-- @field #string label Label to be used -- @field #string label Label to be used
-- @field Core.Point#COORDINATE coordinate Coordinate for this transmission
--- Create a new MSRSQUEUE object for a given radio frequency/modulation. --- Create a new MSRSQUEUE object for a given radio frequency/modulation.
-- @param #MSRSQUEUE self -- @param #MSRSQUEUE self
@ -1733,8 +1738,9 @@ end
-- @param #string voice Specific voice -- @param #string voice Specific voice
-- @param #number volume Volume setting -- @param #number volume Volume setting
-- @param #string label Label to be used -- @param #string label Label to be used
-- @param Core.Point#COORDINATE coordinate Coordinate to be used
-- @return #MSRSQUEUE.Transmission Radio transmission table. -- @return #MSRSQUEUE.Transmission Radio transmission table.
function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgroups, subtitle, subduration, frequency, modulation, gender, culture, voice, volume, label) function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgroups, subtitle, subduration, frequency, modulation, gender, culture, voice, volume, label,coordinate)
if self.TransmitOnlyWithPlayers then if self.TransmitOnlyWithPlayers then
if self.PlayerSet and self.PlayerSet:CountAlive() == 0 then if self.PlayerSet and self.PlayerSet:CountAlive() == 0 then
@ -1774,6 +1780,7 @@ function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgr
transmission.voice = voice transmission.voice = voice
transmission.gender = volume transmission.gender = volume
transmission.label = label transmission.label = label
transmission.coordinate = coordinate
-- Add transmission to queue. -- Add transmission to queue.
self:AddTransmission(transmission) self:AddTransmission(transmission)
@ -1787,9 +1794,9 @@ end
function MSRSQUEUE:Broadcast(transmission) function MSRSQUEUE:Broadcast(transmission)
if transmission.frequency then if transmission.frequency then
transmission.msrs:PlayTextExt(transmission.text, nil, transmission.frequency, transmission.modulation, transmission.gender, transmission.culture, transmission.voice, transmission.volume, transmission.label) transmission.msrs:PlayTextExt(transmission.text, nil, transmission.frequency, transmission.modulation, transmission.gender, transmission.culture, transmission.voice, transmission.volume, transmission.label, transmission.coordinate)
else else
transmission.msrs:PlayText(transmission.text) transmission.msrs:PlayText(transmission.text,nil,transmission.coordinate)
end end
local function texttogroup(gid) local function texttogroup(gid)

View File

@ -4,6 +4,7 @@
cd /moose/ cd /moose/
mkdir -p build/tools mkdir -p build/tools
mkdir -p build/doc mkdir -p build/doc
rm -f build/doc/*
# Checkout luadocumentor # Checkout luadocumentor
cd /moose/build/tools cd /moose/build/tools
@ -18,7 +19,6 @@ lua luadocumentor.lua -d /moose/build/doc '/moose/Moose Development/Moose'
# Copy generated files in the MOOSE_DOCS repo if it is already there # Copy generated files in the MOOSE_DOCS repo if it is already there
if [ -d /moose/build/MOOSE_DOCS/Documentation ]; then if [ -d /moose/build/MOOSE_DOCS/Documentation ]; then
rm -rf /moose/build/MOOSE_DOCS/Documentation rm -f /moose/build/MOOSE_DOCS/Documentation/*
mkdir -p /moose/build/MOOSE_DOCS/Documentation
cp /moose/build/doc/* /moose/build/MOOSE_DOCS/Documentation/ cp /moose/build/doc/* /moose/build/MOOSE_DOCS/Documentation/
fi fi