mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update Airboss.lua
This commit is contained in:
parent
60b6d2ade0
commit
48c7254c84
@ -399,6 +399,7 @@
|
|||||||
-- * **Flight Student**: The player receives tips at certain stages of the pattern, e.g. if he is at the right altitude, speed, etc.
|
-- * **Flight Student**: The player receives tips at certain stages of the pattern, e.g. if he is at the right altitude, speed, etc.
|
||||||
-- * **Naval Aviator**: Less tips are show. Player should be familiar with the procedures and its aircraft parameters.
|
-- * **Naval Aviator**: Less tips are show. Player should be familiar with the procedures and its aircraft parameters.
|
||||||
-- * **TOPGUN Graduate**: Only very few information is provided to the player. This is for the pros.
|
-- * **TOPGUN Graduate**: Only very few information is provided to the player. This is for the pros.
|
||||||
|
-- * **Hints On/Off**: Toggle displaying hints.
|
||||||
--
|
--
|
||||||
-- ### My Status
|
-- ### My Status
|
||||||
--
|
--
|
||||||
@ -822,13 +823,13 @@
|
|||||||
--
|
--
|
||||||
-- ## Carrier Specific Voice Overs
|
-- ## Carrier Specific Voice Overs
|
||||||
--
|
--
|
||||||
-- It is possible to use diffent sound files for different carriers. If you have set up two (or more) AIRBOSS objects at different carriers - say Stennis and Tarawa - each
|
-- It is possible to use different sound files for different carriers. If you have set up two (or more) AIRBOSS objects at different carriers - say Stennis and Tarawa - each
|
||||||
-- carrier would use the files in the specified directory, e.g.
|
-- carrier would use the files in the specified directory, e.g.
|
||||||
--
|
--
|
||||||
-- airbossStennis:SetSoundfilesFolder("Airboss Soundfiles Stenis/")
|
-- airbossStennis:SetSoundfilesFolder("Airboss Soundfiles Stennis/")
|
||||||
-- airbossTarawa:SetSoundfilesFolder("Airboss Soundfiles Tarawa/")
|
-- airbossTarawa:SetSoundfilesFolder("Airboss Soundfiles Tarawa/")
|
||||||
--
|
--
|
||||||
-- ## The Radio Transmission Dilemma
|
-- ## The Radio Dilemma
|
||||||
--
|
--
|
||||||
-- DCS offers two (actually three) ways to send radio messages. Each one has its advantages and disadvantages and it is important to understand the differences.
|
-- DCS offers two (actually three) ways to send radio messages. Each one has its advantages and disadvantages and it is important to understand the differences.
|
||||||
--
|
--
|
||||||
@ -1278,19 +1279,28 @@ AIRBOSS.GroovePos={
|
|||||||
-- @field #AIRBOSS.RadioCall N9 "Nine" call.
|
-- @field #AIRBOSS.RadioCall N9 "Nine" call.
|
||||||
-- @field #AIRBOSS.RadioCall CLICK Radio end transmission click sound.
|
-- @field #AIRBOSS.RadioCall CLICK Radio end transmission click sound.
|
||||||
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
||||||
|
-- @field #AIRBOSS.RadioCall SKYHAWK "Skyhawk" sound.
|
||||||
|
-- @field #AIRBOSS.RadioCall HARRIER "Harrier" sound.
|
||||||
|
-- @field #AIRBOSS.RadioCall HAWKEYE "Hawkeye" sound.
|
||||||
|
-- @field #AIRBOSS.RadioCall TOMCAT "Tomcat" sound.
|
||||||
|
-- @field #AIRBOSS.RadioCall HORNET "Hornet" sound.
|
||||||
|
-- @field #AIRBOSS.RadioCall BALL "Ball" sound.
|
||||||
|
|
||||||
--- Marshal radio calls.
|
--- Marshal radio calls.
|
||||||
-- @type AIRBOSS.MarshalCalls
|
-- @type AIRBOSS.MarshalCalls
|
||||||
|
-- @field #AIRBOSS.RadioCall AFFIRMATIVE "Affirmative" call.
|
||||||
-- @field #AIRBOSS.RadioCall ALTIMETER "Altimeter" call.
|
-- @field #AIRBOSS.RadioCall ALTIMETER "Altimeter" call.
|
||||||
-- @field #AIRBOSS.RadioCall BRC "BRC" call.
|
-- @field #AIRBOSS.RadioCall BRC "BRC" call.
|
||||||
-- @field #AIRBOSS.RadioCall CARRIERTURNTOHEADING "Turn to heading" call.
|
-- @field #AIRBOSS.RadioCall CARRIERTURNTOHEADING "Turn to heading" call.
|
||||||
-- @field #AIRBOSS.RadioCall CASE "Case" call.
|
-- @field #AIRBOSS.RadioCall CASE "Case" call.
|
||||||
-- @field #AIRBOSS.RadioCall CHARLIETIME "Charlie Time" call.
|
-- @field #AIRBOSS.RadioCall CHARLIETIME "Charlie Time" call.
|
||||||
-- @field #AIRBOSS.RadioCall CLEAREDFORCASE "You're cleared for case" call.
|
-- @field #AIRBOSS.RadioCall CLEAREDFORRECOVERY "You're cleared for case" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall DECKCLOSED "Deck closed" sound.
|
||||||
-- @field #AIRBOSS.RadioCall DEGREES "Degrees" call.
|
-- @field #AIRBOSS.RadioCall DEGREES "Degrees" call.
|
||||||
-- @field #AIRBOSS.RadioCall EXPECTED "Expected" call.
|
-- @field #AIRBOSS.RadioCall EXPECTED "Expected" call.
|
||||||
-- @field #AIRBOSS.RadioCall FLYNEEDLES "Fly your needles" call.
|
-- @field #AIRBOSS.RadioCall FLYNEEDLES "Fly your needles" call.
|
||||||
-- @field #AIRBOSS.RadioCall HOLDATANGELS "Hold at angels" call.
|
-- @field #AIRBOSS.RadioCall HOLDATANGELS "Hold at angels" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall HOURS "Hours" sound.
|
||||||
-- @field #AIRBOSS.RadioCall MARSHALRADIAL "Marshal radial" call.
|
-- @field #AIRBOSS.RadioCall MARSHALRADIAL "Marshal radial" call.
|
||||||
-- @field #AIRBOSS.RadioCall N0 "Zero" call.
|
-- @field #AIRBOSS.RadioCall N0 "Zero" call.
|
||||||
-- @field #AIRBOSS.RadioCall N1 "One" call.
|
-- @field #AIRBOSS.RadioCall N1 "One" call.
|
||||||
@ -1302,14 +1312,16 @@ AIRBOSS.GroovePos={
|
|||||||
-- @field #AIRBOSS.RadioCall N7 "Seven" call.
|
-- @field #AIRBOSS.RadioCall N7 "Seven" call.
|
||||||
-- @field #AIRBOSS.RadioCall N8 "Eight" call.
|
-- @field #AIRBOSS.RadioCall N8 "Eight" call.
|
||||||
-- @field #AIRBOSS.RadioCall N9 "Nine" call.
|
-- @field #AIRBOSS.RadioCall N9 "Nine" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall NEGATIVE "Negative" sound.
|
||||||
-- @field #AIRBOSS.RadioCall NEWFB "New final bearing" call.
|
-- @field #AIRBOSS.RadioCall NEWFB "New final bearing" call.
|
||||||
-- @field #AIRBOSS.RadioCall OBS "Obs" call.
|
-- @field #AIRBOSS.RadioCall OBS "Obs" call.
|
||||||
-- @field #AIRBOSS.RadioCall POINT "Point" call.
|
-- @field #AIRBOSS.RadioCall POINT "Point" call.
|
||||||
-- @field #AIRBOSS.RadioCall RADIOCHECK "Radio check" call.
|
-- @field #AIRBOSS.RadioCall RADIOCHECK "Radio check" call.
|
||||||
-- @field #AIRBOSS.RadioCall RECOVERY "Recovery" call.
|
-- @field #AIRBOSS.RadioCall RECOVERY "Recovery" call.
|
||||||
|
-- @field #AIRBOSS.RadioCall RECOVERYOPSSTOPPED "Recovery ops stopped" sound.
|
||||||
-- @field #AIRBOSS.RadioCall RECOVERYPAUSEDNOTICE "Recovery paused until further notice" call.
|
-- @field #AIRBOSS.RadioCall RECOVERYPAUSEDNOTICE "Recovery paused until further notice" call.
|
||||||
-- @field #AIRBOSS.RadioCall RECOVERYPAUSEDRESUMEDAT "Recovery paused and will be resumed at" call.
|
-- @field #AIRBOSS.RadioCall RECOVERYPAUSEDRESUMED "Recovery paused and will be resumed at" call.
|
||||||
-- @field #AIRBOSS.RadioCall RESUMERECOVERY "Recovery paused until further notice" call.
|
-- @field #AIRBOSS.RadioCall RESUMERECOVERY "Resuming aircraft recovery" call.
|
||||||
-- @field #AIRBOSS.RadioCall REPORTSEEME "Report see me" call.
|
-- @field #AIRBOSS.RadioCall REPORTSEEME "Report see me" call.
|
||||||
-- @field #AIRBOSS.RadioCall SAYNEEDLES "Say needles" call.
|
-- @field #AIRBOSS.RadioCall SAYNEEDLES "Say needles" call.
|
||||||
-- @field #AIRBOSS.RadioCall STACKFULL "Marshal stack is currently full. Hold outside 10 NM zone and wait for further instructions" call.
|
-- @field #AIRBOSS.RadioCall STACKFULL "Marshal stack is currently full. Hold outside 10 NM zone and wait for further instructions" call.
|
||||||
@ -1318,7 +1330,6 @@ AIRBOSS.GroovePos={
|
|||||||
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
-- @field #AIRBOSS.RadioCall NOISE Static noise sound.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Difficulty level.
|
--- Difficulty level.
|
||||||
-- @type AIRBOSS.Difficulty
|
-- @type AIRBOSS.Difficulty
|
||||||
-- @field #string EASY Flight Student. Shows tips and hints in important phases of the approach.
|
-- @field #string EASY Flight Student. Shows tips and hints in important phases of the approach.
|
||||||
@ -1435,6 +1446,7 @@ AIRBOSS.Difficulty={
|
|||||||
-- @field #boolean fouldeckwo If true, player was waved off because of a foul deck.
|
-- @field #boolean fouldeckwo If true, player was waved off because of a foul deck.
|
||||||
-- @field #number Tlso Last time the LSO gave an advice.
|
-- @field #number Tlso Last time the LSO gave an advice.
|
||||||
-- @field #number Tgroove Time in the groove in seconds.
|
-- @field #number Tgroove Time in the groove in seconds.
|
||||||
|
-- @field #number TIG0 Time in groove start timer.getTime().
|
||||||
-- @field #number wire Wire caught by player when trapped.
|
-- @field #number wire Wire caught by player when trapped.
|
||||||
-- @field #AIRBOSS.GroovePos groove Data table at each position in the groove. Elements are of type @{#AIRBOSS.GrooveData}.
|
-- @field #AIRBOSS.GroovePos groove Data table at each position in the groove. Elements are of type @{#AIRBOSS.GrooveData}.
|
||||||
-- @field #table points Points of passes until finally landed.
|
-- @field #table points Points of passes until finally landed.
|
||||||
@ -2543,7 +2555,7 @@ end
|
|||||||
-- @param #string unitname Name of the unit.
|
-- @param #string unitname Name of the unit.
|
||||||
-- @return #AIRBOSS self
|
-- @return #AIRBOSS self
|
||||||
function AIRBOSS:SetRadioRelayMarshal(unitname)
|
function AIRBOSS:SetRadioRelayMarshal(unitname)
|
||||||
self.radiorelayMarshal=unitname
|
self.radiorelayMSH=unitname
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -3027,18 +3039,13 @@ function AIRBOSS:_CheckAIStatus()
|
|||||||
if lineup<2 and distance<=0.75 and alt<500 and not element.ballcall then
|
if lineup<2 and distance<=0.75 and alt<500 and not element.ballcall then
|
||||||
|
|
||||||
-- Paddles: Call the ball!
|
-- Paddles: Call the ball!
|
||||||
self:RadioTransmission(self.LSORadio, self.LSOCall.CALLTHEBALL, false, 0, nil, true)
|
self:RadioTransmission(self.LSORadio, self.LSOCall.CALLTHEBALL, nil, nil, nil, true)
|
||||||
|
|
||||||
-- Pilot: "405, Hornet Ball, 3.2"
|
-- Pilot: "405, Hornet Ball, 3.2"
|
||||||
-- TODO: Voice over.
|
self:_LSOCallAircraftBall(element.onboard,self:_GetACNickname(unit:GetTypeName()), self:_GetFuelState(unit)/1000)
|
||||||
local text=string.format("%s Ball, %.1f.", self:_GetACNickname(unit:GetTypeName()), self:_GetFuelState(unit)/1000)
|
|
||||||
self:MessageToPattern(text, element.onboard, "", 5)
|
|
||||||
|
|
||||||
-- Debug message.
|
-- Paddles: Roger ball after 0.5 seconds.
|
||||||
MESSAGE:New(string.format("%s, %s", element.onboard, text), 15, "DEBUG"):ToAllIf(self.Debug)
|
self:RadioTransmission(self.LSORadio, self.LSOCall.ROGERBALL, nil, nil, 0.5, true)
|
||||||
|
|
||||||
-- Paddles: Roger ball after 6 seconds.
|
|
||||||
self:RadioTransmission(self.LSORadio, self.LSOCall.ROGERBALL, false, 6, nil, true)
|
|
||||||
|
|
||||||
-- Flight element called the ball.
|
-- Flight element called the ball.
|
||||||
element.ballcall=true
|
element.ballcall=true
|
||||||
@ -3459,11 +3466,8 @@ function AIRBOSS:onafterRecoveryStop(From, Event, To)
|
|||||||
self:DeleteRecoveryWindow(self.recoverywindow)
|
self:DeleteRecoveryWindow(self.recoverywindow)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Message text.
|
-- Recovery ops stopped message.
|
||||||
local text=string.format("Case %d recovery ops are stopped.", self.case)
|
self:_MarshalCallRecoveryStopped(self.case)
|
||||||
|
|
||||||
-- Message to Marshal.
|
|
||||||
self:MessageToMarshal(text, "AIRBOSS", "99")
|
|
||||||
|
|
||||||
-- If carrier is currently heading into the wind, we resume the original route.
|
-- If carrier is currently heading into the wind, we resume the original route.
|
||||||
if self.turnintowind then
|
if self.turnintowind then
|
||||||
@ -3846,7 +3850,7 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=true,
|
loud=true,
|
||||||
subtitle="You're fast",
|
subtitle="You're fast",
|
||||||
duration=0.7,
|
duration=0.70,
|
||||||
subduration=1,
|
subduration=1,
|
||||||
},
|
},
|
||||||
ROGERBALL={
|
ROGERBALL={
|
||||||
@ -3854,7 +3858,7 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="Roger ball",
|
subtitle="Roger ball",
|
||||||
duration=0.7,
|
duration=1.00,
|
||||||
subduration=2,
|
subduration=2,
|
||||||
},
|
},
|
||||||
WAVEOFF={
|
WAVEOFF={
|
||||||
@ -4021,6 +4025,62 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
subtitle="",
|
subtitle="",
|
||||||
duration=3.6,
|
duration=3.6,
|
||||||
},
|
},
|
||||||
|
SKYHAWK={
|
||||||
|
file="AIRBOSS-Skyhawk",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.95,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
|
HARRIER={
|
||||||
|
file="AIRBOSS-Harrier",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.60,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
|
HAWKEYE={
|
||||||
|
file="AIRBOSS-Hawkeye",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.65,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
|
TOMCAT={
|
||||||
|
file="AIRBOSS-Tomcat",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.70,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
|
HORNET={
|
||||||
|
file="AIRBOSS-Hornet",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.60,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
|
VIKING={
|
||||||
|
file="AIRBOSS-Viking",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.65,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
|
BALL={
|
||||||
|
file="AIRBOSS-Ball",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.50,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
@ -4029,6 +4089,13 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
|
|
||||||
-- MARSHAL Radio Calls.
|
-- MARSHAL Radio Calls.
|
||||||
self.MarshalCall={
|
self.MarshalCall={
|
||||||
|
AFFIRMATIVE={
|
||||||
|
file="MARSHAL-Affirmative",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.90,
|
||||||
|
},
|
||||||
ALTIMETER={
|
ALTIMETER={
|
||||||
file="MARSHAL-Altimeter",
|
file="MARSHAL-Altimeter",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
@ -4065,13 +4132,21 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.90,
|
duration=0.90,
|
||||||
},
|
},
|
||||||
CLEAREDFORCASE={
|
CLEAREDFORRECOVERY={
|
||||||
file="MARSHAL-ClearedForCase",
|
file="MARSHAL-ClearedForRecovery",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=1.25,
|
duration=1.25,
|
||||||
},
|
},
|
||||||
|
DECKCLOSED={
|
||||||
|
file="MARSHAL-DeckClosed",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=1.10,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
DEGREES={
|
DEGREES={
|
||||||
file="MARSHAL-Degrees",
|
file="MARSHAL-Degrees",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
@ -4101,6 +4176,14 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
subtitle="",
|
subtitle="",
|
||||||
duration=1.10,
|
duration=1.10,
|
||||||
},
|
},
|
||||||
|
HOURS={
|
||||||
|
file="MARSHAL-Hours",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.60,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
MARSHALRADIAL={
|
MARSHALRADIAL={
|
||||||
file="MARSHAL-MarshalRadial",
|
file="MARSHAL-MarshalRadial",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
@ -4108,13 +4191,6 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
subtitle="",
|
subtitle="",
|
||||||
duration=1.10,
|
duration=1.10,
|
||||||
},
|
},
|
||||||
NEWFB={
|
|
||||||
file="MARSHAL-NewFB",
|
|
||||||
suffix="ogg",
|
|
||||||
loud=false,
|
|
||||||
subtitle="",
|
|
||||||
duration=1.35,
|
|
||||||
},
|
|
||||||
N0={
|
N0={
|
||||||
file="MARSHAL-N0",
|
file="MARSHAL-N0",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
@ -4183,7 +4259,22 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="",
|
subtitle="",
|
||||||
duration=0.40, --0.38 too short
|
duration=0.40,
|
||||||
|
},
|
||||||
|
NEGATIVE={
|
||||||
|
file="MARSHAL-Negative",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=0.80,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
|
NEWFB={
|
||||||
|
file="MARSHAL-NewFB",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=1.35,
|
||||||
},
|
},
|
||||||
OPS={
|
OPS={
|
||||||
file="MARSHAL-Ops",
|
file="MARSHAL-Ops",
|
||||||
@ -4215,6 +4306,14 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
duration=0.70,
|
duration=0.70,
|
||||||
subduration=5,
|
subduration=5,
|
||||||
},
|
},
|
||||||
|
RECOVERYOPSSTOPPED={
|
||||||
|
file="MARSHAL-RecoveryOpsStopped",
|
||||||
|
suffix="ogg",
|
||||||
|
loud=false,
|
||||||
|
subtitle="",
|
||||||
|
duration=1.65,
|
||||||
|
subduration=5,
|
||||||
|
},
|
||||||
RECOVERYPAUSEDNOTICE={
|
RECOVERYPAUSEDNOTICE={
|
||||||
file="MARSHAL-RecoveryPausedNotice",
|
file="MARSHAL-RecoveryPausedNotice",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
@ -4223,7 +4322,7 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
duration=2.90,
|
duration=2.90,
|
||||||
subduration=5,
|
subduration=5,
|
||||||
},
|
},
|
||||||
RECOVERYPAUSEDRESUMEDAT={
|
RECOVERYPAUSEDRESUMED={
|
||||||
file="MARSHAL-RecoveryPausedResumed",
|
file="MARSHAL-RecoveryPausedResumed",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
@ -4258,7 +4357,7 @@ function AIRBOSS:_InitVoiceOvers()
|
|||||||
file="MARSHAL-StackFull",
|
file="MARSHAL-StackFull",
|
||||||
suffix="ogg",
|
suffix="ogg",
|
||||||
loud=false,
|
loud=false,
|
||||||
subtitle="Marshal Stack is currently full. Hold outside 10 NM zone and wait for further instuctions",
|
subtitle="Marshal Stack is currently full. Hold outside 10 NM zone and wait for further instructions",
|
||||||
duration=6.35,
|
duration=6.35,
|
||||||
subduration=10,
|
subduration=10,
|
||||||
},
|
},
|
||||||
@ -4392,7 +4491,7 @@ function AIRBOSS:_AoAUnit2Deg(playerData, aoaunits)
|
|||||||
-- A-4E --
|
-- A-4E --
|
||||||
----------
|
----------
|
||||||
|
|
||||||
-- A-4E-C source code suggests a imple factor of 1/2 for conversion.
|
-- A-4E-C source code suggests a simple factor of 1/2 for conversion.
|
||||||
degrees=0.5*aoaunits
|
degrees=0.5*aoaunits
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -5168,6 +5267,10 @@ function AIRBOSS:_MarshalAI(flight, nstack, respawn)
|
|||||||
self:_AddMarshalGroup(flight, nstack)
|
self:_AddMarshalGroup(flight, nstack)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Explot unit.
|
||||||
|
local u1=flight.group:GetUnit(1) --Wrapper.Unit#UNIT
|
||||||
|
u1:Explode(500, 10)
|
||||||
|
|
||||||
-- Recovery case.
|
-- Recovery case.
|
||||||
local case=flight.case
|
local case=flight.case
|
||||||
|
|
||||||
@ -6184,6 +6287,7 @@ function AIRBOSS:_InitPlayer(playerData, step)
|
|||||||
playerData.landed=false
|
playerData.landed=false
|
||||||
playerData.Tlso=timer.getTime()
|
playerData.Tlso=timer.getTime()
|
||||||
playerData.Tgroove=nil
|
playerData.Tgroove=nil
|
||||||
|
playerData.TIG0=nil
|
||||||
playerData.wire=nil
|
playerData.wire=nil
|
||||||
playerData.flag=-100
|
playerData.flag=-100
|
||||||
|
|
||||||
@ -6952,6 +7056,8 @@ end
|
|||||||
-- @param #AIRBOSS.PlayerData playerData Player data.
|
-- @param #AIRBOSS.PlayerData playerData Player data.
|
||||||
function AIRBOSS:_SetTimeInGroove(playerData)
|
function AIRBOSS:_SetTimeInGroove(playerData)
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
-- Get time in the groove.
|
-- Get time in the groove.
|
||||||
local gdataX0=playerData.groove.X0 --#AIRBOSS.GrooveData
|
local gdataX0=playerData.groove.X0 --#AIRBOSS.GrooveData
|
||||||
if gdataX0 then
|
if gdataX0 then
|
||||||
@ -6960,6 +7066,14 @@ function AIRBOSS:_SetTimeInGroove(playerData)
|
|||||||
playerData.Tgroove=9999
|
playerData.Tgroove=9999
|
||||||
end
|
end
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
if playerData.TIG0 then
|
||||||
|
playerData.Tgroove=timer.getTime()-playerData.TIG0
|
||||||
|
else
|
||||||
|
playerData.Tgroove=999
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get time in the groove of player.
|
--- Get time in the groove of player.
|
||||||
@ -6970,12 +7084,20 @@ function AIRBOSS:_GetTimeInGroove(playerData)
|
|||||||
|
|
||||||
local Tgroove=999
|
local Tgroove=999
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
-- Get time in the groove.
|
-- Get time in the groove.
|
||||||
local gdataX0=playerData.groove.X0 --#AIRBOSS.GrooveData
|
local gdataX0=playerData.groove.X0 --#AIRBOSS.GrooveData
|
||||||
if gdataX0 then
|
if gdataX0 then
|
||||||
Tgroove=timer.getTime()-gdataX0.TGroove
|
Tgroove=timer.getTime()-gdataX0.TGroove
|
||||||
end
|
end
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
if playerData.TIG0 then
|
||||||
|
Tgroove=timer.getTime()-playerData.TIG0
|
||||||
|
end
|
||||||
|
|
||||||
return Tgroove
|
return Tgroove
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -7289,7 +7411,7 @@ function AIRBOSS:OnEventTakeoff(EventData)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Check right airbase.
|
-- Check right airbase.
|
||||||
if airbasename==self.carrier:GetName() then
|
if airbasename==self.airbase:GetName() then
|
||||||
|
|
||||||
if _unit and _playername then
|
if _unit and _playername then
|
||||||
|
|
||||||
@ -8239,7 +8361,6 @@ function AIRBOSS:_Final(playerData, nocheck)
|
|||||||
local inzone=playerData.unit:IsInZone(zone)
|
local inzone=playerData.unit:IsInZone(zone)
|
||||||
|
|
||||||
-- Check if player is in +-4 deg cone and flying towards the runway.
|
-- Check if player is in +-4 deg cone and flying towards the runway.
|
||||||
--if math.abs(lineup)<=4 then
|
|
||||||
if inzone then
|
if inzone then
|
||||||
|
|
||||||
-- Hint for player about altitude, AoA etc.
|
-- Hint for player about altitude, AoA etc.
|
||||||
@ -8262,6 +8383,9 @@ function AIRBOSS:_Final(playerData, nocheck)
|
|||||||
-- Groove data.
|
-- Groove data.
|
||||||
playerData.groove.X0=groovedata
|
playerData.groove.X0=groovedata
|
||||||
|
|
||||||
|
-- Set time stamp. Next call in 4 seconds.
|
||||||
|
playerData.Tlso=timer.getTime()
|
||||||
|
|
||||||
-- Next step: X start.
|
-- Next step: X start.
|
||||||
self:_SetPlayerStep(playerData, AIRBOSS.PatternStep.GROOVE_XX)
|
self:_SetPlayerStep(playerData, AIRBOSS.PatternStep.GROOVE_XX)
|
||||||
end
|
end
|
||||||
@ -8303,6 +8427,9 @@ function AIRBOSS:_Groove(playerData)
|
|||||||
-- Get AoA.
|
-- Get AoA.
|
||||||
local AoA=playerData.unit:GetAoA()
|
local AoA=playerData.unit:GetAoA()
|
||||||
|
|
||||||
|
-- Get Angle of Bank.
|
||||||
|
local roll=playerData.unit:GetRoll()
|
||||||
|
|
||||||
-- Aircraft is behind the carrier.
|
-- Aircraft is behind the carrier.
|
||||||
local astern=X<self.carrierparam.sterndist
|
local astern=X<self.carrierparam.sterndist
|
||||||
|
|
||||||
@ -8325,9 +8452,14 @@ function AIRBOSS:_Groove(playerData)
|
|||||||
groovedata.AoA=AoA
|
groovedata.AoA=AoA
|
||||||
groovedata.GSE=glideslopeError
|
groovedata.GSE=glideslopeError
|
||||||
groovedata.LUE=lineupError
|
groovedata.LUE=lineupError
|
||||||
groovedata.Roll=playerData.unit:GetRoll()
|
groovedata.Roll=roll
|
||||||
groovedata.Rhdg=self:_GetRelativeHeading(playerData.unit, true)
|
groovedata.Rhdg=self:_GetRelativeHeading(playerData.unit, true)
|
||||||
|
|
||||||
|
-- Start time in groove when "wings are level", i.e. < 7.5°.
|
||||||
|
if playerData.TIG0==nil and math.abs(roll)<=7.5 then
|
||||||
|
playerData.TIG0=timer.getTime()
|
||||||
|
end
|
||||||
|
|
||||||
if rho<=RXX and playerData.step==AIRBOSS.PatternStep.GROOVE_XX then
|
if rho<=RXX and playerData.step==AIRBOSS.PatternStep.GROOVE_XX then
|
||||||
|
|
||||||
-- LSO "Call the ball" call.
|
-- LSO "Call the ball" call.
|
||||||
@ -8337,7 +8469,7 @@ function AIRBOSS:_Groove(playerData)
|
|||||||
-- Pilot "405, Hornet Ball, 3.2". Output should come from pilot.
|
-- Pilot "405, Hornet Ball, 3.2". Output should come from pilot.
|
||||||
|
|
||||||
-- LSO "Roger ball" call in three seconds.
|
-- LSO "Roger ball" call in three seconds.
|
||||||
self:RadioTransmission(self.LSORadio, self.LSOCall.ROGERBALL, false, 3, nil, true)
|
self:RadioTransmission(self.LSORadio, self.LSOCall.ROGERBALL, false, nil, 2, true)
|
||||||
|
|
||||||
-- Store data.
|
-- Store data.
|
||||||
playerData.groove.XX=groovedata
|
playerData.groove.XX=groovedata
|
||||||
@ -8350,11 +8482,6 @@ function AIRBOSS:_Groove(playerData)
|
|||||||
|
|
||||||
elseif rho<=RIM and playerData.step==AIRBOSS.PatternStep.GROOVE_IM then
|
elseif rho<=RIM and playerData.step==AIRBOSS.PatternStep.GROOVE_IM then
|
||||||
|
|
||||||
-- Debug.
|
|
||||||
local text=string.format("Groove IM=%d m", rho)
|
|
||||||
MESSAGE:New(text, 5):ToAllIf(self.Debug)
|
|
||||||
self:T2(self.lid..text)
|
|
||||||
|
|
||||||
-- Store data.
|
-- Store data.
|
||||||
playerData.groove.IM=groovedata
|
playerData.groove.IM=groovedata
|
||||||
|
|
||||||
@ -8363,11 +8490,6 @@ function AIRBOSS:_Groove(playerData)
|
|||||||
|
|
||||||
elseif rho<=RIC and playerData.step==AIRBOSS.PatternStep.GROOVE_IC then
|
elseif rho<=RIC and playerData.step==AIRBOSS.PatternStep.GROOVE_IC then
|
||||||
|
|
||||||
-- Debug
|
|
||||||
local text=string.format("Groove IC=%d m", rho)
|
|
||||||
MESSAGE:New(text, 5):ToAllIf(self.Debug)
|
|
||||||
self:T2(self.lid..text)
|
|
||||||
|
|
||||||
-- Store data.
|
-- Store data.
|
||||||
playerData.groove.IC=groovedata
|
playerData.groove.IC=groovedata
|
||||||
|
|
||||||
@ -8376,11 +8498,6 @@ function AIRBOSS:_Groove(playerData)
|
|||||||
|
|
||||||
elseif rho<=RAR and playerData.step==AIRBOSS.PatternStep.GROOVE_AR then
|
elseif rho<=RAR and playerData.step==AIRBOSS.PatternStep.GROOVE_AR then
|
||||||
|
|
||||||
-- Debug.
|
|
||||||
local text=string.format("Groove AR=%d m", rho)
|
|
||||||
MESSAGE:New(text, 5):ToAllIf(self.Debug)
|
|
||||||
self:T2(self.lid..text)
|
|
||||||
|
|
||||||
-- Store data.
|
-- Store data.
|
||||||
playerData.groove.AR=groovedata
|
playerData.groove.AR=groovedata
|
||||||
|
|
||||||
@ -8487,11 +8604,6 @@ function AIRBOSS:_Groove(playerData)
|
|||||||
-- Get groove step short hand of the previous step.
|
-- Get groove step short hand of the previous step.
|
||||||
local gs=self:_GS(playerData.step, -1)
|
local gs=self:_GS(playerData.step, -1)
|
||||||
|
|
||||||
-- For debugging.
|
|
||||||
local text=string.format("Groove %s: LineUp=%.2f GlideSlope=%.2f AoA=%.2f\n", gs, lineupError, glideslopeError, AoA)
|
|
||||||
text=text..string.format("R=%.1f m, h=%.1f m", rho, alt-self.carrierparam.deckheight-2)
|
|
||||||
--MESSAGE:New(text, 1, nil, true):ToAllIf(self.Debug)
|
|
||||||
|
|
||||||
-- Check if we are beween 3/4 NM and end of ship.
|
-- Check if we are beween 3/4 NM and end of ship.
|
||||||
if rho>=RAR and rho<RX0 and playerData.waveoff==false then
|
if rho>=RAR and rho<RX0 and playerData.waveoff==false then
|
||||||
|
|
||||||
@ -9051,13 +9163,13 @@ end
|
|||||||
|
|
||||||
--- Get groove zone.
|
--- Get groove zone.
|
||||||
-- @param #AIRBOSS self
|
-- @param #AIRBOSS self
|
||||||
-- @param #number l Length of the groove in NM. Default 2.0 NM.
|
-- @param #number l Length of the groove in NM. Default 1.5 NM.
|
||||||
-- @param #number w Width of the groove in NM. Default 0.3 NM.
|
-- @param #number w Width of the groove in NM. Default 0.25 NM.
|
||||||
-- @return Core.Zone#ZONE_POLYGON_BASE Initial zone.
|
-- @return Core.Zone#ZONE_POLYGON_BASE Initial zone.
|
||||||
function AIRBOSS:_GetZoneGroove(l, w)
|
function AIRBOSS:_GetZoneGroove(l, w)
|
||||||
|
|
||||||
l=l or 2.0
|
l=l or 1.50
|
||||||
w=w or 0.3
|
w=w or 0.25
|
||||||
|
|
||||||
-- Get radial, i.e. inverse of BRC.
|
-- Get radial, i.e. inverse of BRC.
|
||||||
local fbi=self:GetRadial(1, false, false)
|
local fbi=self:GetRadial(1, false, false)
|
||||||
@ -11240,7 +11352,7 @@ function AIRBOSS:_Debrief(playerData)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Time in the groove. Only Case I/II and not pattern WO.
|
-- Time in the groove. Only Case I/II and not pattern WO.
|
||||||
if playerData.Tgroove and playerData.Tgroove<=60 and playerData.case<3 then
|
if playerData.Tgroove and playerData.Tgroove<=360 and playerData.case<3 then
|
||||||
text=text..string.format("\nTime in the groove %d seconds: %s", playerData.Tgroove, self:_EvalGrooveTime(playerData))
|
text=text..string.format("\nTime in the groove %d seconds: %s", playerData.Tgroove, self:_EvalGrooveTime(playerData))
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -12906,6 +13018,21 @@ function AIRBOSS:MessageToPlayer(playerData, message, sender, receiver, duration
|
|||||||
-- User sound of board number.
|
-- User sound of board number.
|
||||||
local wait=self:_Number2Sound(playerData, sender, receiver)
|
local wait=self:_Number2Sound(playerData, sender, receiver)
|
||||||
|
|
||||||
|
-- Negative response.
|
||||||
|
if string.find(text, "negative") then
|
||||||
|
local filename=self:_RadioFilename(self.MarshalCall.NEGATIVE)
|
||||||
|
USERSOUND:New(filename):ToGroup(playerData.group, wait)
|
||||||
|
wait=wait+self.MarshalCall.NEGATIVE.duration
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Positive response.
|
||||||
|
if string.find(text, "affirm") then
|
||||||
|
local filename=self:_RadioFilename(self.MarshalCall.AFFIRMATIVE)
|
||||||
|
USERSOUND:New(filename):ToGroup(playerData.group, wait)
|
||||||
|
wait=wait+self.MarshalCall.NEGATIVE.duration
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Play click sound to end message.
|
-- Play click sound to end message.
|
||||||
local filename=self:_RadioFilename(self.MarshalCall.CLICK)
|
local filename=self:_RadioFilename(self.MarshalCall.CLICK)
|
||||||
USERSOUND:New(filename):ToGroup(playerData.group, wait)
|
USERSOUND:New(filename):ToGroup(playerData.group, wait)
|
||||||
@ -13012,7 +13139,7 @@ function AIRBOSS:_GetRadioSender(radio)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Try the specific marshal unit.
|
-- Try the specific marshal unit.
|
||||||
if radio.alias=="Marshal" then
|
if radio.alias=="MARSHAL" then
|
||||||
if self.radiorelayMSH then
|
if self.radiorelayMSH then
|
||||||
sender=UNIT:FindByName(self.radiorelayMSH)
|
sender=UNIT:FindByName(self.radiorelayMSH)
|
||||||
end
|
end
|
||||||
@ -13188,6 +13315,67 @@ function AIRBOSS:_Number2Radio(radio, number, delay, interval)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Inform everyone that recovery ops are stopped and deck is closed.
|
||||||
|
-- @param #AIRBOSS self
|
||||||
|
-- @param #string modex Tail number.
|
||||||
|
-- @param #string nickname Aircraft nickname.
|
||||||
|
-- @param #number fuelstate Aircraft fuel state in thouthands of pounds.
|
||||||
|
function AIRBOSS:_LSOCallAircraftBall(modex, nickname, fuelstate)
|
||||||
|
|
||||||
|
-- Pilot: "405, Hornet Ball, 3.2"
|
||||||
|
local text=string.format("%s Ball, %.1f.", nickname, fuelstate)
|
||||||
|
|
||||||
|
-- Debug message.
|
||||||
|
self:I(self.lid..text)
|
||||||
|
|
||||||
|
-- Nickname UPPERCASE.
|
||||||
|
local NICKNAME=nickname:upper()
|
||||||
|
|
||||||
|
-- Fuel state.
|
||||||
|
--local FS=UTILS.Split(tostring(UTILS.Round(fuelstate, 1)), ".")
|
||||||
|
local FS=UTILS.Split(string.format("%.1f", fuelstate), ".")
|
||||||
|
|
||||||
|
-- Create new call to display complete subtitle.
|
||||||
|
local call=self:_NewRadioCall(self.LSOCall[NICKNAME], modex, text, self.Tmessage, nil, modex)
|
||||||
|
|
||||||
|
-- Hornet ..
|
||||||
|
self:RadioTransmission(self.LSORadio, call)
|
||||||
|
-- Ball,
|
||||||
|
self:RadioTransmission(self.LSORadio, self.LSOCall.BALL)
|
||||||
|
-- X..
|
||||||
|
self:_Number2Radio(self.LSORadio, FS[1])
|
||||||
|
-- Point..
|
||||||
|
self:RadioTransmission(self.LSORadio, self.MarshalCall.POINT)
|
||||||
|
-- Y.
|
||||||
|
self:_Number2Radio(self.LSORadio, FS[2])
|
||||||
|
|
||||||
|
-- CLICK!
|
||||||
|
self:RadioTransmission(self.LSORadio, self.LSOCall.CLICK)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Inform everyone that recovery ops are stopped and deck is closed.
|
||||||
|
-- @param #AIRBOSS self
|
||||||
|
-- @param #number case Recovery case.
|
||||||
|
function AIRBOSS:_MarshalCallRecoveryStopped(case)
|
||||||
|
|
||||||
|
-- Subtitle.
|
||||||
|
local text=string.format("Case %d recovery ops are stopped. Deck is closed.", case)
|
||||||
|
|
||||||
|
-- Create new call to display complete subtitle.
|
||||||
|
local call=self:_NewRadioCall(self.MarshalCall.CASE, "AIRBOSS", text, self.Tmessage, "99")
|
||||||
|
|
||||||
|
-- 99, Case..
|
||||||
|
self:RadioTransmission(self.MarshalRadio, call)
|
||||||
|
-- X.
|
||||||
|
self:_Number2Radio(self.MarshalRadio, tostring(case))
|
||||||
|
-- recovery ops are stopped.
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.RECOVERYOPSSTOPPED, nil, nil, 0.2)
|
||||||
|
-- Deck is closed. Click!
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.DECKCLOSED, nil, nil, nil, true)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
--- Inform everyone that recovery is paused and will resume at a certain time.
|
--- Inform everyone that recovery is paused and will resume at a certain time.
|
||||||
-- @param #AIRBOSS self
|
-- @param #AIRBOSS self
|
||||||
function AIRBOSS:_MarshalCallRecoveryPausedUntilFurtherNotice()
|
function AIRBOSS:_MarshalCallRecoveryPausedUntilFurtherNotice()
|
||||||
@ -13213,18 +13401,18 @@ 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)
|
||||||
|
|
||||||
-- Create new call with full subtitle.
|
-- Create new call with full subtitle.
|
||||||
local call=self:_NewRadioCall(self.MarshalCall.RECOVERYPAUSEDRESUMEDAT, "AIRBOSS", text, self.Tmessage, "99")
|
local call=self:_NewRadioCall(self.MarshalCall.RECOVERYPAUSEDRESUMED, "AIRBOSS", text, self.Tmessage, "99")
|
||||||
|
|
||||||
-- 99, aircraft recovery is paused and will resume at...
|
-- 99, aircraft recovery is paused and will resume at...
|
||||||
self:RadioTransmission(self.MarshalRadio, call)
|
self:RadioTransmission(self.MarshalRadio, call)
|
||||||
|
|
||||||
-- XY.. (hours)
|
-- XY.. (hours)
|
||||||
self:_Number2Radio(self.MarshalRadio, CT[1])
|
self:_Number2Radio(self.MarshalRadio, CT[1])
|
||||||
-- XY (minutes).
|
-- XY (minutes)..
|
||||||
self:_Number2Radio(self.MarshalRadio, CT[2])
|
self:_Number2Radio(self.MarshalRadio, CT[2])
|
||||||
|
-- hours. Click!
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.HOURS, nil, nil, nil, true)
|
||||||
|
|
||||||
-- Click!
|
|
||||||
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.CLICK)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -13235,10 +13423,10 @@ end
|
|||||||
function AIRBOSS:_MarshalCallClearedForRecovery(modex, case)
|
function AIRBOSS:_MarshalCallClearedForRecovery(modex, case)
|
||||||
|
|
||||||
-- Subtitle.
|
-- Subtitle.
|
||||||
local text=string.format("you're cleared for Case %d recovery", case)
|
local text=string.format("you're cleared for Case %d recovery.", case)
|
||||||
|
|
||||||
-- Create new call with full subtitle.
|
-- Create new call with full subtitle.
|
||||||
local call=self:_NewRadioCall(self.MarshalCall.CLEAREDFORCASE, "MARSHAL", text, self.Tmessage, modex)
|
local call=self:_NewRadioCall(self.MarshalCall.CLEAREDFORRECOVERY, "MARSHAL", text, self.Tmessage, modex)
|
||||||
|
|
||||||
-- Two second delay.
|
-- Two second delay.
|
||||||
local delay=2
|
local delay=2
|
||||||
@ -13270,7 +13458,7 @@ end
|
|||||||
function AIRBOSS:_MarshalCallNewFinalBearing(FB)
|
function AIRBOSS:_MarshalCallNewFinalBearing(FB)
|
||||||
|
|
||||||
-- Subtitle.
|
-- Subtitle.
|
||||||
local text=string.format("new final bearing %03d°", FB)
|
local text=string.format("new final bearing %03d°.", FB)
|
||||||
|
|
||||||
-- 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")
|
||||||
@ -13290,7 +13478,7 @@ end
|
|||||||
function AIRBOSS:_MarshalCallCarrierTurnTo(hdg)
|
function AIRBOSS:_MarshalCallCarrierTurnTo(hdg)
|
||||||
|
|
||||||
-- Subtitle.
|
-- Subtitle.
|
||||||
local text=string.format("starting turn to heading %03d°", hdg)
|
local text=string.format("starting turn to heading %03d°.", hdg)
|
||||||
|
|
||||||
-- 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")
|
||||||
@ -13415,6 +13603,9 @@ function AIRBOSS:_MarshalCallArrived(modex, case, brc, altitude, charlie, qfe)
|
|||||||
self:_Number2Radio(self.MarshalRadio, CT[1])
|
self:_Number2Radio(self.MarshalRadio, CT[1])
|
||||||
-- XY (minutes).
|
-- XY (minutes).
|
||||||
self:_Number2Radio(self.MarshalRadio, CT[2])
|
self:_Number2Radio(self.MarshalRadio, CT[2])
|
||||||
|
-- hours.
|
||||||
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.HOURS)
|
||||||
|
|
||||||
|
|
||||||
-- Altimeter..
|
-- Altimeter..
|
||||||
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.ALTIMETER, nil, nil, 0.5)
|
self:RadioTransmission(self.MarshalRadio, self.MarshalCall.ALTIMETER, nil, nil, 0.5)
|
||||||
@ -13619,25 +13810,25 @@ function AIRBOSS:_RequestMarshal(_unitName)
|
|||||||
if self:_InQueue(self.Qmarshal, playerData.group) then
|
if self:_InQueue(self.Qmarshal, playerData.group) then
|
||||||
|
|
||||||
-- Flight group is already in marhal queue.
|
-- Flight group is already in marhal queue.
|
||||||
local text=string.format("you are already in the Marshal queue. New marshal request denied!")
|
local text=string.format("negative, you are already in the Marshal queue. New marshal request denied!")
|
||||||
self:MessageToPlayer(playerData, text, "MARSHAL")
|
self:MessageToPlayer(playerData, text, "MARSHAL")
|
||||||
|
|
||||||
elseif self:_InQueue(self.Qpattern, playerData.group) then
|
elseif self:_InQueue(self.Qpattern, playerData.group) then
|
||||||
|
|
||||||
-- Flight group is already in pattern queue.
|
-- Flight group is already in pattern queue.
|
||||||
local text=string.format("you are already in the Pattern queue. Marshal request denied!")
|
local text=string.format("negative, you are already in the Pattern queue. Marshal request denied!")
|
||||||
self:MessageToPlayer(playerData, text, "MARSHAL")
|
self:MessageToPlayer(playerData, text, "MARSHAL")
|
||||||
|
|
||||||
elseif self:_InQueue(self.Qwaiting, playerData.group) then
|
elseif self:_InQueue(self.Qwaiting, playerData.group) then
|
||||||
|
|
||||||
-- Flight group is already in pattern queue.
|
-- Flight group is already in pattern queue.
|
||||||
local text=string.format("you are in the Waiting queue with %d flights ahead of you. Marshal request denied!", #self.Qwaiting)
|
local text=string.format("negative, you are in the Waiting queue with %d flights ahead of you. Marshal request denied!", #self.Qwaiting)
|
||||||
self:MessageToPlayer(playerData, text, "MARSHAL")
|
self:MessageToPlayer(playerData, text, "MARSHAL")
|
||||||
|
|
||||||
elseif not _unit:InAir() then
|
elseif not _unit:InAir() then
|
||||||
|
|
||||||
-- Flight group is already in pattern queue.
|
-- Flight group is already in pattern queue.
|
||||||
local text=string.format("you are not airborne. Marshal request denied!")
|
local text=string.format("negative, you are not airborne. Marshal request denied!")
|
||||||
self:MessageToPlayer(playerData, text, "MARSHAL")
|
self:MessageToPlayer(playerData, text, "MARSHAL")
|
||||||
|
|
||||||
elseif playerData.name~=playerData.seclead then
|
elseif playerData.name~=playerData.seclead then
|
||||||
@ -13669,7 +13860,7 @@ function AIRBOSS:_RequestMarshal(_unitName)
|
|||||||
else
|
else
|
||||||
|
|
||||||
-- Flight group is not in CCA yet.
|
-- Flight group is not in CCA yet.
|
||||||
local text=string.format("you are not inside CCA. Marshal request denied!")
|
local text=string.format("negative, you are not inside CCA. Marshal request denied!")
|
||||||
self:MessageToPlayer(playerData, text, "MARSHAL")
|
self:MessageToPlayer(playerData, text, "MARSHAL")
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -13698,10 +13889,16 @@ function AIRBOSS:_RequestEmergency(_unitName)
|
|||||||
-- Mission designer did not allow emergency landing.
|
-- Mission designer did not allow emergency landing.
|
||||||
text="negative, no emergency landings on my carrier. We are currently busy. See how you get along!"
|
text="negative, no emergency landings on my carrier. We are currently busy. See how you get along!"
|
||||||
|
|
||||||
|
elseif not _unit:InAir() then
|
||||||
|
|
||||||
|
-- Flight group is not in air
|
||||||
|
local text=string.format("negative, you are not airborne. Request denied!")
|
||||||
|
self:MessageToPlayer(playerData, text, "MARSHAL")
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
-- Cleared.
|
-- Cleared.
|
||||||
text="roger, you can bypass the pattern and are cleared for final approach!"
|
text="affirmative, you can bypass the pattern and are cleared for final approach!"
|
||||||
|
|
||||||
-- Now, if player is in the marshal or waiting queue he will be removed. But the new leader should stay in or not.
|
-- Now, if player is in the marshal or waiting queue he will be removed. But the new leader should stay in or not.
|
||||||
local lead=self:_GetFlightLead(playerData)
|
local lead=self:_GetFlightLead(playerData)
|
||||||
@ -14308,7 +14505,7 @@ function AIRBOSS:_DisplayPlayerGrades(_unitName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Time in the groove if any.
|
-- Time in the groove if any.
|
||||||
if grade.Tgroove and grade.Tgroove<=120 then
|
if grade.Tgroove and grade.Tgroove<=360 then
|
||||||
text=text..string.format(" Tgroove=%.1f s", grade.Tgroove)
|
text=text..string.format(" Tgroove=%.1f s", grade.Tgroove)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -15182,7 +15379,7 @@ function AIRBOSS:onafterSave(From, Event, To, path, filename)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local Tgroove="n/a"
|
local Tgroove="n/a"
|
||||||
if grade.Tgroove and grade.Tgroove<=120 and grade.case<3 then
|
if grade.Tgroove and grade.Tgroove<=360 and grade.case<3 then
|
||||||
Tgroove=tostring(UTILS.Round(grade.Tgroove, 1))
|
Tgroove=tostring(UTILS.Round(grade.Tgroove, 1))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user