mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#AIRBOSS
* Suppress unnecessary SRS TTS calls with empty text
This commit is contained in:
commit
65c384622c
@ -2543,7 +2543,7 @@ function AIRBOSS:AddRecoveryWindow( starttime, stoptime, case, holdingoffset, tu
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
if Tstop <= Tnow then
|
if Tstop <= Tnow then
|
||||||
self:I( string.format( "WARNING: Recovery stop time %s already over. Tnow=%s! Recovery window rejected.", UTILS.SecondsToClock( Tstop ), UTILS.SecondsToClock( Tnow ) ) )
|
string.format( "WARNING: Recovery stop time %s already over. Tnow=%s! Recovery window rejected.", UTILS.SecondsToClock( Tstop ), UTILS.SecondsToClock( Tnow ) )
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -3258,7 +3258,7 @@ function AIRBOSS:SoundCheckLSO( delay )
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -3293,7 +3293,7 @@ function AIRBOSS:SoundCheckMarshal( delay )
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -3684,7 +3684,7 @@ function AIRBOSS:onafterStatus( From, Event, To )
|
|||||||
if i == 0 then
|
if i == 0 then
|
||||||
text = text .. " none"
|
text = text .. " none"
|
||||||
end
|
end
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Check for collision.
|
-- Check for collision.
|
||||||
if collision then
|
if collision then
|
||||||
@ -5459,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
|
||||||
@ -5924,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.
|
||||||
@ -6958,7 +6960,7 @@ function AIRBOSS:_GetFreeStack( ai, case, empty )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self:I( self.lid .. string.format( "Returning free stack %s", tostring( nfree ) ) )
|
self:T( self.lid .. string.format( "Returning free stack %s", tostring( nfree ) ) )
|
||||||
return nfree
|
return nfree
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -7892,7 +7894,7 @@ function AIRBOSS:_RemoveFlight( flight, completely )
|
|||||||
-- Remove player from players table.
|
-- Remove player from players table.
|
||||||
local playerdata = self.players[flight.name]
|
local playerdata = self.players[flight.name]
|
||||||
if playerdata then
|
if playerdata then
|
||||||
self:I( self.lid .. string.format( "Removing player %s completely.", flight.name ) )
|
self:T( self.lid .. string.format( "Removing player %s completely.", flight.name ) )
|
||||||
self.players[flight.name] = nil
|
self.players[flight.name] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -14789,6 +14791,11 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
|
|||||||
self:RadioTransmission( radio, self[caller].CLICK, false, delay )
|
self:RadioTransmission( radio, self[caller].CLICK, false, delay )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
-- SRS transmission
|
||||||
|
if call.subtitle ~= nil and string.len(call.subtitle) > 1 then
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
-- SRS transmission
|
-- SRS transmission
|
||||||
|
|
||||||
@ -15632,7 +15639,7 @@ function AIRBOSS:_LSOCallAircraftBall( modex, nickname, fuelstate )
|
|||||||
local text = string.format( "%s Ball, %.1f.", nickname, fuelstate )
|
local text = string.format( "%s Ball, %.1f.", nickname, fuelstate )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Nickname UPPERCASE.
|
-- Nickname UPPERCASE.
|
||||||
local NICKNAME = nickname:upper()
|
local NICKNAME = nickname:upper()
|
||||||
@ -15668,7 +15675,7 @@ function AIRBOSS:_MarshalCallGasAtTanker( modex )
|
|||||||
local text = string.format( "Bingo fuel! Going for gas at the recovery tanker." )
|
local text = string.format( "Bingo fuel! Going for gas at the recovery tanker." )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
|
|
||||||
-- Create new call to display complete subtitle.
|
-- Create new call to display complete subtitle.
|
||||||
@ -15692,7 +15699,7 @@ function AIRBOSS:_MarshalCallGasAtDivert( modex, divertname )
|
|||||||
local text = string.format( "Bingo fuel! Going for gas at divert field %s.", divertname )
|
local text = string.format( "Bingo fuel! Going for gas at divert field %s.", divertname )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call to display complete subtitle.
|
-- Create new call to display complete subtitle.
|
||||||
local call = self:_NewRadioCall( self.PilotCall.BINGOFUEL, modex, text, self.Tmessage, nil, modex )
|
local call = self:_NewRadioCall( self.PilotCall.BINGOFUEL, modex, text, self.Tmessage, nil, modex )
|
||||||
@ -15714,7 +15721,7 @@ function AIRBOSS:_MarshalCallRecoveryStopped( case )
|
|||||||
local text = string.format( "Case %d recovery ops are stopped. Deck is closed.", case )
|
local text = string.format( "Case %d recovery ops are stopped. Deck is closed.", case )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call to display complete subtitle.
|
-- Create new call to display complete subtitle.
|
||||||
local call = self:_NewRadioCall( self.MarshalCall.CASE, "AIRBOSS", text, self.Tmessage, "99" )
|
local call = self:_NewRadioCall( self.MarshalCall.CASE, "AIRBOSS", text, self.Tmessage, "99" )
|
||||||
@ -15755,7 +15762,7 @@ function AIRBOSS:_MarshalCallRecoveryPausedResumedAt( clock )
|
|||||||
local text = string.format( "aircraft recovery is paused and will be resumed at %s.", clock )
|
local text = string.format( "aircraft recovery is paused and will be resumed at %s.", clock )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call with full subtitle.
|
-- Create new call with full subtitle.
|
||||||
local call = self:_NewRadioCall( self.MarshalCall.RECOVERYPAUSEDRESUMED, "AIRBOSS", text, self.Tmessage, "99" )
|
local call = self:_NewRadioCall( self.MarshalCall.RECOVERYPAUSEDRESUMED, "AIRBOSS", text, self.Tmessage, "99" )
|
||||||
@ -15782,7 +15789,7 @@ function AIRBOSS:_MarshalCallClearedForRecovery( modex, case )
|
|||||||
local text = string.format( "you're cleared for Case %d recovery.", case )
|
local text = string.format( "you're cleared for Case %d recovery.", case )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call with full subtitle.
|
-- Create new call with full subtitle.
|
||||||
local call = self:_NewRadioCall( self.MarshalCall.CLEAREDFORRECOVERY, "MARSHAL", text, self.Tmessage, modex )
|
local call = self:_NewRadioCall( self.MarshalCall.CLEAREDFORRECOVERY, "MARSHAL", text, self.Tmessage, modex )
|
||||||
@ -15820,7 +15827,7 @@ function AIRBOSS:_MarshalCallNewFinalBearing( FB )
|
|||||||
local text = string.format( "new final bearing %03d°.", FB )
|
local text = string.format( "new final bearing %03d°.", FB )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call with full subtitle.
|
-- Create new call with full subtitle.
|
||||||
local call = self:_NewRadioCall( self.MarshalCall.NEWFB, "AIRBOSS", text, self.Tmessage, "99" )
|
local call = self:_NewRadioCall( self.MarshalCall.NEWFB, "AIRBOSS", text, self.Tmessage, "99" )
|
||||||
@ -15843,7 +15850,7 @@ function AIRBOSS:_MarshalCallCarrierTurnTo( hdg )
|
|||||||
local text = string.format( "carrier is now starting turn to heading %03d°.", hdg )
|
local text = string.format( "carrier is now starting turn to heading %03d°.", hdg )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call with full subtitle.
|
-- Create new call with full subtitle.
|
||||||
local call = self:_NewRadioCall( self.MarshalCall.CARRIERTURNTOHEADING, "AIRBOSS", text, self.Tmessage, "99" )
|
local call = self:_NewRadioCall( self.MarshalCall.CARRIERTURNTOHEADING, "AIRBOSS", text, self.Tmessage, "99" )
|
||||||
@ -15874,7 +15881,7 @@ function AIRBOSS:_MarshalCallStackFull( modex, nwaiting )
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call with full subtitle.
|
-- Create new call with full subtitle.
|
||||||
local call = self:_NewRadioCall( self.MarshalCall.STACKFULL, "AIRBOSS", text, self.Tmessage, modex )
|
local call = self:_NewRadioCall( self.MarshalCall.STACKFULL, "AIRBOSS", text, self.Tmessage, modex )
|
||||||
@ -15945,7 +15952,7 @@ function AIRBOSS:_MarshalCallArrived( modex, case, brc, altitude, charlie, qfe )
|
|||||||
local text = string.format( "Case %d, expected BRC %03d°, hold at angels %d. Expected Charlie Time %s. Altimeter %.2f. Report see me.", case, brc, angels, charlie, qfe )
|
local text = string.format( "Case %d, expected BRC %03d°, hold at angels %d. Expected Charlie Time %s. Altimeter %.2f. Report see me.", case, brc, angels, charlie, qfe )
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I( self.lid .. text )
|
self:T( self.lid .. text )
|
||||||
|
|
||||||
-- Create new call to display complete subtitle.
|
-- Create new call to display complete subtitle.
|
||||||
local casecall = self:_NewRadioCall( self.MarshalCall.CASE, "MARSHAL", text, self.Tmessage, modex )
|
local casecall = self:_NewRadioCall( self.MarshalCall.CASE, "MARSHAL", text, self.Tmessage, modex )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user