This commit is contained in:
Applevangelist 2023-07-29 15:56:20 +02:00
parent 27fd726ce3
commit 9c95b91086
3 changed files with 196 additions and 206 deletions

View File

@ -1278,7 +1278,8 @@ end
-- @param #string Event Event. -- @param #string Event Event.
-- @param #string To To state. -- @param #string To To state.
function ATIS:onafterStart( From, Event, To ) function ATIS:onafterStart( From, Event, To )
self:I("Airbase category is "..self.airbase:GetAirbaseCategory()) self:T({From, Event, To})
self:T("Airbase category is "..self.airbase:GetAirbaseCategory())
-- Check that this is an airdrome. -- Check that this is an airdrome.
if self.airbase:GetAirbaseCategory() == Airbase.Category.SHIP then if self.airbase:GetAirbaseCategory() == Airbase.Category.SHIP then
@ -1340,7 +1341,7 @@ end
-- @param #string Event Event. -- @param #string Event Event.
-- @param #string To To state. -- @param #string To To state.
function ATIS:onafterStatus( From, Event, To ) function ATIS:onafterStatus( From, Event, To )
self:T({From, Event, To})
-- Get FSM state. -- Get FSM state.
local fsmstate = self:GetState() local fsmstate = self:GetState()
@ -1362,7 +1363,7 @@ function ATIS:onafterStatus( From, Event, To )
self:T( self.lid .. text ) self:T( self.lid .. text )
if not self:Is("Stopped") then if not self:Is("Stopped") then
self:__Status( -60 ) self:__Status( 60 )
end end
end end
@ -1376,25 +1377,26 @@ end
-- @param #string Event Event. -- @param #string Event Event.
-- @param #string To To state. -- @param #string To To state.
function ATIS:onafterCheckQueue( From, Event, To ) function ATIS:onafterCheckQueue( From, Event, To )
self:T({From, Event, To})
if self.useSRS then
self:Broadcast()
else
if #self.radioqueue.queue == 0 then
self:T( self.lid .. string.format( "Radio queue empty. Repeating message." ) )
self:Broadcast()
else
self:T2( self.lid .. string.format( "Radio queue %d transmissions queued.", #self.radioqueue.queue ) )
end
end
if not self:Is("Stopped") then if not self:Is("Stopped") then
if self.useSRS then
self:Broadcast()
else
if #self.radioqueue.queue == 0 then
self:T( self.lid .. string.format( "Radio queue empty. Repeating message." ) )
self:Broadcast()
else
self:T2( self.lid .. string.format( "Radio queue %d transmissions queued.", #self.radioqueue.queue ) )
end
end
-- Check back in 5 seconds. -- Check back in 5 seconds.
self:__CheckQueue( -math.abs( self.dTQueueCheck ) ) self:__CheckQueue( math.abs( self.dTQueueCheck ) )
end end
end end
@ -1404,7 +1406,7 @@ end
-- @param #string Event Event. -- @param #string Event Event.
-- @param #string To To state. -- @param #string To To state.
function ATIS:onafterBroadcast( From, Event, To ) function ATIS:onafterBroadcast( From, Event, To )
self:T({From, Event, To})
-- Get current coordinate. -- Get current coordinate.
local coord = self.airbase:GetCoordinate() local coord = self.airbase:GetCoordinate()
@ -2417,6 +2419,7 @@ end
-- @param #string To To state. -- @param #string To To state.
-- @param #string Text Report text. -- @param #string Text Report text.
function ATIS:onafterReport( From, Event, To, Text ) function ATIS:onafterReport( From, Event, To, Text )
self:T({From, Event, To})
self:T( self.lid .. string.format( "Report:\n%s", Text ) ) self:T( self.lid .. string.format( "Report:\n%s", Text ) )
if self.useSRS and self.msrs then if self.useSRS and self.msrs then

View File

@ -152,12 +152,16 @@
-- @field #boolean ICLSon Automatic ICLS is activated. -- @field #boolean ICLSon Automatic ICLS is activated.
-- @field #number ICLSchannel ICLS channel. -- @field #number ICLSchannel ICLS channel.
-- @field #string ICLSmorse ICLS morse code, e.g. "STN". -- @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 #AIRBOSS.Radio LSORadio Radio for LSO calls.
-- @field #number LSOFreq LSO radio frequency in MHz. -- @field #number LSOFreq LSO radio frequency in MHz.
-- @field #string LSOModu LSO radio modulation "AM" or "FM". -- @field #string LSOModu LSO radio modulation "AM" or "FM".
-- @field #AIRBOSS.Radio MarshalRadio Radio for carrier calls. -- @field #AIRBOSS.Radio MarshalRadio Radio for carrier calls.
-- @field #number MarshalFreq Marshal radio frequency in MHz. -- @field #number MarshalFreq Marshal radio frequency in MHz.
-- @field #string MarshalModu Marshal radio modulation "AM" or "FM". -- @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 #number TowerFreq Tower radio frequency in MHz.
-- @field Core.Scheduler#SCHEDULER radiotimer Radio queue scheduler. -- @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. -- @field Core.Zone#ZONE_UNIT zoneCCA Carrier controlled area (CCA), i.e. a zone of 50 NM radius around the carrier.
@ -1731,10 +1735,10 @@ AIRBOSS.Difficulty = {
-- @field #table trapsheet Groove data table recorded every 0.5 seconds. -- @field #table trapsheet Groove data table recorded every 0.5 seconds.
-- @field #boolean trapon If true, save trap sheets. -- @field #boolean trapon If true, save trap sheets.
-- @field #string debriefschedulerID Debrief scheduler ID. -- @field #string debriefschedulerID Debrief scheduler ID.
-- --
-- @field Sound.SRS#MSRS SRS -- @field Sound.SRS#MSRS SRS
-- @field Sound.SRS#MSRSQUEUE SRSQ -- @field Sound.SRS#MSRSQUEUE SRSQ
-- --
-- @extends #AIRBOSS.FlightGroup -- @extends #AIRBOSS.FlightGroup
--- Main group level radio menu: F10 Other/Airboss. --- Main group level radio menu: F10 Other/Airboss.
@ -1880,6 +1884,7 @@ function AIRBOSS:New( carriername, alias )
-- Set up Airboss radio. -- Set up Airboss radio.
self:SetMarshalRadio() self:SetMarshalRadio()
self:SetAirbossRadio()
-- Set up LSO radio. -- Set up LSO radio.
self:SetLSORadio() self:SetLSORadio()
@ -3053,7 +3058,7 @@ end
-- @param #number Port Port of the SRS server, defaults to 5002. -- @param #number Port Port of the SRS server, defaults to 5002.
-- @param #string Culture (Optional, Airboss Culture) Culture, defaults to "en-US". -- @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 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 #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 #number Volume (Optional) E.g. 0.75. Defaults to 1.0 (loudest).
-- @param #table AltBackend (Optional) See MSRS for details. -- @param #table AltBackend (Optional) See MSRS for details.
@ -3082,16 +3087,19 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
-- SRSQUEUE -- SRSQUEUE
self.SRSQ = MSRSQUEUE:New("AIRBOSS") self.SRSQ = MSRSQUEUE:New("AIRBOSS")
self.SRSQ:SetTransmitOnlyWithPlayers(true) self.SRSQ:SetTransmitOnlyWithPlayers(true)
if not self.PilotRadio then if not self.PilotRadio then
self:SetSRSPilotVoice() self:SetSRSPilotVoice()
end end
return self return self
end end
--- Set LSO radio frequency and modulation. Default frequency is 264 MHz AM. --- Set LSO radio frequency and modulation. Default frequency is 264 MHz AM.
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #number Frequency (Optional) Frequency in MHz. Default 264 MHz. -- @param #number Frequency (Optional) Frequency in MHz. Default 264 MHz.
-- @param #string Modulation (Optional) Modulation, "AM" or "FM". Default "AM". -- @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 -- @return #AIRBOSS self
function AIRBOSS:SetLSORadio( Frequency, Modulation, Voice, Gender, Culture ) function AIRBOSS:SetLSORadio( Frequency, Modulation, Voice, Gender, Culture )
@ -3108,6 +3116,9 @@ function AIRBOSS:SetLSORadio( Frequency, Modulation, Voice, Gender, Culture )
self.LSORadio.frequency = self.LSOFreq self.LSORadio.frequency = self.LSOFreq
self.LSORadio.modulation = self.LSOModu self.LSORadio.modulation = self.LSOModu
self.LSORadio.alias = "LSO" self.LSORadio.alias = "LSO"
self.LSORadio.voice = Voice
self.LSORadio.gender = Gender or "male"
self.LSORadio.culture = Culture or "en-US"
return self return self
end end
@ -3156,6 +3167,9 @@ end
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #number Frequency (Optional) Frequency in MHz. Default 305 MHz. -- @param #number Frequency (Optional) Frequency in MHz. Default 305 MHz.
-- @param #string Modulation (Optional) Modulation, "AM" or "FM". Default "AM". -- @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 -- @return #AIRBOSS self
function AIRBOSS:SetMarshalRadio( Frequency, Modulation, Voice, Gender, Culture ) function AIRBOSS:SetMarshalRadio( Frequency, Modulation, Voice, Gender, Culture )
@ -3172,6 +3186,9 @@ function AIRBOSS:SetMarshalRadio( Frequency, Modulation, Voice, Gender, Culture
self.MarshalRadio.frequency = self.MarshalFreq self.MarshalRadio.frequency = self.MarshalFreq
self.MarshalRadio.modulation = self.MarshalModu self.MarshalRadio.modulation = self.MarshalModu
self.MarshalRadio.alias = "MARSHAL" self.MarshalRadio.alias = "MARSHAL"
self.MarshalRadio.voice = Voice
self.MarshalRadio.gender = Gender or "male"
self.MarshalRadio.culture = Culture or "en-US"
return self return self
end end
@ -3353,7 +3370,7 @@ function AIRBOSS:SetExtraVoiceOversAI(status)
self.xtVoiceOversAI=status self.xtVoiceOversAI=status
return self return self
end end
--- Do not handle AI aircraft. --- Do not handle AI aircraft.
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @return #AIRBOSS self -- @return #AIRBOSS self
@ -3468,9 +3485,9 @@ end
-- @param #string Host Host. Default `"127.0.0.1"`. -- @param #string Host Host. Default `"127.0.0.1"`.
-- @return #AIRBOSS self -- @return #AIRBOSS self
function AIRBOSS:SetFunkManOn(Port, Host) function AIRBOSS:SetFunkManOn(Port, Host)
self.funkmanSocket=SOCKET:New(Port, Host) self.funkmanSocket=SOCKET:New(Port, Host)
return self return self
end end
@ -5442,6 +5459,7 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
local skyhawk = playerData.actype == AIRBOSS.AircraftCarrier.A4EC local skyhawk = playerData.actype == AIRBOSS.AircraftCarrier.A4EC
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B
local harrier = playerData.actype == AIRBOSS.AircraftCarrier.AV8B local harrier = playerData.actype == AIRBOSS.AircraftCarrier.AV8B
local goshawk = playerData.actype == AIRBOSS.AircraftCarrier.T45C
-- Return values. -- Return values.
local alt local alt
@ -5907,6 +5925,7 @@ function AIRBOSS:_ScanCarrierZone()
-- Get aircraft type name. -- Get aircraft type name.
local actype = group:GetTypeName() local actype = group:GetTypeName()
-- Create a new flight group
if knownflight then if knownflight then
-- Debug output. -- Debug output.
@ -6452,7 +6471,7 @@ function AIRBOSS:_LandAI( flight )
-- Aircraft speed when flying the pattern. -- Aircraft speed when flying the pattern.
local Speed = UTILS.KnotsToKmph( 200 ) local Speed = UTILS.KnotsToKmph( 200 )
if flight.actype == AIRBOSS.AircraftCarrier.HORNET if flight.actype == AIRBOSS.AircraftCarrier.HORNET
or flight.actype == AIRBOSS.AircraftCarrier.FA18C or flight.actype == AIRBOSS.AircraftCarrier.FA18C
or flight.actype == AIRBOSS.AircraftCarrier.RHINOE or flight.actype == AIRBOSS.AircraftCarrier.RHINOE
or flight.actype == AIRBOSS.AircraftCarrier.RHINOF or flight.actype == AIRBOSS.AircraftCarrier.RHINOF
@ -8190,7 +8209,7 @@ end
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AIRBOSS:OnEventBirth( EventData ) function AIRBOSS:OnEventBirth( EventData )
self:F3( { eventbirth = EventData } ) self:F3( { eventbirth = EventData } )
-- Nil checks. -- Nil checks.
if EventData == nil then if EventData == nil then
self:E( self.lid .. "ERROR: EventData=nil in event BIRTH!" ) self:E( self.lid .. "ERROR: EventData=nil in event BIRTH!" )
@ -8202,9 +8221,9 @@ function AIRBOSS:OnEventBirth( EventData )
self:E( EventData ) self:E( EventData )
return return
end end
if EventData.IniObjectCategory ~= Object.Category.UNIT then return end if EventData.IniObjectCategory ~= Object.Category.UNIT then return end
local _unitName = EventData.IniUnitName local _unitName = EventData.IniUnitName
local _unit, _playername = self:_GetPlayerUnitAndName( _unitName ) local _unit, _playername = self:_GetPlayerUnitAndName( _unitName )
@ -9282,9 +9301,9 @@ function AIRBOSS:_DirtyUp( playerData )
self:_PlayerHint( playerData ) self:_PlayerHint( playerData )
-- Radio call "Say/Fly needles". Delayed by 10/15 seconds. -- Radio call "Say/Fly needles". Delayed by 10/15 seconds.
if playerData.actype == AIRBOSS.AircraftCarrier.HORNET if playerData.actype == AIRBOSS.AircraftCarrier.HORNET
or playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14A
or playerData.actype == AIRBOSS.AircraftCarrier.F14B or playerData.actype == AIRBOSS.AircraftCarrier.F14B
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER
@ -9881,24 +9900,24 @@ function AIRBOSS:_Groove( playerData )
return return
end end
end end
-- Long V/STOL groove time Wave Off over 75 seconds to IC - TOPGUN level Only. --pene testing (WIP)--- Need to think more about this. -- Long V/STOL groove time Wave Off over 75 seconds to IC - TOPGUN level Only. --pene testing (WIP)--- Need to think more about this.
--if rho>=RAR and rho<=RIC and not playerData.waveoff and playerData.difficulty==AIRBOSS.Difficulty.HARD and playerData.actype== AIRBOSS.AircraftCarrier.AV8B then --if rho>=RAR and rho<=RIC and not playerData.waveoff and playerData.difficulty==AIRBOSS.Difficulty.HARD and playerData.actype== AIRBOSS.AircraftCarrier.AV8B then
-- Get groove time -- Get groove time
--local vSlow=groovedata.time --local vSlow=groovedata.time
-- If too slow wave off. -- If too slow wave off.
--if vSlow >75 then --if vSlow >75 then
-- LSO Wave off! -- LSO Wave off!
--self:RadioTransmission(self.LSORadio, self.LSOCall.WAVEOFF, nil, nil, nil, true) --self:RadioTransmission(self.LSORadio, self.LSOCall.WAVEOFF, nil, nil, nil, true)
--playerData.Tlso=timer.getTime() --playerData.Tlso=timer.getTime()
-- Player was waved Off -- Player was waved Off
--playerData.waveoff=true --playerData.waveoff=true
--return --return
--end --end
--end --end
-- Groovedata step. -- Groovedata step.
@ -10096,7 +10115,7 @@ function AIRBOSS:_CheckWaveOff( glideslopeError, lineupError, AoA, playerData )
waveoff = true waveoff = true
end end
-- Too slow or too fast? Only for pros. -- Too slow or too fast? Only for pros.
if playerData.difficulty == AIRBOSS.Difficulty.HARD and playerData.actype ~= AIRBOSS.AircraftCarrier.AV8B then if playerData.difficulty == AIRBOSS.Difficulty.HARD and playerData.actype ~= AIRBOSS.AircraftCarrier.AV8B then
-- Get aircraft specific AoA values. Not for AV-8B due to transition to Stable Hover. -- Get aircraft specific AoA values. Not for AV-8B due to transition to Stable Hover.
@ -10252,7 +10271,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 )
@ -10401,7 +10420,7 @@ function AIRBOSS:_Trapped( playerData )
-- Get current wire (estimate). This now based on the position where the player comes to a standstill which should reflect the trapped wire better. -- Get current wire (estimate). This now based on the position where the player comes to a standstill which should reflect the trapped wire better.
local dcorr = 100 local dcorr = 100
if playerData.actype == AIRBOSS.AircraftCarrier.HORNET if playerData.actype == AIRBOSS.AircraftCarrier.HORNET
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER then or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER then
@ -10926,7 +10945,7 @@ function AIRBOSS:_GetZoneAbeamLandingSpot()
-- Coordinate array. Pene Testing extended Abeam landing spot V/STOL. -- Coordinate array. Pene Testing extended Abeam landing spot V/STOL.
local p={} local p={}
-- Points. -- Points.
p[1] = S:Translate( 15, FB ):Translate( 15, FB + 90 ) -- Top-Right p[1] = S:Translate( 15, FB ):Translate( 15, FB + 90 ) -- Top-Right
p[2] = S:Translate( -45, FB ):Translate( 15, FB + 90 ) -- Bottom-Right p[2] = S:Translate( -45, FB ):Translate( 15, FB + 90 ) -- Bottom-Right
@ -11374,7 +11393,7 @@ function AIRBOSS:_GetOptLandingCoordinate()
-- set Case III V/STOL abeam landing spot over deck -- Pene Testing -- set Case III V/STOL abeam landing spot over deck -- Pene Testing
if self.carriertype==AIRBOSS.CarrierType.INVINCIBLE or self.carriertype==AIRBOSS.CarrierType.HERMES or self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then if self.carriertype==AIRBOSS.CarrierType.INVINCIBLE or self.carriertype==AIRBOSS.CarrierType.HERMES or self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
if case==3 then if case==3 then
-- Landing coordinate. -- Landing coordinate.
@ -11382,7 +11401,7 @@ function AIRBOSS:_GetOptLandingCoordinate()
-- Altitude 120ft -- is this corect for Case III? -- Altitude 120ft -- is this corect for Case III?
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120)) self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
elseif case==2 or case==1 then elseif case==2 or case==1 then
-- Landing 100 ft abeam, 120 ft alt. -- Landing 100 ft abeam, 120 ft alt.
@ -11392,7 +11411,7 @@ function AIRBOSS:_GetOptLandingCoordinate()
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120)) self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
end end
else else
-- Ideally we want to land between 2nd and 3rd wire. -- Ideally we want to land between 2nd and 3rd wire.
@ -11536,14 +11555,10 @@ end
-- @return #number Carrier heading in degrees. -- @return #number Carrier heading in degrees.
function AIRBOSS:GetHeadingIntoWind( magnetic, coord ) function AIRBOSS:GetHeadingIntoWind( magnetic, coord )
<<<<<<< HEAD
-- Get direction the wind is blowing from. This is where we want to go.
local windfrom, vwind = self:GetWind( nil, nil, coord )
=======
local function adjustDegreesForWindSpeed(windSpeed) local function adjustDegreesForWindSpeed(windSpeed)
local degreesAdjustment = 0 local degreesAdjustment = 0
-- the windspeeds are in m/s -- the windspeeds are in m/s
-- +0 degrees at 15m/s = 37kts -- +0 degrees at 15m/s = 37kts
-- +0 degrees at 14m/s = 35kts -- +0 degrees at 14m/s = 35kts
-- +0 degrees at 13m/s = 33kts -- +0 degrees at 13m/s = 33kts
@ -11558,7 +11573,7 @@ function AIRBOSS:GetHeadingIntoWind( magnetic, coord )
-- +20 degrees at 4m/s = 26kts -- +20 degrees at 4m/s = 26kts
-- +20 degrees at 3m/s = 26kts -- +20 degrees at 3m/s = 26kts
-- +30 degrees at 2m/s = 26kts 1s -- +30 degrees at 2m/s = 26kts 1s
if windSpeed > 0 and windSpeed < 3 then if windSpeed > 0 and windSpeed < 3 then
degreesAdjustment = 30 degreesAdjustment = 30
elseif windSpeed >= 3 and windSpeed < 5 then elseif windSpeed >= 3 and windSpeed < 5 then
@ -11570,7 +11585,7 @@ function AIRBOSS:GetHeadingIntoWind( magnetic, coord )
elseif windSpeed >= 13 then elseif windSpeed >= 13 then
degreesAdjustment = 0 degreesAdjustment = 0
end end
return degreesAdjustment return degreesAdjustment
end end
@ -11582,7 +11597,6 @@ function AIRBOSS:GetHeadingIntoWind( magnetic, coord )
vwind = vwind + adjustDegreesForWindSpeed(vwind) vwind = vwind + adjustDegreesForWindSpeed(vwind)
--self:I("windfrom="..windfrom.." (c)vwind="..vwind) --self:I("windfrom="..windfrom.." (c)vwind="..vwind)
>>>>>>> origin/develop
-- Actually, we want the runway in the wind. -- Actually, we want the runway in the wind.
local intowind = windfrom - self.carrierparam.rwyangle local intowind = windfrom - self.carrierparam.rwyangle
@ -12032,7 +12046,7 @@ function AIRBOSS:_LSOgrade( playerData )
local nS=count(G, '%(') local nS=count(G, '%(')
local nN=N-nS-nL local nN=N-nS-nL
local nNv=Nv-nS-nL local nNv=Nv-nS-nL
-- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn. -- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn.
local Tgroove=playerData.Tgroove local Tgroove=playerData.Tgroove
local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false
@ -12149,7 +12163,7 @@ function AIRBOSS:_LSOgrade( playerData )
elseif not playerData.hover and playerData.actype == AIRBOSS.AircraftCarrier.AV8B then elseif not playerData.hover and playerData.actype == AIRBOSS.AircraftCarrier.AV8B then
------------------------------- -------------------------------
-- AV-8B not cleared to land -- -- Landing clearence is carrier from LC to Landing -- AV-8B not cleared to land -- -- Landing clearence is carrier from LC to Landing
------------------------------- -------------------------------
if playerData.landed then if playerData.landed then
-- AIRBOSS wants your balls! -- AIRBOSS wants your balls!
@ -13517,8 +13531,8 @@ function AIRBOSS:CarrierTurnIntoWind( time, vdeck, uturn )
-- Wind speed. -- Wind speed.
local _, vwind = self:GetWind() local _, vwind = self:GetWind()
-- Speed of carrier in m/s but at least 2 knots. -- Speed of carrier in m/s but at least 4 knots.
local vtot = math.max( vdeck - vwind, UTILS.KnotsToMps( 2 ) ) local vtot = math.max( vdeck - vwind, UTILS.KnotsToMps( 4 ) )
-- Distance to travel -- Distance to travel
local dist = vtot * time local dist = vtot * time
@ -14721,29 +14735,12 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
if radio == nil or call == nil then if radio == nil or call == nil then
return return
end end
<<<<<<< HEAD
-- 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 )
=======
if not self.SRS then if not self.SRS then
-- Create a new radio transmission item. -- Create a new radio transmission item.
local transmission = {} -- #AIRBOSS.Radioitem local transmission = {} -- #AIRBOSS.Radioitem
transmission.radio = radio transmission.radio = radio
transmission.call = call transmission.call = call
transmission.Tplay = timer.getAbsTime() + (delay or 0) transmission.Tplay = timer.getAbsTime() + (delay or 0)
@ -14751,58 +14748,58 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
transmission.isplaying = false transmission.isplaying = false
transmission.Tstarted = nil transmission.Tstarted = nil
transmission.loud = loud and call.loud transmission.loud = loud and call.loud
-- Player onboard number if sender has one. -- Player onboard number if sender has one.
if self:_IsOnboard( call.modexsender ) then if self:_IsOnboard( call.modexsender ) then
self:_Number2Radio( radio, call.modexsender, delay, 0.3, pilotcall ) self:_Number2Radio( radio, call.modexsender, delay, 0.3, pilotcall )
end end
-- Play onboard number if receiver has one. -- Play onboard number if receiver has one.
if self:_IsOnboard( call.modexreceiver ) then if self:_IsOnboard( call.modexreceiver ) then
self:_Number2Radio( radio, call.modexreceiver, delay, 0.3, pilotcall ) self:_Number2Radio( radio, call.modexreceiver, delay, 0.3, pilotcall )
end end
-- Add transmission to the right queue. -- Add transmission to the right queue.
local caller = "" local caller = ""
if radio.alias == "LSO" then if radio.alias == "LSO" then
table.insert( self.RQLSO, transmission ) table.insert( self.RQLSO, transmission )
caller = "LSOCall" caller = "LSOCall"
-- Schedule radio queue checks. -- Schedule radio queue checks.
if not self.RQLid then if not self.RQLid then
self:T( self.lid .. string.format( "Starting LSO radio queue." ) ) 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 ) self.RQLid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQLSO, "LSO" }, 0.02, 0.05 )
end end
elseif radio.alias == "MARSHAL" then elseif radio.alias == "MARSHAL" then
table.insert( self.RQMarshal, transmission ) table.insert( self.RQMarshal, transmission )
caller = "MarshalCall" caller = "MarshalCall"
if not self.RQMid then if not self.RQMid then
self:T( self.lid .. string.format( "Starting Marhal radio queue." ) ) 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 ) self.RQMid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQMarshal, "MARSHAL" }, 0.02, 0.05 )
end end
end end
-- Append radio click sound at the end of the transmission. -- Append radio click sound at the end of the transmission.
if click then if click then
self:RadioTransmission( radio, self[caller].CLICK, false, delay ) self:RadioTransmission( radio, self[caller].CLICK, false, delay )
end end
else else
-- SRS transmission -- 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
local gender = nil local gender = nil
local culture = nil local culture = nil
if radio.alias == "AIRBOSS" then if radio.alias == "AIRBOSS" then
frequency = self.AirbossRadio.frequency frequency = self.AirbossRadio.frequency
modulation = self.AirbossRadio.modulation modulation = self.AirbossRadio.modulation
@ -14810,13 +14807,13 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
gender = self.AirbossRadio.gender gender = self.AirbossRadio.gender
culture = self.AirbossRadio.culture culture = self.AirbossRadio.culture
end end
if radio.alias == "MARSHAL" then if radio.alias == "MARSHAL" then
voice = self.MarshalRadio.voice voice = self.MarshalRadio.voice
gender = self.MarshalRadio.gender gender = self.MarshalRadio.gender
culture = self.MarshalRadio.culture culture = self.MarshalRadio.culture
end end
if radio.alias == "LSO" then if radio.alias == "LSO" then
frequency = self.LSORadio.frequency frequency = self.LSORadio.frequency
modulation = self.LSORadio.modulation modulation = self.LSORadio.modulation
@ -14824,7 +14821,7 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
gender = self.LSORadio.gender gender = self.LSORadio.gender
culture = self.LSORadio.culture culture = self.LSORadio.culture
end end
if pilotcall then if pilotcall then
voice = self.PilotRadio.voice voice = self.PilotRadio.voice
gender = self.PilotRadio.gender gender = self.PilotRadio.gender
@ -14838,59 +14835,21 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
modulation = self.AirbossRadio.modulation modulation = self.AirbossRadio.modulation
radio.alias = "AIRBOSS" radio.alias = "AIRBOSS"
end end
local volume = nil local volume = nil
if loud then if loud then
volume = 1.0 volume = 1.0
end end
--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:I(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)
>>>>>>> origin/develop
end end
end
<<<<<<< HEAD
-- 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
=======
--- Set SRS voice for the pilot calls. --- Set SRS voice for the pilot calls.
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #string Voice (Optional) SRS specific voice -- @param #string Voice (Optional) SRS specific voice
@ -14904,13 +14863,12 @@ function AIRBOSS:SetSRSPilotVoice( Voice, Gender, Culture )
self.PilotRadio.voice = Voice or MSRS.Voices.Microsoft.David self.PilotRadio.voice = Voice or MSRS.Voices.Microsoft.David
self.PilotRadio.gender = Gender or "male" self.PilotRadio.gender = Gender or "male"
self.PilotRadio.culture = Culture or "en-US" self.PilotRadio.culture = Culture or "en-US"
if (not Voice) and self.SRS and self.SRS.google then if (not Voice) and self.SRS and self.SRS.google then
self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J
end end
return self return self
>>>>>>> origin/develop
end end
--- Check if a call needs a subtitle because the complete voice overs are not available. --- Check if a call needs a subtitle because the complete voice overs are not available.
@ -15156,6 +15114,39 @@ function AIRBOSS:_RadioFilename( call, loud, channel )
return filename return filename
end 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,"%((%a+)%)","Morse %1")
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,"(#[%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 " )
text = string.gsub(text,"\n","; ")
return text
end
--- Send text message to player client. --- Send text message to player client.
-- Message format will be "SENDER: RECCEIVER, MESSAGE". -- Message format will be "SENDER: RECCEIVER, MESSAGE".
-- @param #AIRBOSS self -- @param #AIRBOSS self
@ -15167,7 +15158,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})
if playerData and message and message ~= "" then if playerData and message and message ~= "" then
-- Default duration. -- Default duration.
@ -15190,46 +15181,44 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio
-- SCHEDULER:New(nil, self.MessageToPlayer, {self, playerData, message, sender, receiver, duration, clear}, delay) -- 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 ) self:ScheduleOnce( delay, self.MessageToPlayer, self, playerData, message, sender, receiver, duration, clear )
else else
<<<<<<< HEAD
=======
if not self.SRS then if not self.SRS then
-- Wait until previous sound finished. -- Wait until previous sound finished.
local wait = 0 local wait = 0
-- Onboard number to get the attention. -- Onboard number to get the attention.
if receiver == playerData.onboard then if receiver == playerData.onboard then
-- Which voice over number to use. -- Which voice over number to use.
if sender and (sender == "LSO" or sender == "MARSHAL" or sender == "AIRBOSS") then if sender and (sender == "LSO" or sender == "MARSHAL" or sender == "AIRBOSS") then
-- User sound of board number. -- User sound of board number.
wait = wait + self:_Number2Sound( playerData, sender, receiver ) wait = wait + self:_Number2Sound( playerData, sender, receiver )
end end
end end
-- Negative. -- Negative.
if string.find( text:lower(), "negative" ) then if string.find( text:lower(), "negative" ) then
local filename = self:_RadioFilename( self.MarshalCall.NEGATIVE, false, "MARSHAL" ) local filename = self:_RadioFilename( self.MarshalCall.NEGATIVE, false, "MARSHAL" )
USERSOUND:New( filename ):ToGroup( playerData.group, wait ) USERSOUND:New( filename ):ToGroup( playerData.group, wait )
wait = wait + self.MarshalCall.NEGATIVE.duration wait = wait + self.MarshalCall.NEGATIVE.duration
end end
-- Affirm. -- Affirm.
if string.find( text:lower(), "affirm" ) then if string.find( text:lower(), "affirm" ) then
local filename = self:_RadioFilename( self.MarshalCall.AFFIRMATIVE, false, "MARSHAL" ) local filename = self:_RadioFilename( self.MarshalCall.AFFIRMATIVE, false, "MARSHAL" )
USERSOUND:New( filename ):ToGroup( playerData.group, wait ) USERSOUND:New( filename ):ToGroup( playerData.group, wait )
wait = wait + self.MarshalCall.AFFIRMATIVE.duration wait = wait + self.MarshalCall.AFFIRMATIVE.duration
end end
-- Roger. -- Roger.
if string.find( text:lower(), "roger" ) then if string.find( text:lower(), "roger" ) then
local filename = self:_RadioFilename( self.MarshalCall.ROGER, false, "MARSHAL" ) local filename = self:_RadioFilename( self.MarshalCall.ROGER, false, "MARSHAL" )
USERSOUND:New( filename ):ToGroup( playerData.group, wait ) USERSOUND:New( filename ):ToGroup( playerData.group, wait )
wait = wait + self.MarshalCall.ROGER.duration wait = wait + self.MarshalCall.ROGER.duration
end end
-- Play click sound to end message. -- Play click sound to end message.
if wait > 0 then if wait > 0 then
local filename = self:_RadioFilename( self.MarshalCall.CLICK ) local filename = self:_RadioFilename( self.MarshalCall.CLICK )
@ -15242,52 +15231,41 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio
local voice = self.MarshalRadio.voice local voice = self.MarshalRadio.voice
local gender = self.MarshalRadio.gender local gender = self.MarshalRadio.gender
local culture = self.MarshalRadio.culture local culture = self.MarshalRadio.culture
if not sender then sender = "AIRBOSS" end if not sender then sender = "AIRBOSS" end
>>>>>>> origin/develop
-- 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 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 end
end
-- Negative. --if sender == "MARSHAL" then
if string.find( text:lower(), "negative" ) then --voice = self.MarshalRadio.voice
local filename = self:_RadioFilename( self.MarshalCall.NEGATIVE, false, "MARSHAL" ) --gender = self.MarshalRadio.gender
USERSOUND:New( filename ):ToGroup( playerData.group, wait ) --culture = self.MarshalRadio.culture
wait = wait + self.MarshalCall.NEGATIVE.duration --end
end
-- Affirm. if sender == "LSO" then
if string.find( text:lower(), "affirm" ) then frequency = self.LSORadio.frequency
local filename = self:_RadioFilename( self.MarshalCall.AFFIRMATIVE, false, "MARSHAL" ) modulation = self.LSORadio.modulation
USERSOUND:New( filename ):ToGroup( playerData.group, wait ) voice = self.LSORadio.voice
wait = wait + self.MarshalCall.AFFIRMATIVE.duration gender = self.LSORadio.gender
end culture = self.LSORadio.culture
--elseif not sender then
-- TODO - what freq to use here?
--frequency = self.AirbossRadio.frequency
--modulation = self.AirbossRadio.modulation
--sender = "AIRBOSS"
end
-- Roger. self:I(self.lid..text)
if string.find( text:lower(), "roger" ) then self:I({sender,frequency,modulation,voice})
local filename = self:_RadioFilename( self.MarshalCall.ROGER, false, "MARSHAL" ) local srstext = self:_GetNiceSRSText(text)
USERSOUND:New( filename ):ToGroup( playerData.group, wait ) self.SRSQ:NewTransmission(srstext,duration,self.SRS,nil,0.1,nil,nil,nil,frequency,modulation,gender,culture,voice,nil,sender)
wait = wait + self.MarshalCall.ROGER.duration
end 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. -- Text message to player client.
if playerData.client then if playerData.client then
MESSAGE:New( text, duration, sender, clear ):ToClient( playerData.client ) MESSAGE:New( text, duration, sender, clear ):ToClient( playerData.client )
@ -15571,13 +15549,13 @@ end
-- @param #string modex Tail number. -- @param #string modex Tail number.
function AIRBOSS:_MarshallInboundCall(unit, modex) function AIRBOSS:_MarshallInboundCall(unit, modex)
-- Calculate -- Calculate
local vectorCarrier = self:GetCoordinate():GetDirectionVec3(unit:GetCoordinate()) local vectorCarrier = self:GetCoordinate():GetDirectionVec3(unit:GetCoordinate())
local bearing = UTILS.Round(unit:GetCoordinate():GetAngleDegrees( vectorCarrier ), 0) local bearing = UTILS.Round(unit:GetCoordinate():GetAngleDegrees( vectorCarrier ), 0)
local distance = UTILS.Round(UTILS.MetersToNM(unit:GetCoordinate():Get2DDistance(self:GetCoordinate())),0) local distance = UTILS.Round(UTILS.MetersToNM(unit:GetCoordinate():Get2DDistance(self:GetCoordinate())),0)
local angels = UTILS.Round(UTILS.MetersToFeet(unit:GetHeight()/1000),0) local angels = UTILS.Round(UTILS.MetersToFeet(unit:GetHeight()/1000),0)
local state = UTILS.Round(self:_GetFuelState(unit)/1000,1) local state = UTILS.Round(self:_GetFuelState(unit)/1000,1)
-- Pilot: "Marshall, [modex], marking mom's [bearing] for [distance], angels [XX], state [X.X]" -- Pilot: "Marshall, [modex], marking mom's [bearing] for [distance], angels [XX], state [X.X]"
local text=string.format("Marshal, %s, marking mom's %d for %d, angels %d, state %.1f", modex, bearing, distance, angels, state) local text=string.format("Marshal, %s, marking mom's %d for %d, angels %d, state %.1f", modex, bearing, distance, angels, state)
-- Debug message. -- Debug message.
@ -16404,8 +16382,8 @@ function AIRBOSS:_RequestMarshal( _unitName )
-- Voice over of inbound call (regardless of airboss rejecting it or not) -- Voice over of inbound call (regardless of airboss rejecting it or not)
if self.xtVoiceOvers then if self.xtVoiceOvers then
self:_MarshallInboundCall(_unit, playerData.onboard) self:_MarshallInboundCall(_unit, playerData.onboard)
end end
-- Check if player is in CCA -- Check if player is in CCA
local inCCA = playerData.unit:IsInZone( self.zoneCCA ) local inCCA = playerData.unit:IsInZone( self.zoneCCA )
@ -16626,7 +16604,7 @@ function AIRBOSS:_RequestSpinning( _unitName )
-- Some advice. -- Some advice.
if playerData.difficulty == AIRBOSS.Difficulty.EASY then if playerData.difficulty == AIRBOSS.Difficulty.EASY then
local text = "Climb to 1200 feet and proceed to the initial again." local text = "Climb to 1200 feet and proceed to the initial again."
self:MessageToPlayer( playerData, text, "INSTRUCTOR", "" ) self:MessageToPlayer( playerData, text, "AIRBOSS", "" )
end end
return return
@ -16653,12 +16631,12 @@ function AIRBOSS:_RequestCommence( _unitName )
local playerData = self.players[_playername] -- #AIRBOSS.PlayerData local playerData = self.players[_playername] -- #AIRBOSS.PlayerData
if playerData then if playerData then
-- Voice over of Commencing call (regardless of Airboss will rejected or not) -- Voice over of Commencing call (regardless of Airboss will rejected or not)
if self.xtVoiceOvers then if self.xtVoiceOvers then
self:_CommencingCall(_unit, playerData.onboard) self:_CommencingCall(_unit, playerData.onboard)
end end
-- Check if unit is in CCA. -- Check if unit is in CCA.
local text = "" local text = ""
local cleared = false local cleared = false
@ -17381,7 +17359,7 @@ function AIRBOSS:_DisplayCarrierInfo( _unitname )
state = "Deck closed" state = "Deck closed"
end end
if self.turning then if self.turning then
state = state .. " (turning currently)" state = state .. " (currently turning)"
end end
-- Message text. -- Message text.

View File

@ -327,6 +327,15 @@ function FLIGHTGROUP:New(group)
-- TODO: Add pseudo functions. -- TODO: Add pseudo functions.
--- FSM Function OnAfterLandAtAirbase
-- @function [parent=#FLIGHTGROUP] OnAfterLandAtAirbase
-- @param #FLIGHTGROUP self
-- @param #string From State.
-- @param #string Event Trigger.
-- @param #string To State.
-- @param Wrapper.Airbase#AIRBASE Airbase.
-- @return #FLIGHTGROUP self
-- Handle events: -- Handle events:
self:HandleEvent(EVENTS.Birth, self.OnEventBirth) self:HandleEvent(EVENTS.Birth, self.OnEventBirth)
self:HandleEvent(EVENTS.EngineStartup, self.OnEventEngineStartup) self:HandleEvent(EVENTS.EngineStartup, self.OnEventEngineStartup)